Commit 76a4393d authored by qiaoyajun's avatar qiaoyajun

vuex添加客户

parent d231299a
......@@ -817,7 +817,7 @@ export default {
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
this.saveMsg.push({
Content: x.data.FilePath,
......@@ -879,7 +879,7 @@ export default {
}).then(() => {
this.$router.push({ name:'addFinancialDocuments',query:{"id":this.$route.query.id,"Name":this.$route.query.Name,'InPay':this.$route.query.InPay,"Type":this.$route.query.Type,"orderObj":this.$route.query.orderObj,'IsUploadPic':this.$route.query.IsUploadPic,'companyID':this.$route.query.companyID}})
}).catch(() => {
this.$router.push({name:'FinancialDocuments',query:{'Type':this.$route.query.Type,'InPay':this.$route.query.InPay}}) ;
this.$router.push({name:'FinancialDocuments',query:{'Type':this.$route.query.Type,'InPay':this.$route.query.InPay}}) ;
});
}else{
this.resultCode = res.data.resultCode;
......@@ -1258,7 +1258,10 @@ export default {
},
},created(){
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(){
let userInfo = this.getLocalStorage();
this.department = userInfo.DepartName;
......
/* 获取数据 */
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
})
......@@ -521,7 +521,7 @@ export default {
state.currReceiptQueryTeamId = obj.teamId
}
var needQuery = obj.msgs
.filter(msg =>
.filter(msg =>
msg.needMsgReceipt && msg.from === state.myInfo.account && !state.receiptQueryList.find(item => item.idServer === msg.idServer)
)
.map(msg => {
......@@ -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