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

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

View File

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