Commit d9d74f13 by 李伟康

commit

1 parent 37494e86
......@@ -139,13 +139,7 @@ export default {
popKey: 'employeeBoxVisible'
}
],
customerInfo: {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
}
customerInfo: this.$store.state.user.customerInfo
}
},
mounted () {
......
......@@ -60,7 +60,7 @@
<media_6 :views="media[id]" />
</view>
<pay-pop ref="pay"></pay-pop>
<template v-if="type != 'preview'">
<template v-if="type != 'preview'">
<view
class="pen-box"
@click="drawStatus = !drawStatus"
......@@ -150,6 +150,7 @@ export default {
},
// 完成接待
done () {
this.$store.dispatch('clearCustomerInfo')
this.stopAudio();
uni.navigateBack();
},
......
......@@ -10,24 +10,42 @@
export default {
state () {
return {
customerInfo: {},
customerInfo: {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
},
};
},
mutations: {
getCustomerInfo(state){
getCustomerInfo (state) {
return state.customerInfo
},
setCustomerInfo (state, data) {
state.customerInfo = data
},
clearCustomerInfo(state){
state.customerInfo = {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
}
}
},
actions: {
// 获取用户详情
async getCustomerInfo ({ commit }) {
return commit('getCustomerInfo')
getCustomerInfo ({state}) {
return state.customerInfo
},
async setCustomerInfo ({ commit }, value) {
setCustomerInfo ({ commit }, value) {
commit('setCustomerInfo', value);
},
clearCustomerInfo({commit}){
commit('clearCustomerInfo')
}
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!