diff --git a/.env.development b/.env.development index 82d8b38..cd59fca 100644 --- a/.env.development +++ b/.env.development @@ -9,4 +9,6 @@ VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview VUE_APP_OUT_OLD=https://cz-hjjc-test.115.langye.net/oa VUE_APP_OUT_URL=https://cz-hjjc-test.115.langye.net/oa +VUE_APP_DOWNLOAD_API='https://cz-hjjc-test.115.langye.net' + VUE_APP_MODULE_NAME=ht diff --git a/.env.production b/.env.production index 6f2d2e6..a9367c3 100644 --- a/.env.production +++ b/.env.production @@ -8,4 +8,6 @@ VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview VUE_APP_OUT_OLD = /oa VUE_APP_OUT_URL = /oa +VUE_APP_DOWNLOAD_API='http://192.167.20.118:8080' + VUE_APP_MODULE_NAME=ht diff --git a/src/api/common.js b/src/api/common.js index 792217f..c2f415f 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -29,3 +29,12 @@ export function flowStatusConfig() { noloading: true }) } + +export function downLoadFile(params) { + return request({ + url: '/api/download-file', + method: 'get', + params:params, + noloading: true + }) +} diff --git a/src/views/contract/components/biddingUpload.vue b/src/views/contract/components/biddingUpload.vue index 62d83c4..54c2f6c 100644 --- a/src/views/contract/components/biddingUpload.vue +++ b/src/views/contract/components/biddingUpload.vue @@ -31,20 +31,41 @@
单个文件不能超过50M + +
+
已上传文件:
+
+ + {{item.name}} + + 预览 + 下载 +
+
+ + + + diff --git a/src/views/contract/components/oaLink.vue b/src/views/contract/components/oaLink.vue index b910d9d..5196e11 100644 --- a/src/views/contract/components/oaLink.vue +++ b/src/views/contract/components/oaLink.vue @@ -11,9 +11,9 @@ 查询
- + @@ -304,9 +307,9 @@
-
+ @@ -698,9 +701,9 @@ this.paymentRegistrationForm.plan = this.contract.plan_link - if(this.contract.plan_link,length>0){ - this.showPlanList = this.mergePlanData(this.contract.plan_link,this.contract.plans) - } + // if(this.contract.plan_link,length>0){ + // this.showPlanList = this.mergePlanData(this.contract.plan_link,this.contract.plans) + // } console.log("this.paymentRegistrationForm.plan",this.contract.plan_link,this.showPlanList) if(this.contract.plan_link.legnth===0){ Message({ @@ -713,8 +716,9 @@ if (this.contract.borrows && this.contract.borrows.length > 0) { this.paymentRegistrationForm.applyMoney = parseFloat(this.contract.money) - parseFloat(this.contract.borrows[0].money) + parseFloat(this.contract.borrows[0].diff) - } + } + this.getBudgets(this.contract.plans?.map(i => i.pid>0?i.pid:i.id)?.toString()) const res = await getFundLog({ contract_id: this.contract.id, show_type: 1 @@ -729,7 +733,14 @@ } }) }, - + inputMoney(e, row) { + row.use_money = e + this.paymentRegistrationForm.plan.forEach(item => { + if (item.plan_id == row.id) { + item.use_money = e + } + }) + }, submit() { let data = { contract_id: this.contract.id, @@ -747,7 +758,7 @@ }; // 如果没有关联预算计划,需要选择 if(this.paymentRegistrationForm.plan.length===0){ - let contract_plan_act_links = this.$refs.editorPlanTable.getSelection() + let contract_plan_act_links = this.$refs.planTable.getSelection() console.log("contract_plan_act_links",contract_plan_act_links) if(contract_plan_act_links.length<1){ Message({ @@ -759,7 +770,7 @@ // 判断选择的预算计划金额是否不为0 let money0 = 0 contract_plan_act_links.map(i=>{ - if(parseFloat(i._inputMoney)<=0 || !i._inputMoney){ + if(parseFloat(i.use_money)<=0 || !i.use_money){ money0++ } }) @@ -774,7 +785,7 @@ return { plan_id:item.id, new_money:this.contract.money, - use_money:item._inputMoney + use_money:item.use_money } }) } @@ -833,16 +844,24 @@ return 'allSelect' } }, - async getBudgets(refresh) { - let res = await getBudget(this.planSelect); + async getBudgets(pid,search) { + if(search){ + this.$refs.planTable.clearSelection() + this.paymentRegistrationForm.plan = [] + } + + let res = await getBudget({ + top_pid: 1, + ...this.planSelect, + pid + }); this.initInputMoney(res.list.data) - this.plans = res.list.data; - - if(refresh){ - this.$refs.editorPlanTable.clearSelection() - } - this.planTotal = res.list.total; + this.plans = res.list.data; + this.planTotal = res.list.total; + this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { + return item.plan_id + })) // this.toggleSelection(this.paymentRegistrationForm.plan.map(item => { // return item.plan_id // })) @@ -859,7 +878,7 @@ planPick (selection, row) { if (row.year != new Date().getFullYear()) { this.$confirm("您选择了非本年预算,是否继续?").catch(_ => { - this.$refs['editorPlanTable'].toggleRowSelection(row) + this.$refs['planTable'].toggleRowSelection(row) }) } }, @@ -876,26 +895,62 @@ this.paymentRegistrationForm.plan = []; } }, - toggleSelection(e) { - if (!e) { - return; - } - let plans = this.paymentRegistrationForm.plan.map((item) => { - return item.plan_id; - }); - if (plans) { - this.plans - .filter((plan) => { - return plans.includes(plan.id); - }) - .map((row) => { - this.$nextTick(() => { - this.$refs["planTable"].toggleRowSelection(row); - }); - }); - } else { - this.$refs["planTable"].clearSelection(); - } + toggleSelection(plans) { + if (plans) { + console.log("this.plans",plans,this.plans,this.paymentRegistrationForm) + let arr = this.plans.filter(plan => { + if (plans.includes(plan.id)) { + plan.use_money = parseFloat(this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money) ==0 ? + this.totalApplyMoney() : this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money + return true + }else if(plans.includes(plan.pid)) { + plan.use_money = parseFloat(this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money) ==0 ? + this.totalApplyMoney() : this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money + return true + }else{ + plan.use_money = 0 + } + // plan.use_money = this.paymentRegistrationForm.applyMoney + }) + console.log("arr",arr) + arr.forEach(row => { + console.log("row",row) + this.$refs.planTable.toggleRowSelection(row) + this.paymentRegistrationForm.plan.push({ + contract_id: this.contract.id, + plan_id: row.id, + use_money: row.use_money, + new_money: row.money, + label: row.name, + plan:row + }) + }) + } else { + this.$refs.planTable.clearSelection() + } + + + + + // if (!e) { + // return; + // } + // let plans = this.paymentRegistrationForm.plan.map((item) => { + // return item.plan_id; + // }); + // if (plans) { + // this.plans + // .filter((plan) => { + // return plans.includes(plan.id); + // }) + // .map((row) => { + // this.$nextTick(() => { + // this.$refs["planTable"].toggleRowSelection(row); + // }); + // }); + // } else { + // this.$refs["planTable"].clearSelection(); + // } }, async getAssetsFlowIds() { @@ -941,7 +996,10 @@ watch: { isShowPaymentRegistration(newVal) { if (newVal) { - this.getBudgets(); + // this.getBudgets(); + }else{ + this.paymentRegistrationForm.plan = [] + this.$refs.planTable.clearSelection() } }, }, diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 36a9795..7e9a4a8 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -650,7 +650,7 @@ 签订修改 - +
@@ -784,6 +784,25 @@ + + + +
+
+ {{index+1}}、{{item.flow_title}} + 打印 +
+
+
+ @@ -850,6 +869,8 @@ export default { }, data() { return { + isShowPrintModal:false, + printList:[], isShowEdit: false, isShowOaModal: false, oaUrl: "", @@ -1313,7 +1334,32 @@ export default { width: 200, hidden: !/contractAll/g.test(this.$route.path), customFn:row => { + const flows = row.contract_flow_links.filter(i => i.custom_model_id === row.flow_mod_id); return ( + flows.length>0? + flows.map((item,index)=>{ + return ( +
+

+ + {index+1}、 + { + item.flow_title + } + + { + row.is_purchase ? "" : ([{ this.flowStatus.get(row.FLOWSTATUS.other.getStatus()) ?? '待申请' }]) + } + { + // (!row.is_purchase && row.FLOWSTATUS.other.getStatus() > 1) ? (this.toOaDetail('other',row,item.flow_id)}}>查看) : "" + (this.flowStatus.get(row.FLOWSTATUS.other.getStatus()) ?this.toOaDetail('other',row,item.flow_id)}}>查看:'') + } +

+ +
+ ) + }) + :

@@ -1326,7 +1372,8 @@ export default { }

{ - (!row.is_purchase && row.FLOWSTATUS.other.getStatus() > 1) ? (this.toOaDetail('other',row)}}>查看) : "" + // (!row.is_purchase && row.FLOWSTATUS.other.getStatus() > 1) ? (this.toOaDetail('other',row)}}>查看) : "" + }
) @@ -1766,20 +1813,39 @@ export default { }, printFlow (row) { let id; - if (row.purchase_last_flow_id) { - id = row.purchase_last_flow_id; - } else if (row.join_last_flow_id) { - id = row.join_last_flow_id - } else if (row.other_flow_id) { - id = row.other_flow_id - } else {} - if (!id) { + + // if (row.purchase_last_flow_id) { + // id = row.purchase_last_flow_id; + // } else if (row.join_last_flow_id) { + // id = row.join_last_flow_id + // } else if (row.other_flow_id) { + // id = row.other_flow_id + // } else {} + if(row.contract_flow_links.length>0){ + if(row.contract_flow_links.length===1){ + id = row.contract_flow_links[0].flow_id + window.open(`${process.env.VUE_APP_OUT_URL}/flow/print-relate-flow?id=${id}&except_self=0&auth_token=${getToken()}`,"_blank") + } + if(row.contract_flow_links.length>1){ + this.printList = row.contract_flow_links + this.isShowPrintModal = true + } + }else{ this.$message.warning("未找到流程"); return } - window.open(`${process.env.VUE_APP_OUT_URL}/flow/print-relate-flow?id=${id}&except_self=0&auth_token=${this.$store.getters.oa_token}`,"_blank") + + // if (!id) { + // this.$message.warning("未找到流程"); + // return + // } + }, + printFlowSigle(id){ + window.open(`${process.env.VUE_APP_OUT_URL}/flow/print-relate-flow?id=${id}&except_self=0&auth_token=${getToken()}`,"_blank") + }, + showIsFramework () { this.$nextTick(() => { if (this.$refs['methodInput'].selected.label === '直接发包' && this.form.use_framework_buy) { @@ -1796,7 +1862,7 @@ export default { this.oaUrl = url this.isShowOaModal = true }, - async toOaDetail (tbname,row) { + async toOaDetail (tbname,row,id) { let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=` switch (tbname) { case "caigou": @@ -1810,8 +1876,12 @@ export default { url += contract?.flow_id break; case "other": - let other = row.contract_flow_links.find(i => i.custom_model_id == row.flow_mod_id) - url += other[0]?.flow_id + if(id){ + url += id + }else{ + let other = row.contract_flow_links.find(i => i.custom_model_id == row.flow_mod_id) + url += other[0]?.flow_id + } break; default: url = `${process.env.VUE_APP_OUT_URL}/flow/list/todo` diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index d11c948..cafd7fb 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -817,6 +817,7 @@ import {listdeptNoAuth} from "@/api/system/department"; ...this.plansSelect, pid }) + if (res.list.data) { this.plans = res.list.data.map(i => ({ use_money:0, @@ -873,9 +874,6 @@ import {listdeptNoAuth} from "@/api/system/department"; } }); this.paymentRegistrationForm.plan = [..._plan, ..._select] - - - } else { this.paymentRegistrationForm.plan = [] } @@ -912,7 +910,6 @@ import {listdeptNoAuth} from "@/api/system/department"; arr.forEach(row => { console.log("row",row) this.$refs.planTable.toggleRowSelection(row) - this.paymentRegistrationForm.plan.push({ contract_id: this.contract.id, plan_id: row.id, diff --git a/src/views/preview/index.vue b/src/views/preview/index.vue index 1eb7ea0..e9f86c1 100644 --- a/src/views/preview/index.vue +++ b/src/views/preview/index.vue @@ -73,6 +73,10 @@ export default { computed: {}, created() { this.resolveUrl(this.$route.query.url) + }, + destroyed() { + this.url = '' + this.type = '' } }