Commit 5e26af77 by 李伟康

增加key刷新页面

1 parent 04848d8a
......@@ -50,6 +50,7 @@
<view
:class="['select', `${formData[i.key] ? '' : 'placeholder'}`]"
@click="showPopup(i)"
:key="selectKey"
>
{{ formData[i.key] || i.placeholder }}
<uni-icons
......@@ -216,7 +217,8 @@ export default {
],
errorTip: false,
receptionStatus: -1,
updateViewKey: Date.now()
updateViewKey: Date.now(),
selectKey: Date.now(),
}
},
computed: {
......@@ -325,11 +327,11 @@ export default {
this.formData.carModelId = item.id
}
this.$store.dispatch("setCustomerInfo", this.formData);
this.selectKey = Date.now()
},
open () {
this.$store.dispatch('getCustomerInfo').then((customerInfo) => {
this.formData = customerInfo
this.updateViewKey = Date.now()
let { sceneType, customerType } = this,
step = Object.values(customerInfo).every((value) => !!value) ? 2 : 1
this.errorTip = false
......@@ -347,6 +349,7 @@ export default {
}
this.step = step
this.$refs.formRef.open()
this.updateViewKey = Date.now()
})
},
chooseResult (val) {
......
......@@ -48,6 +48,7 @@
<view
:class="['select', `${customerInfo[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)"
:key="selectKey"
>
{{ customerInfo[i.key] || i.placeholder }}
<uni-icons
......@@ -293,7 +294,8 @@ export default {
customerQr: ''
},
isCheck: false,
customerType: 1
customerType: 1,
selectKey:Date.now()
}
},
mounted () {
......@@ -382,6 +384,7 @@ export default {
this.customerInfo.carModel = item.name;
}
this.$store.dispatch("setCustomerInfo", this.customerInfo);
this.selectKey = Date.now()
const { customerName, phoneNumber, staffName } = this.customerInfo
this.isCheck = customerName && phoneNumber && staffName
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!