Commit 408fcb95 by Joey

feat: 凭证中心联查支持两种打开方式

parent bc00c078
...@@ -34,10 +34,8 @@ export default { ...@@ -34,10 +34,8 @@ export default {
data:obj data:obj
    }).then(res => {     }).then(res => {
        if (res.status === 200) {         if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证 if(res.data.data){//展示凭证
let resObj = res.data.data; GMS.vbus.$emit('previewVoucherTY',res.data.data);
resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{ }else{
context.dom.$Modal.warning({ context.dom.$Modal.warning({
title: '信息提示', title: '信息提示',
......
...@@ -32,6 +32,16 @@ ...@@ -32,6 +32,16 @@
"titleColumn": "title", "titleColumn": "title",
"valueColumn": "name" "valueColumn": "name"
} }
},
{
"title": "凭证打开方式",
"key": "voucherShowType",
"type": "array",
"dataSource": {
"api": "/mechanismVchr/configOptions",
"titleColumn": "title",
"valueColumn": "name"
}
} }
] ]
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -148,11 +148,26 @@ export default { ...@@ -148,11 +148,26 @@ export default {
this.jumpToVoucher(param.voucher.id,param.voucher.acctYear,param.previewState); this.jumpToVoucher(param.voucher.id,param.voucher.acctYear,param.previewState);
}) })
}) })
window.GMS.vbus.$on('previewVoucherTY', (param) => {
if (this.config.voucherShowType == 'modal') {
this.showVoucher = true;
this.$nextTick(() => {
let iframe0 = document.getElementById("iframe0");
if (iframe0) {
iframe0.src = param
}
})
}
else {
window.open(param, '_blank');
}
})
this.getCerSerName(); this.getCerSerName();
this.searchAllQueryAsync(); this.searchAllQueryAsync();
}, },
beforeDestroy() { beforeDestroy() {
window.GMS.vbus.$off("previewVoucher"); window.GMS.vbus.$off("previewVoucher");
window.GMS.vbus.$off("previewVoucherTY");
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment