Commit da389a57 by 李伟康

commit 修复操作缓存

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