Commit d87ac7b3 by 乔延琦

Merge branch 'develop-yuancheng' into 'develop'

Develop yuancheng

See merge request GFP/RBC/rbc-frontend!23
parents 5b95ecc8 8d3fd94d
...@@ -10,45 +10,42 @@ export default { ...@@ -10,45 +10,42 @@ export default {
} }
if (bill) { if (bill) {
bill.setControlsSate(param["_control_name_"], 'enable', false) bill.setControlsSate(param["_control_name_"], 'enable', false)
// GMS.$hideContainer.$Spin.show();
bill.executeServerAction(postData, function (code, data) { bill.executeServerAction(postData, function (code, data) {
bill.setControlsSate(param["_control_name_"], 'enable', true) bill.setControlsSate(param["_control_name_"], 'enable', true)
if (code === 200) { if (code === 200) {
// GMS.$hideContainer.$Spin.hide();
const id = data.content.billData.id const id = data.content.billData.id
// GMS.vbus.$emit('change-form-state', { state: 'readOnly', billId: id})
GMS.$hideContainer.$Message.success('提交成功'); GMS.$hideContainer.$Message.success('提交成功');
GMS.vbus.$emit("workflow-state-change", 90)
if ( // if (
window.osConfig.appOpenMode && // window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader" // window.osConfig.appOpenMode == "apploader"
) { // ) {
GMS.$hideContainer.$portalAPI.emit('nros-tag-close') // GMS.$hideContainer.$portalAPI.emit('nros-tag-close')
GMS.$hideContainer.$portalAPI.emit( // GMS.$hideContainer.$portalAPI.emit(
"open-new-page", //打开一个新的页签 // "open-new-page", //打开一个新的页签
getUUID(), // getUUID(),
"runner-bill-form", // "runner-bill-form",
{ // {
templateName: param.param.viewName, // templateName: param.param.viewName,
id, // id,
state:'readOnly' // state:'readOnly'
}, // },
{ // {
openWay: "FUNCTAB", // openWay: "FUNCTAB",
title: "单据详情", // title: "单据详情",
} // }
); // );
} // }
else { // else {
Bridge.vm.modal_visible = false // Bridge.vm.modal_visible = false
GMS.$hideContainer.addComponent(typesBill, {}, function (c) { // GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
c.templateName = param.param.viewName; // c.templateName = param.param.viewName;
c.billId = id; // c.billId = id;
c.init = true; // c.init = true;
c.modal_visible = true; // c.modal_visible = true;
c.isReadOnly = true // c.isReadOnly = true
}) // })
} // }
} else if (code === 201) { } else if (code === 201) {
GMS.$hideContainer.$Spin.hide(); GMS.$hideContainer.$Spin.hide();
GMS.$hideContainer.$Message.error("提交失败"); GMS.$hideContainer.$Message.error("提交失败");
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
loadFinishFun(bill) { loadFinishFun(bill) {
console.log('billState', bill.getMasterData().getValue('billState')) console.log('billState', bill.getMasterData().getValue('billState'))
const workflowState = bill.getMasterData().getValue('billState') const workflowState = bill.getMasterData().getValue('billState')
if ([90,91,92].includes(workflowState)) { if ([90,92].includes(workflowState)) {
this.state = 'readOnly' this.state = 'readOnly'
} }
let that = this; let that = this;
......
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
bottom: '' bottom: ''
}, },
btnGroup: [], btnGroup: [],
workflowState: 0
} }
}, },
watch: { watch: {
...@@ -53,6 +54,14 @@ export default { ...@@ -53,6 +54,14 @@ export default {
[location]: '0px', [location]: '0px',
} }
} }
// 监听工作流状态改变
GMS.vbus.$on("workflow-state-change", (val) => {
this.workflowState = val
this.getBtnGroup()
})
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change");
}, },
methods: { methods: {
checkParent() { checkParent() {
...@@ -101,7 +110,12 @@ export default { ...@@ -101,7 +110,12 @@ export default {
}, },
getBillStateDisable(val) { getBillStateDisable(val) {
if (!val) return false if (!val) return false
let approveState = this.context.bill.getMasterData().getValue('billState') let approveState = null
if (this.workflowState === 0) {
approveState = this.context.bill.getMasterData().getValue('billState')
} else {
approveState = this.workflowState
}
let disableState = val.split(';') let disableState = val.split(';')
const getBillState = () => { const getBillState = () => {
if (this.tmpBill.state === '') { if (this.tmpBill.state === '') {
...@@ -115,6 +129,10 @@ export default { ...@@ -115,6 +129,10 @@ export default {
switch (approveState) { switch (approveState) {
case 90: case 90:
return disableState.includes('90') return disableState.includes('90')
case 91:
return disableState.includes('91')
case 92:
return disableState.includes('92')
case 1: case 1:
return disableState.includes('1') || getBillState() return disableState.includes('1') || getBillState()
default: default:
......
...@@ -1212,7 +1212,6 @@ export default { ...@@ -1212,7 +1212,6 @@ export default {
"description": "", "description": "",
"title": "缓存单据数据[cacheSaveAction]", "title": "缓存单据数据[cacheSaveAction]",
"value": "cacheSaveAction", "value": "cacheSaveAction",
"btnDisable": "billReadOnly;90;91;92"
}, },
{ {
"discard": false, "discard": false,
...@@ -1229,7 +1228,7 @@ export default { ...@@ -1229,7 +1228,7 @@ export default {
] ]
}, },
"description": "", "description": "",
"title": "保存(报销单)[cacheSaveAction]", "title": "保存(报销单)[saveActionBXD]",
"value": "saveActionBXD", "value": "saveActionBXD",
"btnDisable": "billReadOnly;90;91;92" "btnDisable": "billReadOnly;90;91;92"
}, },
...@@ -1472,18 +1471,18 @@ export default { ...@@ -1472,18 +1471,18 @@ export default {
"path": "资产/通用", "path": "资产/通用",
"extends": { "extends": {
"param": [ "param": [
{ // {
"ref": "bill", // "ref": "bill",
"type": "metaData", // "type": "metaData",
"title": "成功跳转页面", // "title": "成功跳转页面",
"key": "viewName" // "key": "viewName"
} // }
] ]
}, },
"description": "", "description": "",
"title": "财务_提交[CW_submitAction]", "title": "财务_提交[CW_submitAction]",
"value": "CW_submitAction", "value": "CW_submitAction",
"btnDisable": "billEdit;90;1;0" "btnDisable": "billEdit;90;91;92"
}, },
{ {
"discard": false, "discard": false,
......
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