mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 23:20:12 +08:00
Feature/#pos rename functions (#682)
* Rename functions for POS managemen * Rename functions for image on key layout
This commit is contained in:
parent
5e8b46ad32
commit
9393379516
@ -356,7 +356,7 @@ export function getKeyLayout({ keyLayoutUuid }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ListProductPrice
|
// ListProductPrice
|
||||||
export function requestListProductPrice({
|
export function getProductPriceList({
|
||||||
searchValue,
|
searchValue,
|
||||||
priceListUuid,
|
priceListUuid,
|
||||||
businessPartnerUuid,
|
businessPartnerUuid,
|
||||||
@ -395,45 +395,45 @@ export function requestListProductPrice({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestPrintOrder({
|
export function printOrder({
|
||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`Print order ${orderUuid}`)
|
console.info(`Print order ${orderUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestGenerateImmediateInvoice({
|
export function generateImmediateInvoice({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`Generate imediate invoice with POS id ${posId}, and uuid ${posUuid}`)
|
console.info(`Generate imediate invoice with POS id ${posId}, and uuid ${posUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestCompletePreparedOrder({
|
export function completeOrder({
|
||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`Complete prepared order ${orderUuid}`)
|
console.info(`Complete prepared order ${orderUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestReverseSalesTransaction({
|
export function reverseSalesTransaction({
|
||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`Reverse sales transaction ${orderUuid}`)
|
console.info(`Reverse sales transaction ${orderUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestCreateWithdrawal({
|
export function withdrawal({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`Withdrall cash with POS id ${posId}, and uuid ${posUuid}`)
|
console.info(`Withdrall cash with POS id ${posId}, and uuid ${posUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestCreateNewCustomerReturnOrder({
|
export function createNewReturnOrder({
|
||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
console.info(`New Customer Return Order ${orderUuid}`)
|
console.info(`New Customer Return Order ${orderUuid}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestCashClosing({
|
export function cashClosing({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
@ -442,7 +442,7 @@ export function requestCashClosing({
|
|||||||
|
|
||||||
// Create Payment
|
// Create Payment
|
||||||
|
|
||||||
export function requestCreatePayment({
|
export function createPayment({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
invoiceUuid,
|
invoiceUuid,
|
||||||
@ -477,7 +477,7 @@ export function requestCreatePayment({
|
|||||||
|
|
||||||
// Update Payment
|
// Update Payment
|
||||||
|
|
||||||
export function requestUpdatePayment({
|
export function updatePayment({
|
||||||
paymentUuid,
|
paymentUuid,
|
||||||
bankUuid,
|
bankUuid,
|
||||||
referenceNo,
|
referenceNo,
|
||||||
@ -506,7 +506,7 @@ export function requestUpdatePayment({
|
|||||||
|
|
||||||
// Delete Payment
|
// Delete Payment
|
||||||
|
|
||||||
export function requestDeletePayment({
|
export function deletePayment({
|
||||||
paymentUuid
|
paymentUuid
|
||||||
}) {
|
}) {
|
||||||
return requestRest({
|
return requestRest({
|
||||||
@ -523,7 +523,7 @@ export function requestDeletePayment({
|
|||||||
|
|
||||||
// List Payments
|
// List Payments
|
||||||
|
|
||||||
export function requestListPayments({
|
export function getPaymentsList({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
@ -568,7 +568,7 @@ export function requestListPayments({
|
|||||||
* currency_uuid - Currency UUID reference
|
* currency_uuid - Currency UUID reference
|
||||||
* ]
|
* ]
|
||||||
*/
|
*/
|
||||||
export function requestProcessOrder({
|
export function processOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
createPayments,
|
createPayments,
|
||||||
|
@ -253,7 +253,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
formatPrice,
|
formatPrice,
|
||||||
formatQuantity,
|
formatQuantity,
|
||||||
srcImage(keyValue) {
|
getImageFromSource(keyValue) {
|
||||||
if (this.isEmptyValue(keyValue)) {
|
if (this.isEmptyValue(keyValue)) {
|
||||||
return this.defaultImage
|
return this.defaultImage
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ import fieldsListCollection from './fieldsListCollection.js'
|
|||||||
import typeCollection from '@/components/ADempiere/Form/VPOS/Collection/typeCollection'
|
import typeCollection from '@/components/ADempiere/Form/VPOS/Collection/typeCollection'
|
||||||
import convertAmount from '@/components/ADempiere/Form/VPOS/Collection/convertAmount/index'
|
import convertAmount from '@/components/ADempiere/Form/VPOS/Collection/convertAmount/index'
|
||||||
import { formatDate, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
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 {
|
export default {
|
||||||
name: 'Collection',
|
name: 'Collection',
|
||||||
@ -770,7 +770,7 @@ export default {
|
|||||||
message: this.$t('notifications.processing'),
|
message: this.$t('notifications.processing'),
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
requestProcessOrder({
|
processOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
createPayments: !this.isEmptyValue(payment),
|
createPayments: !this.isEmptyValue(payment),
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<div @click="setKeyActionToOrderLine(keyValue)">
|
<div @click="setKeyActionToOrderLine(keyValue)">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="ifImage(keyValue)"
|
v-if="getDefaultImage(keyValue)"
|
||||||
:src="srcImage(keyValue)"
|
:src="getImageFromSource(keyValue)"
|
||||||
class="key-layout"
|
class="key-layout"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
/>
|
/>
|
||||||
@ -246,7 +246,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loadKeyLayout(keyLayoutUuid)
|
this.loadKeyLayout(keyLayoutUuid)
|
||||||
},
|
},
|
||||||
ifImage(keyValue) {
|
getDefaultImage(keyValue) {
|
||||||
const { fileName } = keyValue.resourceReference
|
const { fileName } = keyValue.resourceReference
|
||||||
|
|
||||||
if (this.isEmptyValue(fileName)) {
|
if (this.isEmptyValue(fileName)) {
|
||||||
@ -259,7 +259,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return image.isLoaded
|
return image.isLoaded
|
||||||
},
|
},
|
||||||
srcImage(keyValue) {
|
getImageFromSource(keyValue) {
|
||||||
const { fileName } = keyValue.resourceReference
|
const { fileName } = keyValue.resourceReference
|
||||||
|
|
||||||
if (this.isEmptyValue(fileName)) {
|
if (this.isEmptyValue(fileName)) {
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<p
|
<p
|
||||||
:style="blockOption"
|
:style="blockOption"
|
||||||
@click="createWithdrawal"
|
@click="withdrawal"
|
||||||
>
|
>
|
||||||
<i class="el-icon-document-remove" />
|
<i class="el-icon-document-remove" />
|
||||||
<br>
|
<br>
|
||||||
@ -269,14 +269,14 @@
|
|||||||
import OrdersList from '@/components/ADempiere/Form/VPOS/OrderList/index'
|
import OrdersList from '@/components/ADempiere/Form/VPOS/OrderList/index'
|
||||||
import ListProductPrice from '@/components/ADempiere/Form/VPOS/ProductInfo/productList'
|
import ListProductPrice from '@/components/ADempiere/Form/VPOS/ProductInfo/productList'
|
||||||
import {
|
import {
|
||||||
requestPrintOrder,
|
printOrder,
|
||||||
requestGenerateImmediateInvoice,
|
generateImmediateInvoice,
|
||||||
requestCreateWithdrawal,
|
withdrawal,
|
||||||
requestCreateNewCustomerReturnOrder,
|
createNewReturnOrder,
|
||||||
requestCashClosing,
|
cashClosing,
|
||||||
requestDeleteOrder,
|
requestDeleteOrder,
|
||||||
requestCreateOrder,
|
requestCreateOrder,
|
||||||
requestProcessOrder
|
processOrder
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import ModalDialog from '@/components/ADempiere/Dialog'
|
import ModalDialog from '@/components/ADempiere/Dialog'
|
||||||
import posProcess from '@/utils/ADempiere/constants/posProcess'
|
import posProcess from '@/utils/ADempiere/constants/posProcess'
|
||||||
@ -424,14 +424,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
printOrder() {
|
printOrder() {
|
||||||
requestPrintOrder({
|
printOrder({
|
||||||
orderUuid: this.$route.query.action
|
orderUuid: this.$route.query.action
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
generateImmediateInvoice() {
|
generateImmediateInvoice() {
|
||||||
// TODO: Add BPartner
|
// TODO: Add BPartner
|
||||||
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
||||||
requestGenerateImmediateInvoice({
|
generateImmediateInvoice({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
})
|
})
|
||||||
@ -445,7 +445,7 @@ export default {
|
|||||||
message: this.$t('notifications.processing'),
|
message: this.$t('notifications.processing'),
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
requestProcessOrder({
|
processOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid: this.$route.query.action,
|
orderUuid: this.$route.query.action,
|
||||||
createPayments: !this.isEmptyValue(this.$store.getters.getListPayments),
|
createPayments: !this.isEmptyValue(this.$store.getters.getListPayments),
|
||||||
@ -502,16 +502,16 @@ export default {
|
|||||||
]
|
]
|
||||||
this.$store.dispatch('addParametersProcessPos', parametersList)
|
this.$store.dispatch('addParametersProcessPos', parametersList)
|
||||||
},
|
},
|
||||||
createWithdrawal() {
|
withdrawal() {
|
||||||
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
||||||
// TODO: Add BParner, C_BankAccount_ID (caja), CashTransferBankAccount_ID, PAY_C_BankAccount_ID
|
// TODO: Add BParner, C_BankAccount_ID (caja), CashTransferBankAccount_ID, PAY_C_BankAccount_ID
|
||||||
requestCreateWithdrawal({
|
withdrawal({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
createNewCustomerReturnOrder() {
|
createNewCustomerReturnOrder() {
|
||||||
requestCreateNewCustomerReturnOrder({
|
createNewReturnOrder({
|
||||||
orderUuid: this.$route.query.action
|
orderUuid: this.$route.query.action
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -573,7 +573,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cashClosing() {
|
cashClosing() {
|
||||||
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
const { uuid: posUuid, id: posId } = this.getCurrentPOS
|
||||||
requestCashClosing({
|
cashClosing({
|
||||||
posId,
|
posId,
|
||||||
posUuid
|
posUuid
|
||||||
})
|
})
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import {
|
import {
|
||||||
requestListProductPrice
|
getProductPriceList
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import { isEmptyValue, extractPagingToken } from '@/utils/ADempiere/valueUtils.js'
|
import { isEmptyValue, extractPagingToken } from '@/utils/ADempiere/valueUtils.js'
|
||||||
import { showMessage } from '@/utils/ADempiere/notification.js'
|
import { showMessage } from '@/utils/ADempiere/notification.js'
|
||||||
@ -92,7 +92,7 @@ const listProductPrice = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
requestListProductPrice({
|
getProductPriceList({
|
||||||
searchValue,
|
searchValue,
|
||||||
priceListUuid,
|
priceListUuid,
|
||||||
businessPartnerUuid,
|
businessPartnerUuid,
|
||||||
@ -165,7 +165,7 @@ const listProductPrice = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
requestListProductPrice({
|
getProductPriceList({
|
||||||
searchValue,
|
searchValue,
|
||||||
priceListUuid,
|
priceListUuid,
|
||||||
businessPartnerUuid,
|
businessPartnerUuid,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
requestGetConversionRate,
|
requestGetConversionRate,
|
||||||
requestCreatePayment,
|
createPayment,
|
||||||
requestDeletePayment,
|
deletePayment,
|
||||||
requestUpdatePayment,
|
updatePayment,
|
||||||
requestListPayments
|
getPaymentsList
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||||
import { showMessage } from '@/utils/ADempiere/notification.js'
|
import { showMessage } from '@/utils/ADempiere/notification.js'
|
||||||
@ -63,7 +63,7 @@ export default {
|
|||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
listPaymentsLocal.forEach(payment => {
|
listPaymentsLocal.forEach(payment => {
|
||||||
requestCreatePayment({
|
createPayment({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
bankUuid: payment.bankUuid,
|
bankUuid: payment.bankUuid,
|
||||||
@ -174,7 +174,7 @@ export default {
|
|||||||
return undefined
|
return undefined
|
||||||
})
|
})
|
||||||
if (isEmptyValue(listPayments)) {
|
if (isEmptyValue(listPayments)) {
|
||||||
requestCreatePayment({
|
createPayment({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid,
|
orderUuid,
|
||||||
invoiceUuid,
|
invoiceUuid,
|
||||||
@ -199,7 +199,7 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
requestUpdatePayment({
|
updatePayment({
|
||||||
paymentUuid: listPayments.uuid,
|
paymentUuid: listPayments.uuid,
|
||||||
bankUuid,
|
bankUuid,
|
||||||
referenceNo,
|
referenceNo,
|
||||||
@ -226,7 +226,7 @@ export default {
|
|||||||
orderUuid,
|
orderUuid,
|
||||||
paymentUuid
|
paymentUuid
|
||||||
}) {
|
}) {
|
||||||
requestDeletePayment({
|
deletePayment({
|
||||||
paymentUuid
|
paymentUuid
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
@ -243,7 +243,7 @@ export default {
|
|||||||
},
|
},
|
||||||
listPayments({ commit, dispatch }, { posUuid, orderUuid }) {
|
listPayments({ commit, dispatch }, { posUuid, orderUuid }) {
|
||||||
dispatch('updatePaymentPos', true)
|
dispatch('updatePaymentPos', true)
|
||||||
requestListPayments({
|
getPaymentsList({
|
||||||
posUuid,
|
posUuid,
|
||||||
orderUuid
|
orderUuid
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user