gaoluyang
6 小时以前 cb9cd49627b65a4c0e137e08063271a8cefe1826
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
59
60
61
import { requestClient } from '#/api/request';
 
export namespace WlsProductSalesDetailApi {
  /** MES 销售出库明细 */
  export interface ProductSalesDetail {
    id?: number; // 明细编号
    lineId?: number; // 出库单行编号
    salesId?: number; // 出库单编号
    itemId?: number; // 物料编号
    itemCode?: string; // 物料编码
    itemName?: string; // 物料名称
    quantity?: number; // 数量
    materialStockId?: number; // 库存记录编号
    batchId?: number; // 批次编号
    batchCode?: string; // 批次号
    warehouseId?: number; // 仓库编号
    warehouseName?: string; // 仓库名称
    locationId?: number; // 库区编号
    locationName?: string; // 库区名称
    areaId?: number; // 库位编号
    areaName?: string; // 库位名称
    remark?: string; // 备注
  }
}
 
/** 查询销售出库明细列表(按行编号) */
export function getProductSalesDetailListByLineId(lineId: number) {
  return requestClient.get<WlsProductSalesDetailApi.ProductSalesDetail[]>(
    '/mes/wm/product-sales-detail/list-by-line',
    { params: { lineId } },
  );
}
 
/** 查询销售出库明细详情 */
export function getProductSalesDetail(id: number) {
  return requestClient.get<WlsProductSalesDetailApi.ProductSalesDetail>(
    `/mes/wm/product-sales-detail/get?id=${id}`,
  );
}
 
/** 新增销售出库明细 */
export function createProductSalesDetail(
  data: WlsProductSalesDetailApi.ProductSalesDetail,
) {
  return requestClient.post<number>(
    '/mes/wm/product-sales-detail/create',
    data,
  );
}
 
/** 修改销售出库明细 */
export function updateProductSalesDetail(
  data: WlsProductSalesDetailApi.ProductSalesDetail,
) {
  return requestClient.put('/mes/wm/product-sales-detail/update', data);
}
 
/** 删除销售出库明细 */
export function deleteProductSalesDetail(id: number) {
  return requestClient.delete(`/mes/wm/product-sales-detail/delete?id=${id}`);
}