/* * @Description:通用/联查凭证 */ export default { execute(context, param) { if (!param.billId || !param.billDefine) { context.dom.$Message.info("请配置查询单据参数"); return; } if(context.selects.length==0){ context.dom.$Message.info("请勾择需要联查的数据"); return; } if(context.selects.length > 1){ context.dom.$Message.info("只能勾选一条数据"); return; } let that = this; let billDefine = param.billDefine.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, ""); let obj = {}; if(context.selects.length == 1){ context.selects.forEach(v=>{ obj = { id:v[param.billId], billCode:v[param.billCode], billDefine:billDefine } }) } that.showVchrAsync(obj,context); }, showVchrAsync(obj,context){ GMS.$http.post('/mechanismVchr/showVchr',obj).then(res => { if (res.status === 200) { if (res.data.data && typeof res.data.data == 'object' && res.data.data.showVoucher === false) { context.dom.$Modal.warning({ title: '信息提示', content: res.data.data.processMsg, onOk: () => {}, }); } else { GMS.vbus.$emit('previewVoucherTY',res.data.data); } } }) } }