1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +08:00

Change document type at the point of sale (#1108)

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-08-23 22:03:07 -04:00 committed by GitHub
parent 966e63907e
commit 540b8807a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -751,6 +751,7 @@ export default {
this.clearOrder()
},
changeWarehouse(warehouse) {
if (warehouse.is_pos_required_pin) {
const attributePin = {
...warehouse,
action: 'changeWarehouse',
@ -760,10 +761,17 @@ export default {
const visible = true
this.visible = visible
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
} else {
this.$store.commit('setCurrentWarehousePos', warehouse)
}
},
changeDocumentType(documentType) {
if (this.adviserPin) {
this.$store.commit('setCurrentDocumentTypePos', documentType)
if (!documentType.is_pos_required_pin) {
this.$store.dispatch('updateOrder', {
orderUuid: this.currentOrder.uuid,
posUuid: this.currentPointOfSales.uuid,
documentTypeUuid: documentType.uuid
})
} else {
const attributePin = {
...documentType,
@ -776,6 +784,7 @@ export default {
}
},
changePriceList(priceList) {
if (priceList.is_pos_required_pin) {
const attributePin = {
...priceList,
action: 'changePriceList',
@ -784,6 +793,9 @@ export default {
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} else {
this.$store.commit('setCurrentPriceList', priceList)
}
},
arrowTop() {
if (this.currentTable > 0) {