|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface ProductionitemcodeSpareitemcodeVO {
|
|
|
|
id: number
|
|
|
|
productionItemCode: string
|
|
|
|
spareItemCode: string
|
|
|
|
available: string
|
|
|
|
remark: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询量产件备件关系列表
|
|
|
|
export const getProductionitemcodeSpareitemcodePage = async (params) => {
|
|
|
|
if (params.isSearch) {
|
|
|
|
delete params.isSearch
|
|
|
|
const data = {...params}
|
|
|
|
return await request.post({ url: '/wms/productionitemcode-spareitemcode/senior', data })
|
|
|
|
} else {
|
|
|
|
return await request.get({ url: `/wms/productionitemcode-spareitemcode/page`, params })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询量产件备件关系列表
|
|
|
|
export const getProductionitemcodeSpareitemcodeRelation = async (params) => {
|
|
|
|
if (params.isSearch) {
|
|
|
|
delete params.isSearch
|
|
|
|
const data = {...params}
|
|
|
|
return await request.post({ url: '/wms/productionitemcode-spareitemcode/getRelationSenior', data })
|
|
|
|
} else {
|
|
|
|
return await request.get({ url: `/wms/productionitemcode-spareitemcode/getRelation`, params })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询量产件备件关系详情
|
|
|
|
export const getProductionitemcodeSpareitemcode = async (id: number) => {
|
|
|
|
return await request.get({ url: `/wms/productionitemcode-spareitemcode/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增量产件备件关系
|
|
|
|
export const createProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => {
|
|
|
|
return await request.post({ url: `/wms/productionitemcode-spareitemcode/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改量产件备件关系
|
|
|
|
export const updateProductionitemcodeSpareitemcode = async (data: ProductionitemcodeSpareitemcodeVO) => {
|
|
|
|
return await request.put({ url: `/wms/productionitemcode-spareitemcode/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除量产件备件关系
|
|
|
|
export const deleteProductionitemcodeSpareitemcode = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/productionitemcode-spareitemcode/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出量产件备件关系 Excel
|
|
|
|
export const exportProductionitemcodeSpareitemcode = async (params) => {
|
|
|
|
return await request.download({ url: `/wms/productionitemcode-spareitemcode/export-excel`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => {
|
|
|
|
return request.download({ url: '/wms/productionitemcode-spareitemcode/get-import-template' })
|
|
|
|
}
|