gaoluyang
2026-06-29 27cd042df9aca0383a49f3514bc21958dd890912
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import type { PageParam, PageResult } from '../../../../packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace ErpStockInApi {
  /** 其它入库单信息 */
  export interface StockIn {
    id?: number; // 入库编号
    no: string; // 入库单号
    supplierId: number; // 供应商编号
    supplierName?: string; // 供应商名称
    inTime: Date; // 入库时间
    totalCount: number; // 合计数量
    totalPrice: number; // 合计金额,单位:元
    status: number; // 状态
    remark: string; // 备注
    fileUrl?: string; // 附件
    productNames?: string; // 产品信息
    creatorName?: string; // 创建人
    items?: StockInItem[]; // 入库产品清单
  }
 
  /** 其它入库单产品信息 */
  export interface StockInItem {
    id?: number; // 编号
    seq?: number; // 前端行号
    warehouseId?: number; // 仓库编号
    productId?: number; // 产品编号
    productName?: string; // 产品名称
    productUnitId?: number; // 产品单位编号
    productUnitName?: string; // 产品单位名称
    productBarCode?: string; // 产品条码
    count?: number; // 数量
    productPrice?: number; // 产品单价
    totalPrice?: number; // 总价
    stockCount?: number; // 库存数量
    remark?: string; // 备注
  }
}
 
/** 查询其它入库单分页 */
export function getStockInPage(params: PageParam) {
  return requestClient.get<PageResult<ErpStockInApi.StockIn>>(
    '/erp/stock-in/page',
    {
      params,
    },
  );
}
 
/** 查询其它入库单详情 */
export function getStockIn(id: number) {
  return requestClient.get<ErpStockInApi.StockIn>(`/erp/stock-in/get?id=${id}`);
}
 
/** 新增其它入库单 */
export function createStockIn(data: ErpStockInApi.StockIn) {
  return requestClient.post('/erp/stock-in/create', data);
}
 
/** 修改其它入库单 */
export function updateStockIn(data: ErpStockInApi.StockIn) {
  return requestClient.put('/erp/stock-in/update', data);
}
 
/** 更新其它入库单的状态 */
export function updateStockInStatus(id: number, status: number) {
  return requestClient.put('/erp/stock-in/update-status', null, {
    params: { id, status },
  });
}
 
/** 删除其它入库单 */
export function deleteStockIn(ids: number[]) {
  return requestClient.delete('/erp/stock-in/delete', {
    params: {
      ids: ids.join(','),
    },
  });
}
 
/** 导出其它入库单 Excel */
export function exportStockIn(params: any) {
  return requestClient.download('/erp/stock-in/export-excel', {
    params,
  });
}