You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.8 KiB
64 lines
1.8 KiB
import request from '@/config/axios'
|
|
|
|
export interface CustomeritemVO {
|
|
customerCode: string
|
|
itemCode: string
|
|
customerItemCode: string
|
|
cusotmerUom: string
|
|
convertRate: number
|
|
packUnit: string
|
|
packQty: number
|
|
altPackUnit: string
|
|
altPackQty: number
|
|
packQtyOfContainer: number
|
|
available: number
|
|
activeTime: Date
|
|
expireTime: Date
|
|
remark: string
|
|
}
|
|
|
|
// 查询客户物料列表
|
|
export const getCustomeritemPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return request.post({ url: '/wms/customeritem/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/customeritem/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询客户物料详情
|
|
export const getCustomeritem = async (id: number) => {
|
|
return await request.get({ url: `/wms/customeritem/get?id=` + id })
|
|
}
|
|
|
|
// 新增客户物料
|
|
export const createCustomeritem = async (data: CustomeritemVO) => {
|
|
return await request.post({ url: `/wms/customeritem/create`, data })
|
|
}
|
|
|
|
// 修改客户物料
|
|
export const updateCustomeritem = async (data: CustomeritemVO) => {
|
|
return await request.put({ url: `/wms/customeritem/update`, data })
|
|
}
|
|
|
|
// 删除客户物料
|
|
export const deleteCustomeritem = async (id: number) => {
|
|
return await request.delete({ url: `/wms/customeritem/delete?id=` + id })
|
|
}
|
|
|
|
// 导出客户物料 Excel
|
|
export const exportCustomeritem = async (params) => {
|
|
if (params.isSearch) {
|
|
const data = {...params}
|
|
return await request.downloadPost({ url: `/wms/customeritem/export-excel-senior`, data })
|
|
} else {
|
|
return await request.download({ url: `/wms/customeritem/export-excel`, params })
|
|
}
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/customeritem/get-import-template' })
|
|
}
|