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.

59 lines
1.7 KiB

1 year ago
import request from '@/config/axios'
export interface PurchasepriceVO {
supplierCode: string
itemCode: string
currency: string
price: number
available: number
activeTime: Date
expireTime: Date
remark: string
}
// 查询采购价格单列表
export const getPurchasepricePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/purchaseprice/senior', data })
} else {
return await request.get({ url: `/wms/purchaseprice/page`, params })
}
}
// 查询采购价格单详情
export const getPurchaseprice = async (id: number) => {
return await request.get({ url: `/wms/purchaseprice/get?id=` + id })
}
// 新增采购价格单
export const createPurchaseprice = async (data: PurchasepriceVO) => {
return await request.post({ url: `/wms/purchaseprice/create`, data })
}
// 修改采购价格单
export const updatePurchaseprice = async (data: PurchasepriceVO) => {
return await request.put({ url: `/wms/purchaseprice/update`, data })
}
// 删除采购价格单
export const deletePurchaseprice = async (id: number) => {
return await request.delete({ url: `/wms/purchaseprice/delete?id=` + id })
}
// 导出采购价格单 Excel
export const exportPurchaseprice = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchaseprice/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchaseprice/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseprice/get-import-template' })
}