Commit 60d2e048 by 乔延琦

Merge branch 'develop-zhouyi' into 'develop'

feat(@gms/gms-plugin-billexpand): 路由模式下新建单据报错时关闭单据

See merge request GFP/RBC/rbc-frontend!127
parents 97a292db 3e05f0ec
...@@ -2,9 +2,10 @@ import ImageViewModal from '../../../../@rbc/invoice/src/components/image-view-m ...@@ -2,9 +2,10 @@ import ImageViewModal from '../../../../@rbc/invoice/src/components/image-view-m
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
const curbill = bill.dom || bill const curbill = bill.dom || bill
GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) { const name = GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
c.imageTableName = param.param.tableName c.imageTableName = param.param.tableName
c.bill = curbill c.bill = curbill
c.componentName = name
}) })
} }
} }
\ No newline at end of file
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
import InvoiceModal from '../components-control/invoice-modal.vue' import InvoiceModal from '../components-control/invoice-modal.vue'
export default { export default {
execute: function (bill, param) { execute: function (bill, param) {
GMS.$hideContainer.addComponent(InvoiceModal, {}, function (c) { const name = GMS.$hideContainer.addComponent(InvoiceModal, {}, function (c) {
c.bill = bill.dom c.bill = bill.dom
c.invoiceName = param.param.invoiceName c.invoiceName = param.param.invoiceName
c.componentName = name
}) })
} }
} }
\ No newline at end of file
...@@ -16,6 +16,7 @@ export default { ...@@ -16,6 +16,7 @@ export default {
modalVisible: true, modalVisible: true,
bill: null, bill: null,
invoiceName: '', invoiceName: '',
componentName: null,
} }
}, },
methods: { methods: {
...@@ -54,6 +55,7 @@ export default { ...@@ -54,6 +55,7 @@ export default {
} }
this.bill.refreshSubDataRow(subBillName) this.bill.refreshSubDataRow(subBillName)
}) })
this.componentName && GMS.$hideContainer.remove(this.componentName)
}) })
} }
......
...@@ -79,8 +79,14 @@ export default { ...@@ -79,8 +79,14 @@ export default {
this.init = true; this.init = true;
}); });
}, },
loadFinishFun(bill) { loadFinishFun(bill, err) {
console.log('billState', bill.getMasterData().getValue('billState')) if (err) {
this.$Message.error(err)
setTimeout(() => {
this.close()
}, 0);
return
}
const workflowState = bill.getMasterData().getValue('billState') const workflowState = bill.getMasterData().getValue('billState')
let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑 let readArr = this.templateName.endsWith('_A')?[92]:[90,92];//如果是审批界面话,90能编辑
if (this.state != 'readOnly' && readArr.includes(workflowState)) { if (this.state != 'readOnly' && readArr.includes(workflowState)) {
......
...@@ -8,9 +8,10 @@ export default { ...@@ -8,9 +8,10 @@ export default {
const imageId = context.selects[0][param.imageId] const imageId = context.selects[0][param.imageId]
const yearFlag = context.selects[0][param.yearFlag] const yearFlag = context.selects[0][param.yearFlag]
GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) { const name = GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
c.yearFlag = yearFlag c.yearFlag = yearFlag
c.imageId = imageId c.imageId = imageId
c.componentName = name
}) })
} }
} }
\ No newline at end of file
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
currentImgIndex: 0, currentImgIndex: 0,
imgUrlSet: new Set(), imgUrlSet: new Set(),
imageTableName: null, imageTableName: null,
componentName: null,
}; };
}, },
watch: { watch: {
...@@ -64,6 +65,7 @@ export default { ...@@ -64,6 +65,7 @@ export default {
this.bill = null this.bill = null
this.imageId = null this.imageId = null
this.yearFlags = [] this.yearFlags = []
this.componentName && GMS.$hideContainer.remove(this.componentName)
} }
}, },
imageId(id) { imageId(id) {
......
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