ERP:增加供应商的实现

This commit is contained in:
YunaiV
2024-02-06 18:00:08 +08:00
parent 9cbdfe0ecb
commit 5bdf0fc0ff
8 changed files with 561 additions and 34 deletions

View File

@ -0,0 +1,58 @@
import request from '@/config/axios'
// ERP 供应商 VO
export interface SupplierVO {
id: number // 供应商编号
name: string // 供应商名称
contact: string // 联系人
mobile: string // 手机号码
telephone: string // 联系电话
email: string // 电子邮箱
fax: string // 传真
remark: string // 备注
status: number // 开启状态
sort: number // 排序
taxNo: string // 纳税人识别号
taxPercent: number // 税率
bankName: string // 开户行
bankAccount: string // 开户账号
bankAddress: string // 开户地址
}
// ERP 供应商 API
export const SupplierApi = {
// 查询供应商分页
getSupplierPage: async (params: any) => {
return await request.get({ url: `/erp/supplier/page`, params })
},
// 获得供应商精简列表
getSupplierSimpleList: async () => {
return await request.get({ url: `/erp/supplier/simple-list` })
},
// 查询供应商详情
getSupplier: async (id: number) => {
return await request.get({ url: `/erp/supplier/get?id=` + id })
},
// 新增供应商
createSupplier: async (data: SupplierVO) => {
return await request.post({ url: `/erp/supplier/create`, data })
},
// 修改供应商
updateSupplier: async (data: SupplierVO) => {
return await request.put({ url: `/erp/supplier/update`, data })
},
// 删除供应商
deleteSupplier: async (id: number) => {
return await request.delete({ url: `/erp/supplier/delete?id=` + id })
},
// 导出供应商 Excel
exportSupplier: async (params) => {
return await request.download({ url: `/erp/supplier/export-excel`, params })
}
}

View File

@ -12,43 +12,35 @@ export interface StockInVO {
remark: string // 备注
}
// TODO 芋艿:稍后清理字段
// ERP 其它入库单 API
export const StockInApi = {
// 查询ERP 其它入库单分页
// 查询其它入库单分页
getStockInPage: async (params: any) => {
return await request.get({ url: `/erp/stock-in/page`, params })
},
// 查询ERP 其它入库单详情
// 查询其它入库单详情
getStockIn: async (id: number) => {
return await request.get({ url: `/erp/stock-in/get?id=` + id })
},
// 新增ERP 其它入库单
// 新增其它入库单
createStockIn: async (data: StockInVO) => {
return await request.post({ url: `/erp/stock-in/create`, data })
},
// 修改ERP 其它入库单
// 修改其它入库单
updateStockIn: async (data: StockInVO) => {
return await request.put({ url: `/erp/stock-in/update`, data })
},
// 删除ERP 其它入库单
// 删除其它入库单
deleteStockIn: async (id: number) => {
return await request.delete({ url: `/erp/stock-in/delete?id=` + id })
},
// 导出ERP 其它入库单 Excel
// 导出其它入库单 Excel
exportStockIn: async (params) => {
return await request.download({ url: `/erp/stock-in/export-excel`, params })
},
// ==================== 子表ERP 其它入库单项) ====================
// 获得ERP 其它入库单项列表
getStockInItemListByInId: async (inId) => {
return await request.get({ url: `/erp/stock-in/stock-in-item/list-by-in-id?inId=` + inId })
}
}