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.
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface SupplierVO {
|
|
|
|
code: string
|
|
|
|
name: string
|
|
|
|
shortName: string
|
|
|
|
address: string
|
|
|
|
country: string
|
|
|
|
city: string
|
|
|
|
phone: string
|
|
|
|
fax: string
|
|
|
|
postId: string
|
|
|
|
contacts: string
|
|
|
|
bank: string
|
|
|
|
currency: string
|
|
|
|
taxRate: number
|
|
|
|
type: string
|
|
|
|
available: number
|
|
|
|
activeTime: Date
|
|
|
|
expireTime: Date
|
|
|
|
remark: string
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询供应商列表
|
|
|
|
export const getSupplierPage = async (params) => {
|
|
|
|
return await request.get({ url: `/wms/supplier/page`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询供应商详情
|
|
|
|
export const getSupplier = async (id: number) => {
|
|
|
|
return await request.get({ url: `/wms/supplier/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增供应商
|
|
|
|
export const createSupplier = async (data: SupplierVO) => {
|
|
|
|
return await request.post({ url: `/wms/supplier/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改供应商
|
|
|
|
export const updateSupplier = async (data: SupplierVO) => {
|
|
|
|
return await request.put({ url: `/wms/supplier/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除供应商
|
|
|
|
export const deleteSupplier = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/wms/supplier/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出供应商 Excel
|
|
|
|
export const exportSupplier = async (params) => {
|
|
|
|
return await request.download({ url: `/wms/supplier/export-excel`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 下载用户导入模板
|
|
|
|
export const importTemplate = () => {
|
|
|
|
return request.download({ url: '/wms/supplier/get-import-template' })
|
|
|
|
}
|