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.
51 lines
1.4 KiB
51 lines
1.4 KiB
import request from '@/config/axios'
|
|
|
|
export interface ConfigurationVO {
|
|
strategyCode: string
|
|
ruleCode: string
|
|
configurationCode: string
|
|
configurationValue: string
|
|
description: string
|
|
groupCode: string
|
|
}
|
|
|
|
// 查询配置列表
|
|
export const getConfigurationPage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return request.post({ url: '/wms/configuration/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/configuration/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询配置详情
|
|
export const getConfiguration = async (id: number) => {
|
|
return await request.get({ url: `/wms/configuration/get?id=` + id })
|
|
}
|
|
|
|
// 新增配置
|
|
export const createConfiguration = async (data: ConfigurationVO) => {
|
|
return await request.post({ url: `/wms/configuration/create`, data })
|
|
}
|
|
|
|
// 修改配置
|
|
export const updateConfiguration = async (data: ConfigurationVO) => {
|
|
return await request.put({ url: `/wms/configuration/update`, data })
|
|
}
|
|
|
|
// 删除配置
|
|
export const deleteConfiguration = async (id: number) => {
|
|
return await request.delete({ url: `/wms/configuration/delete?id=` + id })
|
|
}
|
|
|
|
// 导出配置 Excel
|
|
export const exportConfiguration = async (params) => {
|
|
return await request.download({ url: `/wms/configuration/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/configuration/get-import-template' })
|
|
}
|