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:
parent
4401c1d77d
commit
5e8b46ad32
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user