From 6880fda27d9fbe5d251640dde494a2a731595f4c Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 1 Sep 2023 15:49:57 +0800 Subject: [PATCH] 2023-9-1 --- src/views/contract/components/oaFiles.vue | 152 ++++++++++++++++++++++ src/views/contract/contractList.vue | 101 +++++++++++++- 2 files changed, 250 insertions(+), 3 deletions(-) create mode 100644 src/views/contract/components/oaFiles.vue diff --git a/src/views/contract/components/oaFiles.vue b/src/views/contract/components/oaFiles.vue new file mode 100644 index 0000000..d3b978f --- /dev/null +++ b/src/views/contract/components/oaFiles.vue @@ -0,0 +1,152 @@ + + + + + + {{ itemTitle(item) }} + + + {{ + file.name + }} + + + + + + + + + + + + + + + + + + diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index bd3a3a8..d3353f3 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -470,6 +470,17 @@ + + 流程附件 + + + @@ -1064,6 +1077,7 @@ import paymentRegistration from "./components/paymentRegistration"; import contractSign from "@/views/contract/components/contractSign"; import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration"; import biddingUpload from "./components/biddingUpload.vue"; +import oaFiles from './components/oaFiles.vue'; let iframe; export default { components: { @@ -1073,6 +1087,7 @@ export default { contractSign, contractPaymentRegistration, biddingUpload, + oaFiles }, data() { var planPass = (rule, value, callback) => { @@ -1317,6 +1332,39 @@ export default { break; } }, + customFn:row => { + const getDate = (value) => { + if (row.is_substitute) { + return "无"; + } + if (row.is_plan === 1) { + return "无"; + } + switch (value) { + case 1: + return "待申请"; + break; + case 2: + return "流转中"; + break; + case 3: + return "已办结"; + break; + default: + return "异常"; + break; + } + } + return ( + + { getDate(row.purchase_status) } + + { + (row.purchase_status === 1 || row.is_substitute || row.is_plan === 1) ? '' : 查看 + } + + ) + } }, { label: "采购业务审批流程", @@ -1365,7 +1413,9 @@ export default { { getDate(row.purchase_status) } - 查看 + { + (row.purchase_status === 1 || row.is_substitute || row.is_simple) ? '' : this.toOaDetail('caigou',row)}}>查看 + } ) } @@ -1423,7 +1473,9 @@ export default { { getDate(row.invite_status) } - 查看 + { + (row.is_substitute || row.is_simple || row.purchase_way?.remark === "false" || row.invite_status === 1) ? '' : this.toOaDetail('pay',row)}}>查看 + } ) } @@ -1475,7 +1527,9 @@ export default { { getDate(row.join_status) } - 查看 + { + (row.is_simple || row.join_status === 1) ? '' : this.toOaDetail('hetong',row)}}>查看 + } ) } @@ -1919,6 +1973,42 @@ export default { }; }, methods: { + async toOaDetail (tbname,row) { + let res; + switch (tbname) { + case 'hetong': + res = await httpCurl({ + tbname, + out_contract_id: row.id + }) + break; + case 'caigou': + res = await httpCurl({ + tbname, + out_caigou_id: row.id + }) + break; + case 'pay': + res = await httpCurl({ + tbname, + out_pay_id: row.id + }) + break; + } + console.log(res) + if (res && res.flow?.id) { + window.open( + `http://hjjc-szemcold-test.ali251.langye.net/index.php?s=/flow/edit/id/${res.flow.id}`, + "bidding", + `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` + ) + } else { + this.$message({ + type: 'warning', + message: '未查找到该流程' + }) + } + }, reset () { this.select = deepCopy(this.selectCopy) }, @@ -2758,4 +2848,9 @@ export default { } } } + +a:hover { + transition: all .2s; + text-decoration: underline; +}