1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +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,19 +751,27 @@ export default {
this.clearOrder() this.clearOrder()
}, },
changeWarehouse(warehouse) { changeWarehouse(warehouse) {
const attributePin = { if (warehouse.is_pos_required_pin) {
...warehouse, const attributePin = {
action: 'changeWarehouse', ...warehouse,
type: 'actionPos', action: 'changeWarehouse',
label: this.$t('form.pos.pinMessage.warehouse') type: 'actionPos',
label: this.$t('form.pos.pinMessage.warehouse')
}
const visible = true
this.visible = visible
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
} else {
this.$store.commit('setCurrentWarehousePos', warehouse)
} }
const visible = true
this.visible = visible
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
}, },
changeDocumentType(documentType) { changeDocumentType(documentType) {
if (this.adviserPin) { if (!documentType.is_pos_required_pin) {
this.$store.commit('setCurrentDocumentTypePos', documentType) this.$store.dispatch('updateOrder', {
orderUuid: this.currentOrder.uuid,
posUuid: this.currentPointOfSales.uuid,
documentTypeUuid: documentType.uuid
})
} else { } else {
const attributePin = { const attributePin = {
...documentType, ...documentType,
@ -776,14 +784,18 @@ export default {
} }
}, },
changePriceList(priceList) { changePriceList(priceList) {
const attributePin = { if (priceList.is_pos_required_pin) {
...priceList, const attributePin = {
action: 'changePriceList', ...priceList,
type: 'actionPos', action: 'changePriceList',
label: this.$t('form.pos.pinMessage.priceList') type: 'actionPos',
label: this.$t('form.pos.pinMessage.priceList')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} else {
this.$store.commit('setCurrentPriceList', priceList)
} }
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
}, },
arrowTop() { arrowTop() {
if (this.currentTable > 0) { if (this.currentTable > 0) {