From 0b9e4e7df42e6b2b7ffc9cd194aaf52bd47d424b Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Mon, 14 Dec 2020 12:19:43 -0400 Subject: [PATCH] print label from table (#560) * print label from table * minimal changes * correcting currency conversion errors * remove switch * minimal change --- .../ADempiere/Form/ProductInfo/index.vue | 28 ++- .../Form/ProductInfo/productList.vue | 104 +++++++- .../ADempiere/Form/VPOS/Collection/index.vue | 30 ++- .../ADempiere/Form/VPOS/Order/index.vue | 76 +++++- .../ADempiere/pointOfSales/collection.js | 43 ++-- .../modules/ADempiere/pointOfSales/index.js | 1 - src/store/modules/ADempiere/process.js | 234 +++++++++++++++++- src/utils/ADempiere/constants/zoomReport.js | 15 ++ src/views/ADempiere/Form/index.vue | 1 - 9 files changed, 479 insertions(+), 53 deletions(-) create mode 100644 src/utils/ADempiere/constants/zoomReport.js diff --git a/src/components/ADempiere/Form/ProductInfo/index.vue b/src/components/ADempiere/Form/ProductInfo/index.vue index 85195ede..10ca8066 100644 --- a/src/components/ADempiere/Form/ProductInfo/index.vue +++ b/src/components/ADempiere/Form/ProductInfo/index.vue @@ -1,6 +1,8 @@ @@ -10,6 +12,7 @@ */ import ProductInfoList from './productList' import fieldMixin from '@/components/ADempiere/Field/mixin/mixinField.js' +import staticReportRoutes from '@/utils/ADempiere/constants/zoomReport' import { formatPrice, formatQuantity @@ -25,7 +28,8 @@ export default { ], data() { return { - timeOut: null + timeOut: null, + process: staticReportRoutes } }, computed: { @@ -49,6 +53,9 @@ export default { } return [] }, + currentPos() { + return this.$store.getters.getCurrentPOS + }, keyShortcuts() { return { refreshList: ['f5'], @@ -56,8 +63,16 @@ export default { } } }, - beforeMount() { + // beforeMount() { + // if (this.isEmptyValue(this.currentPos)) { + // this.$store.dispatch('listPointOfSalesFromServer') + // } + // }, + created() { + // if (this.isEmptyValue(this.currentPos)) { this.$store.dispatch('listPointOfSalesFromServer') + this.findProcess(this.process) + // } }, methods: { formatPrice, @@ -132,6 +147,13 @@ export default { // TODO: Verify with 'value' or 'searchValue' attribute value: valueProduct }) + }, + findProcess(procces) { + // if (this.isEmptyValue(this.currentPos)) { + procces.forEach(report => { + this.$store.dispatch('getProcessFromServer', { containerUuid: report.uuid }) + }) + // } } } } diff --git a/src/components/ADempiere/Form/ProductInfo/productList.vue b/src/components/ADempiere/Form/ProductInfo/productList.vue index f9370ea3..240694ed 100644 --- a/src/components/ADempiere/Form/ProductInfo/productList.vue +++ b/src/components/ADempiere/Form/ProductInfo/productList.vue @@ -15,7 +15,6 @@ :metadata-field="field" /> -