mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +08:00
Feature/add endpoint setup (#907)
* Minor change - Rename API Services - Add endpoint * set method name
This commit is contained in:
parent
04c64d6ea7
commit
71a61f1cb1
@ -27,5 +27,11 @@
|
|||||||
"report": false,
|
"report": false,
|
||||||
"smartBrowser": false,
|
"smartBrowser": false,
|
||||||
"form": false
|
"form": false
|
||||||
|
},
|
||||||
|
"pointOfSales": {
|
||||||
|
"endpoint": "/form/addons/point-of-sales"
|
||||||
|
},
|
||||||
|
"priceChecking": {
|
||||||
|
"endpoint": "/form/addons/point-of-sales"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,22 +16,22 @@
|
|||||||
|
|
||||||
// Get Instance for connection
|
// Get Instance for connection
|
||||||
import { request } from '@/utils/ADempiere/request'
|
import { request } from '@/utils/ADempiere/request'
|
||||||
|
import { config } from '@/utils/ADempiere/config'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere'
|
import { isEmptyValue } from '@/utils/ADempiere'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* method in api/price-checking.js as requestGetProductPrice
|
* method in api/price-checking.js as getProductPrice
|
||||||
* @author elsiosanchez <elsiosanches@gmail.com>
|
* @author elsiosanchez <elsiosanches@gmail.com>
|
||||||
*/
|
*/
|
||||||
export { requestGetProductPrice as findProduct } from '@/api/ADempiere/form/price-checking.js'
|
export { getProductPrice as findProduct } from '@/api/ADempiere/form/price-checking.js'
|
||||||
export { requestGetConversionRate } from '@/api/ADempiere/system-core.js'
|
export { requestGetConversionRate } from '@/api/ADempiere/system-core.js'
|
||||||
|
|
||||||
// List Point of sales
|
// List Point of sales
|
||||||
export function requestGetPointOfSales({
|
export function getPointOfSales({
|
||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/point-of-sales',
|
url: `${config.pointOfSales.endpoint}/point-of-sales`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
point_of_sales_uuid: posUuid
|
point_of_sales_uuid: posUuid
|
||||||
@ -45,13 +45,13 @@ export function requestGetPointOfSales({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List Point of sales
|
// List Point of sales
|
||||||
export function requestListPointOfSales({
|
export function listPointOfSales({
|
||||||
userUuid,
|
userUuid,
|
||||||
pageSize,
|
pageSize,
|
||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/selling-points',
|
url: `${config.pointOfSales.endpoint}/selling-points`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
user_uuid: userUuid,
|
user_uuid: userUuid,
|
||||||
@ -73,14 +73,14 @@ export function requestListPointOfSales({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create order from POS
|
// Create order from POS
|
||||||
export function requestCreateOrder({
|
export function createOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
customerUuid,
|
customerUuid,
|
||||||
documentTypeUuid,
|
documentTypeUuid,
|
||||||
salesRepresentativeUuid
|
salesRepresentativeUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/create-order',
|
url: `${config.pointOfSales.endpoint}/create-order`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -97,14 +97,14 @@ export function requestCreateOrder({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update order from POS
|
// Update order from POS
|
||||||
export function requestUpdateOrder({
|
export function updateOrder({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
posUuid,
|
posUuid,
|
||||||
customerUuid,
|
customerUuid,
|
||||||
description
|
description
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/update-order',
|
url: `${config.pointOfSales.endpoint}/update-order`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_uuid: orderUuid,
|
order_uuid: orderUuid,
|
||||||
@ -121,9 +121,9 @@ export function requestUpdateOrder({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get order from uuid
|
// Get order from uuid
|
||||||
export function requestGetOrder(orderUuid) {
|
export function getOrder(orderUuid) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/order',
|
url: `${config.pointOfSales.endpoint}/order`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
order_uuid: orderUuid
|
order_uuid: orderUuid
|
||||||
@ -137,7 +137,7 @@ export function requestGetOrder(orderUuid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create order from POS
|
// Create order from POS
|
||||||
export function requestDeleteOrder({
|
export function deleteOrder({
|
||||||
orderUuid
|
orderUuid
|
||||||
// posUuid,
|
// posUuid,
|
||||||
// customerUuid,
|
// customerUuid,
|
||||||
@ -145,7 +145,7 @@ export function requestDeleteOrder({
|
|||||||
// salesRepresentativeUuid
|
// salesRepresentativeUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/delete-order',
|
url: `${config.pointOfSales.endpoint}/delete-order`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_uuid: orderUuid
|
order_uuid: orderUuid
|
||||||
@ -161,7 +161,7 @@ export function requestDeleteOrder({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List orders from pos uuid
|
// List orders from pos uuid
|
||||||
export function requestListOrders({
|
export function listOrders({
|
||||||
posUuid,
|
posUuid,
|
||||||
documentNo,
|
documentNo,
|
||||||
businessPartnerUuid,
|
businessPartnerUuid,
|
||||||
@ -220,7 +220,7 @@ export function requestListOrders({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/orders',
|
url: `${config.pointOfSales.endpoint}/orders`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -253,7 +253,7 @@ export function requestListOrders({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create order line from order uuid and product
|
// Create order line from order uuid and product
|
||||||
export function requestCreateOrderLine({
|
export function createOrderLine({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
warehouseUuid,
|
warehouseUuid,
|
||||||
productUuid,
|
productUuid,
|
||||||
@ -264,7 +264,7 @@ export function requestCreateOrderLine({
|
|||||||
discountRate
|
discountRate
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/create-order-line',
|
url: `${config.pointOfSales.endpoint}/create-order-line`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_uuid: orderUuid,
|
order_uuid: orderUuid,
|
||||||
@ -285,7 +285,7 @@ export function requestCreateOrderLine({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// updateOrderLine orders from pos uuid
|
// updateOrderLine orders from pos uuid
|
||||||
export function requestUpdateOrderLine({
|
export function updateOrderLine({
|
||||||
orderLineUuid,
|
orderLineUuid,
|
||||||
description,
|
description,
|
||||||
quantity,
|
quantity,
|
||||||
@ -293,7 +293,7 @@ export function requestUpdateOrderLine({
|
|||||||
discountRate
|
discountRate
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/update-order-line',
|
url: `${config.pointOfSales.endpoint}/update-order-line`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
// is_add_quantity: true,
|
// is_add_quantity: true,
|
||||||
@ -312,11 +312,11 @@ export function requestUpdateOrderLine({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// delete Order Line
|
// delete Order Line
|
||||||
export function requestDeleteOrderLine({
|
export function deleteOrderLine({
|
||||||
orderLineUuid
|
orderLineUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/delete-order-line',
|
url: `${config.pointOfSales.endpoint}/delete-order-line`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_line_uuid: orderLineUuid
|
order_line_uuid: orderLineUuid
|
||||||
@ -327,13 +327,13 @@ export function requestDeleteOrderLine({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function requestListOrderLines({
|
export function listOrderLines({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
pageSize,
|
pageSize,
|
||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/order-lines',
|
url: `${config.pointOfSales.endpoint}/order-lines`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
order_uuid: orderUuid,
|
order_uuid: orderUuid,
|
||||||
@ -356,7 +356,7 @@ export function requestListOrderLines({
|
|||||||
|
|
||||||
export function getKeyLayout({ keyLayoutUuid }) {
|
export function getKeyLayout({ keyLayoutUuid }) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/key-layout',
|
url: `${config.pointOfSales.endpoint}/key-layout`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
key_layout_uuid: keyLayoutUuid
|
key_layout_uuid: keyLayoutUuid
|
||||||
@ -382,7 +382,7 @@ export function getProductPriceList({
|
|||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/product-prices',
|
url: `${config.pointOfSales.endpoint}/product-prices`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
price_list_uuid: priceListUuid,
|
price_list_uuid: priceListUuid,
|
||||||
@ -467,7 +467,7 @@ export function createPayment({
|
|||||||
currencyUuid
|
currencyUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/create-payment',
|
url: `${config.pointOfSales.endpoint}/create-payment`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -499,7 +499,7 @@ export function updatePayment({
|
|||||||
tenderTypeCode
|
tenderTypeCode
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/update-payment',
|
url: `${config.pointOfSales.endpoint}/update-payment`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
payment_uuid: paymentUuid,
|
payment_uuid: paymentUuid,
|
||||||
@ -522,7 +522,7 @@ export function deletePayment({
|
|||||||
paymentUuid
|
paymentUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/delete-payment',
|
url: `${config.pointOfSales.endpoint}/delete-payment`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
payment_uuid: paymentUuid
|
payment_uuid: paymentUuid
|
||||||
@ -540,7 +540,7 @@ export function getPaymentsList({
|
|||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/payments',
|
url: `${config.pointOfSales.endpoint}/payments`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -601,7 +601,7 @@ export function processOrder({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/process-order',
|
url: `${config.pointOfSales.endpoint}/process-order`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -626,7 +626,7 @@ export function validatePin({
|
|||||||
pin
|
pin
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/validate-pin',
|
url: `${config.pointOfSales.endpoint}/validate-pin`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
|
@ -17,9 +17,10 @@
|
|||||||
// Get Instance for connectionimport {
|
// Get Instance for connectionimport {
|
||||||
import { isEmptyValue } from '@/utils/ADempiere'
|
import { isEmptyValue } from '@/utils/ADempiere'
|
||||||
import { request } from '@/utils/ADempiere/request'
|
import { request } from '@/utils/ADempiere/request'
|
||||||
|
import { config } from '@/utils/ADempiere/config'
|
||||||
|
|
||||||
// List Point of sales
|
// List Point of sales
|
||||||
export function requestGetProductPrice({
|
export function getProductPrice({
|
||||||
searchValue,
|
searchValue,
|
||||||
upc,
|
upc,
|
||||||
value,
|
value,
|
||||||
@ -30,7 +31,7 @@ export function requestGetProductPrice({
|
|||||||
validFrom
|
validFrom
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/form/addons/point-of-sales/product-price',
|
url: `${config.priceChecking.endpoint}/product-price`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
search_value: searchValue,
|
search_value: searchValue,
|
||||||
|
@ -92,7 +92,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import formMixin from '@/components/ADempiere/Form/formMixin.js'
|
import formMixin from '@/components/ADempiere/Form/formMixin.js'
|
||||||
import fieldsList from './fieldsListBarCode.js'
|
import fieldsList from './fieldsListBarCode.js'
|
||||||
// import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
|
||||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||||
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
||||||
@ -187,7 +186,7 @@ export default {
|
|||||||
// // cleans all values except column name 'ProductValue'
|
// // cleans all values except column name 'ProductValue'
|
||||||
// this.search = mutation.payload.value
|
// this.search = mutation.payload.value
|
||||||
// if (!this.isEmptyValue(this.search) && this.search.length >= 4) {
|
// if (!this.isEmptyValue(this.search) && this.search.length >= 4) {
|
||||||
// requestGetProductPrice({
|
// getProductPrice({
|
||||||
// searchValue: mutation.payload.value
|
// searchValue: mutation.payload.value
|
||||||
// })
|
// })
|
||||||
// .then(productPrice => {
|
// .then(productPrice => {
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import formMixin from '@/components/ADempiere/Form/formMixin.js'
|
import formMixin from '@/components/ADempiere/Form/formMixin.js'
|
||||||
import fieldsList from './fieldsList.js'
|
import fieldsList from './fieldsList.js'
|
||||||
import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
import { getProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
||||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||||
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
||||||
@ -201,7 +201,7 @@ export default {
|
|||||||
// cleans all values except column name 'ProductValue'
|
// cleans all values except column name 'ProductValue'
|
||||||
this.search = mutation.payload.value
|
this.search = mutation.payload.value
|
||||||
if (!this.isEmptyValue(this.search) && this.search.length >= 4) {
|
if (!this.isEmptyValue(this.search) && this.search.length >= 4) {
|
||||||
requestGetProductPrice({
|
getProductPrice({
|
||||||
searchValue: mutation.payload.value,
|
searchValue: mutation.payload.value,
|
||||||
priceListUuid: this.currentPoint.priceList.uuid
|
priceListUuid: this.currentPoint.priceList.uuid
|
||||||
})
|
})
|
||||||
@ -258,7 +258,7 @@ export default {
|
|||||||
if (typeof value[value.length - 1] === 'string') {
|
if (typeof value[value.length - 1] === 'string') {
|
||||||
value = mutation.payload.value.slice(0, -1)
|
value = mutation.payload.value.slice(0, -1)
|
||||||
}
|
}
|
||||||
requestGetProductPrice({
|
getProductPrice({
|
||||||
searchValue: mutation.payload.value,
|
searchValue: mutation.payload.value,
|
||||||
priceListUuid: this.currentPoint.priceList.uuid
|
priceListUuid: this.currentPoint.priceList.uuid
|
||||||
})
|
})
|
||||||
|
@ -288,8 +288,8 @@ import {
|
|||||||
withdrawal,
|
withdrawal,
|
||||||
createNewReturnOrder,
|
createNewReturnOrder,
|
||||||
cashClosing,
|
cashClosing,
|
||||||
requestDeleteOrder,
|
deleteOrder,
|
||||||
requestCreateOrder,
|
createOrder,
|
||||||
processOrder
|
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'
|
||||||
@ -472,7 +472,7 @@ export default {
|
|||||||
value: this.currentOrder.id
|
value: this.currentOrder.id
|
||||||
}]
|
}]
|
||||||
this.$store.dispatch('addParametersProcessPos', parametersList)
|
this.$store.dispatch('addParametersProcessPos', parametersList)
|
||||||
requestCreateOrder({
|
createOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
customerUuid: this.currentOrder.businessPartner.uuid,
|
customerUuid: this.currentOrder.businessPartner.uuid,
|
||||||
salesRepresentativeUuid: this.currentOrder.salesRepresentative.uuid
|
salesRepresentativeUuid: this.currentOrder.salesRepresentative.uuid
|
||||||
@ -520,7 +520,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteOrder() {
|
deleteOrder() {
|
||||||
this.$store.dispatch('updateOrderPos', true)
|
this.$store.dispatch('updateOrderPos', true)
|
||||||
requestDeleteOrder({
|
deleteOrder({
|
||||||
orderUuid: this.$route.query.action
|
orderUuid: this.$route.query.action
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import {
|
import {
|
||||||
requestCreateOrderLine,
|
createOrderLine,
|
||||||
requestUpdateOrderLine,
|
updateOrderLine,
|
||||||
requestDeleteOrderLine
|
deleteOrderLine
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import { formatPercent } from '@/utils/ADempiere/valueFormat.js'
|
import { formatPercent } from '@/utils/ADempiere/valueFormat.js'
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ export default {
|
|||||||
},
|
},
|
||||||
createOrderLine(orderUuid) {
|
createOrderLine(orderUuid) {
|
||||||
const productUuid = this.product.uuid
|
const productUuid = this.product.uuid
|
||||||
requestCreateOrderLine({
|
createOrderLine({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
productUuid
|
productUuid
|
||||||
})
|
})
|
||||||
@ -143,7 +143,7 @@ export default {
|
|||||||
quantity = currentLine.quantity
|
quantity = currentLine.quantity
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
requestUpdateOrderLine({
|
updateOrderLine({
|
||||||
orderLineUuid: currentLine.uuid,
|
orderLineUuid: currentLine.uuid,
|
||||||
quantity,
|
quantity,
|
||||||
price,
|
price,
|
||||||
@ -171,7 +171,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteOrderLine(lineSelection) {
|
deleteOrderLine(lineSelection) {
|
||||||
console
|
console
|
||||||
requestDeleteOrderLine({
|
deleteOrderLine({
|
||||||
orderLineUuid: lineSelection.uuid
|
orderLineUuid: lineSelection.uuid
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
findProduct,
|
findProduct,
|
||||||
requestUpdateOrderLine
|
updateOrderLine
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import {
|
import {
|
||||||
formatDate,
|
formatDate,
|
||||||
@ -404,7 +404,7 @@ export default {
|
|||||||
this.arrowBottom()
|
this.arrowBottom()
|
||||||
break
|
break
|
||||||
case 'plus':
|
case 'plus':
|
||||||
requestUpdateOrderLine({
|
updateOrderLine({
|
||||||
orderLineUuid: this.currentOrderLine.uuid,
|
orderLineUuid: this.currentOrderLine.uuid,
|
||||||
quantity: this.listOrderLine[this.currentTable].quantity + 1
|
quantity: this.listOrderLine[this.currentTable].quantity + 1
|
||||||
})
|
})
|
||||||
@ -423,7 +423,7 @@ export default {
|
|||||||
|
|
||||||
break
|
break
|
||||||
case 'minus':
|
case 'minus':
|
||||||
requestUpdateOrderLine({
|
updateOrderLine({
|
||||||
orderLineUuid: this.currentOrderLine.uuid,
|
orderLineUuid: this.currentOrderLine.uuid,
|
||||||
quantity: this.listOrderLine[this.currentTable].quantity - 1
|
quantity: this.listOrderLine[this.currentTable].quantity - 1
|
||||||
})
|
})
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import {
|
import {
|
||||||
requestCreateOrder,
|
createOrder,
|
||||||
requestGetOrder,
|
getOrder,
|
||||||
requestUpdateOrder,
|
updateOrder,
|
||||||
requestCreateOrderLine,
|
createOrderLine,
|
||||||
requestListOrders
|
listOrders
|
||||||
} from '@/api/ADempiere/form/point-of-sales.js'
|
} from '@/api/ADempiere/form/point-of-sales.js'
|
||||||
import { isEmptyValue, extractPagingToken, convertValuesToSend } from '@/utils/ADempiere/valueUtils.js'
|
import { isEmptyValue, extractPagingToken, convertValuesToSend } from '@/utils/ADempiere/valueUtils.js'
|
||||||
import { showMessage } from '@/utils/ADempiere/notification.js'
|
import { showMessage } from '@/utils/ADempiere/notification.js'
|
||||||
@ -39,7 +39,7 @@ export default {
|
|||||||
customerUuid,
|
customerUuid,
|
||||||
salesRepresentativeUuid
|
salesRepresentativeUuid
|
||||||
}) {
|
}) {
|
||||||
return requestCreateOrder({
|
return createOrder({
|
||||||
posUuid,
|
posUuid,
|
||||||
customerUuid,
|
customerUuid,
|
||||||
salesRepresentativeUuid
|
salesRepresentativeUuid
|
||||||
@ -71,7 +71,7 @@ export default {
|
|||||||
posUuid,
|
posUuid,
|
||||||
customerUuid
|
customerUuid
|
||||||
}) {
|
}) {
|
||||||
requestUpdateOrder({
|
updateOrder({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
posUuid,
|
posUuid,
|
||||||
customerUuid
|
customerUuid
|
||||||
@ -108,7 +108,7 @@ export default {
|
|||||||
price,
|
price,
|
||||||
discountRate
|
discountRate
|
||||||
}) {
|
}) {
|
||||||
requestCreateOrderLine({
|
createOrderLine({
|
||||||
orderUuid,
|
orderUuid,
|
||||||
productUuid
|
productUuid
|
||||||
})
|
})
|
||||||
@ -134,7 +134,7 @@ export default {
|
|||||||
orderUuid = rootGetters.posAttributes.currentPointOfSales.currentOrder.uuid // this.currentOrder.uuid
|
orderUuid = rootGetters.posAttributes.currentPointOfSales.currentOrder.uuid // this.currentOrder.uuid
|
||||||
}
|
}
|
||||||
if (!isEmptyValue(orderUuid)) {
|
if (!isEmptyValue(orderUuid)) {
|
||||||
requestGetOrder(orderUuid)
|
getOrder(orderUuid)
|
||||||
.then(orderResponse => {
|
.then(orderResponse => {
|
||||||
dispatch('fillOrde', {
|
dispatch('fillOrde', {
|
||||||
attribute: orderResponse,
|
attribute: orderResponse,
|
||||||
@ -207,7 +207,7 @@ export default {
|
|||||||
})
|
})
|
||||||
values = convertValuesToSend(values)
|
values = convertValuesToSend(values)
|
||||||
const { documentNo, businessPartnerUuid, grandTotal, openAmount, isPaid, isProcessed, isAisleSeller, isInvoiced, dateOrderedFrom, dateOrderedTo, salesRepresentativeUuid } = values
|
const { documentNo, businessPartnerUuid, grandTotal, openAmount, isPaid, isProcessed, isAisleSeller, isInvoiced, dateOrderedFrom, dateOrderedTo, salesRepresentativeUuid } = values
|
||||||
requestListOrders({
|
listOrders({
|
||||||
posUuid,
|
posUuid,
|
||||||
documentNo,
|
documentNo,
|
||||||
businessPartnerUuid,
|
businessPartnerUuid,
|
||||||
@ -254,7 +254,7 @@ export default {
|
|||||||
},
|
},
|
||||||
findOrderServer({ commit }, orderUuid) {
|
findOrderServer({ commit }, orderUuid) {
|
||||||
if (typeof orderUuid === 'string' && !isEmptyValue(orderUuid)) {
|
if (typeof orderUuid === 'string' && !isEmptyValue(orderUuid)) {
|
||||||
requestGetOrder(orderUuid)
|
getOrder(orderUuid)
|
||||||
.then(responseOrder => {
|
.then(responseOrder => {
|
||||||
commit('findOrder', responseOrder)
|
commit('findOrder', responseOrder)
|
||||||
})
|
})
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import {
|
import {
|
||||||
requestListOrderLines
|
listOrderLines
|
||||||
} 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'
|
||||||
@ -30,7 +30,7 @@ export default {
|
|||||||
if (isEmptyValue(orderUuid)) {
|
if (isEmptyValue(orderUuid)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
requestListOrderLines({
|
listOrderLines({
|
||||||
orderUuid
|
orderUuid
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import {
|
import {
|
||||||
requestListPointOfSales
|
listPointOfSales
|
||||||
} 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'
|
||||||
@ -32,7 +32,7 @@ export default {
|
|||||||
listPointOfSalesFromServer({ commit, getters, dispatch }, posToSet = null) {
|
listPointOfSalesFromServer({ commit, getters, dispatch }, posToSet = null) {
|
||||||
const userUuid = getters['user/getUserUuid']
|
const userUuid = getters['user/getUserUuid']
|
||||||
let pos, listPos
|
let pos, listPos
|
||||||
requestListPointOfSales({
|
listPointOfSales({
|
||||||
userUuid
|
userUuid
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user