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.7 KiB
64 lines
1.7 KiB
1 year ago
|
import request from '@/config/axios'
|
||
|
|
||
|
export interface EnterpriseVO {
|
||
|
id: number
|
||
|
code: string
|
||
|
name: string
|
||
|
shortName: string
|
||
|
address: string
|
||
|
available: string
|
||
|
activeTime: Date
|
||
|
expireTime: Date
|
||
|
remark: string
|
||
|
deletionTime: Date
|
||
|
deleterId: string
|
||
|
extraProperties: string
|
||
|
concurrencyStamp: string
|
||
|
siteId: string
|
||
|
}
|
||
|
|
||
|
// 查询企业列表
|
||
|
export const getEnterprisePage = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
delete params.isSearch
|
||
|
const data = {...params}
|
||
|
return await request.post({ url: '/wms/enterprise/senior', data })
|
||
|
} else {
|
||
|
return await request.get({ url: `/wms/enterprise/page`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 查询企业详情
|
||
|
export const getEnterprise = async (id: number) => {
|
||
|
return await request.get({ url: `/wms/enterprise/get?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 新增企业
|
||
|
export const createEnterprise = async (data: EnterpriseVO) => {
|
||
|
return await request.post({ url: `/wms/enterprise/create`, data })
|
||
|
}
|
||
|
|
||
|
// 修改企业
|
||
|
export const updateEnterprise = async (data: EnterpriseVO) => {
|
||
|
return await request.put({ url: `/wms/enterprise/update`, data })
|
||
|
}
|
||
|
|
||
|
// 删除企业
|
||
|
export const deleteEnterprise = async (id: number) => {
|
||
|
return await request.delete({ url: `/wms/enterprise/delete?id=` + id })
|
||
|
}
|
||
|
|
||
|
// 导出企业 Excel
|
||
|
export const exportEnterprise = async (params) => {
|
||
|
if (params.isSearch) {
|
||
|
const data = {...params}
|
||
|
return await request.downloadPost({ url: `/wms/enterprise/export-excel-senior`, data })
|
||
|
} else {
|
||
|
return await request.download({ url: `/wms/enterprise/export-excel`, params })
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 下载用户导入模板
|
||
|
export const importTemplate = () => {
|
||
|
return request.download({ url: '/wms/enterprise/get-import-template' })
|
||
|
}
|