1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Fixed error with Search Product from Value instead name (#680)

This commit is contained in:
Yamel Senih 2021-03-22 11:10:58 -04:00 committed by GitHub
parent 4401c1d77d
commit 5e8b46ad32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 19 deletions

View File

@ -226,26 +226,15 @@ export default {
setKeyActionToOrderLine(keyValue) {
if (!this.isEmptyValue(keyValue.subKeyLayoutUuid)) {
this.loadKeyLayout(keyValue.subKeyLayoutUuid)
} else {
const products = this.listOrderLine.find(item => item.lineDescription === keyValue.name)
// TODO: Change this dispatch
if (!this.isEmptyValue(products) && keyValue.quantity > 1) {
this.$store.dispatch('notifyActionKeyPerformed', {
value: {
QtyEntered: keyValue.quantity,
value: keyValue.name
}
})
} else {
this.$store.dispatch('notifyActionKeyPerformed', {
columnName: 'ProductValue',
value: {
QtyEntered: keyValue.quantity,
value: keyValue.name
value: keyValue.productValue
}
})
}
}
},
handleCommand(command) {
const point = this.$store.getters.getPointOfSalesUuid.keyLayoutUuid

View File

@ -115,7 +115,7 @@ export function convertKey(keyToConvert) {
sequence: keyToConvert.sequence,
spanX: keyToConvert.span_x,
spanY: keyToConvert.span_y,
productUuid: keyToConvert.product_uuid,
productValue: keyToConvert.product_value,
quantity: keyToConvert.quantity,
resourceReference: convertResourceReference(
keyToConvert.resource_reference