Commit da389a57 by 李伟康

commit 修复操作缓存

1 parent cac2e438
......@@ -242,6 +242,7 @@ export default {
watchStatus: {
immediate: true,
handler (newval) {
console.log(newval)
if (newval) this.clearBoard()
}
},
......
......@@ -172,7 +172,8 @@ export default {
watchStatus: {
immediate: true,
handler (newval) {
if (newval) this.receptionStatus = -1
this.receptionStatus = -1
this.errorTip = false
}
},
},
......
......@@ -258,7 +258,6 @@ export default {
let { id } = this.chooseItem;
this.type = "preview";
this.id = id;
this.clearHistory()
this.$refs.previewRef.close();
},
// 完成接待
......@@ -269,7 +268,6 @@ export default {
setTimeout(() => {
this.id = "";
this.type = "";
this.$store.dispatch("clearHistory", true);
this.setReceptionStatus(e);
}, 1500);
},
......@@ -280,7 +278,6 @@ export default {
},
backHome () {
this.$refs.finish.close()
this.clearHistory()
this.id = "";
this.type = "";
},
......@@ -299,7 +296,7 @@ export default {
},
clearHistory(){
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory", true);
this.$store.dispatch("clearHistory");
},
openStep () {
this.$refs.finish.close()
......
......@@ -8,29 +8,29 @@
// import { setToken, getToken, removeToken } from '@/utils/token';;
export default {
state() {
state () {
return {
customerInfo: {
customerName: "",
carBrand:'',
carBrand: '',
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
},
historyStatus:false,
carBrands:[],
employeeList:[],
historyStatus: Date.now(),
carBrands: [],
employeeList: [],
};
},
mutations: {
getCustomerInfo(state) {
getCustomerInfo (state) {
return state.customerInfo;
},
setCustomerInfo(state, data) {
setCustomerInfo (state, data) {
state.customerInfo = data;
},
clearCustomerInfo(state) {
clearCustomerInfo (state) {
state.customerInfo = {
customerName: "",
carModel: "",
......@@ -42,22 +42,22 @@ export default {
},
actions: {
// 获取用户详情
getCustomerInfo({ state }) {
getCustomerInfo ({ state }) {
return state.customerInfo;
},
setCustomerInfo({ commit }, value) {
setCustomerInfo ({ commit }, value) {
commit("setCustomerInfo", value);
},
clearCustomerInfo({ commit }) {
clearCustomerInfo ({ commit }) {
commit("clearCustomerInfo");
},
clearHistory({state}, value = false){
state.historyStatus = value
clearHistory ({ state }) {
state.historyStatus = Date.now()
},
setCarBrandsList({state},value){
setCarBrandsList ({ state }, value) {
state.carBrands = value
},
setEmployeeList({state},value){
setEmployeeList ({ state }, value) {
state.employeeList = value
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!