mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
error correction with default point of sale with sales representative (#582)
* error correction with default point of sale with sales representative * minimal change
This commit is contained in:
parent
19d4bb123d
commit
e2bbc598a7
@ -130,9 +130,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isEmptyValue(this.currentPoint)) {
|
||||
this.$store.dispatch('listPointOfSalesFromServer')
|
||||
}
|
||||
this.$store.dispatch('listPointOfSalesFromServer')
|
||||
this.unsubscribe = this.subscribeChanges()
|
||||
},
|
||||
mounted() {
|
||||
|
@ -136,7 +136,12 @@ const pointOfSales = {
|
||||
return currentPOS.uuid
|
||||
},
|
||||
// current pos info
|
||||
getCurrentPOS: (state) => {
|
||||
getCurrentPOS: (state, getters) => {
|
||||
const userUuid = getters['user/getUserUuid']
|
||||
const sellingPointsList = state.pointOfSales.sellingPointsList.length
|
||||
if (sellingPointsList > 1) {
|
||||
return state.pointOfSales.sellingPointsList.find(elem => elem.salesRepresentative.uuid === userUuid)
|
||||
}
|
||||
if (isEmptyValue(state.pointOfSales)) {
|
||||
return undefined
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user