|
@@ -17,6 +17,7 @@ const user = {
|
|
|
changeOrg: '',
|
|
|
settleAccountFlag: 0, // 结算账户管理是否开启
|
|
|
isShowSpecialPrice: 0, // 是否显示特约价
|
|
|
+ dealerSupplierFlag: 0 // 是否是省仓用户
|
|
|
},
|
|
|
|
|
|
mutations: {
|
|
@@ -47,12 +48,15 @@ const user = {
|
|
|
SET_MUSTCHANGEPWD: (state, status) => {
|
|
|
state.mustChangePwd = status
|
|
|
},
|
|
|
- SET_SETTLEACCOUNT:(state, status) => {
|
|
|
+ SET_SETTLEACCOUNT: (state, status) => {
|
|
|
state.settleAccountFlag = status
|
|
|
},
|
|
|
- SET_isShowSpecialPrice:(state, status) => {
|
|
|
+ SET_isShowSpecialPrice: (state, status) => {
|
|
|
state.isShowSpecialPrice = status
|
|
|
},
|
|
|
+ SET_dealerSupplierFlag: (state, status) => {
|
|
|
+ state.dealerSupplierFlag = status
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
actions: {
|
|
@@ -72,7 +76,8 @@ const user = {
|
|
|
commit('SET_AUTHORGS', res.auth_orgs || [])
|
|
|
commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
|
|
|
commit('SET_MUSTCHANGEPWD', users.mustChangePwd)
|
|
|
- commit('SET_isShowSpecialPrice',users.extInfo.isShowSpecialPrice)
|
|
|
+ commit('SET_isShowSpecialPrice', users.extInfo.isShowSpecialPrice)
|
|
|
+ commit('SET_dealerSupplierFlag', users.extInfo.dealerSupplierFlag)
|
|
|
Vue.ls.set('rolesAccess-qpls-md', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
|
|
|
commit('SET_AVATAR', res.avatar ? res.avatar : '')
|
|
|
// 记住密码
|
|
@@ -100,7 +105,7 @@ const user = {
|
|
|
const roles = Vue.ls.get('rolesAccess-qpls-md')
|
|
|
// 如果存在不同步采购退货,屏蔽同步的采购退货
|
|
|
const hasOutSyncReturn = roles.permissionList.find(item => item == 'M_purchaseReturn_outSnycList')
|
|
|
- if(hasOutSyncReturn){
|
|
|
+ if (hasOutSyncReturn) {
|
|
|
roles.permissionList = roles.permissionList.filter(item => item != 'M_purchaseReturnList')
|
|
|
}
|
|
|
commit('SET_ROLES', roles)
|
|
@@ -113,32 +118,32 @@ const user = {
|
|
|
commit('SET_CHANGEORG', info)
|
|
|
},
|
|
|
// 更新结算账户状态
|
|
|
- UpdateSettleAccount({ commit, state }, info) {
|
|
|
+ UpdateSettleAccount ({ commit, state }, info) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
updateAccountMangeState(info).then(res => {
|
|
|
- if(res.status == 200){
|
|
|
+ if (res.status == 200) {
|
|
|
resolve(res)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
reject(ret)
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
- reject(error)
|
|
|
- })
|
|
|
+ reject(error)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
// 查询结算账户状态
|
|
|
- GetSettleAccountState({ commit, state }) {
|
|
|
+ GetSettleAccountState ({ commit, state }) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
queryAccountMangeState().then(res => {
|
|
|
- if(res.status == 200){
|
|
|
- commit('SET_SETTLEACCOUNT', res.data&&res.data.functionEnableFlag)
|
|
|
+ if (res.status == 200) {
|
|
|
+ commit('SET_SETTLEACCOUNT', res.data && res.data.functionEnableFlag)
|
|
|
resolve(res)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
reject(ret)
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
- reject(error)
|
|
|
- })
|
|
|
+ reject(error)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
// 登出
|
|
@@ -157,7 +162,8 @@ const user = {
|
|
|
commit('SET_MUSTCHANGEPWD', '')
|
|
|
commit('SET_AVATAR', '')
|
|
|
commit('SET_TOKEN', '')
|
|
|
- commit('SET_isShowSpecialPrice','0')
|
|
|
+ commit('SET_isShowSpecialPrice', '0')
|
|
|
+ commit('SET_isShowSpecialPrice', '0')
|
|
|
commit('SET_ROLES', { permissionList: [] })
|
|
|
Vue.ls.remove(ACCESS_TOKEN)
|
|
|
Vue.ls.remove('userName')
|