diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index d72ac2bb..e95da3d2 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -368,8 +368,9 @@ this.$router.push({name:'homesteadList'}) this.$cookies.set("item",JSON.stringify(item)); }*/ - this.$router.push({name:'homesteadList'}) + this.$cookies.set("item",""); this.$cookies.set("item",JSON.stringify(item)); + this.$router.push({name:'homesteadList'}) }, getList() { this.totalList = [] diff --git a/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue b/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue index 10084996..c5e13b70 100644 --- a/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue +++ b/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue @@ -88,7 +88,7 @@ label-width="auto" required :rules="[{ required: true , message:'请选择所属镇账户' }]" - v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=1" + v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=2" /> - + @@ -103,7 +113,9 @@ maxDate: new Date(2025, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -220,16 +232,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { + attachmentList(oData3).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,{}),"id":r.id}) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue index 00b51e56..d883c925 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue @@ -63,9 +63,20 @@ -

上传附件

+

上传附件(收据)

- + + +
+

上传附件(发票)

+
+ + +
+

上传附件(其他)

+
+ +
@@ -94,7 +105,9 @@ maxDate: new Date(2050, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -204,19 +217,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{})}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue index 17b5db67..1704325c 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue @@ -64,9 +64,20 @@ -

上传附件

+

上传附件(收据)

- + + +
+

上传附件(发票)

+
+ + +
+

上传附件(其他)

+
+ +
@@ -95,7 +106,9 @@ maxDate: new Date(2025, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -215,19 +228,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{})}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue index b58f96a1..4b1c5617 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue @@ -116,9 +116,20 @@ -

上传附件

+

上传附件(收据)

- + + +
+

上传附件(发票)

+
+ + +
+

上传附件(其他)

+
+ +
@@ -147,7 +158,9 @@ maxDate: new Date(2025, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -279,19 +292,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{})}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue index 3bc7d2db..07893705 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue @@ -69,9 +69,20 @@ -

上传附件

+

上传附件(收据)

- + + +
+

上传附件(发票)

+
+ + +
+

上传附件(其他)

+
+ +
@@ -99,7 +110,9 @@ maxDate: new Date(2025, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -216,19 +229,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{}),"id":r.id}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue index 6b12123b..5c665cdd 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue @@ -71,9 +71,20 @@ -

上传附件

+

上传附件(收据)

- + + +
+

上传附件(发票)

+
+ + +
+

上传附件(其他)

+
+ +
@@ -101,7 +112,9 @@ maxDate: new Date(2025, 10, 1), currentDate: new Date(), form:{}, - fileList:[], + fileList1:[], + fileList2:[], + fileList3:[], capitalExpenditureType:'', payee:'', bankType:'', @@ -218,19 +231,40 @@ }); }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{}),"id":r.id}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue index bd182a27..5831914b 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue @@ -259,9 +259,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -361,8 +369,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], }; }, created() { @@ -681,7 +693,7 @@ return; } } - 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: '此申请单中未上传任何附件,是否确认提交?', @@ -695,70 +707,31 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { - const params = new FormData(); - params.append("tableId", this.form.id); - params.append("tableName", "t_yinnong_transfer"); - params.append("bizPath", "upload"); - params.append("fileType", "0"); - params.append("file", rr); - commonAttach(params).then((r) => { - }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + }) + }else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } + }) + }else{ + customSubmit(this.form.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) } }); }) @@ -774,70 +747,64 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { + 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_transfer"); params.append("bizPath", "transfer"); - params.append("fileType", ""); + params.append("fileType", "1"); params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - } else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ + })} + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - } else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + }) + } else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } + }) + }else{ + customSubmit(this.form.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) } }); } @@ -885,38 +852,39 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { + 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_transfer"); params.append("bizPath", "transfer"); - params.append("fileType", ""); + params.append("fileType", "1"); params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }else{ + })} if(this.form.capitalExpenditureType==2){ addProjectto(this.projectForm).then(res => { this.$toast.success('保存成功'); @@ -937,7 +905,6 @@ history.go(-1) },2000) } - } }); }, @@ -1064,32 +1031,83 @@ } } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); }, - deleteFile(file){ - this.uploadFiles.map((response,index) => { + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); + }, + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { + if(file.file == response){ + this.uploadFiles3.splice(index,1) } }) - console.log(file) if(file.id){ systemAttachment(file.id).then((res) => { }); } }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { + attachmentList(oData3).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,{}),"id":r.id}) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue index 2e0f98a6..3820aacb 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue @@ -204,9 +204,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -308,8 +316,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], }; }, created() { @@ -597,7 +609,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: '此申请单中未上传任何附件,是否确认提交?', @@ -642,17 +654,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 => { @@ -724,52 +758,40 @@ } } 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) - }) - }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.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{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }); - }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.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 => { @@ -801,7 +823,7 @@ },2000) } }); - } + }, payeeSelectChange(select, i) { @@ -902,14 +924,41 @@ } } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); }, - deleteFile(file){ - console.log(file) - this.uploadFiles.map((response,index) => { + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); + }, + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { + if(file.file == response){ + this.uploadFiles3.splice(index,1) } }) if(file.id){ @@ -918,19 +967,40 @@ } }, getFileList(){ - let oData= { + let oData1= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "1", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "3", + } + attachmentList(oData3).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,{}),"id":r.id}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue index 97ee637d..a76df047 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue @@ -206,9 +206,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -309,8 +317,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], }; }, created() { @@ -609,7 +621,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){ + 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: '此申请单中未上传任何附件,是否确认提交?', @@ -635,7 +647,7 @@ }else if(this.form.capitalExpenditureType==4){ this.infoForm.transferId = this.form.id addInfoto(this.infoForm).then(res => { - cashSubmit(response.data.id).then(res => { + customSubmit(response.data.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) @@ -654,17 +666,39 @@ }) }else { updateCash(this.form).then((response) => { - 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) => { - }) - }) - this.chargeItme = this.chargeItme.reverse() + 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 => { @@ -684,7 +718,7 @@ }else if(this.form.capitalExpenditureType==4){ this.infoForm.transferId = this.form.id addInfoto(this.infoForm).then(res => { - cashSubmit(this.form.id).then(res => { + customSubmit(response.data.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) @@ -752,80 +786,71 @@ } } this.projectForm.outId = this.form.id - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - 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) => { - }) - }) - updateCash(this.form).then((response) => { - this.chargeItme.map(res => { - res.cashId = this.form.id - addCashdetail(res).then(r => { + 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) => { }) - }) - 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.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 if(this.form.capitalExpenditureType==4){ - this.infoForm.transferId = this.form.id - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) + })} + 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) => { }) - }else{ + })} + 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) - } - }); - }else { - updateCash(this.form).then((response) => { - this.chargeItme.map(res => { - console.log(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) - }) - }else if(this.form.capitalExpenditureType==4){ - this.infoForm.transferId = this.form.id - addInfoto(this.infoForm).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{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }); - } + }) + }else{ + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) + } + }); } } @@ -943,33 +968,83 @@ } } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); }, - deleteFile(file){ - this.uploadFiles.map((response,index) => { + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); + }, + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { + if(file.file == response){ + this.uploadFiles3.splice(index,1) } }) - console.log(file) if(file.id){ - console.log(file.id) systemAttachment(file.id).then((res) => { }); } }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { + attachmentList(oData3).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,{}),"id":r.id}) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue index a92fc7ac..630985d0 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue @@ -256,9 +256,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -359,8 +367,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], orderTypeName:'', orderTypeOptions:[] }; @@ -960,13 +972,41 @@ } } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); + }, + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { + if(file.file == response){ + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); }, - deleteFile(file){ - this.uploadFiles.map((response,index) => { + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles3.splice(index,1) } }) if(file.id){ @@ -975,16 +1015,40 @@ } }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_cash", + bizPath: "yinnong", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_cash", bizPath: "yinnong", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { + attachmentList(oData3).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,{}),"id":r.id}) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue index f71c7ece..0314671b 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue @@ -261,9 +261,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -363,8 +371,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], }; }, created() { @@ -666,7 +678,7 @@ return; } } - 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: '此申请单中未上传任何附件,是否确认提交?', @@ -680,70 +692,31 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { - const params = new FormData(); - params.append("tableId", this.form.id); - params.append("tableName", "t_yinnong_transfer"); - params.append("bizPath", "transfer"); - params.append("fileType", "1"); - params.append("file", rr); - commonAttach(params).then((r) => { - }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + }) + }else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } + }) + }else{ + customSubmit(this.form.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) } }); }) @@ -759,8 +732,8 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { + 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_transfer"); @@ -769,34 +742,29 @@ params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - } else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - } - }else{ + })} if(this.form.capitalExpenditureType==2){ addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { @@ -823,11 +791,8 @@ },2000) }) } - } }); } - - }, goUpdate(){ if(this.chargeItme.length<1){ @@ -870,9 +835,8 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - console.log(this.uploadFiles) - this.uploadFiles.map(rr => { + 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_transfer"); @@ -881,28 +845,29 @@ params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } - }else{ + })} if(this.form.capitalExpenditureType==2){ addProjectto(this.projectForm).then(res => { this.$toast.success('保存成功'); @@ -923,8 +888,6 @@ history.go(-1) },2000) } - } - }); }, accountTypeChange1(e){ @@ -1066,13 +1029,41 @@ } } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); + }, + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { + if(file.file == response){ + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); }, - deleteFile(file){ - this.uploadFiles.map((response,index) => { + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles3.splice(index,1) } }) if(file.id){ @@ -1081,19 +1072,40 @@ } }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{}),"id":r.id}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) }, diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue index 4129a4f5..4b525e87 100644 --- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue +++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue @@ -259,9 +259,17 @@
-

上传附件

+

上传附件(收据)

- + +
+

上传附件(发票)

+
+ +
+

上传附件(其他)

+
+
@@ -361,8 +369,12 @@ isAsc: "desc", }, projectFundType:'', - fileList:[], - uploadFiles:[], + fileList1:[], + fileList2:[], + fileList3:[], + uploadFiles1:[], + uploadFiles2:[], + uploadFiles3:[], }; }, created() { @@ -682,7 +694,7 @@ return; } } - 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: '此申请单中未上传任何附件,是否确认提交?', @@ -696,70 +708,31 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { - const params = new FormData(); - params.append("tableId", this.form.id); - params.append("tableName", "t_yinnong_transfer"); - params.append("bizPath", "transfer"); - params.append("fileType", "1"); - params.append("file", rr); - commonAttach(params).then((r) => { - }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + }) + }else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } + }) + }else{ + customSubmit(this.form.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) } }); }) @@ -775,8 +748,8 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { + 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_transfer"); @@ -785,60 +758,54 @@ params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - } else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ + })} + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - } else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - customSubmit(this.form.id).then(res => { - this.$toast.success('提交成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }) - }else{ + }) + } else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { customSubmit(this.form.id).then(res => { this.$toast.success('提交成功'); setTimeout(function(){ history.go(-1) },2000) }) - } + }) + }else{ + customSubmit(this.form.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) } }); } @@ -886,8 +853,8 @@ this.projectForm.outId = this.form.id this.infoForm.transferId = this.form.id this.$set(this.projectForm, "ynType", '1'); - if(this.uploadFiles!=null&&this.uploadFiles.length>0){ - this.uploadFiles.map(rr => { + 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_transfer"); @@ -896,48 +863,48 @@ params.append("file", rr); commonAttach(params).then((r) => { }) - }) - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "2"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) + })} + 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_transfer"); + params.append("bizPath", "transfer"); + params.append("fileType", "3"); + params.append("file", rr); + commonAttach(params).then((r) => { }) - }else{ + })} + if(this.form.capitalExpenditureType==2){ + addProjectto(this.projectForm).then(res => { this.$toast.success('保存成功'); setTimeout(function(){ history.go(-1) },2000) - } - }else{ - if(this.form.capitalExpenditureType==2){ - addProjectto(this.projectForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }else if(this.form.capitalExpenditureType==4){ - addInfoto(this.infoForm).then(res => { - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - }) - }else{ + }) + }else if(this.form.capitalExpenditureType==4){ + addInfoto(this.infoForm).then(res => { this.$toast.success('保存成功'); setTimeout(function(){ history.go(-1) },2000) - } + }) + }else{ + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) } }); @@ -1026,13 +993,41 @@ this.accountTypeChange1(); } }, - beforeRead(file) { - this.uploadFiles.push(file.file); + beforeRead1(file) { + this.uploadFiles1.push(file.file); + }, + deleteFile1(file){ + this.uploadFiles1.map((response,index) => { + if(file.file == response){ + this.uploadFiles1.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead2(file) { + this.uploadFiles2.push(file.file); + }, + deleteFile2(file){ + this.uploadFiles2.map((response,index) => { + if(file.file == response){ + this.uploadFiles2.splice(index,1) + } + }) + if(file.id){ + systemAttachment(file.id).then((res) => { + }); + } + }, + beforeRead3(file) { + this.uploadFiles3.push(file.file); }, - deleteFile(file){ - this.uploadFiles.map((response,index) => { + deleteFile3(file){ + this.uploadFiles3.map((response,index) => { if(file.file == response){ - this.uploadFiles.splice(index,1) + this.uploadFiles3.splice(index,1) } }) if(file.id){ @@ -1041,19 +1036,40 @@ } }, getFileList(){ - let oData= { + let oData1= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + fileType: "1", + } + attachmentList(oData1).then(res => { + res.rows.map(r => { + let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL + this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) + }) + }) + let oData2= { + tableId: this.$route.query.id, + tableName: "t_yinnong_transfer", + bizPath: "transfer", + 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,{}),"id":r.id}) + }) + }) + let oData3= { tableId: this.$route.query.id, tableName: "t_yinnong_transfer", bizPath: "transfer", - fileType: "", + fileType: "3", } - attachmentList(oData).then(res => { - console.log(res) - console.log(location.protocol+"//"+location.host+request.defaults.baseURL) + attachmentList(oData3).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,{}),"id":r.id}) - console.log(r) + this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) }) }) },