Skip to content

Commit 3d4feef

Browse files
committed
✨ ERP:采购入库 50%
1 parent 5339cca commit 3d4feef

File tree

4 files changed

+1166
-0
lines changed

4 files changed

+1166
-0
lines changed

src/api/erp/purchase/in/index.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import request from '@/config/axios'
2+
3+
// ERP 采购入库 VO
4+
export interface PurchaseInVO {
5+
id: number // 入库工单编号
6+
no: string // 采购入库号
7+
customerId: number // 客户编号
8+
inTime: Date // 入库时间
9+
totalCount: number // 合计数量
10+
totalPrice: number // 合计金额,单位:元
11+
status: number // 状态
12+
remark: string // 备注
13+
outCount: number // 采购出库数量
14+
returnCount: number // 采购退货数量
15+
}
16+
17+
// ERP 采购入库 API
18+
export const PurchaseInApi = {
19+
// 查询采购入库分页
20+
getPurchaseInPage: async (params: any) => {
21+
return await request.get({ url: `/erp/purchase-in/page`, params })
22+
},
23+
24+
// 查询采购入库详情
25+
getPurchaseIn: async (id: number) => {
26+
return await request.get({ url: `/erp/purchase-in/get?id=` + id })
27+
},
28+
29+
// 新增采购入库
30+
createPurchaseIn: async (data: PurchaseInVO) => {
31+
return await request.post({ url: `/erp/purchase-in/create`, data })
32+
},
33+
34+
// 修改采购入库
35+
updatePurchaseIn: async (data: PurchaseInVO) => {
36+
return await request.put({ url: `/erp/purchase-in/update`, data })
37+
},
38+
39+
// 更新采购入库的状态
40+
updatePurchaseInStatus: async (id: number, status: number) => {
41+
return await request.put({
42+
url: `/erp/purchase-in/update-status`,
43+
params: {
44+
id,
45+
status
46+
}
47+
})
48+
},
49+
50+
// 删除采购入库
51+
deletePurchaseIn: async (ids: number[]) => {
52+
return await request.delete({
53+
url: `/erp/purchase-in/delete`,
54+
params: {
55+
ids: ids.join(',')
56+
}
57+
})
58+
},
59+
60+
// 导出采购入库 Excel
61+
exportPurchaseIn: async (params: any) => {
62+
return await request.download({ url: `/erp/purchase-in/export-excel`, params })
63+
}
64+
}

0 commit comments

Comments
 (0)