Commit 76a4393d authored by qiaoyajun's avatar qiaoyajun

vuex添加客户

parent d231299a
......@@ -1259,6 +1259,9 @@ export default {
},created(){
this.orderObj = this.$route.query.orderObj?JSON.parse(this.$route.query.orderObj):null;
console.log(this.$route.query.orderObj)
if(this.orderObj!=null&&this.orderObj.OrderSource===10){
console.log("getGuestInfo",this.$store.getters.getGuestInfo)
}
},mounted(){
let userInfo = this.getLocalStorage();
this.department = userInfo.DepartName;
......
......@@ -389,6 +389,9 @@ export default {
}, null)
},
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 orderObj = {
OrderID: 0,
......
/* 获取数据 */
export default {
getGuestInfo(state) {
return state.guestInfo;
}
}
......@@ -5,6 +5,7 @@ import modules from './modules'
import mutations from './mutations'
import actions from './actions'
import state from './state'
import getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
......@@ -15,6 +16,8 @@ export default new Vuex.Store({
mutations,
// 与mutation通讯,ui层写入内存数据的接口,可异步操作
actions,
// 获取数据
getters,
plugins: [],
strict: false
})
......@@ -562,6 +562,9 @@ export default {
// 页面数据暂存
pageConditionUpdate(state, obj) {
state.pageCondition = obj
},
// 客户数据暂存
saveGuestInfo(state, guestInfo) {
state.guestInfo = guestInfo;
}
}
......@@ -86,5 +86,7 @@ export default {
// 聊天室成员列表
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