|
|
@@ -740,7 +740,7 @@ |
|
|
|
this.$set(this.form, "bankTypeList", this.chargeItme); |
|
|
|
this.$set(this.form, "accountTypeList", this.chargeItme); |
|
|
|
this.$set(this.form, "transferStatusList", this.chargeItme); |
|
|
|
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ |
|
|
|
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ |
|
|
|
Dialog.confirm({ |
|
|
|
title: '提示', |
|
|
|
message: '此申请单中未上传任何附件,是否确认提交?', |
|
|
@@ -785,17 +785,39 @@ |
|
|
|
}) |
|
|
|
}else { |
|
|
|
updateCash(this.form).then((response) => { |
|
|
|
console.log(this.uploadFiles) |
|
|
|
this.uploadFiles.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "1"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ |
|
|
|
this.uploadFiles1.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "1"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
})} |
|
|
|
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ |
|
|
|
this.uploadFiles2.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "2"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
})} |
|
|
|
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ |
|
|
|
this.uploadFiles3.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "3"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
})} |
|
|
|
this.chargeItme.map(res => { |
|
|
|
res.cashId = this.form.id |
|
|
|
addCashdetail(res).then(r => { |
|
|
@@ -867,84 +889,72 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this.projectForm.outId = this.form.id |
|
|
|
if(this.uploadFiles==null||this.uploadFiles.length==0){ |
|
|
|
updateCash(this.form).then((response) => { |
|
|
|
this.chargeItme.map(res => { |
|
|
|
res.cashId = this.form.id |
|
|
|
addCashdetail(res).then(r => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(this.form.capitalExpenditureType==2){ |
|
|
|
this.projectForm.outId = this.form.id |
|
|
|
this.$set(this.projectForm, "ynType", '2'); |
|
|
|
addProjectto(this.projectForm).then(res => { |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
updateCash(this.form).then((response) => { |
|
|
|
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ |
|
|
|
this.uploadFiles1.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "1"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
}else if(this.form.capitalExpenditureType==4){ |
|
|
|
this.infoForm.transferId = this.form.id |
|
|
|
addInfoto(this.infoForm).then(res => { |
|
|
|
customSubmit(response.data.id).then(res => { |
|
|
|
this.$toast.success('提交成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
}) |
|
|
|
})} |
|
|
|
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ |
|
|
|
this.uploadFiles2.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "2"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}); |
|
|
|
}else { |
|
|
|
updateCash(this.form).then((response) => { |
|
|
|
console.log(this.uploadFiles) |
|
|
|
this.uploadFiles.map(rr => { |
|
|
|
})} |
|
|
|
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ |
|
|
|
this.uploadFiles3.map(rr => { |
|
|
|
const params = new FormData(); |
|
|
|
params.append("tableId", this.form.id); |
|
|
|
params.append("tableName", "t_yinnong_cash"); |
|
|
|
params.append("bizPath", "yinnong"); |
|
|
|
params.append("fileType", "1"); |
|
|
|
params.append("fileType", "3"); |
|
|
|
params.append("file", rr); |
|
|
|
commonAttach(params).then((r) => { |
|
|
|
}) |
|
|
|
})} |
|
|
|
this.chargeItme.map(res => { |
|
|
|
res.cashId = this.form.id |
|
|
|
addCashdetail(res).then(r => { |
|
|
|
}) |
|
|
|
this.chargeItme.map(res => { |
|
|
|
res.cashId = this.form.id |
|
|
|
addCashdetail(res).then(r => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(this.form.capitalExpenditureType==2){ |
|
|
|
this.projectForm.outId = this.form.id |
|
|
|
this.$set(this.projectForm, "ynType", '2'); |
|
|
|
addProjectto(this.projectForm).then(res => { |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
}) |
|
|
|
if(this.form.capitalExpenditureType==2){ |
|
|
|
this.projectForm.outId = this.form.id |
|
|
|
this.$set(this.projectForm, "ynType", '2'); |
|
|
|
addProjectto(this.projectForm).then(res => { |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
}else if(this.form.capitalExpenditureType==4){ |
|
|
|
this.infoForm.transferId = this.form.id |
|
|
|
addInfoto(this.infoForm).then(res => { |
|
|
|
customSubmit(response.data.id).then(res => { |
|
|
|
this.$toast.success('提交成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
}) |
|
|
|
}else if(this.form.capitalExpenditureType==4){ |
|
|
|
this.infoForm.transferId = this.form.id |
|
|
|
addInfoto(this.infoForm).then(res => { |
|
|
|
customSubmit(response.data.id).then(res => { |
|
|
|
this.$toast.success('提交成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.$toast.success('保存成功'); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
payeeSelectChange(select, i) { |
|
|
|