Commit 39845597 authored by 我在何方's avatar 我在何方

新建收款单修复

parent a45f0db6
......@@ -61,6 +61,9 @@ export default {
getCustomerSelect(params)
.then(res => this.list = res.data.list)
.finally(() => this.loading = false)
},
reset(){
this.index=null
}
}
}
......
......@@ -19,6 +19,7 @@
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('客户')}}</span>
<customer-selector
ref="customer"
v-model="form.customerId"
@change="customerChange"
/>
......@@ -751,10 +752,11 @@ export default {
this.id = this.$route.query.id;
this.getReceivableData()
}
console.log(this.$route.query.receiptId)
if (this.$route.query.receiptId && this.$route.query.receiptId !== '0') {
if (this.$route.query.receiptId && this.$route.query.receiptId != 0) {
this.receiptId = this.$route.query.receiptId;
this.getReceivableInfo()
}else{
this.removeData()
}
},
async created() {
......@@ -1165,7 +1167,7 @@ export default {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6)
},
customerChange(value) {
if (this.flag) {
if (this.flag||!value) {
this.flag = false
return
}
......@@ -1434,6 +1436,19 @@ export default {
this.queryParams.page = 1;
this.getList()
},
//清空数据
removeData(){
console.log(this.form)
this.$refs.customer.reset()
this.list = []
for(var i in this.form){
if(i=='receiptAccountList'){
this.$set(this.form,i,[])
}else{
this.$set(this.form,i,'')
}
}
}
},
};
</script>
......
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