1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Feature/#pos rename functions (#682)

* Rename functions for POS managemen

* Rename functions for image on key layout
This commit is contained in:
Yamel Senih 2021-03-22 11:49:16 -04:00 committed by GitHub
parent 5e8b46ad32
commit 9393379516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 46 deletions

View File

@ -356,7 +356,7 @@ export function getKeyLayout({ keyLayoutUuid }) {
}
// ListProductPrice
export function requestListProductPrice({
export function getProductPriceList({
searchValue,
priceListUuid,
businessPartnerUuid,
@ -395,45 +395,45 @@ export function requestListProductPrice({
})
}
export function requestPrintOrder({
export function printOrder({
orderUuid
}) {
console.info(`Print order ${orderUuid}`)
}
export function requestGenerateImmediateInvoice({
export function generateImmediateInvoice({
posId,
posUuid
}) {
console.info(`Generate imediate invoice with POS id ${posId}, and uuid ${posUuid}`)
}
export function requestCompletePreparedOrder({
export function completeOrder({
orderUuid
}) {
console.info(`Complete prepared order ${orderUuid}`)
}
export function requestReverseSalesTransaction({
export function reverseSalesTransaction({
orderUuid
}) {
console.info(`Reverse sales transaction ${orderUuid}`)
}
export function requestCreateWithdrawal({
export function withdrawal({
posId,
posUuid
}) {
console.info(`Withdrall cash with POS id ${posId}, and uuid ${posUuid}`)
}
export function requestCreateNewCustomerReturnOrder({
export function createNewReturnOrder({
orderUuid
}) {
console.info(`New Customer Return Order ${orderUuid}`)
}
export function requestCashClosing({
export function cashClosing({
posId,
posUuid
}) {
@ -442,7 +442,7 @@ export function requestCashClosing({
// Create Payment
export function requestCreatePayment({
export function createPayment({
posUuid,
orderUuid,
invoiceUuid,
@ -477,7 +477,7 @@ export function requestCreatePayment({
// Update Payment
export function requestUpdatePayment({
export function updatePayment({
paymentUuid,
bankUuid,
referenceNo,
@ -506,7 +506,7 @@ export function requestUpdatePayment({
// Delete Payment
export function requestDeletePayment({
export function deletePayment({
paymentUuid
}) {
return requestRest({
@ -523,7 +523,7 @@ export function requestDeletePayment({
// List Payments
export function requestListPayments({
export function getPaymentsList({
posUuid,
orderUuid
}) {
@ -568,7 +568,7 @@ export function requestListPayments({
* currency_uuid - Currency UUID reference
* ]
*/
export function requestProcessOrder({
export function processOrder({
posUuid,
orderUuid,
createPayments,

View File

@ -253,7 +253,7 @@ export default {
methods: {
formatPrice,
formatQuantity,
srcImage(keyValue) {
getImageFromSource(keyValue) {
if (this.isEmptyValue(keyValue)) {
return this.defaultImage
}

View File

@ -182,7 +182,7 @@ import fieldsListCollection from './fieldsListCollection.js'
import typeCollection from '@/components/ADempiere/Form/VPOS/Collection/typeCollection'
import convertAmount from '@/components/ADempiere/Form/VPOS/Collection/convertAmount/index'
import { formatDate, formatPrice } from '@/utils/ADempiere/valueFormat.js'
import { requestProcessOrder } from '@/api/ADempiere/form/point-of-sales.js'
import { processOrder } from '@/api/ADempiere/form/point-of-sales.js'
export default {
name: 'Collection',
@ -770,7 +770,7 @@ export default {
message: this.$t('notifications.processing'),
showClose: true
})
requestProcessOrder({
processOrder({
posUuid,
orderUuid,
createPayments: !this.isEmptyValue(payment),

View File

@ -45,8 +45,8 @@
</span>
<div @click="setKeyActionToOrderLine(keyValue)">
<el-image
v-if="ifImage(keyValue)"
:src="srcImage(keyValue)"
v-if="getDefaultImage(keyValue)"
:src="getImageFromSource(keyValue)"
class="key-layout"
fit="contain"
/>
@ -246,7 +246,7 @@ export default {
}
this.loadKeyLayout(keyLayoutUuid)
},
ifImage(keyValue) {
getDefaultImage(keyValue) {
const { fileName } = keyValue.resourceReference
if (this.isEmptyValue(fileName)) {
@ -259,7 +259,7 @@ export default {
}
return image.isLoaded
},
srcImage(keyValue) {
getImageFromSource(keyValue) {
const { fileName } = keyValue.resourceReference
if (this.isEmptyValue(fileName)) {

View File

@ -107,7 +107,7 @@
<el-card shadow="hover">
<p
:style="blockOption"
@click="createWithdrawal"
@click="withdrawal"
>
<i class="el-icon-document-remove" />
<br>
@ -269,14 +269,14 @@
import OrdersList from '@/components/ADempiere/Form/VPOS/OrderList/index'
import ListProductPrice from '@/components/ADempiere/Form/VPOS/ProductInfo/productList'
import {
requestPrintOrder,
requestGenerateImmediateInvoice,
requestCreateWithdrawal,
requestCreateNewCustomerReturnOrder,
requestCashClosing,
printOrder,
generateImmediateInvoice,
withdrawal,
createNewReturnOrder,
cashClosing,
requestDeleteOrder,
requestCreateOrder,
requestProcessOrder
processOrder
} from '@/api/ADempiere/form/point-of-sales.js'
import ModalDialog from '@/components/ADempiere/Dialog'
import posProcess from '@/utils/ADempiere/constants/posProcess'
@ -424,14 +424,14 @@ export default {
})
},
printOrder() {
requestPrintOrder({
printOrder({
orderUuid: this.$route.query.action
})
},
generateImmediateInvoice() {
// TODO: Add BPartner
const { uuid: posUuid, id: posId } = this.getCurrentPOS
requestGenerateImmediateInvoice({
generateImmediateInvoice({
posId,
posUuid
})
@ -445,7 +445,7 @@ export default {
message: this.$t('notifications.processing'),
showClose: true
})
requestProcessOrder({
processOrder({
posUuid,
orderUuid: this.$route.query.action,
createPayments: !this.isEmptyValue(this.$store.getters.getListPayments),
@ -502,16 +502,16 @@ export default {
]
this.$store.dispatch('addParametersProcessPos', parametersList)
},
createWithdrawal() {
withdrawal() {
const { uuid: posUuid, id: posId } = this.getCurrentPOS
// TODO: Add BParner, C_BankAccount_ID (caja), CashTransferBankAccount_ID, PAY_C_BankAccount_ID
requestCreateWithdrawal({
withdrawal({
posId,
posUuid
})
},
createNewCustomerReturnOrder() {
requestCreateNewCustomerReturnOrder({
createNewReturnOrder({
orderUuid: this.$route.query.action
})
},
@ -573,7 +573,7 @@ export default {
},
cashClosing() {
const { uuid: posUuid, id: posId } = this.getCurrentPOS
requestCashClosing({
cashClosing({
posId,
posUuid
})

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import {
requestListProductPrice
getProductPriceList
} from '@/api/ADempiere/form/point-of-sales.js'
import { isEmptyValue, extractPagingToken } from '@/utils/ADempiere/valueUtils.js'
import { showMessage } from '@/utils/ADempiere/notification.js'
@ -92,7 +92,7 @@ const listProductPrice = {
})
}
return new Promise(resolve => {
requestListProductPrice({
getProductPriceList({
searchValue,
priceListUuid,
businessPartnerUuid,
@ -165,7 +165,7 @@ const listProductPrice = {
})
}
return new Promise(resolve => {
requestListProductPrice({
getProductPriceList({
searchValue,
priceListUuid,
businessPartnerUuid,

View File

@ -1,9 +1,9 @@
import {
requestGetConversionRate,
requestCreatePayment,
requestDeletePayment,
requestUpdatePayment,
requestListPayments
createPayment,
deletePayment,
updatePayment,
getPaymentsList
} from '@/api/ADempiere/form/point-of-sales.js'
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
import { showMessage } from '@/utils/ADempiere/notification.js'
@ -63,7 +63,7 @@ export default {
orderUuid
}) {
listPaymentsLocal.forEach(payment => {
requestCreatePayment({
createPayment({
posUuid,
orderUuid,
bankUuid: payment.bankUuid,
@ -174,7 +174,7 @@ export default {
return undefined
})
if (isEmptyValue(listPayments)) {
requestCreatePayment({
createPayment({
posUuid,
orderUuid,
invoiceUuid,
@ -199,7 +199,7 @@ export default {
})
})
} else {
requestUpdatePayment({
updatePayment({
paymentUuid: listPayments.uuid,
bankUuid,
referenceNo,
@ -226,7 +226,7 @@ export default {
orderUuid,
paymentUuid
}) {
requestDeletePayment({
deletePayment({
paymentUuid
})
.then(response => {
@ -243,7 +243,7 @@ export default {
},
listPayments({ commit, dispatch }, { posUuid, orderUuid }) {
dispatch('updatePaymentPos', true)
requestListPayments({
getPaymentsList({
posUuid,
orderUuid
})