init
This commit is contained in:
37
src/vuex/modules/data.js
Normal file
37
src/vuex/modules/data.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import * as types from '../types'
|
||||
// import { getStore, setStore } from '@config/mUtils.js'
|
||||
|
||||
const state = {
|
||||
materObj: {}, // 物料查询-盘点修改
|
||||
hcxCheckObj: {} // 缓存线盘点 - 盘点修改
|
||||
}
|
||||
|
||||
const getters = {
|
||||
materObj: state => state.materObj,
|
||||
hcxCheckObj: state => state.hcxCheckObj
|
||||
}
|
||||
|
||||
const actions = {
|
||||
materObj ({commit}, res) {
|
||||
commit(types.MATER_OBJ, res)
|
||||
},
|
||||
hcxCheckObj ({commit}, res) {
|
||||
commit(types.HCX_CHECK_OBJ, res)
|
||||
}
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
[types.MATER_OBJ] (state, res) {
|
||||
state.materObj = res
|
||||
},
|
||||
[types.HCX_CHECK_OBJ] (state, res) {
|
||||
state.hcxCheckObj = res
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
state,
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
Reference in New Issue
Block a user