57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
export interface MaterialVO {
|
|
id: number
|
|
remark: string
|
|
matCode: string
|
|
matName: string
|
|
parentId: number
|
|
matType: string
|
|
enabledStatus: number
|
|
unit: string
|
|
brand: string
|
|
spec: string
|
|
safeStock: number
|
|
schemeId: number
|
|
}
|
|
|
|
// 查询物料主数据分页
|
|
export const getMaterialPage = async (params) => {
|
|
return await request.get({ url: `/biz/material/page`, params })
|
|
}
|
|
|
|
// 查询物料主数据详情
|
|
export const getMaterial = async (id: number) => {
|
|
return await request.get({ url: `/biz/material/get?id=` + id })
|
|
}
|
|
|
|
// 新增物料主数据
|
|
export const createMaterial = async (data: MaterialVO) => {
|
|
return await request.post({ url: `/biz/material/create`, data })
|
|
}
|
|
|
|
// 修改物料主数据
|
|
export const updateMaterial = async (data: MaterialVO) => {
|
|
return await request.put({ url: `/biz/material/update`, data })
|
|
}
|
|
|
|
// 删除物料主数据
|
|
export const deleteMaterial = async (id: number) => {
|
|
return await request.delete({ url: `/biz/material/delete?id=` + id })
|
|
}
|
|
|
|
// 导出物料主数据 Excel
|
|
export const exportMaterial = async (params) => {
|
|
return await request.download({ url: `/biz/material/export-excel`, params })
|
|
}
|
|
|
|
// 获取物料下拉列表
|
|
export const getMaterialDropdown = async (params) => {
|
|
return await request.get({ url: `/biz/material/dropdown`, params })
|
|
}
|
|
|
|
// 获取规格型号下拉列表
|
|
export const getSpecDropdown = async (params) => {
|
|
return await request.get({ url: `/biz/material/spec/dropdown`, params })
|
|
}
|