From aa8b11ad3d6db5f17a9d469be24737abae6bc31a Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 8 Apr 2024 11:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94oa=E5=8E=BB=E6=8E=89=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=E7=9B=B8=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract/components/detailContract.vue | 1070 ++++++++--------- .../contract/components/editorContract.vue | 42 +- 2 files changed, 553 insertions(+), 559 deletions(-) diff --git a/src/views/contract/components/detailContract.vue b/src/views/contract/components/detailContract.vue index 425e33d..3a919a7 100644 --- a/src/views/contract/components/detailContract.vue +++ b/src/views/contract/components/detailContract.vue @@ -1,537 +1,535 @@ - - - - - diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue index 007b106..fc0d2d4 100644 --- a/src/views/contract/components/editorContract.vue +++ b/src/views/contract/components/editorContract.vue @@ -496,31 +496,21 @@ ['qingshi',17], ['zhaobiaowenjianshencha',27] ]) + const flow2contractField = new Map([ + ['caigou',"purchase_status"], + ['hetonghuiqian',"join_status"], + ['qingshi',"req_status"], + ['zhaobiaowenjianshencha',"invite_status"] + ]) if (!this.oatoken) { this.oatoken = (await getOatoken()).oatoken; } - - const res = await httpCurl({ - oatoken: this.oatoken, - table, - keyword: this.detail.name - },true,'','get',`${process.env.VUE_APP_OUT_URL}/api/flow-list`) - - if (res.data.flow.data.length > 0) { - const oaFlow = res.data.flow.data[0] - console.log('oaFlow',oaFlow) - updateContract({ - out_contract_id: this.contrantId, - flow_type: flow_type.get(table), - status: oaFlow.status, - flow_id: this.oaFlow[table] - }) - } else { - this.$message({ - type: 'warning', - message: '内控系统未找到相应流程' - }) - } + updateContract({ + out_contract_id: this.contrantId, + flow_type: flow_type.get(table), + status: (this.detail[flow2contractField.get(table)] - 2), + flow_id: this.oaFlow[table] + }) }, //预算计划金额输入 planInput(e, row) { @@ -689,8 +679,14 @@ }, editor() { + const flow2contractField = new Map([ + ['caigou',"purchase_status"], + ['hetonghuiqian',"join_status"], + ['qingshi',"req_status"], + ['zhaobiaowenjianshencha',"invite_status"] + ]) for (let key in this.oaFlow) { - if (this.oaFlow[key]) { + if (this.oaFlow[key] && this.detail[flow2contractField.get(key)] && this.detail[flow2contractField.get(key)] !== 1) { this.getOaFlow(key).then(res => { }) }