mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
Correcting point of sale style (#1114)
* Correcting point of sale style * minimal changes Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
parent
8b1e0a8345
commit
a69bd99dbd
@ -100,6 +100,22 @@ export default [
|
||||
isMandatory: true
|
||||
}
|
||||
},
|
||||
{
|
||||
elementColumnName: 'EMail',
|
||||
columnName: 'EMail',
|
||||
tableName: 'AD_user',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 5,
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
handleActionPerformed: true,
|
||||
size: 24,
|
||||
displayLogic: `@TenderType@=='Z'`,
|
||||
isActiveLogics: true,
|
||||
isMandatory: true
|
||||
}
|
||||
},
|
||||
// ReferenceNo
|
||||
{
|
||||
tableName: 'HR_Attribute',
|
||||
@ -107,7 +123,7 @@ export default [
|
||||
columnName: 'ReferenceNo',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 5,
|
||||
sequence: 6,
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
handleActionPerformed: true,
|
||||
@ -124,7 +140,7 @@ export default [
|
||||
columnName: 'CreditCardType',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 6,
|
||||
sequence: 7,
|
||||
defaultValue: 'M',
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
@ -142,7 +158,7 @@ export default [
|
||||
columnName: 'CreditCardNumber',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 7,
|
||||
sequence: 8,
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
handleActionPerformed: true,
|
||||
@ -159,7 +175,7 @@ export default [
|
||||
columnName: 'AccountNo',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 8,
|
||||
sequence: 9,
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
handleActionPerformed: true,
|
||||
@ -168,21 +184,5 @@ export default [
|
||||
isActiveLogics: true,
|
||||
isMandatory: true
|
||||
}
|
||||
},
|
||||
{
|
||||
elementColumnName: 'EMail',
|
||||
columnName: 'EMail',
|
||||
tableName: 'AD_user',
|
||||
isFromDictionary: true,
|
||||
overwriteDefinition: {
|
||||
sequence: 4,
|
||||
handleActionKeyPerformed: true,
|
||||
handleContentSelection: true,
|
||||
handleActionPerformed: true,
|
||||
size: 24,
|
||||
displayLogic: `@TenderType@=='Z'`,
|
||||
isActiveLogics: true,
|
||||
isMandatory: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -175,7 +175,7 @@
|
||||
</el-main>
|
||||
<!-- Collection container bottom panel -->
|
||||
<el-footer id="infoInvoce" height="auto" style="padding-left: 0px; padding-right: 0px;">
|
||||
<el-row :gutter="24" style="background-color: rgb(245, 247, 250);">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<span>
|
||||
<p class="total">
|
||||
|
@ -21,7 +21,7 @@
|
||||
id="headerContainer"
|
||||
style="display: -webkit-box; height: 100%"
|
||||
>
|
||||
<el-container style="background: white; height: 100%!important;">
|
||||
<el-container v-shortkey="{ closeForm: ['esc'] }" style="background: white; height: 100%!important;" @shortkey.native="keyActionClosePin">
|
||||
<el-header
|
||||
height="auto"
|
||||
:style="isShowedPOSKeyLayout ? 'padding-right: 20px; padding-left: 0px;' : 'padding-right: 0px; padding-left: 0px;'"
|
||||
@ -214,7 +214,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-main>
|
||||
<el-dialog ref="dialog" :title="$t('form.pos.pinMessage.pin') + infowOverdrawnInvoice.label" width="40%" :visible.sync="visible">
|
||||
<el-dialog ref="dialog" v-shortkey="{ closeForm: ['esc'] }" :title="$t('form.pos.pinMessage.pin') + infowOverdrawnInvoice.label" width="40%" :visible.sync="visible" @shortkey.native="keyActionClosePin">
|
||||
<el-input
|
||||
id="pin"
|
||||
ref="pin"
|
||||
@ -223,6 +223,7 @@
|
||||
type="password"
|
||||
:placeholder="$t('form.pos.tableProduct.pin')"
|
||||
:focus="true"
|
||||
@change="openPin(pin)"
|
||||
/>
|
||||
<span style="float: right;">
|
||||
<el-button
|
||||
@ -383,13 +384,13 @@
|
||||
</p>
|
||||
<p class="total">{{ $t('form.pos.order.type') }}:<b class="order-info">{{ currentOrder.documentType.name }}</b></p>
|
||||
<p class="total">
|
||||
{{ $t('form.pos.order.itemQuantity') }}
|
||||
{{ $t('form.pos.order.itemQuantity') }}:
|
||||
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
|
||||
{{ getItemQuantity }}
|
||||
</b>
|
||||
</p>
|
||||
<p class="total">
|
||||
{{ $t('form.pos.order.numberLines') }}
|
||||
{{ $t('form.pos.order.numberLines') }}:
|
||||
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
|
||||
{{ numberOfLines }}
|
||||
</b>
|
||||
@ -683,9 +684,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
showOverdrawnInvoice(value) {
|
||||
if (value) {
|
||||
this.visible = value
|
||||
}
|
||||
this.visible = value
|
||||
},
|
||||
numberOfLines(value) {
|
||||
if (value > 0) {
|
||||
@ -725,6 +724,10 @@ export default {
|
||||
formatDate,
|
||||
formatPrice,
|
||||
formatQuantity,
|
||||
keyActionClosePin(event) {
|
||||
this.visible = false
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: false })
|
||||
},
|
||||
focusPin() {
|
||||
this.$refs.pin.focus()
|
||||
},
|
||||
|
@ -23,9 +23,9 @@
|
||||
<el-popover
|
||||
v-model="visible"
|
||||
v-shortkey="keyShortcuts"
|
||||
placement="right"
|
||||
placement="bottom-start"
|
||||
trigger="click"
|
||||
width="800"
|
||||
width="1250"
|
||||
@shortkey.native="close"
|
||||
>
|
||||
<el-button icon="el-icon-close" type="text" style="float: right;padding: 1% 1% 0px 0px;font-size: 20px;" @click="close" />
|
||||
|
@ -48,18 +48,27 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="product.value"
|
||||
label="Codigo"
|
||||
:label="$t('form.productInfo.code')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="product.name"
|
||||
label="Producto"
|
||||
:label="$t('form.productInfo.name')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="priceListName"
|
||||
label="Lista de Precio"
|
||||
prop="quantityOnHand"
|
||||
:label="$t('form.productInfo.quantityOnHand')"
|
||||
align="right"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Precio"
|
||||
:label="$t('form.pos.collect.convertedAmount')"
|
||||
align="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ formatPrice(scope.row.schemaPriceStandard, scope.row.schemaCurrency.iSOCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('form.productInfo.price')"
|
||||
align="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
@ -133,6 +142,7 @@ export default {
|
||||
listWithPrice() {
|
||||
const { productPricesList } = this.productPrice
|
||||
if (!this.isEmptyValue(productPricesList)) {
|
||||
console.log(productPricesList)
|
||||
return productPricesList
|
||||
}
|
||||
return []
|
||||
|
@ -169,6 +169,9 @@ export default {
|
||||
return pos.isPosRequiredPin
|
||||
}
|
||||
return false
|
||||
},
|
||||
showOverdrawnInvoice() {
|
||||
return this.$store.getters.getOverdrawnInvoice.visible
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -200,6 +203,9 @@ export default {
|
||||
if (!value && !this.isEmptyValue(this.$route.query)) {
|
||||
this.reloadOrder(true)
|
||||
}
|
||||
},
|
||||
showOverdrawnInvoice(value) {
|
||||
this.visible = value
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
@ -602,38 +608,30 @@ export default {
|
||||
} else if (mutation.type === 'addActionPerformed') {
|
||||
switch (mutation.payload.columnName) {
|
||||
case 'QtyEntered':
|
||||
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
|
||||
if (this.allowsModifyQuantity) {
|
||||
this.updateOrderLine(mutation.payload)
|
||||
} else {
|
||||
const attributePin = {
|
||||
...mutation.payload,
|
||||
type: 'updateOrder',
|
||||
label: this.$t('form.pos.pinMessage.qtyEntered')
|
||||
}
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
this.visible = true
|
||||
}
|
||||
} else if (!this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
|
||||
if (this.allowsModifyQuantity && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
|
||||
this.updateOrderLine(mutation.payload)
|
||||
} else {
|
||||
const attributePin = {
|
||||
...mutation.payload,
|
||||
type: 'updateOrder',
|
||||
label: this.$t('form.pos.pinMessage.qtyEntered')
|
||||
}
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
this.visible = true
|
||||
}
|
||||
break
|
||||
case 'PriceEntered':
|
||||
case 'Discount':
|
||||
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
|
||||
if (this.modifyPrice) {
|
||||
this.updateOrderLine(mutation.payload)
|
||||
} else {
|
||||
const attributePin = {
|
||||
...mutation.payload,
|
||||
type: 'updateOrder',
|
||||
label: mutation.payload.columnName === 'PriceEntered' ? this.$t('form.pos.pinMessage.price') : this.$t('form.pos.pinMessage.discount')
|
||||
}
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
this.visible = true
|
||||
}
|
||||
} else if (!this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) {
|
||||
if (this.modifyPrice) {
|
||||
this.updateOrderLine(mutation.payload)
|
||||
} else {
|
||||
const attributePin = {
|
||||
...mutation.payload,
|
||||
type: 'updateOrder',
|
||||
label: mutation.payload.columnName === 'PriceEntered' ? this.$t('form.pos.pinMessage.price') : this.$t('form.pos.pinMessage.discount')
|
||||
}
|
||||
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
|
||||
this.visible = true
|
||||
}
|
||||
break
|
||||
case 'C_DocTypeTarget_ID': {
|
||||
|
@ -436,8 +436,8 @@ export default {
|
||||
discount: 'Descuento',
|
||||
tax: 'Impuesto',
|
||||
total: 'Total',
|
||||
itemQuantity: 'Cantidad de Árticulo',
|
||||
numberLines: 'Numero de Lineas',
|
||||
itemQuantity: 'Cantidad de Artículos',
|
||||
numberLines: 'Número de Líneas',
|
||||
pointSale: 'Punto de Venta',
|
||||
collect: 'Cobrar',
|
||||
collections: 'Cobros',
|
||||
@ -521,6 +521,7 @@ export default {
|
||||
id: 'ID',
|
||||
lastName: 'Nombre2',
|
||||
description: 'Descripción',
|
||||
convertedPrice: 'Precio Convertido',
|
||||
quantityOnHand: 'Existencia',
|
||||
price: 'Precio',
|
||||
taxAmount: 'Monto de Impuesto',
|
||||
|
Loading…
x
Reference in New Issue
Block a user