From 346b90994988b232cee4bcd7924769a5a5a37dc8 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 18 Apr 2023 17:31:04 +0800 Subject: [PATCH] 2023-4-18 --- src/store/modules/app.js | 1 - .../contract/components/editorContract.vue | 2 +- src/views/contract/contractList.vue | 33 ++++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 88beb88..069df3f 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -84,7 +84,6 @@ const actions = { }, clearLayout({ commit }) { commit("SET_LAYOUT",{}) - window.localStorage.removeItem('worker-layout') } }; diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue index 36cb5cd..1afac68 100644 --- a/src/views/contract/components/editorContract.vue +++ b/src/views/contract/components/editorContract.vue @@ -212,7 +212,7 @@ diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 7c20739..ef6882a 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -577,7 +577,7 @@ import detail from "./components/detailContract" import paymentRegistration from "./components/paymentRegistration"; import contractSign from "@/views/contract/components/contractSign"; import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration"; - +let iframe; export default { components: { editor, @@ -1158,7 +1158,7 @@ export default { fundingChannels: [], isBudget: true, plan: [], - is_substitute: 0, + //is_substitute: 0, is_framework: 0, use_framework_buy: 0, contract_to_contracts: [], @@ -1497,8 +1497,8 @@ export default { // setNowContract(contract,tbname) { this.nowContract = { - ...contract, - tbname + tbname, + ...contract } }, //点击付款计划查看 @@ -1556,15 +1556,17 @@ export default { }, //会签流程 async signProcess(row) { + this.setNowContract(row,'hetong') let baseInfo = { "title": row?.name, "执行部门": row?.carry_department, "total": row?.money, + "out_contract_id": row.id, //"承包商\\供应商":row.supply } // let res = await getOatoken() let url = - `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/9&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}` + `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/9&id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}` let signProcess = window.open(url, 'signProcess', `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0` ) @@ -1909,12 +1911,24 @@ export default { //页面激活后刷新合同列表 window.onfocus = async () => { if(this.nowContract?.tbname && this.nowContract?.id) { - const res = await getOutDetail({tbname:this.nowContract.tbname,out_caigou_id:this.nowContract.id}) + let select = {} + select['tbname'] = this.nowContract.tbname; + switch (this.nowContract.tbname){ + case "caigou": + select['out_caigou_id'] = this.nowContract.id; + break; + case "hetong": + select['out_contract_id'] = this.nowContract.id; + break; + } + const res = await getOutDetail(select) let flowIdMap = new Map([ - ['caigou',8] + ['caigou',8], + ['hetong',9] ]) let flowTypeMap = new Map([ - ['caigou',2] + ['caigou',2], + ['hetong',3] ]) let getStatus = (status) => { if(status === 'end') { @@ -1936,13 +1950,14 @@ export default { } }, created() { - let iframe = document.createElement('iframe'); + iframe = document.createElement('iframe'); iframe.src = `${process.env.VUE_APP_OUT_OLD}/login/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}` iframe.style.display = 'none' document.body.appendChild(iframe); }, destroyed() { window.onfocus = null + document.body.removeChild(iframe); } }