@@ -368,8 +368,9 @@ | |||||
this.$router.push({name:'homesteadList'}) | this.$router.push({name:'homesteadList'}) | ||||
this.$cookies.set("item",JSON.stringify(item)); | this.$cookies.set("item",JSON.stringify(item)); | ||||
}*/ | }*/ | ||||
this.$router.push({name:'homesteadList'}) | |||||
this.$cookies.set("item",""); | |||||
this.$cookies.set("item",JSON.stringify(item)); | this.$cookies.set("item",JSON.stringify(item)); | ||||
this.$router.push({name:'homesteadList'}) | |||||
}, | }, | ||||
getList() { | getList() { | ||||
this.totalList = [] | this.totalList = [] | ||||
@@ -88,7 +88,7 @@ | |||||
label-width="auto" | label-width="auto" | ||||
required | required | ||||
:rules="[{ required: true , message:'请选择所属镇账户' }]" | :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" | |||||
/> | /> | ||||
<van-popup v-model="showTaccountId" position="bottom"> | <van-popup v-model="showTaccountId" position="bottom"> | ||||
<van-picker | <van-picker | ||||
@@ -15,7 +15,7 @@ | |||||
<van-field readonly label="账户类型" v-model="accountType" input-align="right" label-width="auto" /> | <van-field readonly label="账户类型" v-model="accountType" input-align="right" label-width="auto" /> | ||||
<van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" /> | <van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" /> | ||||
<van-field readonly label="账户分类" v-if="accountType=='银行存款'&&(bankType=='中国银行'||bankType=='山东省农村信用社(农商行)')" v-model="villageAccountType" input-align="right" label-width="auto" /> | <van-field readonly label="账户分类" v-if="accountType=='银行存款'&&(bankType=='中国银行'||bankType=='山东省农村信用社(农商行)')" v-model="villageAccountType" input-align="right" label-width="auto" /> | ||||
<van-field readonly label="所属镇账户" v-if="accountType=='银行存款'&&villageAccountType!='村虚拟账户'" v-model="taccountId" input-align="right" label-width="auto" /> | |||||
<van-field readonly label="所属镇账户" v-if="accountType=='银行存款'&&villageAccountType!='村实体账户'" v-model="taccountId" input-align="right" label-width="auto" /> | |||||
<van-field readonly label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" v-model="accountNo" input-align="right" label-width="auto" /> | <van-field readonly label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" v-model="accountNo" input-align="right" label-width="auto" /> | ||||
<van-cell title="管控类型" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'&&bankType=='山东省农村信用社(农商行)'" > | <van-cell title="管控类型" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'&&bankType=='山东省农村信用社(农商行)'" > | ||||
<template #right-icon> | <template #right-icon> | ||||
@@ -88,7 +88,7 @@ | |||||
label-width="auto" | label-width="auto" | ||||
required | required | ||||
:rules="[{ required: true , message:'请选择所属镇账户' }]" | :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" | |||||
/> | /> | ||||
<van-popup v-model="showTaccountId" position="bottom"> | <van-popup v-model="showTaccountId" position="bottom"> | ||||
<van-picker | <van-picker | ||||
@@ -259,9 +259,17 @@ | |||||
</van-popup>--> | </van-popup>--> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -304,8 +312,9 @@ | |||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -360,10 +369,14 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.capitalExpenditureOpen = false | this.capitalExpenditureOpen = false | ||||
@@ -389,6 +402,13 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -419,6 +439,8 @@ | |||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
upId: null, | upId: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
@@ -688,7 +710,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -702,70 +724,31 @@ | |||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", "1"); | params.append("fileType", "1"); | ||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
@@ -903,6 +880,26 @@ | |||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
this.$toast.success('保存成功'); | 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){ | 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(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "transfer", | bizPath: "transfer", | ||||
fileType: "", | |||||
fileType: "3", | |||||
} | } | ||||
attachmentList(oData).then(res => { | |||||
attachmentList(oData3).then(res => { | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -203,9 +203,17 @@ | |||||
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -253,7 +261,9 @@ | |||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -308,10 +318,14 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -337,6 +351,13 @@ | |||||
this.addChargeItme(); | this.addChargeItme(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -366,6 +387,8 @@ | |||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
upId: null, | upId: null, | ||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
@@ -645,7 +668,7 @@ | |||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -655,6 +678,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | addCashdetail(res).then(r => {}) | ||||
@@ -757,7 +800,7 @@ | |||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -767,6 +810,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
getFileList(){ | getFileList(){ | ||||
let oData= { | |||||
let oData1= { | |||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -204,9 +204,17 @@ | |||||
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -254,7 +262,9 @@ | |||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -309,10 +319,14 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -340,6 +354,13 @@ | |||||
this.addChargeItme(); | this.addChargeItme(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -370,6 +391,8 @@ | |||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
upId: null, | upId: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
@@ -647,7 +670,7 @@ | |||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -657,6 +680,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | addCashdetail(res).then(r => {}) | ||||
@@ -775,7 +818,7 @@ | |||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -785,6 +828,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -248,9 +248,17 @@ | |||||
<van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -299,7 +307,9 @@ | |||||
maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -357,10 +367,14 @@ | |||||
projectFundType:'', | projectFundType:'', | ||||
orderTypeName:'', | orderTypeName:'', | ||||
orderTypeOptions:[], | orderTypeOptions:[], | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -389,6 +403,13 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -418,6 +439,8 @@ | |||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
upId: null, | upId: null, | ||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
@@ -730,8 +753,7 @@ | |||||
}) | }) | ||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -741,6 +763,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | addCashdetail(res).then(r => {}) | ||||
@@ -843,7 +885,7 @@ | |||||
}else{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | |||||
this.uploadFiles1.map(rr => { | |||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
params.append("tableName", "t_yinnong_cash"); | params.append("tableName", "t_yinnong_cash"); | ||||
@@ -853,6 +895,26 @@ | |||||
commonAttach(params).then((r) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => {}) | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
getFileList(){ | getFileList(){ | ||||
let oData= { | |||||
let oData1= { | |||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -251,9 +251,17 @@ | |||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -295,7 +303,9 @@ | |||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{ | form:{ | ||||
}, | }, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -351,10 +361,14 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -378,6 +392,13 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -406,6 +427,8 @@ | |||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
upId: null, | upId: null, | ||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
@@ -674,7 +697,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -688,70 +711,31 @@ | |||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", "1"); | params.append("fileType", "1"); | ||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
} | |||||
}) | |||||
}else{ | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
goUpdate(){ | goUpdate(){ | ||||
if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
@@ -878,58 +854,58 @@ | |||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", "1"); | params.append("fileType", "1"); | ||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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){ | 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(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -251,9 +251,17 @@ | |||||
/> | /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -301,7 +309,9 @@ | |||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -356,10 +366,14 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
nowDate:"" | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getNowDate(); | |||||
this.reset(); | this.reset(); | ||||
this.initProjectInfo(); | this.initProjectInfo(); | ||||
this.capitalExpenditureOpen = false | this.capitalExpenditureOpen = false | ||||
@@ -385,6 +399,13 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | 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(){ | initProjectInfo(){ | ||||
let _this = this | let _this = this | ||||
let queryParams={ | let queryParams={ | ||||
@@ -413,6 +434,8 @@ | |||||
this.form = { | this.form = { | ||||
id: null, | id: null, | ||||
upId: null, | upId: null, | ||||
applyDate:this.nowDate, | |||||
approvalMode:'1', | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
@@ -684,7 +707,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -698,70 +721,31 @@ | |||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", "1"); | params.append("fileType", "1"); | ||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
@@ -841,7 +820,7 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
} | |||||
}); | }); | ||||
} | } | ||||
@@ -888,38 +867,39 @@ | |||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_transfer"); | 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); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
@@ -940,8 +920,6 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
} | |||||
}); | }); | ||||
}, | }, | ||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
@@ -1034,31 +1012,74 @@ | |||||
this.accountTypeChange1(); | 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){ | 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(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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,{})}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -72,10 +72,20 @@ | |||||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -103,7 +113,9 @@ | |||||
maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -220,16 +232,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "transfer", | bizPath: "transfer", | ||||
fileType: "", | |||||
fileType: "3", | |||||
} | } | ||||
attachmentList(oData).then(res => { | |||||
attachmentList(oData3).then(res => { | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -63,9 +63,20 @@ | |||||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -94,7 +105,9 @@ | |||||
maxDate: new Date(2050, 10, 1), | maxDate: new Date(2050, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -204,19 +217,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -64,9 +64,20 @@ | |||||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | <van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -95,7 +106,9 @@ | |||||
maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -215,19 +228,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -116,9 +116,20 @@ | |||||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | <van-field readonly label="资金用途" v-model="item.remark" input-align="right" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -147,7 +158,9 @@ | |||||
maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -279,19 +292,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -69,9 +69,20 @@ | |||||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -99,7 +110,9 @@ | |||||
maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -216,19 +229,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -71,9 +71,20 @@ | |||||
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -101,7 +112,9 @@ | |||||
maxDate: new Date(2025, 10, 1), | maxDate: new Date(2025, 10, 1), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | form:{}, | ||||
fileList:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
@@ -218,19 +231,40 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -259,9 +259,17 @@ | |||||
</van-popup> | </van-popup> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -361,8 +369,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -681,7 +693,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -695,70 +707,31 @@ | |||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", ""); | |||||
params.append("fileType", "1"); | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
params.append("bizPath", "transfer"); | params.append("bizPath", "transfer"); | ||||
params.append("fileType", ""); | |||||
params.append("fileType", "1"); | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
@@ -937,7 +905,6 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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){ | 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){ | if(file.id){ | ||||
systemAttachment(file.id).then((res) => { | systemAttachment(file.id).then((res) => { | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "transfer", | bizPath: "transfer", | ||||
fileType: "", | |||||
fileType: "3", | |||||
} | } | ||||
attachmentList(oData).then(res => { | |||||
attachmentList(oData3).then(res => { | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -204,9 +204,17 @@ | |||||
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -308,8 +316,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -597,7 +609,7 @@ | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -642,17 +654,39 @@ | |||||
}) | }) | ||||
}else { | }else { | ||||
updateCash(this.form).then((response) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
@@ -724,52 +758,40 @@ | |||||
} | } | ||||
} | } | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
updateCash(this.form).then((response) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
@@ -801,7 +823,7 @@ | |||||
},2000) | },2000) | ||||
} | } | ||||
}); | }); | ||||
} | |||||
}, | }, | ||||
payeeSelectChange(select, i) { | 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){ | 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){ | if(file.id){ | ||||
@@ -918,19 +967,40 @@ | |||||
} | } | ||||
}, | }, | ||||
getFileList(){ | getFileList(){ | ||||
let oData= { | |||||
let oData1= { | |||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | 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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -206,9 +206,17 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -309,8 +317,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -609,7 +621,7 @@ | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -635,7 +647,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(response.data.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -654,17 +666,39 @@ | |||||
}) | }) | ||||
}else { | }else { | ||||
updateCash(this.form).then((response) => { | 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 => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
@@ -684,7 +718,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -752,80 +786,71 @@ | |||||
} | } | ||||
} | } | ||||
this.projectForm.outId = this.form.id | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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){ | 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){ | if(file.id){ | ||||
console.log(file.id) | |||||
systemAttachment(file.id).then((res) => { | systemAttachment(file.id).then((res) => { | ||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | bizPath: "yinnong", | ||||
fileType: "", | |||||
fileType: "3", | |||||
} | } | ||||
attachmentList(oData).then(res => { | |||||
attachmentList(oData3).then(res => { | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -256,9 +256,17 @@ | |||||
<van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -359,8 +367,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
orderTypeName:'', | orderTypeName:'', | ||||
orderTypeOptions:[] | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
if(file.id){ | if(file.id){ | ||||
@@ -975,16 +1015,40 @@ | |||||
} | } | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_cash", | tableName: "t_yinnong_cash", | ||||
bizPath: "yinnong", | bizPath: "yinnong", | ||||
fileType: "", | |||||
fileType: "3", | |||||
} | } | ||||
attachmentList(oData).then(res => { | |||||
attachmentList(oData3).then(res => { | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -261,9 +261,17 @@ | |||||
</van-popup> | </van-popup> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" accept="image/*,file/*" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -363,8 +371,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -666,7 +678,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -680,70 +692,31 @@ | |||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
@@ -769,34 +742,29 @@ | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
@@ -823,11 +791,8 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
goUpdate(){ | goUpdate(){ | ||||
if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
@@ -870,9 +835,8 @@ | |||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
@@ -881,28 +845,29 @@ | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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){ | if(this.form.capitalExpenditureType==2){ | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
@@ -923,8 +888,6 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
} | |||||
}); | }); | ||||
}, | }, | ||||
accountTypeChange1(e){ | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
if(file.id){ | if(file.id){ | ||||
@@ -1081,19 +1072,40 @@ | |||||
} | } | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -259,9 +259,17 @@ | |||||
</van-popup> | </van-popup> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | |||||
<p class="main_title">上传附件(收据)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader> | |||||
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(发票)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader> | |||||
</div> | |||||
<p class="main_title">上传附件(其他)</p> | |||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | |||||
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader> | |||||
</div> | </div> | ||||
<div style="padding: 16px 0;"> | <div style="padding: 16px 0;"> | ||||
<van-row> | <van-row> | ||||
@@ -361,8 +369,12 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | |||||
uploadFiles:[], | |||||
fileList1:[], | |||||
fileList2:[], | |||||
fileList3:[], | |||||
uploadFiles1:[], | |||||
uploadFiles2:[], | |||||
uploadFiles3:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -682,7 +694,7 @@ | |||||
return; | 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({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
@@ -696,70 +708,31 @@ | |||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
@@ -785,60 +758,54 @@ | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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 => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '1'); | 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(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
params.append("tableName", "t_yinnong_transfer"); | params.append("tableName", "t_yinnong_transfer"); | ||||
@@ -896,48 +863,48 @@ | |||||
params.append("file", rr); | params.append("file", rr); | ||||
commonAttach(params).then((r) => { | 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('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },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('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | } | ||||
}); | }); | ||||
@@ -1026,13 +993,41 @@ | |||||
this.accountTypeChange1(); | 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){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | |||||
this.uploadFiles3.splice(index,1) | |||||
} | } | ||||
}) | }) | ||||
if(file.id){ | if(file.id){ | ||||
@@ -1041,19 +1036,40 @@ | |||||
} | } | ||||
}, | }, | ||||
getFileList(){ | 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, | tableId: this.$route.query.id, | ||||
tableName: "t_yinnong_transfer", | tableName: "t_yinnong_transfer", | ||||
bizPath: "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 => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | 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}) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||