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
+
+
-
-
+
@@ -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 (
+