1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +08:00

show price base the info product (#1106)

* show price base the info product

* fixe style

* minimal changes

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-08-24 00:28:14 -04:00 committed by GitHub
parent 540b8807a3
commit c908591f76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 31 deletions

View File

@ -145,13 +145,14 @@
popper-class="el-popper-info" popper-class="el-popper-info"
placement="right-start" placement="right-start"
trigger="click" trigger="click"
width="300"
:title="$t('form.productInfo.productInformation')" :title="$t('form.productInfo.productInformation')"
> >
<el-form <el-form
label-position="top" label-position="top"
style="float: right;display: contents;line-height: 30px;" style="float: right;display: contents;line-height: 30px;"
> >
<el-row> <el-row style="margin: 10px!important;">
<el-col :span="4"> <el-col :span="4">
<div> <div>
<el-avatar v-if="isEmptyValue(scope.row.product.imageUrl)" shape="square" :size="100" src="https://#" @error="true"> <el-avatar v-if="isEmptyValue(scope.row.product.imageUrl)" shape="square" :size="100" src="https://#" @error="true">
@ -175,12 +176,14 @@
{{ $t('form.productInfo.description') }}: <b>{{ scope.row.product.description }}</b><br> {{ $t('form.productInfo.description') }}: <b>{{ scope.row.product.description }}</b><br>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div style="float: right"> <div style="float: right; text-align: end;">
{{ $t('form.productInfo.price') }}: {{ $t('form.productInfo.price') }}:
<b>{{ formatPrice(scope.row.product.priceActual, pointOfSalesCurrency.iSOCode) }}</b> <b>{{ formatPrice(scope.row.priceList, pointOfSalesCurrency.iSOCode) }}</b>
<br> <br>
{{ $t('form.productInfo.taxAmount') }}: <b>{{ scope.row.taxRate.name }}</b>
<b>{{ scope.row.taxIndicator }}</b> <br>
{{ $t('form.productInfo.grandTotal') }}:
<b>{{ formatPrice((scope.row.priceList * scope.row.taxRate.rate / 100) + scope.row.priceList, pointOfSalesCurrency.iSOCode) }}</b>
<br> <br>
{{ $t('form.productInfo.quantityAvailable') }}: {{ $t('form.productInfo.quantityAvailable') }}:
<b>{{ formatQuantity(scope.row.quantityOrdered) }}</b> <b>{{ formatQuantity(scope.row.quantityOrdered) }}</b>
@ -991,7 +994,7 @@ export default {
<style> <style>
.el-popper-info { .el-popper-info {
margin-left: 12px; margin-left: 12px;
max-width: 65%; max-width: 75%;
min-width: 50%; min-width: 60%;
} }
</style> </style>

View File

@ -548,31 +548,29 @@ export default {
return this.formatPrice(this.currentOrder.grandTotal - this.currentOrder.totalLines, currency) return this.formatPrice(this.currentOrder.grandTotal - this.currentOrder.totalLines, currency)
}, },
deleteOrderLine(lineSelection) { deleteOrderLine(lineSelection) {
if (this.isPosRequiredPin) { if (this.currentPointOfSales.isAllowsModifyQuantity) {
if (this.allowsModifyQuantity) { deleteOrderLine({
deleteOrderLine({ orderLineUuid: lineSelection.uuid
orderLineUuid: lineSelection.uuid })
.then(response => {
this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid })
}) })
.then(response => { .catch(error => {
this.$store.dispatch('reloadOrder', { orderUuid: this.$store.getters.posAttributes.currentPointOfSales.currentOrder.uuid }) console.error(error.message)
this.$message({
type: 'error',
message: error.message,
showClose: true
}) })
.catch(error => { })
console.error(error.message) } else {
this.$message({ const attributePin = {
type: 'error', ...lineSelection,
message: error.message, type: 'deleteLine',
showClose: true label: this.$t('form.pos.pinMessage.delete')
})
})
} else {
const attributePin = {
...lineSelection,
type: 'deleteLine',
label: this.$t('form.pos.pinMessage.delete')
}
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} }
this.$store.dispatch('changePopoverOverdrawnInvoice', { attributePin, visible: true })
this.visible = true
} }
}, },
subscribeChanges() { subscribeChanges() {

View File

@ -548,7 +548,7 @@ export default {
taxAmount: 'Tax Amount', taxAmount: 'Tax Amount',
grandTotal: 'Grand Total', grandTotal: 'Grand Total',
grandTotalConverted: 'Grand Total Converted', grandTotalConverted: 'Grand Total Converted',
quantityAvailable: 'Quantity Avalible', quantityAvailable: 'Available',
upc: 'UPC / EAN' upc: 'UPC / EAN'
}, },
guideSteps: { guideSteps: {

View File

@ -524,7 +524,7 @@ export default {
taxAmount: 'Monto de Impuesto', taxAmount: 'Monto de Impuesto',
grandTotal: 'Total General', grandTotal: 'Total General',
grandTotalConverted: 'Gran Total Convertido', grandTotalConverted: 'Gran Total Convertido',
quantityAvailable: 'Cantidad Disponible', quantityAvailable: 'Disponible',
upc: 'Código de Barras' upc: 'Código de Barras'
}, },
guideSteps: { guideSteps: {