1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +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:
Elsio Sanchez 2021-08-24 15:03:55 -04:00 committed by GitHub
parent 8b1e0a8345
commit a69bd99dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 75 additions and 63 deletions

View File

@ -100,6 +100,22 @@ export default [
isMandatory: true 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 // ReferenceNo
{ {
tableName: 'HR_Attribute', tableName: 'HR_Attribute',
@ -107,7 +123,7 @@ export default [
columnName: 'ReferenceNo', columnName: 'ReferenceNo',
isFromDictionary: true, isFromDictionary: true,
overwriteDefinition: { overwriteDefinition: {
sequence: 5, sequence: 6,
handleActionKeyPerformed: true, handleActionKeyPerformed: true,
handleContentSelection: true, handleContentSelection: true,
handleActionPerformed: true, handleActionPerformed: true,
@ -124,7 +140,7 @@ export default [
columnName: 'CreditCardType', columnName: 'CreditCardType',
isFromDictionary: true, isFromDictionary: true,
overwriteDefinition: { overwriteDefinition: {
sequence: 6, sequence: 7,
defaultValue: 'M', defaultValue: 'M',
handleActionKeyPerformed: true, handleActionKeyPerformed: true,
handleContentSelection: true, handleContentSelection: true,
@ -142,7 +158,7 @@ export default [
columnName: 'CreditCardNumber', columnName: 'CreditCardNumber',
isFromDictionary: true, isFromDictionary: true,
overwriteDefinition: { overwriteDefinition: {
sequence: 7, sequence: 8,
handleActionKeyPerformed: true, handleActionKeyPerformed: true,
handleContentSelection: true, handleContentSelection: true,
handleActionPerformed: true, handleActionPerformed: true,
@ -159,7 +175,7 @@ export default [
columnName: 'AccountNo', columnName: 'AccountNo',
isFromDictionary: true, isFromDictionary: true,
overwriteDefinition: { overwriteDefinition: {
sequence: 8, sequence: 9,
handleActionKeyPerformed: true, handleActionKeyPerformed: true,
handleContentSelection: true, handleContentSelection: true,
handleActionPerformed: true, handleActionPerformed: true,
@ -168,21 +184,5 @@ export default [
isActiveLogics: true, isActiveLogics: true,
isMandatory: 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
}
} }
] ]

View File

@ -175,7 +175,7 @@
</el-main> </el-main>
<!-- Collection container bottom panel --> <!-- Collection container bottom panel -->
<el-footer id="infoInvoce" height="auto" style="padding-left: 0px; padding-right: 0px;"> <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"> <el-col :span="24">
<span> <span>
<p class="total"> <p class="total">

View File

@ -21,7 +21,7 @@
id="headerContainer" id="headerContainer"
style="display: -webkit-box; height: 100%" 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 <el-header
height="auto" height="auto"
:style="isShowedPOSKeyLayout ? 'padding-right: 20px; padding-left: 0px;' : 'padding-right: 0px; padding-left: 0px;'" :style="isShowedPOSKeyLayout ? 'padding-right: 20px; padding-left: 0px;' : 'padding-right: 0px; padding-left: 0px;'"
@ -214,7 +214,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-main> </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 <el-input
id="pin" id="pin"
ref="pin" ref="pin"
@ -223,6 +223,7 @@
type="password" type="password"
:placeholder="$t('form.pos.tableProduct.pin')" :placeholder="$t('form.pos.tableProduct.pin')"
:focus="true" :focus="true"
@change="openPin(pin)"
/> />
<span style="float: right;"> <span style="float: right;">
<el-button <el-button
@ -383,13 +384,13 @@
</p> </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.type') }}:<b class="order-info">{{ currentOrder.documentType.name }}</b></p>
<p class="total"> <p class="total">
{{ $t('form.pos.order.itemQuantity') }} {{ $t('form.pos.order.itemQuantity') }}:
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info"> <b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ getItemQuantity }} {{ getItemQuantity }}
</b> </b>
</p> </p>
<p class="total"> <p class="total">
{{ $t('form.pos.order.numberLines') }} {{ $t('form.pos.order.numberLines') }}:
<b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info"> <b v-if="!isEmptyValue(currentOrder.uuid)" class="order-info">
{{ numberOfLines }} {{ numberOfLines }}
</b> </b>
@ -683,9 +684,7 @@ export default {
}, },
watch: { watch: {
showOverdrawnInvoice(value) { showOverdrawnInvoice(value) {
if (value) { this.visible = value
this.visible = value
}
}, },
numberOfLines(value) { numberOfLines(value) {
if (value > 0) { if (value > 0) {
@ -725,6 +724,10 @@ export default {
formatDate, formatDate,
formatPrice, formatPrice,
formatQuantity, formatQuantity,
keyActionClosePin(event) {
this.visible = false
this.$store.dispatch('changePopoverOverdrawnInvoice', { visible: false })
},
focusPin() { focusPin() {
this.$refs.pin.focus() this.$refs.pin.focus()
}, },

View File

@ -23,9 +23,9 @@
<el-popover <el-popover
v-model="visible" v-model="visible"
v-shortkey="keyShortcuts" v-shortkey="keyShortcuts"
placement="right" placement="bottom-start"
trigger="click" trigger="click"
width="800" width="1250"
@shortkey.native="close" @shortkey.native="close"
> >
<el-button icon="el-icon-close" type="text" style="float: right;padding: 1% 1% 0px 0px;font-size: 20px;" @click="close" /> <el-button icon="el-icon-close" type="text" style="float: right;padding: 1% 1% 0px 0px;font-size: 20px;" @click="close" />

View File

@ -48,18 +48,27 @@
> >
<el-table-column <el-table-column
prop="product.value" prop="product.value"
label="Codigo" :label="$t('form.productInfo.code')"
/> />
<el-table-column <el-table-column
prop="product.name" prop="product.name"
label="Producto" :label="$t('form.productInfo.name')"
/> />
<el-table-column <el-table-column
prop="priceListName" prop="quantityOnHand"
label="Lista de Precio" :label="$t('form.productInfo.quantityOnHand')"
align="right"
/> />
<el-table-column <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" align="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -133,6 +142,7 @@ export default {
listWithPrice() { listWithPrice() {
const { productPricesList } = this.productPrice const { productPricesList } = this.productPrice
if (!this.isEmptyValue(productPricesList)) { if (!this.isEmptyValue(productPricesList)) {
console.log(productPricesList)
return productPricesList return productPricesList
} }
return [] return []

View File

@ -169,6 +169,9 @@ export default {
return pos.isPosRequiredPin return pos.isPosRequiredPin
} }
return false return false
},
showOverdrawnInvoice() {
return this.$store.getters.getOverdrawnInvoice.visible
} }
}, },
watch: { watch: {
@ -200,6 +203,9 @@ export default {
if (!value && !this.isEmptyValue(this.$route.query)) { if (!value && !this.isEmptyValue(this.$route.query)) {
this.reloadOrder(true) this.reloadOrder(true)
} }
},
showOverdrawnInvoice(value) {
this.visible = value
} }
}, },
beforeMount() { beforeMount() {
@ -602,38 +608,30 @@ export default {
} else if (mutation.type === 'addActionPerformed') { } else if (mutation.type === 'addActionPerformed') {
switch (mutation.payload.columnName) { switch (mutation.payload.columnName) {
case 'QtyEntered': case 'QtyEntered':
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) { if (this.allowsModifyQuantity && !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)) {
this.updateOrderLine(mutation.payload) 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 break
case 'PriceEntered': case 'PriceEntered':
case 'Discount': case 'Discount':
if (this.isPosRequiredPin && !this.isEmptyValue(this.$store.state['pointOfSales/orderLine/index'].line)) { if (this.modifyPrice) {
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)) {
this.updateOrderLine(mutation.payload) 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 break
case 'C_DocTypeTarget_ID': { case 'C_DocTypeTarget_ID': {

View File

@ -436,8 +436,8 @@ export default {
discount: 'Descuento', discount: 'Descuento',
tax: 'Impuesto', tax: 'Impuesto',
total: 'Total', total: 'Total',
itemQuantity: 'Cantidad de Árticulo', itemQuantity: 'Cantidad de Artículos',
numberLines: 'Numero de Lineas', numberLines: 'Número de Líneas',
pointSale: 'Punto de Venta', pointSale: 'Punto de Venta',
collect: 'Cobrar', collect: 'Cobrar',
collections: 'Cobros', collections: 'Cobros',
@ -521,6 +521,7 @@ export default {
id: 'ID', id: 'ID',
lastName: 'Nombre2', lastName: 'Nombre2',
description: 'Descripción', description: 'Descripción',
convertedPrice: 'Precio Convertido',
quantityOnHand: 'Existencia', quantityOnHand: 'Existencia',
price: 'Precio', price: 'Precio',
taxAmount: 'Monto de Impuesto', taxAmount: 'Monto de Impuesto',