Commit dd118328 by qiaoyanqi

Merge branch 'develop' of http://nvwa.jiuqi.com.cn/gitlab/GFP/RBC/rbc-frontend…

Merge branch 'develop' of http://nvwa.jiuqi.com.cn/gitlab/GFP/RBC/rbc-frontend into develop-qiaoyanqi

# Conflicts:
#	develop/@gms/gms-plugin-billexpand/src/actions/saveAction.js
parents b02fe999 75370c16
...@@ -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("提交失败");
......
...@@ -47,6 +47,14 @@ export default { ...@@ -47,6 +47,14 @@ export default {
this.templateName = newVal; this.templateName = newVal;
}, },
}, },
state: {
handler() {
this.init = false
this.$nextTick(() => {
this.init = true
})
}
}
}, },
methods: { methods: {
changeData(billId) { changeData(billId) {
...@@ -57,6 +65,11 @@ export default { ...@@ -57,6 +65,11 @@ export default {
}); });
}, },
loadFinishFun(bill) { loadFinishFun(bill) {
console.log('billState', bill.getMasterData().getValue('billState'))
const workflowState = bill.getMasterData().getValue('billState')
if ([90,92].includes(workflowState)) {
this.state = 'readOnly'
}
let that = this; let that = this;
setTimeout(() => { setTimeout(() => {
that.billClass = bill; that.billClass = bill;
...@@ -129,6 +142,13 @@ export default { ...@@ -129,6 +142,13 @@ export default {
this.init = true; this.init = true;
}); });
}); });
GMS.vbus.$on("workflow-state-change", (val) => {
console.log('refresh', val)
this.init = false;
this.$nextTick(() => {
this.init = true;
})
})
GMS.vbus.$on("submitSuccess", (res, param) => { GMS.vbus.$on("submitSuccess", (res, param) => {
GMS.vbus.$emit("custom-query-refresh"); GMS.vbus.$emit("custom-query-refresh");
GMS.vbus.$emit("tab-count-refresh"); GMS.vbus.$emit("tab-count-refresh");
...@@ -155,6 +175,7 @@ export default { ...@@ -155,6 +175,7 @@ export default {
GMS.vbus.$off("saveSuccess"); GMS.vbus.$off("saveSuccess");
GMS.vbus.$off("submitSuccess"); GMS.vbus.$off("submitSuccess");
GMS.vbus.$off("change-form-state"); GMS.vbus.$off("change-form-state");
GMS.vbus.$off("workflow-state-change")
}, },
}; };
</script> </script>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<!-- </div> --> <!-- </div> -->
</el-popover> </el-popover>
<!-- 弹框 --> <!-- 弹框 -->
<EditModal v-if="showModal" v-model="showModal" :title="title" :selection="selection" :table-name="tableName" :multiple="multiple" :tableKey="tableKey" :treeKey="treeKey" :tableColumns="tableColumns" :searchPlaceholder="searchPlaceholder" :authType="authType" :versionDate="versionDate" :modalWidth="modalWidth" :isLeaf="isLeaf" :hideSelected="hideSelected" :structtype="structtype" :groupTableName="groupTableName" :treeTableName="treeTableName" :filterFormular="filterFormular" :filterFormularSP="filterFormularSP" :billdefineName="billdefineName" :billId="billId" :bill="bill" :isFilter="isFilter" :rowIndex="rowIndex" @on-ok="onSelectOk" /> <EditModal v-model="showModal" :title="title" :selection="selection" :table-name="tableName" :multiple="multiple" :tableKey="tableKey" :treeKey="treeKey" :tableColumns="tableColumns" :searchPlaceholder="searchPlaceholder" :authType="authType" :versionDate="versionDate" :modalWidth="modalWidth" :isLeaf="isLeaf" :hideSelected="hideSelected" :structtype="structtype" :groupTableName="groupTableName" :treeTableName="treeTableName" :filterFormular="filterFormular" :filterFormularSP="filterFormularSP" :billdefineName="billdefineName" :billId="billId" :bill="bill" :isFilter="isFilter" :rowIndex="rowIndex" @on-ok="onSelectOk" />
</div> </div>
</template> </template>
<script> <script>
...@@ -136,6 +136,7 @@ export default { ...@@ -136,6 +136,7 @@ export default {
this.selection[0] = this.value this.selection[0] = this.value
this.showModal = true this.showModal = true
} }
this.dataListShow = false
} }
}, },
// 下拉列表 // 下拉列表
...@@ -398,6 +399,8 @@ export default { ...@@ -398,6 +399,8 @@ export default {
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
list-style: none; list-style: none;
max-height: 250px;
overflow: auto;
} }
.acct-search-list .acct-search-item { .acct-search-list .acct-search-item {
......
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
bottom: '' bottom: ''
}, },
btnGroup: [], btnGroup: [],
workflowState: 0
} }
}, },
watch: { watch: {
...@@ -53,8 +54,17 @@ export default { ...@@ -53,8 +54,17 @@ export default {
[location]: '0px', [location]: '0px',
} }
} }
// 监听工作流状态改变
GMS.vbus.$on("workflow-state-change", this.handleWorkflowStateChange)
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change", this.handleWorkflowStateChange);
}, },
methods: { methods: {
handleWorkflowStateChange(val) {
this.workflowState = val
this.getBtnGroup()
},
checkParent() { checkParent() {
let curNode = this.$refs.btnGroup let curNode = this.$refs.btnGroup
while (curNode) { while (curNode) {
...@@ -101,7 +111,12 @@ export default { ...@@ -101,7 +111,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 +130,10 @@ export default { ...@@ -115,6 +130,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') || getBillState()
case 92:
return disableState.includes('92')
case 1: case 1:
return disableState.includes('1') || getBillState() return disableState.includes('1') || getBillState()
default: default:
......
...@@ -167,6 +167,7 @@ export default { ...@@ -167,6 +167,7 @@ export default {
}).then((res) => { }).then((res) => {
res = res || [] res = res || []
let count = 0 let count = 0
this.data = res[0]
for (let o of res) { for (let o of res) {
if (o.procState == 1) { if (o.procState == 1) {
this.data = o this.data = o
......
...@@ -1207,7 +1207,6 @@ export default { ...@@ -1207,7 +1207,6 @@ export default {
"description": "", "description": "",
"title": "缓存单据数据[cacheSaveAction]", "title": "缓存单据数据[cacheSaveAction]",
"value": "cacheSaveAction", "value": "cacheSaveAction",
"btnDisable": "billReadOnly;90;91;92"
}, },
{ {
"discard": false, "discard": false,
...@@ -1224,9 +1223,9 @@ export default { ...@@ -1224,9 +1223,9 @@ export default {
] ]
}, },
"description": "", "description": "",
"title": "保存(报销单)[cacheSaveAction]", "title": "保存(报销单)[saveActionBXD]",
"value": "saveActionBXD", "value": "saveActionBXD",
"btnDisable": "billReadOnly;90;91;92" "btnDisable": "billReadOnly;90;92"
}, },
{ {
"discard": false, "discard": false,
...@@ -1368,7 +1367,7 @@ export default { ...@@ -1368,7 +1367,7 @@ export default {
"description": "", "description": "",
"title": "财务_保存[CW_saveAction]", "title": "财务_保存[CW_saveAction]",
"value": "CW_saveAction", "value": "CW_saveAction",
"btnDisable": "billReadOnly;90;91;92" "btnDisable": "billReadOnly;90;92"
}, },
{ {
"discard": false, "discard": false,
...@@ -1467,18 +1466,18 @@ export default { ...@@ -1467,18 +1466,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;92"
}, },
{ {
"discard": false, "discard": false,
......
...@@ -56,8 +56,16 @@ export default { ...@@ -56,8 +56,16 @@ export default {
// this.type = 'load' // this.type = 'load'
}); });
}); });
GMS.vbus.$on("workflow-state-change", (val) => {
console.log('refresh', val)
this.init = false;
this.$nextTick(() => {
this.init = true;
})
})
}, },
beforeDestroy() { beforeDestroy() {
GMS.vbus.$off("workflow-state-change")
GMS.vbus.$off("change-form-state"); GMS.vbus.$off("change-form-state");
this.$portalAPI.off('on-close-tag', this.checkBillChange) this.$portalAPI.off('on-close-tag', this.checkBillChange)
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "nvwa", "name": "nvwa",
"index": { "index": {
"name": "@gms/gms-entry", "name": "@gms/gms-entry",
"version": "latest" "version": "0.2.90-rbc"
}, },
"login": { "login": {
"name": "@rbc/rbc-login", "name": "@rbc/rbc-login",
......
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