diff --git a/src/store/index.js b/src/store/index.js index a764d4b..ac32be1 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,6 +4,7 @@ import common from './modules/common'; import tags from './modules/tags'; import logs from './modules/logs'; import dict from './modules/dict'; +import client from './modules/client' import getters from './getters'; const store = createStore({ @@ -13,6 +14,7 @@ const store = createStore({ logs, tags, dict, + client }, getters, }); diff --git a/src/store/modules/client.js b/src/store/modules/client.js new file mode 100644 index 0000000..dae6f00 --- /dev/null +++ b/src/store/modules/client.js @@ -0,0 +1,39 @@ +const params = { + state: { + // 其它入库 + otherInParams: {}, + // 物料入库 + materialInParams: {}, + // 转移入库 + exchangeInParams: {}, + // 其他出库 + otherOutParams: {}, + // 物料出库 + materialOutParams: {}, + // 领料出库 + exchangeOutParams: {}, + // 玻璃饼出库 + pieOutParams: {}, + }, + mutations: { + //保存数据 + CHANGE_ACTIVE_LI(state, data) { + state[data.title] = data.form; + }, + //清除数据 + // SET_CLEAR_DATA(state,data){ + // state.id=data + // } + }, + actions: { + //保存数据 + changeSetting({ commit }, data) { + commit("CHANGE_ACTIVE_LI", data); + }, + //清除数据 + // clearVuex({ commit }) { + // commit("SET_CLEAR_DATA", null); + // }, + }, +} +export default params; \ No newline at end of file diff --git a/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue b/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue index d4ba1aa..e603652 100644 --- a/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue +++ b/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue @@ -349,12 +349,21 @@ export default { checkRow:{}, }; }, - mounted() { }, + created() { + if (JSON.stringify(this.$store.state.client.pieOutParams) !== "{}") { + this.query = this.$store.state.client.pieOutParams; + this.searchForm = this.$store.state.client.pieOutParams; + } + }, methods: { searchChange(params, done){ this.query = params this.page.currentPage = 1 this.onLoad() + this.$store.dispatch("changeSetting", { + title: "pieOutParams", + form: this.query, + }); done() }, searchReset(){ diff --git a/src/views/inboundOutboundManagement/materialIssuing.vue b/src/views/inboundOutboundManagement/materialIssuing.vue index b97d254..525e2aa 100644 --- a/src/views/inboundOutboundManagement/materialIssuing.vue +++ b/src/views/inboundOutboundManagement/materialIssuing.vue @@ -2,6 +2,7 @@ @@ -405,11 +406,15 @@ export default { }, ] - } + }, + searchForm:{} } }, - mounted() { - + created() { + if (JSON.stringify(this.$store.state.client.exchangeOutParams) !== "{}") { + this.query = this.$store.state.client.exchangeOutParams; + this.searchForm = this.$store.state.client.exchangeOutParams; + } }, methods: { changeCode(val){ @@ -420,6 +425,10 @@ export default { searchChange(params, done){ this.query = params this.page.currentPage = 1 + this.$store.dispatch("changeSetting", { + title: "exchangeOutParams", + form: this.query, + }); this.onLoad() done() }, diff --git a/src/views/inboundOutboundManagement/otherIssuing/index.vue b/src/views/inboundOutboundManagement/otherIssuing/index.vue index 15bd52f..ba8d16b 100644 --- a/src/views/inboundOutboundManagement/otherIssuing/index.vue +++ b/src/views/inboundOutboundManagement/otherIssuing/index.vue @@ -1,6 +1,8 @@