import request from '@/config/axios' export interface CustomerdockVO { code: string name: string description: string city: string address: string contactPerson: string contactPhone: string customerCode: string warehouseCode: string defaultLocationCode: string available: number activeTime: Date expireTime: Date remark: string } // 查询客户月台列表 export const getCustomerdockPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/customerdock/senior', data }) } else { return await request.get({ url: `/wms/customerdock/page`, params }) } } // 查询客户月台详情 export const getCustomerdock = async (id: number) => { return await request.get({ url: `/wms/customerdock/get?id=` + id }) } // 新增客户月台 export const createCustomerdock = async (data: CustomerdockVO) => { return await request.post({ url: `/wms/customerdock/create`, data }) } // 修改客户月台 export const updateCustomerdock = async (data: CustomerdockVO) => { return await request.put({ url: `/wms/customerdock/update`, data }) } // 删除客户月台 export const deleteCustomerdock = async (id: number) => { return await request.delete({ url: `/wms/customerdock/delete?id=` + id }) } // 导出客户月台 Excel export const exportCustomerdock = async (params) => { if (params.isSearch) { const data = {...params} return await request.downloadPost({ url: `/wms/customerdock/export-excel-senior`, data }) } else { return await request.download({ url: `/wms/customerdock/export-excel`, params }) } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/customerdock/get-import-template' }) } // 查询客户月台发货口列表 export const pageCustomerCodeToCustomerDock = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/customerdock/pageCustomerCodeToCustomerDockSenior', data }) } else { return await request.get({ url: `/wms/customerdock/pageCustomerCodeToCustomerDock`, params }) } } // 查询客户月台收货口列表 export const pageCustomerCodeToCustomerDockReceiving = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} return request.post({ url: '/wms/customerdock/pageCustomerCodeToCustomerDockReceivingSenior', data }) } else { return await request.get({ url: `/wms/customerdock/pageCustomerCodeToCustomerDockReceiving`, params }) } }