From 3ac72d691b53ea6518a8d1bb1663e5c5777c1c86 Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 23 May 2022 10:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E5=86=9Capp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paymentApproval/approvalAdd.vue | 32 +++- .../paymentApproval/approvalAdd10.vue | 36 +--- .../paymentApproval/approvalAdd11.vue | 5 - .../paymentApproval/approvalModify12.vue | 160 ++++++++++-------- 4 files changed, 114 insertions(+), 119 deletions(-) diff --git a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue index ea95550c..d638281e 100644 --- a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue +++ b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue @@ -1080,16 +1080,40 @@ }) }, getFileList(){ - let oData= { + let oData1= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "upload", - fileType: "0", + fileType: "1", } - attachmentList(oData).then(res => { + attachmentList(oData1).then(res => { res.rows.map(r => { let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL - this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "upload", + fileType: "2", + } + attachmentList(oData2).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) + }) + }) + let oData3= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "upload", + fileType: "3", + } + attachmentList(oData3).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue index 692c47da..735d3107 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue @@ -616,7 +616,7 @@ return; } } - if(this.uploadFiles==null||this.uploadFiles.length==0){ + if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ Dialog.confirm({ title: '提示', message: '此申请单中未上传任何附件,是否确认提交?', @@ -662,7 +662,6 @@ }) }else{ addCash(this.form).then((response) => { - console.log(this.uploadFiles) this.uploadFiles1.map(rr => { const params = new FormData(); params.append("tableId", response.data.id); @@ -762,39 +761,7 @@ return; } } - if(this.uploadFiles==null||this.uploadFiles.length==0){ addCash(this.form).then((response) => { - this.chargeItme.map(res => { - res.cashId = response.data.id - addCashdetail(res).then(r => {}) - }) - if(this.form.capitalExpenditureType==2){ - this.projectForm.outId = response.data.id - this.$set(this.projectForm, "ynType", '2'); - addProjectto(this.projectForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }else if(this.form.capitalExpenditureType==4){ - this.infoForm.transferId = response.data.id - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }); - }else{ - addCash(this.form).then((response) => { - console.log(this.uploadFiles) this.uploadFiles1.map(rr => { const params = new FormData(); params.append("tableId", response.data.id); @@ -853,7 +820,6 @@ },2000) } }); - } }, payeeSelectChange(select, i) { let obj = {}; diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue index fb514b73..78815547 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue @@ -406,7 +406,6 @@ } listProject(queryParams).then(response => { _this.projectList = response.rows; - console.log(response) for (let i = 0; i < response.rows.length; i++) { //_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); _this.$set(_this.projectList[i],"text",response.rows[i].projectName) @@ -414,7 +413,6 @@ } }); listInfo(this.queryContractionParams).then(response => { - console.log(response) _this.infoList = response.rows; for (let i = 0; i < response.rows.length; i++) { //_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); @@ -547,7 +545,6 @@ this.showcapital = false; }, onConfirmFundType(data){ - console.log(data) this.projectForm.projectFundType = data.value; this.projectFundType = data.text; this.showFundType = false; @@ -781,7 +778,6 @@ total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) }); this.$set(this.form, "expenditureAmount", total); - console.log(this.form.expenditureAmount,this.form.payerAccount) if(parseFloat(this.form.payerAccount) { - console.log(this.uploadFiles) this.uploadFiles1.map(rr => { const params = new FormData(); params.append("tableId", response.data.id); diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue index 05992298..f6a3e4c9 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue @@ -740,7 +740,7 @@ this.$set(this.form, "bankTypeList", this.chargeItme); this.$set(this.form, "accountTypeList", this.chargeItme); this.$set(this.form, "transferStatusList", this.chargeItme); - if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ + if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ Dialog.confirm({ title: '提示', message: '此申请单中未上传任何附件,是否确认提交?', @@ -785,17 +785,39 @@ }) }else { updateCash(this.form).then((response) => { - console.log(this.uploadFiles) - this.uploadFiles.map(rr => { - const params = new FormData(); - params.append("tableId", this.form.id); - params.append("tableName", "t_yinnong_cash"); - params.append("bizPath", "yinnong"); - params.append("fileType", "1"); - params.append("file", rr); - commonAttach(params).then((r) => { - }) - }) + if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ + this.uploadFiles1.map(rr => { + const params = new FormData(); + params.append("tableId", this.form.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "yinnong"); + params.append("fileType", "1"); + params.append("file", rr); + commonAttach(params).then((r) => { + }) + })} + if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ + this.uploadFiles2.map(rr => { + const params = new FormData(); + params.append("tableId", this.form.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "yinnong"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { + }) + })} + if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ + this.uploadFiles3.map(rr => { + const params = new FormData(); + params.append("tableId", this.form.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "yinnong"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { + }) + })} this.chargeItme.map(res => { res.cashId = this.form.id addCashdetail(res).then(r => { @@ -867,84 +889,72 @@ } } this.projectForm.outId = this.form.id - if(this.uploadFiles==null||this.uploadFiles.length==0){ - updateCash(this.form).then((response) => { - this.chargeItme.map(res => { - res.cashId = this.form.id - addCashdetail(res).then(r => { - }) - }) - if(this.form.capitalExpenditureType==2){ - this.projectForm.outId = this.form.id - this.$set(this.projectForm, "ynType", '2'); - addProjectto(this.projectForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) + updateCash(this.form).then((response) => { + if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ + this.uploadFiles1.map(rr => { + const params = new FormData(); + params.append("tableId", this.form.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "yinnong"); + params.append("fileType", "1"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else if(this.form.capitalExpenditureType==4){ - this.infoForm.transferId = this.form.id - addInfoto(this.infoForm).then(res => { - customSubmit(response.data.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) + })} + if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ + this.uploadFiles2.map(rr => { + const params = new FormData(); + params.append("tableId", this.form.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "yinnong"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }); - }else { - updateCash(this.form).then((response) => { - console.log(this.uploadFiles) - this.uploadFiles.map(rr => { + })} + if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ + this.uploadFiles3.map(rr => { const params = new FormData(); params.append("tableId", this.form.id); params.append("tableName", "t_yinnong_cash"); params.append("bizPath", "yinnong"); - params.append("fileType", "1"); + params.append("fileType", "3"); params.append("file", rr); commonAttach(params).then((r) => { }) + })} + this.chargeItme.map(res => { + res.cashId = this.form.id + addCashdetail(res).then(r => { }) - this.chargeItme.map(res => { - res.cashId = this.form.id - addCashdetail(res).then(r => { - }) + }) + if(this.form.capitalExpenditureType==2){ + this.projectForm.outId = this.form.id + this.$set(this.projectForm, "ynType", '2'); + addProjectto(this.projectForm).then(res => { + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) }) - if(this.form.capitalExpenditureType==2){ - this.projectForm.outId = this.form.id - this.$set(this.projectForm, "ynType", '2'); - addProjectto(this.projectForm).then(res => { - this.$toast.success('保存成功'); + }else if(this.form.capitalExpenditureType==4){ + this.infoForm.transferId = this.form.id + addInfoto(this.infoForm).then(res => { + customSubmit(response.data.id).then(res => { + this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - }else if(this.form.capitalExpenditureType==4){ - this.infoForm.transferId = this.form.id - addInfoto(this.infoForm).then(res => { - customSubmit(response.data.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }); - } + }) + }else{ + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) + } + }); + }, payeeSelectChange(select, i) {