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

创建请款单优化

parent 9a738cd9
......@@ -727,7 +727,7 @@ export default {
},
selectChangeBank(val){
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.supplierBankAccountName = bank.accountName
},
......@@ -737,9 +737,9 @@ export default {
if(val){
getSupplier(val).then((res)=>{
this.bankData = res.data.bankList
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
console.log(this.bankData)
if(this.bankData.length>0&&!bank) this.form.supplierBankAccount= this.bankData[0]['bankAccount']
let bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount)
console.log(bank)
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