@@ -258,7 +258,7 @@ | |||
/> | |||
</van-popup> | |||
<van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入开户银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入开户银行银行" input-align="right" label-width="auto"/> | |||
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" type="number" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/> | |||
<van-field | |||
readonly | |||
@@ -267,6 +267,7 @@ | |||
placeholder="" | |||
v-model="item.bankTypeText" | |||
input-align="right" | |||
placeholder="请输入所属银行" | |||
required | |||
:rules="[{ required: true , message:'请选择所属银行' }]" | |||
/> | |||
@@ -715,6 +716,7 @@ | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -803,70 +805,317 @@ | |||
this.infoForm.transferId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
let 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) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", response.data.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", response.data.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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 => { | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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 => { | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
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(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
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 => { | |||
}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{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -903,43 +1152,248 @@ | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then((response) => { | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.infoForm.transferId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
let 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) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", response.data.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", response.data.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
})} | |||
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map(rr => { | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
})} | |||
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map(rr => { | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
commonAttach(params).then((r) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
})} | |||
}) | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
@@ -947,7 +1401,7 @@ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else if(this.form.capitalExpenditureType==4){ | |||
} else if(this.form.capitalExpenditureType==4){ | |||
addInfoto(this.infoForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
@@ -960,6 +1414,7 @@ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
@@ -704,6 +704,7 @@ | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -747,6 +748,7 @@ | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then(response => { | |||
console.log(response.data.id) | |||
this.projectForm.outId = response.data.id | |||
this.infoForm.transferId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
@@ -791,68 +793,317 @@ | |||
this.infoForm.transferId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.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) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", response.data.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", response.data.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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(); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(response.data.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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(); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
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(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
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 => { | |||
}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{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(response.data.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -889,64 +1140,269 @@ | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
addTransfer(this.form).then((response) => { | |||
addTransfer(this.form).then(response => { | |||
this.projectForm.outId = response.data.id | |||
this.infoForm.transferId = response.data.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.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) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", response.data.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", response.data.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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(); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", response.data.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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(); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
commonAttach(params).then((r) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
})} | |||
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 => { | |||
}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{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
@@ -60,8 +60,8 @@ | |||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | |||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | |||
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> | |||
<van-field readonly label="提款人" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="提款金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="联系方式" v-model="item.drawer" input-align="right" label-width="auto"/> | |||
<van-field readonly label="申请使用金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> | |||
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/> | |||
</div> | |||
</div> | |||
@@ -700,6 +700,7 @@ | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -732,7 +733,12 @@ | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ | |||
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&& | |||
(this.uploadFiles2==null||this.uploadFiles2.length==0)&& | |||
(this.uploadFiles3==null||this.uploadFiles3.length==0)&& | |||
this.fileList1.length==0&& | |||
this.fileList2.length==0&& | |||
this.fileList3.length==0){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -783,67 +789,315 @@ | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.infoForm.transferId = this.form.id | |||
this.projectForm.outId = _this.form.id | |||
this.infoForm.transferId = _this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", _this.form.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", _this.form.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
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(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
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 => { | |||
}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{ | |||
customSubmit(_this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
@@ -851,6 +1105,7 @@ | |||
}, | |||
goUpdate(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -887,43 +1142,248 @@ | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then((response) => { | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.infoForm.transferId = this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", _this.form.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", _this.form.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
commonAttach(params).then((r) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
})} | |||
}) | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
@@ -931,7 +1391,7 @@ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else if(this.form.capitalExpenditureType==4){ | |||
} else if(this.form.capitalExpenditureType==4){ | |||
addInfoto(this.infoForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
@@ -944,7 +1404,7 @@ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
payeeSelectChange(select, i) { | |||
@@ -485,6 +485,7 @@ | |||
// 分页 | |||
pageNum: 1, | |||
pageSize: 999, | |||
type:'name' | |||
}; | |||
listTemplate(templateQueryParams).then(rrr => { | |||
this.templateList = rrr.rows; | |||
@@ -685,6 +686,7 @@ | |||
this.$set(this.form, "expenditureAmount", total); | |||
}, | |||
goAdd(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -717,7 +719,12 @@ | |||
return; | |||
} | |||
} | |||
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ | |||
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&& | |||
(this.uploadFiles2==null||this.uploadFiles2.length==0)&& | |||
(this.uploadFiles3==null||this.uploadFiles3.length==0&& | |||
this.fileList1.length==0&& | |||
this.fileList2.length==0&& | |||
this.fileList3.length==0)){ | |||
Dialog.confirm({ | |||
title: '提示', | |||
message: '此申请单中未上传任何附件,是否确认提交?', | |||
@@ -728,12 +735,12 @@ | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.infoForm.transferId = this.form.id | |||
this.projectForm.outId = _this.form.id | |||
this.infoForm.transferId = _this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
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('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -742,7 +749,7 @@ | |||
}) | |||
}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('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -750,7 +757,7 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -768,45 +775,292 @@ | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = this.form.id | |||
this.infoForm.transferId = this.form.id | |||
this.projectForm.outId = _this.form.id | |||
this.infoForm.transferId = _this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", _this.form.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", _this.form.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
_this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}) | |||
}else{ | |||
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); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
commonAttach(params).then((r) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
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('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -815,7 +1069,7 @@ | |||
}) | |||
} 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('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
@@ -823,17 +1077,19 @@ | |||
}) | |||
}) | |||
}else{ | |||
customSubmit(this.form.id).then(res => { | |||
customSubmit(_this.form.id).then(res => { | |||
this.$toast.success('提交成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
goUpdate(){ | |||
let _this = this | |||
if(this.chargeItme.length<1){ | |||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||
return; | |||
@@ -870,43 +1126,248 @@ | |||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||
updateTransfer(this.form).then((response) => { | |||
this.projectForm.outId = this.form.id | |||
this.infoForm.transferId = this.form.id | |||
updateTransfer(this.form).then(response => { | |||
this.projectForm.outId = _this.form.id | |||
this.infoForm.transferId = _this.form.id | |||
this.$set(this.projectForm, "ynType", '1'); | |||
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
this.uploadFiles1.map(rr => { | |||
const params = new FormData(); | |||
params.append("tableId", this.form.id); | |||
params.append("tableName", "t_yinnong_transfer"); | |||
params.append("bizPath", "transfer"); | |||
params.append("fileType", "1"); | |||
params.append("file", rr); | |||
commonAttach(params).then((r) => { | |||
this.uploadFiles1.map((rr1,idx1) => { | |||
let params1 = new FormData(); | |||
params1.append("tableId", _this.form.id); | |||
params1.append("tableName", "t_yinnong_transfer"); | |||
params1.append("bizPath", "transfer"); | |||
params1.append("fileType", "1"); | |||
params1.append("file", rr1); | |||
commonAttach(params1).then((r1) => { | |||
if(idx1 == (_this.uploadFiles1.length-1)){ | |||
if(_this.uploadFiles2!=null&&_this.uploadFiles2.length>0){ | |||
_this.uploadFiles2.map((rr2,idx2) => { | |||
let params2 = new FormData(); | |||
params2.append("tableId", _this.form.id); | |||
params2.append("tableName", "t_yinnong_transfer"); | |||
params2.append("bizPath", "transfer"); | |||
params2.append("fileType", "2"); | |||
params2.append("file", rr2); | |||
commonAttach(params2).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
} | |||
}) | |||
}) | |||
}else if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params3).then((r3) => { | |||
if(idx3 ==(_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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); | |||
}) | |||
}else if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
this.uploadFiles2.map((rr2,idx2) => { | |||
let 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) => { | |||
params.append("file", rr2); | |||
commonAttach(params).then((r2) => { | |||
if(idx2 == (_this.uploadFiles2.length-1)){ | |||
if(_this.uploadFiles3!=null&&_this.uploadFiles3.length>0){ | |||
_this.uploadFiles3.map((rr3,idx3) => { | |||
let params3 = new FormData(); | |||
params3.append("tableId", _this.form.id); | |||
params3.append("tableName", "t_yinnong_transfer"); | |||
params3.append("bizPath", "transfer"); | |||
params3.append("fileType", "3"); | |||
params3.append("file", rr3); | |||
commonAttach(params).then((r3) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
}) | |||
}else{ | |||
if(_this.form.capitalExpenditureType==2){ | |||
addProjectto(_this.projectForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
} else if(_this.form.capitalExpenditureType==4){ | |||
addInfoto(_this.infoForm).then(res => { | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else{ | |||
_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); | |||
}) | |||
}else if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
this.uploadFiles3.map((rr3,idx3) => { | |||
let 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); | |||
params.append("file", rr3); | |||
commonAttach(params).then((r) => { | |||
if(idx3 == (_this.uploadFiles3.length-1)){ | |||
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{ | |||
_this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}) | |||
})} | |||
}) | |||
}else{ | |||
if(this.form.capitalExpenditureType==2){ | |||
addProjectto(this.projectForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
@@ -914,7 +1375,7 @@ | |||
history.go(-1) | |||
},2000) | |||
}) | |||
}else if(this.form.capitalExpenditureType==4){ | |||
} else if(this.form.capitalExpenditureType==4){ | |||
addInfoto(this.infoForm).then(res => { | |||
this.$toast.success('保存成功'); | |||
setTimeout(function(){ | |||
@@ -927,6 +1388,7 @@ | |||
history.go(-1) | |||
},2000) | |||
} | |||
} | |||
}); | |||
}, | |||
accountTypeChange1(e){ | |||