1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 05:11:59 +08:00

Add support to POS service from API gRPC-POS-Client (#447)

This commit is contained in:
Yamel Senih 2020-04-15 16:51:34 -04:00 committed by GitHub
parent dcc956d07c
commit 5ef8db4cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -46,6 +46,7 @@
"dependencies": {
"@adempiere/grpc-access-client": "^1.1.8",
"@adempiere/grpc-data-client": "^2.2.1",
"@adempiere/grpc-pos-client": "^1.0.3",
"@adempiere/grpc-dictionary-client": "^1.3.5",
"@adempiere/grpc-enrollment-client": "^1.0.7",
"autoprefixer": "^9.5.1",

35
src/api/ADempiere/pos.js Normal file
View File

@ -0,0 +1,35 @@
import { getLanguage } from '@/lang/index'
import { getToken } from '@/utils/auth'
import POS from '@adempiere/grpc-pos-client'
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
// Get Instance for connection
function Instance() {
return new POS(
BUSINESS_DATA_ADDRESS,
getToken(),
getLanguage() || 'en_US'
)
}
export function getProductPrice({
searchValue,
upc,
value,
name,
priceListUuid,
businessPartnerUuid,
warehouseUuid,
validFrom
}) {
return Instance.call(this).getProductPrice({
searchValue,
upc,
value,
name,
priceListUuid,
businessPartnerUuid,
warehouseUuid,
validFrom
})
}