From 77c1a0f0d0f56fab9f802c5ef09aea730f662f20 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Fri, 1 Aug 2025 19:01:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +
.env.production | 2 +
src/api/common.js | 9 +
.../contract/components/biddingUpload.vue | 50 +-
src/views/contract/components/oaLink.vue | 32 +-
.../components/paymentRegistration copy.vue | 1005 +++++++++++++++++
.../components/paymentRegistration.vue | 158 ++-
src/views/contract/contractList.vue | 98 +-
.../components/examineRegistration.vue | 5 +-
src/views/preview/index.vue | 4 +
10 files changed, 1279 insertions(+), 86 deletions(-)
create mode 100644 src/views/contract/components/paymentRegistration copy.vue
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
+
+
+
+
+
+
+
+
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 @@
查询
-
+
@@ -135,18 +135,18 @@
return
}
- if(flowsList.length>1){
- this.$message.warning('只能选择一条流程关联')
- return
- }
- let foreign_ids = this.joinIds(this.row.id,flowsList[0].out_contract_id)
-
- console.log("flowsList",foreign_ids)
+ // if(flowsList.length>1){
+ // this.$message.warning('只能选择一条流程关联')
+ // return
+ // }
+ // let foreign_ids = this.joinIds(this.row.id,flowsList[0].out_contract_id)
+ let flow_ids = flowsList.map(item=>item.id).join(",")
+ console.log("flowsList",flow_ids)
// return
oaSave({
foreign_field:'out_contract_id',
- foreign_id:foreign_ids,
- flow_id:flowsList[0].id
+ foreign_id:this.row.id,
+ flow_id:flow_ids
}).then(res=>{
this.$message.success('关联成功')
this.$emit('refresh')
@@ -167,11 +167,11 @@
},
handleSelectionChange(selectedRows) {
- if (selectedRows.length > 1) {
- // 只保留最新选择的项
- this.$refs.oaTable.clearSelection();
- this.$refs.oaTable.toggleRowSelection(selectedRows[selectedRows.length - 1]);
- }
+ // if (selectedRows.length > 1) {
+ // // 只保留最新选择的项
+ // this.$refs.oaTable.clearSelection();
+ // this.$refs.oaTable.toggleRowSelection(selectedRows[selectedRows.length - 1]);
+ // }
// this.$refs.oaTable.clearSelection();
// this.$refs.oaTable.toggleRowSelection(selectedRows);
}
diff --git a/src/views/contract/components/paymentRegistration copy.vue b/src/views/contract/components/paymentRegistration copy.vue
new file mode 100644
index 0000000..452dc99
--- /dev/null
+++ b/src/views/contract/components/paymentRegistration copy.vue
@@ -0,0 +1,1005 @@
+
+
+
+
+
+
+
受款单位
+
+ {{ contract.supply }}
+
+
+
+
{{ nameFormat($route.path.split('_')[1]) }}名称
+
+ {{ contract.name }}
+
+
+
+
{{ nameFormat($route.path.split('_')[1]) }}金额
+
+ {{ priceFormat(contract.money) }} (元)
+
+
+
+
+
已申请金额
+
+ {{ totalApplyMoney() }} (元)
+
+
+
+
已申请笔数
+
+ {{ payment.length }}
+
+
+
+
+
+
已付金额
+
+ {{ totalMoney() }} (元)
+
+
+
+
支付占比
+
+ {{ percentPay() }}%
+
+
+
+
已付笔数
+
+ {{ actNumsTotal() }}
+
+
+
+ 点击查看列表
+
+
+
+
+
+
+
+
+
+ 暂无已付笔数
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
借款金额
+
+ {{ priceFormat(contract.borrows[0]['money']) }} (元)
+
+
+
+
剩余还款金额
+
+ {{ priceFormat(contract.borrows[0]['diff']) }}(元)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *款项类型
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 附件 :
+
+
+
+ 选取文件
+ 开始上传
+
+ 支持文件格式:.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls
+ .xlsx
+
单个文件不能超过20M
+
+
+
+
+
+
+
+
+ {
+ planSelect.year = e
+ getBudgets(true)
+ }"
+ >
+
+
+
+
+ {
+ planSelect.type = e[e.length - 1] || '';
+ getBudgets(true);
+ }"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{findVal(planTypes,scope.row.type)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/contract/components/paymentRegistration.vue b/src/views/contract/components/paymentRegistration.vue
index 452dc99..41962fb 100644
--- a/src/views/contract/components/paymentRegistration.vue
+++ b/src/views/contract/components/paymentRegistration.vue
@@ -208,7 +208,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 (
+
+ )
+ })
+ :
)
@@ -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 = ''
}
}