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 {
}
if (bill) {
bill.setControlsSate(param["_control_name_"], 'enable', false)
// GMS.$hideContainer.$Spin.show();
bill.executeServerAction(postData, function (code, data) {
bill.setControlsSate(param["_control_name_"], 'enable', true)
if (code === 200) {
// GMS.$hideContainer.$Spin.hide();
const id = data.content.billData.id
// GMS.vbus.$emit('change-form-state', { state: 'readOnly', billId: id})
GMS.$hideContainer.$Message.success('提交成功');
if (
window.osConfig.appOpenMode &&
window.osConfig.appOpenMode == "apploader"
) {
GMS.$hideContainer.$portalAPI.emit('nros-tag-close')
GMS.$hideContainer.$portalAPI.emit(
"open-new-page", //打开一个新的页签
getUUID(),
"runner-bill-form",
{
templateName: param.param.viewName,
id,
state:'readOnly'
},
{
openWay: "FUNCTAB",
title: "单据详情",
}
);
}
else {
Bridge.vm.modal_visible = false
GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
c.templateName = param.param.viewName;
c.billId = id;
c.init = true;
c.modal_visible = true;
c.isReadOnly = true
})
}
GMS.vbus.$emit("workflow-state-change", 90)
// if (
// window.osConfig.appOpenMode &&
// window.osConfig.appOpenMode == "apploader"
// ) {
// GMS.$hideContainer.$portalAPI.emit('nros-tag-close')
// GMS.$hideContainer.$portalAPI.emit(
// "open-new-page", //打开一个新的页签
// getUUID(),
// "runner-bill-form",
// {
// templateName: param.param.viewName,
// id,
// state:'readOnly'
// },
// {
// openWay: "FUNCTAB",
// title: "单据详情",
// }
// );
// }
// else {
// Bridge.vm.modal_visible = false
// GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
// c.templateName = param.param.viewName;
// c.billId = id;
// c.init = true;
// c.modal_visible = true;
// c.isReadOnly = true
// })
// }
} else if (code === 201) {
GMS.$hideContainer.$Spin.hide();
GMS.$hideContainer.$Message.error("提交失败");
......
......@@ -47,6 +47,14 @@ export default {
this.templateName = newVal;
},
},
state: {
handler() {
this.init = false
this.$nextTick(() => {
this.init = true
})
}
}
},
methods: {
changeData(billId) {
......@@ -57,6 +65,11 @@ export default {
});
},
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;
setTimeout(() => {
that.billClass = bill;
......@@ -129,6 +142,13 @@ export default {
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.$emit("custom-query-refresh");
GMS.vbus.$emit("tab-count-refresh");
......@@ -155,6 +175,7 @@ export default {
GMS.vbus.$off("saveSuccess");
GMS.vbus.$off("submitSuccess");
GMS.vbus.$off("change-form-state");
GMS.vbus.$off("workflow-state-change")
},
};
</script>
......
......@@ -19,7 +19,7 @@
<!-- </div> -->
</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>
</template>
<script>
......@@ -136,6 +136,7 @@ export default {
this.selection[0] = this.value
this.showModal = true
}
this.dataListShow = false
}
},
// 下拉列表
......@@ -398,6 +399,8 @@ export default {
box-sizing: border-box;
background-color: #fff;
list-style: none;
max-height: 250px;
overflow: auto;
}
.acct-search-list .acct-search-item {
......
......@@ -21,6 +21,7 @@ export default {
bottom: ''
},
btnGroup: [],
workflowState: 0
}
},
watch: {
......@@ -53,8 +54,17 @@ export default {
[location]: '0px',
}
}
// 监听工作流状态改变
GMS.vbus.$on("workflow-state-change", this.handleWorkflowStateChange)
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change", this.handleWorkflowStateChange);
},
methods: {
handleWorkflowStateChange(val) {
this.workflowState = val
this.getBtnGroup()
},
checkParent() {
let curNode = this.$refs.btnGroup
while (curNode) {
......@@ -101,7 +111,12 @@ export default {
},
getBillStateDisable(val) {
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(';')
const getBillState = () => {
if (this.tmpBill.state === '') {
......@@ -115,6 +130,10 @@ export default {
switch (approveState) {
case 90:
return disableState.includes('90')
case 91:
return disableState.includes('91') || getBillState()
case 92:
return disableState.includes('92')
case 1:
return disableState.includes('1') || getBillState()
default:
......
......@@ -167,6 +167,7 @@ export default {
}).then((res) => {
res = res || []
let count = 0
this.data = res[0]
for (let o of res) {
if (o.procState == 1) {
this.data = o
......
......@@ -1207,7 +1207,6 @@ export default {
"description": "",
"title": "缓存单据数据[cacheSaveAction]",
"value": "cacheSaveAction",
"btnDisable": "billReadOnly;90;91;92"
},
{
"discard": false,
......@@ -1224,9 +1223,9 @@ export default {
]
},
"description": "",
"title": "保存(报销单)[cacheSaveAction]",
"title": "保存(报销单)[saveActionBXD]",
"value": "saveActionBXD",
"btnDisable": "billReadOnly;90;91;92"
"btnDisable": "billReadOnly;90;92"
},
{
"discard": false,
......@@ -1368,7 +1367,7 @@ export default {
"description": "",
"title": "财务_保存[CW_saveAction]",
"value": "CW_saveAction",
"btnDisable": "billReadOnly;90;91;92"
"btnDisable": "billReadOnly;90;92"
},
{
"discard": false,
......@@ -1467,18 +1466,18 @@ export default {
"path": "资产/通用",
"extends": {
"param": [
{
"ref": "bill",
"type": "metaData",
"title": "成功跳转页面",
"key": "viewName"
}
// {
// "ref": "bill",
// "type": "metaData",
// "title": "成功跳转页面",
// "key": "viewName"
// }
]
},
"description": "",
"title": "财务_提交[CW_submitAction]",
"value": "CW_submitAction",
"btnDisable": "billEdit;90;1;0"
"btnDisable": "billEdit;90;92"
},
{
"discard": false,
......
......@@ -56,8 +56,16 @@ export default {
// this.type = 'load'
});
});
GMS.vbus.$on("workflow-state-change", (val) => {
console.log('refresh', val)
this.init = false;
this.$nextTick(() => {
this.init = true;
})
})
},
beforeDestroy() {
GMS.vbus.$off("workflow-state-change")
GMS.vbus.$off("change-form-state");
this.$portalAPI.off('on-close-tag', this.checkBillChange)
},
......
......@@ -2,7 +2,7 @@
"name": "nvwa",
"index": {
"name": "@gms/gms-entry",
"version": "latest"
"version": "0.2.90-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