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:
parent
dcc956d07c
commit
5ef8db4cd8
@ -46,6 +46,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adempiere/grpc-access-client": "^1.1.8",
|
"@adempiere/grpc-access-client": "^1.1.8",
|
||||||
"@adempiere/grpc-data-client": "^2.2.1",
|
"@adempiere/grpc-data-client": "^2.2.1",
|
||||||
|
"@adempiere/grpc-pos-client": "^1.0.3",
|
||||||
"@adempiere/grpc-dictionary-client": "^1.3.5",
|
"@adempiere/grpc-dictionary-client": "^1.3.5",
|
||||||
"@adempiere/grpc-enrollment-client": "^1.0.7",
|
"@adempiere/grpc-enrollment-client": "^1.0.7",
|
||||||
"autoprefixer": "^9.5.1",
|
"autoprefixer": "^9.5.1",
|
||||||
|
35
src/api/ADempiere/pos.js
Normal file
35
src/api/ADempiere/pos.js
Normal 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
|
||||||
|
})
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user