api.ts
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { http } from '@/typing/http';
import request from '@/utils/request';
import { PMS_HOST, OOP_HOST } from "@/utils/host";
/** 获取服务站配件列表 */
export function getPartShopPageApi(params: PmsStoragePartShop.QueryParams): http.PromisePageResp<PmsStoragePartShop.Item> {
return request.get(`${PMS_HOST}/erp/part/shop/list`, { params });
}
/** 编辑服务站配件 */
export function savePartStockApi(params: PmsStoragePartShop.Params): http.PromiseResp<string> {
return request.post(`${PMS_HOST}/erp/part/shop/update/stock`, { ...params });
}
/** 编辑服务站配件价格 */
export function savePartPriceApi(params: PmsStoragePartShop.Params): http.PromiseResp<string> {
return request.post(`${PMS_HOST}/erp/part/shop/update/price`, { ...params });
}
/** 获取服务站列表 */
export function getShopApi(): http.PromiseResp<PmsStoragePartShop.Option[]> {
return request.get(`${OOP_HOST}/select/biz/shops`, { params: { bizType: 2 } });
}
/**
* 配件选择
*/
export function getPartPageListApi(params?: PartPriceCoefficientSpace.QueryPartParams): http.PromisePageResp<PartPriceCoefficientSpace.PartItem> {
return request.get(`${PMS_HOST}/erp/part/list`, { params });
}
/** 释放库存 */
export function releaseApi(params: PmsStoragePartShop.ReleaseParam): http.PromiseResp<void> {
return request.post(`${PMS_HOST}/erp/part/shop/release/actual`, { ...params });
}
/**
* 查询门店备件锁件明细列表
*/
export function getLockDetail(params?: PmsStoragePartShop.LockParams): http.PromiseRespA<PmsStoragePartShop.LockDetailVO> {
return request.get(`${PMS_HOST}/erp/part/shop/get/lock/detail`, { params });
}
/**
* 查询门店备件流水明细列表
*/
export function getFlowDetail(params?: PmsStoragePartShop.FlowParams): http.PromisePageResp<PmsStoragePartShop.FlowVO> {
return request.get(`${PMS_HOST}/erp/part/shop/get/record`, { params });
}
/**
* 查询门店备件锁库流水明细列表
*/
export function getLockFlowDetail(params?: PmsStoragePartShop.FlowParams): http.PromisePageResp<PmsStoragePartShop.FlowVO> {
return request.get(`${PMS_HOST}/erp/part/shop/get/lock/record`, { params });
}
// 释放库存
export function unLock(params: PmsStoragePartShop.unLock): http.PromiseResp<string> {
return request.post(`${PMS_HOST}/erp/part/shop/cancel/lock`, { ...params }, { contentType: "form-urlencoded" });
}