From f8806dad2e60f5ddda223dc5ac5f13b33644c7ff Mon Sep 17 00:00:00 2001
From: yujk <990961482@qq.com>
Date: Wed, 20 Apr 2022 18:31:19 +0800
Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E5=86=9C=E7=8B=AC=E7=AB=8Bapp?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/homesteadSurvey/index.vue | 3 +-
.../paymentAccount/paymentAccountAdd.vue | 2 +-
.../paymentAccount/paymentAccountDetail.vue | 2 +-
.../paymentAccount/paymentAccountModify.vue | 2 +-
.../paymentApproval/approvalAdd.vue | 263 +++++++++------
.../paymentApproval/approvalAdd10.vue | 140 +++++++-
.../paymentApproval/approvalAdd11.vue | 140 +++++++-
.../paymentApproval/approvalAdd12.vue | 141 ++++++--
.../paymentApproval/approvalAdd2.vue | 317 ++++++++++--------
.../paymentApproval/approvalAdd4.vue | 273 ++++++++-------
.../paymentApproval/approvalDetail.vue | 52 ++-
.../paymentApproval/approvalDetail10.vue | 54 ++-
.../paymentApproval/approvalDetail11.vue | 54 ++-
.../paymentApproval/approvalDetail12.vue | 54 ++-
.../paymentApproval/approvalDetail2.vue | 54 ++-
.../paymentApproval/approvalDetail4.vue | 54 ++-
.../paymentApproval/approvalModify.vue | 286 ++++++++--------
.../paymentApproval/approvalModify10.vue | 218 ++++++++----
.../paymentApproval/approvalModify11.vue | 257 +++++++++-----
.../paymentApproval/approvalModify12.vue | 90 ++++-
.../paymentApproval/approvalModify2.vue | 262 ++++++++-------
.../paymentApproval/approvalModify4.vue | 306 +++++++++--------
22 files changed, 1939 insertions(+), 1085 deletions(-)
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"
/>
-
+
diff --git a/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.vue b/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.vue
index 3518833f..c5af98de 100644
--- a/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.vue
+++ b/src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.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"
/>
-->
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -304,8 +312,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
- fileList:[],
-
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -360,10 +369,14 @@
isAsc: "desc",
},
projectFundType:'',
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.capitalExpenditureOpen = false
@@ -389,6 +402,13 @@
this.getDictionaries();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -419,6 +439,8 @@
this.form = {
id: null,
upId: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -688,7 +710,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: '此申请单中未上传任何附件,是否确认提交?',
@@ -702,70 +724,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.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(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- 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==2){
+ addProjectto(this.projectForm).then(res => {
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
- }else{
- if(this.form.capitalExpenditureType==2){
- addProjectto(this.projectForm).then(res => {
- customSubmit(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- addInfoto(this.infoForm).then(res => {
- customSubmit(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
+ })
+ }else{
+ customSubmit(response.data.id).then(res => {
+ this.$toast.success('提交成功');
+ setTimeout(function(){
+ history.go(-1)
+ },2000)
+ })
}
});
})
@@ -781,70 +764,64 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.id);
+ 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(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_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(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
- }else{
- if(this.form.capitalExpenditureType==2){
- addProjectto(this.projectForm).then(res => {
- customSubmit(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- } else if(this.form.capitalExpenditureType==4){
- addInfoto(this.infoForm).then(res => {
- customSubmit(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
+ })
+ }else{
+ customSubmit(response.data.id).then(res => {
+ this.$toast.success('提交成功');
+ setTimeout(function(){
+ history.go(-1)
+ },2000)
+ })
}
});
}
@@ -893,7 +870,7 @@
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
@@ -903,6 +880,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_transfer");
+ params.append("bizPath", "transfer");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_transfer");
+ params.append("bizPath", "transfer");
+ params.append("fileType", "3");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
@@ -1077,27 +1074,71 @@
}
}
},
- 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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
},
- deleteFile(file){
- this.uploadFiles.map((response,index) => {
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
if(file.file == response){
- this.uploadFiles.splice(index,1)
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ beforeRead3(file) {
+ this.uploadFiles3.push(file.file);
+ },
+ deleteFile3(file){
+ this.uploadFiles3.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles3.splice(index,1)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
+ 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 ae0eae53..54bfd4ab 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue
@@ -203,9 +203,17 @@
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -253,7 +261,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
- fileList:[],
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -308,10 +318,14 @@
isAsc: "desc",
},
projectFundType:'',
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -337,6 +351,13 @@
this.addChargeItme();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -366,6 +387,8 @@
reset() {
this.form = {
id: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -645,7 +668,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -655,6 +678,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -757,7 +800,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -767,6 +810,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -910,30 +973,71 @@
}
}
},
- 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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
+ },
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ 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)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
- console.log(r)
+ this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},
diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue
index b703a051..88dcbd2b 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue
@@ -204,9 +204,17 @@
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -254,7 +262,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
- fileList:[],
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -309,10 +319,14 @@
isAsc: "desc",
},
projectFundType:'',
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -340,6 +354,13 @@
this.addChargeItme();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -370,6 +391,8 @@
this.form = {
id: null,
upId: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -647,7 +670,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -657,6 +680,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -775,7 +818,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -785,6 +828,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -930,30 +993,71 @@
}
}
},
- 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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
+ },
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ 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)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
})
})
},
diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue
index 4926f994..166bc4c4 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue
@@ -248,9 +248,17 @@
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -299,7 +307,9 @@
maxDate: new Date(2050, 10, 1),
currentDate: new Date(),
form:{},
- fileList:[],
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -357,10 +367,14 @@
projectFundType:'',
orderTypeName:'',
orderTypeOptions:[],
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -389,6 +403,13 @@
this.getDictionaries();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -418,6 +439,8 @@
reset() {
this.form = {
id: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -730,8 +753,7 @@
})
}else{
addCash(this.form).then((response) => {
- console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -741,6 +763,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -843,7 +885,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
- this.uploadFiles.map(rr => {
+ this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -853,6 +895,26 @@
commonAttach(params).then((r) => {
})
})
+ this.uploadFiles2.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.id);
+ params.append("tableName", "t_yinnong_cash");
+ params.append("bizPath", "yinnong");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
+ })
+ })
+ this.uploadFiles3.map(rr => {
+ const params = new FormData();
+ params.append("tableId", response.data.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 = response.data.id
addCashdetail(res).then(r => {})
@@ -981,30 +1043,71 @@
}
}
},
- 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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
+ },
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ 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)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
- console.log(r)
+ this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},
diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue
index 684394d2..ab2294dc 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue
@@ -251,9 +251,17 @@
/>
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -295,7 +303,9 @@
currentDate: new Date(),
form:{
},
- fileList:[],
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -351,10 +361,14 @@
isAsc: "desc",
},
projectFundType:'',
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -378,6 +392,13 @@
this.getDictionaries();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -406,6 +427,8 @@
reset() {
this.form = {
id: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -674,7 +697,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: '此申请单中未上传任何附件,是否确认提交?',
@@ -688,70 +711,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.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(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- 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==2){
+ addProjectto(this.projectForm).then(res => {
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
- }else{
- if(this.form.capitalExpenditureType==2){
- addProjectto(this.projectForm).then(res => {
- customSubmit(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- addInfoto(this.infoForm).then(res => {
- customSubmit(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
+ })
+ }else{
+ customSubmit(response.data.id).then(res => {
+ this.$toast.success('提交成功');
+ setTimeout(function(){
+ history.go(-1)
+ },2000)
+ })
}
});
})
@@ -767,75 +751,67 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.id);
+ 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(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_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(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
- }else{
- if(this.form.capitalExpenditureType==2){
- addProjectto(this.projectForm).then(res => {
- customSubmit(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- } else if(this.form.capitalExpenditureType==4){
- addInfoto(this.infoForm).then(res => {
- customSubmit(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
+ })
+ }else{
+ customSubmit(response.data.id).then(res => {
+ this.$toast.success('提交成功');
+ setTimeout(function(){
+ history.go(-1)
+ },2000)
+ })
}
});
}
-
-
},
goUpdate(){
if(this.chargeItme.length<1){
@@ -878,58 +854,58 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.id);
+ 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 => {
- 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)
}
});
@@ -1048,31 +1024,74 @@
}
}
},
- 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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
+ },
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ beforeRead3(file) {
+ this.uploadFiles3.push(file.file);
+ },
+ deleteFile3(file){
+ this.uploadFiles3.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles3.splice(index,1)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
- console.log(r)
+ this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},
diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue
index 7e18ac34..e18e1850 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue
@@ -251,9 +251,17 @@
/>
- 上传附件
+ 上传附件(收据)
-
+
+
+ 上传附件(发票)
+
+
+
+ 上传附件(其他)
+
+
@@ -301,7 +309,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
- fileList:[],
+ fileList1:[],
+ fileList2:[],
+ fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -356,10 +366,14 @@
isAsc: "desc",
},
projectFundType:'',
- uploadFiles:[],
+ uploadFiles1:[],
+ uploadFiles2:[],
+ uploadFiles3:[],
+ nowDate:""
};
},
created() {
+ this.getNowDate();
this.reset();
this.initProjectInfo();
this.capitalExpenditureOpen = false
@@ -385,6 +399,13 @@
this.getDictionaries();
},
methods: {
+ getNowDate(){
+ var _this = this;
+ let yy = new Date().getFullYear();
+ let mm = new Date().getMonth()+1;
+ let dd = new Date().getDate();
+ _this.nowDate = yy+'-'+mm+'-'+dd
+ },
initProjectInfo(){
let _this = this
let queryParams={
@@ -413,6 +434,8 @@
this.form = {
id: null,
upId: null,
+ applyDate:this.nowDate,
+ approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -684,7 +707,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: '此申请单中未上传任何附件,是否确认提交?',
@@ -698,70 +721,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.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(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- 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==2){
+ addProjectto(this.projectForm).then(res => {
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
- }else{
- if(this.form.capitalExpenditureType==2){
- addProjectto(this.projectForm).then(res => {
- customSubmit(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- }else if(this.form.capitalExpenditureType==4){
- addInfoto(this.infoForm).then(res => {
- customSubmit(response.data.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(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
- }
+ })
+ }else{
+ customSubmit(response.data.id).then(res => {
+ this.$toast.success('提交成功');
+ setTimeout(function(){
+ history.go(-1)
+ },2000)
+ })
}
});
})
@@ -777,44 +761,39 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.id);
+ 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(response.data.id).then(res => {
- this.$toast.success('提交成功');
- setTimeout(function(){
- history.go(-1)
- },2000)
- })
- })
- } else if(this.form.capitalExpenditureType==4){
- 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_transfer");
+ params.append("bizPath", "transfer");
+ params.append("fileType", "2");
+ params.append("file", rr);
+ commonAttach(params).then((r) => {
})
- }else{
- customSubmit(response.data.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(response.data.id).then(res => {
@@ -841,7 +820,7 @@
},2000)
})
}
- }
+
});
}
@@ -888,38 +867,39 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.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", response.data.id);
+ params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
- params.append("bizPath", "upload");
- params.append("fileType", "0");
+ 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 => {
- 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('保存成功');
@@ -940,8 +920,6 @@
history.go(-1)
},2000)
}
- }
-
});
},
payeeSelectChange(select, i) {
@@ -1034,31 +1012,74 @@
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)
+ }
+ })
+ },
+ beforeRead2(file) {
+ this.uploadFiles2.push(file.file);
},
- deleteFile(file){
- this.uploadFiles.map((response,index) => {
+ deleteFile2(file){
+ this.uploadFiles2.map((response,index) => {
if(file.file == response){
- this.uploadFiles.splice(index,1)
+ this.uploadFiles2.splice(index,1)
+ }
+ })
+ },
+ beforeRead3(file) {
+ this.uploadFiles3.push(file.file);
+ },
+ deleteFile3(file){
+ this.uploadFiles3.map((response,index) => {
+ if(file.file == response){
+ this.uploadFiles3.splice(index,1)
}
})
},
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,{})})
+ })
+ })
+ 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,{})})
+ })
+ })
+ 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,{})})
- console.log(r)
+ this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},
diff --git a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue
index 3befabbf..c535773f 100644
--- a/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue
+++ b/src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue
@@ -72,10 +72,20 @@
- 上传附件
+ 上传附件(收据)
-
-
+
+
+
+ 上传附件(发票)
+
+
+
+
+ 上传附件(其他)
+
+
+
@@ -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})
})
})
},