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