mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Bugfix/fix point router on initial load (#630)
* add complete order from collection * call the edit line fields only when they are displayed * unnecessary calling of customer fields * minimal changes * Add point id to the route on initial load Co-authored-by: Elsio Sanchez <elsiosanche@gmail.com>
This commit is contained in:
parent
472ffc523a
commit
eb4b746a9a
@ -584,7 +584,7 @@ export function requestProcessOrder({
|
||||
amount: parameter.amount,
|
||||
tender_type_code: parameter.tenderTypeCode,
|
||||
payment_ate: parameter.paymentDate,
|
||||
currency_uid: parameter.currency_uuid
|
||||
currency_uid: parameter.currencyUuid
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ export default {
|
||||
amount: this.amontSend,
|
||||
paymentDate,
|
||||
tenderTypeCode,
|
||||
currencyUuid: this.currencyDisplay(currencyToPay).currencyUuid
|
||||
currencyUuid: this.currencyDisplay(currencyToPay)
|
||||
})
|
||||
}
|
||||
this.addCollect()
|
||||
@ -739,6 +739,9 @@ export default {
|
||||
if (display) {
|
||||
return display
|
||||
}
|
||||
if (currency === this.currencyPoint.id) {
|
||||
return this.currencyPoint.uuid
|
||||
}
|
||||
return currency
|
||||
},
|
||||
convertCurrency() {
|
||||
|
@ -116,9 +116,6 @@ export default {
|
||||
if (this.isEmptyValue(this.$store.getters.getSellingPointsList)) {
|
||||
let posToSet
|
||||
// set pos id with query path
|
||||
if (!this.isEmptyValue(this.$route.query) && !this.isEmptyValue(this.$route.query.pos)) {
|
||||
posToSet = Number(this.$route.query.pos)
|
||||
}
|
||||
this.$store.dispatch('listPointOfSalesFromServer', posToSet)
|
||||
}
|
||||
|
||||
|
@ -133,6 +133,11 @@ export default {
|
||||
this.listOrderLines(value)
|
||||
}
|
||||
},
|
||||
currentPoint(value) {
|
||||
if (!this.isEmptyValue(value)) {
|
||||
this.$store.dispatch('setCurrentPOS', value)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Used when loading/reloading the app without the order uuid
|
||||
* @param {oject|boolean} bPartnerToSet
|
||||
@ -166,6 +171,17 @@ export default {
|
||||
if (!this.isEmptyValue(this.$route.query)) {
|
||||
this.reloadOrder(true, this.$route.query.action)
|
||||
}
|
||||
if (!this.isEmptyValue(this.$route.query.pos) && !this.isEmptyValue(this.allOrderLines) && this.isEmptyValue(this.$route.query.action)) {
|
||||
this.$router.push({
|
||||
params: {
|
||||
...this.$route.params
|
||||
},
|
||||
query: {
|
||||
...this.$route.query,
|
||||
action: this.getOrder.uuid
|
||||
}
|
||||
}, () => {})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
@ -311,7 +327,7 @@ export default {
|
||||
this.createOrderLine(response.uuid)
|
||||
}
|
||||
this.$store.dispatch('listOrdersFromServer', {
|
||||
posUuid: this.$store.getters.getCurrentPOS.uuid
|
||||
posUuid: this.currentPoint.uuid
|
||||
})
|
||||
}).catch(() => {})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user