Commit 408fcb95 by Joey

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

parent bc00c078
......@@ -34,10 +34,8 @@ export default {
data:obj
    }).then(res => {
        if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
let resObj = res.data.data;
resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data);
if(res.data.data){//展示凭证
GMS.vbus.$emit('previewVoucherTY',res.data.data);
}else{
context.dom.$Modal.warning({
title: '信息提示',
......
......@@ -32,6 +32,16 @@
"titleColumn": "title",
"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 {
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.searchAllQueryAsync();
},
beforeDestroy() {
window.GMS.vbus.$off("previewVoucher");
window.GMS.vbus.$off("previewVoucherTY");
},
};
</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