@@ -188,13 +188,15 @@ | |||||
listDeposit(queryParams).then(response => { | listDeposit(queryParams).then(response => { | ||||
this.bankDepositOptions = [] | this.bankDepositOptions = [] | ||||
for(var i = 0 ; i < response.rows.length ; i++){ | for(var i = 0 ; i < response.rows.length ; i++){ | ||||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id}); | |||||
this.bankDepositOptions.push({"text":response.rows[i].bankDeposit,"value":response.rows[i].id,"payeePaymentLines":response.rows[i].payeePaymentLines}); | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
onConfirmBankDeposit(data){ | onConfirmBankDeposit(data){ | ||||
console.log(data) | |||||
this.bankDeposit = data.text | this.bankDeposit = data.text | ||||
this.form.payeePaymentLines = data.value; | |||||
this.form.bankDeposit = data.value | |||||
this.form.payeePaymentLines = data.payeePaymentLines | |||||
this.showBankDeposit = false; | this.showBankDeposit = false; | ||||
}, | }, | ||||
onConfirmPayeeType(data){ | onConfirmPayeeType(data){ | ||||
@@ -7,7 +7,7 @@ | |||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
> | > | ||||
<template #title> | <template #title> | ||||
<p style="font-weight: bold;">添加出纳账户设置</p> | |||||
<p style="font-weight: bold;">添加付款账户设置</p> | |||||
</template> | </template> | ||||
</van-nav-bar> | </van-nav-bar> | ||||
<van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="goModify" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
@@ -318,7 +318,7 @@ | |||||
}, | }, | ||||
created() { | created() { | ||||
this.getTaList(); | this.getTaList(); | ||||
this.getDetail(); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getDetail(){ | getDetail(){ | ||||
@@ -225,7 +225,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit , getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
addCash, | addCash, | ||||
@@ -608,62 +608,14 @@ | |||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '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){ | |||||
this.infoForm.transferId = response.data.id | |||||
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) | |||||
}) | |||||
} | |||||
}) | |||||
}) | |||||
}); | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
addProjectto(this.projectForm).then(res => { | addProjectto(this.projectForm).then(res => { | ||||
customSubmit(response.data.id).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -673,7 +625,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = response.data.id | this.infoForm.transferId = response.data.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
customSubmit(response.data.id).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -681,15 +633,61 @@ | |||||
}) | }) | ||||
}) | }) | ||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}); | |||||
}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | }) | ||||
}) | }) | ||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -730,34 +728,31 @@ | |||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.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) | |||||
} | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}) | }) | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
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{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
@@ -774,34 +769,31 @@ | |||||
}) | }) | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.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) | |||||
} | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}) | }) | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -200,7 +200,7 @@ | |||||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
<van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | ||||
<van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" 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 required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" type="number" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -555,90 +555,64 @@ | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
// 钱计算 | |||||
moneyChange(input) { | |||||
if(this.form.cashType=='11'){ | |||||
console.log(input) | |||||
if(this.form.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||||
this.chargeItme = [] | |||||
this.addChargeItme(); | |||||
return false; | |||||
}else { | |||||
let obj = {}; | |||||
obj = this.chargeItme.find((account) => { | |||||
//model就是上面的数据源 | |||||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
}); | |||||
let total = 0; | |||||
this.chargeItme.forEach((money) => { | |||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
}); | |||||
this.$set(this.form, "expenditureAmount", total); | |||||
if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
this.form.expenditureAmount="" | |||||
this.chargeItme = [] | |||||
this.addChargeItme(); | |||||
return false; | |||||
} | |||||
} | |||||
}else{ | |||||
let obj = {}; | |||||
obj = this.chargeItme.find((account) => { | |||||
//model就是上面的数据源 | |||||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
}); | |||||
goAdd(){ | |||||
if(this.form.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||||
return false; | |||||
}else { | |||||
let total = 0; | let total = 0; | ||||
this.chargeItme.forEach((money) => { | this.chargeItme.forEach((money) => { | ||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | ||||
}); | }); | ||||
this.$set(this.form, "expenditureAmount", total); | this.$set(this.form, "expenditureAmount", total); | ||||
} | |||||
}, | |||||
goAdd(){ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
Dialog.confirm({ | |||||
title: '提示', | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | |||||
}) | |||||
.then(() => { | |||||
addCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
}else{ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
Dialog.confirm({ | |||||
title: '提示', | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | |||||
}) | |||||
.then(() => { | |||||
console.log(this.form) | |||||
addCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -668,27 +642,25 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}); | |||||
}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | }) | ||||
}) | }) | ||||
}); | |||||
}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -718,49 +690,64 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
goUpdate(){ | goUpdate(){ | ||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
addCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
if(this.form.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' });; | |||||
return false; | |||||
}else { | |||||
let total = 0; | |||||
this.chargeItme.forEach((money) => { | |||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
}); | |||||
this.$set(this.form, "expenditureAmount", total); | |||||
console.log(this.form.expenditureAmount,this.form.payerAccount) | |||||
if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
return false; | |||||
}else{ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||||
addCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -784,25 +771,24 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
}); | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -826,9 +812,9 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
@@ -270,10 +270,11 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit, getAccount ,getQmyeFlow ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
addCash, | addCash, | ||||
addCashdetail, attachmentList, commonAttach, | addCashdetail, attachmentList, commonAttach, | ||||
listMoneyorder, | listMoneyorder, | ||||
updateCash | updateCash | ||||
@@ -355,7 +356,8 @@ | |||||
projectFundType:'', | projectFundType:'', | ||||
orderTypeName:'', | orderTypeName:'', | ||||
orderTypeOptions:[] | |||||
orderTypeOptions:[], | |||||
uploadFiles:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -688,60 +690,13 @@ | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
}) | }) | ||||
.then(() => { | .then(() => { | ||||
console.log(this.form) | |||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}) | |||||
}) | |||||
}); | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => { | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -771,8 +726,54 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}); | |||||
}) | |||||
}else{ | |||||
addCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", response.data.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | }) | ||||
}) | }) | ||||
this.chargeItme.map(res => { | |||||
res.cashId = response.data.id | |||||
addCashdetail(res).then(r => {}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -813,32 +814,31 @@ | |||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}) | }) | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
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{ | }else{ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
@@ -855,32 +855,31 @@ | |||||
}) | }) | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}) | |||||
addCashdetail(res).then(r => {}) | |||||
}) | }) | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -7,7 +7,7 @@ | |||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
> | > | ||||
<template #title> | <template #title> | ||||
<p style="font-weight: bold;">添加信用卡转账申请</p> | |||||
<p style="font-weight: bold;">添加公务卡转账申请</p> | |||||
</template> | </template> | ||||
</van-nav-bar> | </van-nav-bar> | ||||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -293,7 +293,8 @@ | |||||
minDate: new Date(2000, 1, 1), | minDate: new Date(2000, 1, 1), | ||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
form:{}, | |||||
form:{ | |||||
}, | |||||
fileList:[], | fileList:[], | ||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
@@ -306,7 +307,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
chargeItmeShow:[], | chargeItmeShow:[], | ||||
@@ -316,6 +317,10 @@ | |||||
transferType:"", | transferType:"", | ||||
orderByColumn: "id", | orderByColumn: "id", | ||||
isAsc: "desc", | isAsc: "desc", | ||||
isPeers : null, | |||||
accountType : null, | |||||
bankType : null, | |||||
status : "0" | |||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | contractOpen:false, | ||||
@@ -389,7 +394,6 @@ | |||||
} | } | ||||
}); | }); | ||||
listInfo(this.queryContractionParams).then(response => { | listInfo(this.queryContractionParams).then(response => { | ||||
console.log(response) | |||||
_this.infoList = response.rows; | _this.infoList = response.rows; | ||||
for (let i = 0; i < response.rows.length; i++) { | for (let i = 0; i < response.rows.length; i++) { | ||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | //_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | ||||
@@ -421,7 +425,8 @@ | |||||
auditStatus: "0", | auditStatus: "0", | ||||
paymentState: "1", | paymentState: "1", | ||||
bankPriority: "0", | bankPriority: "0", | ||||
clientPriority: "0" | |||||
clientPriority: "0", | |||||
isPeers:"N" | |||||
}; | }; | ||||
this.processList = {} | this.processList = {} | ||||
this.projectForm={ | this.projectForm={ | ||||
@@ -592,7 +597,6 @@ | |||||
accountTypeChange(e){ | accountTypeChange(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
@@ -609,9 +613,8 @@ | |||||
accountTypeChange1(e){ | accountTypeChange1(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.bankType = this.form.bankType | |||||
this.queryParams.isPeers = this.form.isPeers?this.form.isPeers:null | |||||
this.queryParams.bankType = this.form.bankType?this.form.bankType:null | |||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
@@ -999,7 +1002,8 @@ | |||||
this.form.accountType = "1" | this.form.accountType = "1" | ||||
this.form.isPeers = null | this.form.isPeers = null | ||||
this.accountTypeChange(); | this.accountTypeChange(); | ||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
}else if(obj.bankType==2||obj.bankType==3||obj.bankType==4){ | |||||
console.log(obj.bankType) | |||||
this.form.accountType = null | this.form.accountType = null | ||||
this.form.isPeers = "Y" | this.form.isPeers = "Y" | ||||
this.accountTypeChange1(); | this.accountTypeChange1(); | ||||
@@ -7,7 +7,7 @@ | |||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
> | > | ||||
<template #title> | <template #title> | ||||
<p style="font-weight: bold;">查看信用卡转账申请</p> | |||||
<p style="font-weight: bold;">查看公务卡转账申请</p> | |||||
</template> | </template> | ||||
<template #right> | <template #right> | ||||
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> | ||||
@@ -62,7 +62,7 @@ export default { | |||||
queryParams:{ | queryParams:{ | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10, | pageSize:10, | ||||
transferType: '10', | |||||
cashType: '10', | |||||
} | } | ||||
}; | }; | ||||
}, | }, | ||||
@@ -62,7 +62,7 @@ export default { | |||||
queryParams:{ | queryParams:{ | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:10, | pageSize:10, | ||||
transferType: '11', | |||||
cashType: '11', | |||||
} | } | ||||
}; | }; | ||||
}, | }, | ||||
@@ -62,7 +62,7 @@ export default { | |||||
queryParams:{ | queryParams:{ | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:100, | pageSize:100, | ||||
transferType: '12', | |||||
cashType: '12', | |||||
} | } | ||||
}; | }; | ||||
}, | }, | ||||
@@ -78,7 +78,6 @@ export default { | |||||
getList(){ | getList(){ | ||||
setTimeout(() => { | setTimeout(() => { | ||||
listCash(this.queryParams).then(response => { | listCash(this.queryParams).then(response => { | ||||
console.log(response) | |||||
for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | response.rows[i].auditStatus = this.selectDictLabel(this.auditStatusOptions, response.rows[i].auditStatus); | ||||
this.applicationList.push(response.rows[i]); | this.applicationList.push(response.rows[i]); | ||||
@@ -451,6 +451,7 @@ | |||||
response.rows[j].showPayee = false; | response.rows[j].showPayee = false; | ||||
} | } | ||||
this.chargeItme = response.rows; | this.chargeItme = response.rows; | ||||
console.log(this.chargeItme) | |||||
}); | }); | ||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
@@ -498,6 +499,7 @@ | |||||
}, | }, | ||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
@@ -607,37 +607,37 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(this.form.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{ | |||||
cashSubmit(this.form.id).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 => { | |||||
cashSubmit(this.form.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{ | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | }); | ||||
}) | }) | ||||
}else { | }else { | ||||
@@ -656,37 +656,37 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(this.form.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{ | |||||
cashSubmit(this.form.id).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 => { | |||||
cashSubmit(this.form.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{ | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -729,33 +729,33 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | |||||
}) | |||||
}) | }) | ||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
}else { | }else { | ||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
@@ -773,33 +773,33 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | |||||
}) | |||||
}) | }) | ||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
@@ -190,7 +190,7 @@ | |||||
@cancel="showpayer = false" | @cancel="showpayer = false" | ||||
/> | /> | ||||
</van-popup> | </van-popup> | ||||
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="可用余额(元)" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/> | |||||
</div> | </div> | ||||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | ||||
@@ -201,7 +201,7 @@ | |||||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
<van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入收款方全称' }]" v-model="item.payee" label="收款方" placeholder="请输入收款方全称" input-align="right" label-width="auto"/> | ||||
<van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" label="提款人" placeholder="请输入提款人" input-align="right" label-width="auto"/> | <van-field required :rules="[{ required: true , message:'请输入提款人' }]" v-model="item.drawer" 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 required :rules="[{ required: true , message:'请输入提款金额' }]" v-model="item.incomeAmount" type="number" label="提款金额(元)" placeholder="请输入提款金额" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | <van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -559,90 +559,68 @@ | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
// 钱计算 | |||||
moneyChange(input) { | |||||
if(this.form.cashType=='11'){ | |||||
console.log(input) | |||||
if(this.form.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||||
this.chargeItme = [] | |||||
this.addChargeItme(); | |||||
return false; | |||||
}else { | |||||
let obj = {}; | |||||
obj = this.chargeItme.find((account) => { | |||||
//model就是上面的数据源 | |||||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
}); | |||||
let total = 0; | |||||
this.chargeItme.forEach((money) => { | |||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
}); | |||||
this.$set(this.form, "expenditureAmount", total); | |||||
if(this.form.payerAccount<this.form.expenditureAmount){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
this.form.expenditureAmount="" | |||||
this.chargeItme = [] | |||||
this.addChargeItme(); | |||||
return false; | |||||
} | |||||
} | |||||
}else{ | |||||
let obj = {}; | |||||
obj = this.chargeItme.find((account) => { | |||||
//model就是上面的数据源 | |||||
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据 | |||||
}); | |||||
goAdd(){ | |||||
if(this.form.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||||
return false; | |||||
}else { | |||||
let total = 0; | let total = 0; | ||||
this.chargeItme.forEach((money) => { | this.chargeItme.forEach((money) => { | ||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | ||||
}); | }); | ||||
this.$set(this.form, "expenditureAmount", total); | this.$set(this.form, "expenditureAmount", total); | ||||
} | |||||
}, | |||||
goAdd(){ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | |||||
Dialog.confirm({ | |||||
title: '提示', | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | |||||
}) | |||||
.then(() => { | |||||
updateCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
if(this.form.payerAccount<this.form.expenditureAmount){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
return false; | |||||
}else{ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
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){ | |||||
Dialog.confirm({ | |||||
title: '提示', | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | |||||
}) | |||||
.then(() => { | |||||
updateCash(this.form).then((response) => { | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -657,7 +635,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -672,27 +650,26 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}); | |||||
}) | |||||
}else { | |||||
updateCash(this.form).then((response) => { | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme = this.chargeItme.reverse() | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
}) | }) | ||||
}) | }) | ||||
}); | |||||
}) | |||||
}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", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -707,7 +684,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -722,49 +699,66 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
goUpdate(){ | goUpdate(){ | ||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
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.payerAccount==0){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能等于0!' }); | |||||
return false; | |||||
}else { | |||||
let total = 0; | |||||
this.chargeItme.forEach((money) => { | |||||
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2) | |||||
}); | |||||
this.$set(this.form, "expenditureAmount", total); | |||||
if(parseFloat(this.form.payerAccount)<parseFloat(this.form.expenditureAmount)){ | |||||
this.$notify({ type: 'danger', message: '申请使用金额不能大于可用余额!' }); | |||||
return false; | |||||
}else{ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
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){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -777,7 +771,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -790,25 +784,25 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}else{ | |||||
updateCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
}); | |||||
}else { | |||||
updateCash(this.form).then((response) => { | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
console.log(res) | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -821,7 +815,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -834,10 +828,11 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | } | ||||
}) | |||||
}) | |||||
}); | |||||
}); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
let obj = {}; | let obj = {}; | ||||
@@ -970,12 +965,9 @@ | |||||
fileType: "0", | fileType: "0", | ||||
} | } | ||||
attachmentList(oData).then(res => { | attachmentList(oData).then(res => { | ||||
console.log(res) | |||||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | ||||
console.log(r) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -651,6 +651,10 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
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.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -661,56 +665,8 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
cashSubmit(this.form.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 => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}) | }) | ||||
}) | }) | ||||
}); | |||||
}) | |||||
}else{ | |||||
updateCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).then((r) => { | |||||
}) | |||||
}) | |||||
this.chargeItme.map(res => { | |||||
res.cashId = this.form.id | |||||
addCashdetail(res).then(r => { | |||||
if(this.form.capitalExpenditureType==2){ | if(this.form.capitalExpenditureType==2){ | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.$set(this.projectForm, "ynType", '2'); | this.$set(this.projectForm, "ynType", '2'); | ||||
@@ -725,7 +681,7 @@ | |||||
}else if(this.form.capitalExpenditureType==4){ | }else if(this.form.capitalExpenditureType==4){ | ||||
this.infoForm.transferId = this.form.id | this.infoForm.transferId = this.form.id | ||||
addInfoto(this.infoForm).then(res => { | addInfoto(this.infoForm).then(res => { | ||||
cashSubmit(this.form.id).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
@@ -740,8 +696,55 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
} | } | ||||
}); | |||||
}) | |||||
}else { | |||||
updateCash(this.form).then((response) => { | |||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | |||||
const params = new FormData(); | |||||
params.append("tableId", this.form.id); | |||||
params.append("tableName", "t_yinnong_cash"); | |||||
params.append("bizPath", "upload"); | |||||
params.append("fileType", "0"); | |||||
params.append("file", rr); | |||||
commonAttach(params).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 => { | |||||
cashSubmit(this.form.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{ | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -763,7 +766,8 @@ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | ||||
return; | return; | ||||
} | } | ||||
}if(this.form.capitalExpenditureType==4){ | |||||
} | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | if(this.infoForm.name==""||this.infoForm.name==null){ | ||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | this.$notify({ type: 'danger', message: '请选择合同名称!' }); | ||||
return; | return; | ||||
@@ -777,39 +781,41 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
this.projectForm.outId = this.form.id | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | |||||
}) | |||||
}) | }) | ||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
}else{ | |||||
}else { | |||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -825,33 +831,36 @@ | |||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = this.form.id | res.cashId = this.form.id | ||||
addCashdetail(res).then(r => { | addCashdetail(res).then(r => { | ||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
}) | |||||
}) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '2'); | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | setTimeout(function(){ | ||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
} | |||||
}) | |||||
}) | }) | ||||
}) | |||||
}else{ | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
let obj = {}; | let obj = {}; | ||||
@@ -7,7 +7,7 @@ | |||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
> | > | ||||
<template #title> | <template #title> | ||||
<p style="font-weight: bold;">修改付款申请</p> | |||||
<p style="font-weight: bold;">修改公务卡转账申请</p> | |||||
</template> | </template> | ||||
</van-nav-bar> | </van-nav-bar> | ||||
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | ||||
@@ -196,7 +196,7 @@ | |||||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | ||||
<div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
<van-cell title="收款账户类型"> | |||||
<van-cell title="收款账户类型" v-if="form.bankType==1"> | |||||
<template #right-icon> | <template #right-icon> | ||||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | ||||
<van-radio name="1">公户</van-radio> | <van-radio name="1">公户</van-radio> | ||||
@@ -204,6 +204,14 @@ | |||||
</van-radio-group> | </van-radio-group> | ||||
</template> | </template> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="是否与付款方同行" v-if="form.bankType==2||form.bankType==3||form.bankType==4" > | |||||
<template #right-icon> | |||||
<van-radio-group direction="horizontal" v-model="form.isPeers" @change="accountTypeChange1"> | |||||
<van-radio name="Y">是</van-radio> | |||||
<van-radio name="N">否</van-radio> | |||||
</van-radio-group> | |||||
</template> | |||||
</van-cell> | |||||
</div> | </div> | ||||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
<van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" /> | ||||
@@ -385,14 +393,14 @@ | |||||
this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
}); | }); | ||||
let params1={ | let params1={ | ||||
villageAccountType:'1', | |||||
"params":{townAccountType:'1'} | |||||
accountType: "102", | |||||
status: "N", | |||||
} | } | ||||
listVaccount1(params1).then((response) => { | |||||
getAccount(params1).then((response) => { | |||||
this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
this.payerOptions[index].text = res.payee; | |||||
this.payerOptions[index].text = res.accountName; | |||||
this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
}) | }) | ||||
}); | }); | ||||
@@ -446,6 +454,7 @@ | |||||
response.rows[j].showPayee = false; | response.rows[j].showPayee = false; | ||||
} | } | ||||
this.chargeItme = response.rows; | this.chargeItme = response.rows; | ||||
console.log(this.chargeItme) | |||||
}); | }); | ||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
@@ -497,6 +506,7 @@ | |||||
}, | }, | ||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
@@ -601,9 +611,9 @@ | |||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
if(res.payeeType==4){ | |||||
res.text = res.payee | |||||
res.value = res.id | |||||
this.payeeList.push(res) | this.payeeList.push(res) | ||||
} | } | ||||
}) | }) | ||||
@@ -917,6 +927,26 @@ | |||||
}); | }); | ||||
}, | }, | ||||
accountTypeChange1(e){ | |||||
console.log(e) | |||||
if(e!=null&&e!=undefined){ | |||||
this.form.isPeers=e | |||||
} | |||||
this.payeeList = []; | |||||
this.chargeItme = []; | |||||
this.queryParams.isPeers = this.form.isPeers?this.form.isPeers:null | |||||
this.queryParams.bankType = this.form.bankType?this.form.bankType:null | |||||
this.queryParams.status = "0" | |||||
listPayee(this.queryParams).then((response) => { | |||||
response.rows.map((res,index) => { | |||||
if(res.payeeType==4){ | |||||
res.text = res.payee | |||||
res.value = res.id | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | |||||
}); | |||||
}, | |||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
let obj = {}; | let obj = {}; | ||||
let fuzhitype = 0; | let fuzhitype = 0; | ||||
@@ -967,23 +997,68 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
this.$set(this.form, "bookId", obj.bookId); | |||||
this.$set(this.form, "deptId", obj.deptId); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.payee); | |||||
this.$set(this.form, "payerAccount", obj.payeeAccount); | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "payerFrom", '1'); | |||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||||
obj.bankType != null && obj.bankType != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | |||||
this.$set(this.form, "deptId", obj.deptId); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.accountName); | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "bankAccountType", obj.bankAccountType); | |||||
this.$set(this.form, "villageAccountType", obj.villageAccountType); | |||||
this.$set(this.form, "taccountId", obj.taccountId); | |||||
this.$set(this.form, "accountNo", obj.accountNo); | |||||
this.$set(this.form, "cifNo", obj.cifNo); | |||||
this.$set(this.form, "payerFrom", '1'); | |||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==3||obj.bankType==4){ | |||||
console.log(obj.bankType) | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | |||||
}else{ | |||||
if(obj.payerFrom==1){ | |||||
this.diglogStatus = false; | |||||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
this.$set(this.form,"payer","") | |||||
this.$set(this.form,"payerAccount","") | |||||
}else{ | |||||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
}else{ | |||||
this.$set(this.form, "operatorCode", ''); | |||||
} | |||||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
}else{ | |||||
this.$set(this.form, "enterpriseCode", ''); | |||||
} | |||||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
}else{ | |||||
this.$set(this.form, "accountPassword", ''); | |||||
} | |||||
this.$set(this.form, "bookId",''); | |||||
this.$set(this.form, "deptId", ''); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.accountName); | |||||
this.$set(this.form, "bankType", obj.bankType); | |||||
if(obj.payerFrom==6){ | |||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
this.$set(this.form, "payerAccount", response.data); | |||||
}); | |||||
}else { | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
} | |||||
} | |||||
} | } | ||||
}, | }, | ||||
beforeRead(file) { | beforeRead(file) { | ||||
@@ -433,7 +433,6 @@ | |||||
} | } | ||||
console.log(param) | console.log(param) | ||||
getInfoto(param).then(res => { | getInfoto(param).then(res => { | ||||
this.infoForm = res.data | this.infoForm = res.data | ||||
}) | }) | ||||
}else{ | }else{ | ||||
@@ -452,6 +451,7 @@ | |||||
response.rows[j].showPayee = false; | response.rows[j].showPayee = false; | ||||
} | } | ||||
this.chargeItme = response.rows; | this.chargeItme = response.rows; | ||||
console.log(this.chargeItme) | |||||
}); | }); | ||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
@@ -503,6 +503,7 @@ | |||||
}, | }, | ||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
@@ -75,11 +75,19 @@ | |||||
} | } | ||||
this.getList(); | this.getList(); | ||||
}); | }); | ||||
console.log(this.$route.query.fr) | |||||
if(this.$route.query.fr){ | |||||
this.$cookies.set("from",this.$route.query.fr,"0") | |||||
} | |||||
}, | }, | ||||
methods: { | methods: { | ||||
goOnlineHomeIndex(){ | goOnlineHomeIndex(){ | ||||
this.$router.go(-1) | |||||
if(this.$cookies.get("from")=="my"){ | |||||
this.$router.push({name:"yinnongMy"}) | |||||
}else{ | |||||
this.$router.push({name:"yinnongWorkbench"}) | |||||
} | |||||
}, | }, | ||||
getList() { | getList() { | ||||
this.taskList = [] | this.taskList = [] | ||||
@@ -29,7 +29,7 @@ | |||||
/> | /> | ||||
</template> | </template> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="我的业务" is-link to="done"> | |||||
<van-cell title="我的业务" is-link :to="{path:'done',query:{fr:'my'}}"> | |||||
<template #icon> | <template #icon> | ||||
<van-image | <van-image | ||||
fit="contain" | fit="contain" | ||||
@@ -41,7 +41,7 @@ | |||||
</van-swipe-item> | </van-swipe-item> | ||||
</van-swipe> | </van-swipe> | ||||
<van-row style="min-height: 100px;" class="indexCard"> | <van-row style="min-height: 100px;" class="indexCard"> | ||||
<van-cell style="border-radius: 6px;" is-link to="done"> | |||||
<van-cell style="border-radius: 6px;" is-link :to="{path:'done',query:{fr:'workbench'}}"> | |||||
<template #title> | <template #title> | ||||
<p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p> | <p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p> | ||||
<p style="font-weight: bold;font-size: 18px;display: inline-block;">待办</p> | <p style="font-weight: bold;font-size: 18px;display: inline-block;">待办</p> | ||||