Commit 22e70ecb by Joey

feat(@rbc/runner-bill-form): 单据加载时报错直接关掉页签

parent a68abdd4
...@@ -33,7 +33,8 @@ export default { ...@@ -33,7 +33,8 @@ export default {
templateName: "", templateName: "",
init:true, init:true,
curTagId: null, curTagId: null,
hideButtonGroup:false hideButtonGroup:false,
forceClose: false,
}; };
}, },
created() { created() {
...@@ -71,7 +72,7 @@ export default { ...@@ -71,7 +72,7 @@ export default {
}); });
}, },
checkBillChange(cb, id) { checkBillChange(cb, id) {
if (id != this.curTagId) { if (id != this.curTagId || this.forceClose) {
cb(true) cb(true)
return return
} }
...@@ -93,7 +94,15 @@ export default { ...@@ -93,7 +94,15 @@ export default {
}); });
} }
}, },
loadFinishFun(bill) { loadFinishFun(bill, err) {
if (!GMS.oldBillDataMap) GMS.oldBillDataMap = {}
if (err) {
setTimeout(() => {
this.forceClose = true
GMS.$hideContainer.$portalAPI.emit('entry-tag-close', nros.getCurrTag())
}, 0);
return
}
this.curBill = bill; this.curBill = bill;
const billState = bill.getMasterData().getValue('billState') const billState = bill.getMasterData().getValue('billState')
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑 let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
...@@ -106,7 +115,6 @@ export default { ...@@ -106,7 +115,6 @@ export default {
} }
setTimeout(() => { setTimeout(() => {
GMS.oldBillData = bill.getBuillData(); GMS.oldBillData = bill.getBuillData();
if (!GMS.oldBillDataMap) GMS.oldBillDataMap = {}
GMS.oldBillDataMap[this.curTagId] = bill.getBuillData() GMS.oldBillDataMap[this.curTagId] = bill.getBuillData()
}, 100); }, 100);
}, },
......
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