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

新建收款单修复

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