Commit 76a4393d authored by qiaoyajun's avatar qiaoyajun

vuex添加客户

parent d231299a
...@@ -1259,6 +1259,9 @@ export default { ...@@ -1259,6 +1259,9 @@ export default {
},created(){ },created(){
this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null; this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null;
console.log(this.$route.query.orderObj) console.log(this.$route.query.orderObj)
if(this.orderObj!=null&&this.orderObj.OrderSource===10){
console.log("getGuestInfo",this.$store.getters.getGuestInfo)
}
},mounted(){ },mounted(){
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.department = userInfo.DepartName; this.department = userInfo.DepartName;
......
...@@ -389,6 +389,9 @@ export default { ...@@ -389,6 +389,9 @@ export default {
}, null) }, null)
}, },
addFinancialOrder: function (type) { // 新增单据方法 addFinancialOrder: function (type) { // 新增单据方法
let userInfo =[{name:"132",age:11},{name:"1321",age:222}]
this.$store.commit('saveGuestInfo',userInfo)
console.log("getGuestInfo",this.$store.getters.getGuestInfo)
let TCIDARR = [this.tcid]; let TCIDARR = [this.tcid];
let orderObj = { let orderObj = {
OrderID: 0, OrderID: 0,
......
/* 获取数据 */
export default {
getGuestInfo(state) {
return state.guestInfo;
}
}
...@@ -5,6 +5,7 @@ import modules from './modules' ...@@ -5,6 +5,7 @@ import modules from './modules'
import mutations from './mutations' import mutations from './mutations'
import actions from './actions' import actions from './actions'
import state from './state' import state from './state'
import getters from './getters'
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
...@@ -15,6 +16,8 @@ export default new Vuex.Store({ ...@@ -15,6 +16,8 @@ export default new Vuex.Store({
mutations, mutations,
// 与mutation通讯,ui层写入内存数据的接口,可异步操作 // 与mutation通讯,ui层写入内存数据的接口,可异步操作
actions, actions,
// 获取数据
getters,
plugins: [], plugins: [],
strict: false strict: false
}) })
...@@ -562,6 +562,9 @@ export default { ...@@ -562,6 +562,9 @@ export default {
// 页面数据暂存 // 页面数据暂存
pageConditionUpdate(state, obj) { pageConditionUpdate(state, obj) {
state.pageCondition = obj state.pageCondition = obj
},
// 客户数据暂存
saveGuestInfo(state, guestInfo) {
state.guestInfo = guestInfo;
} }
} }
...@@ -86,5 +86,7 @@ export default { ...@@ -86,5 +86,7 @@ export default {
// 聊天室成员列表 // 聊天室成员列表
currChatroomMembers: [], currChatroomMembers: [],
// 页面数据暂存 // 页面数据暂存
pageCondition: null pageCondition: null,
// 客户信息
guestInfo: []
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment