Commit 66fea675 authored by 我在何方's avatar 我在何方

创建请款单优化

parent 9a738cd9
...@@ -727,7 +727,7 @@ export default { ...@@ -727,7 +727,7 @@ export default {
}, },
selectChangeBank(val){ selectChangeBank(val){
this.$forceUpdate() this.$forceUpdate()
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount) let bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
this.form.supplierBank = bank.bankName this.form.supplierBank = bank.bankName
this.form.supplierBankAccountName = bank.accountName this.form.supplierBankAccountName = bank.accountName
}, },
...@@ -737,9 +737,9 @@ export default { ...@@ -737,9 +737,9 @@ export default {
if(val){ if(val){
getSupplier(val).then((res)=>{ getSupplier(val).then((res)=>{
this.bankData = res.data.bankList this.bankData = res.data.bankList
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount) let bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
console.log(this.bankData) console.log(bank)
if(this.bankData.length>0&&!bank) this.form.supplierBankAccount= this.bankData[0]['bankAccount'] if(!bank&&this.bankData.length>0) this.form.supplierBankAccount= this.bankData[0]['bankAccount']
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment