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.
53 lines
1.3 KiB
53 lines
1.3 KiB
import request from '@/config/axios'
|
|
|
|
export interface RuleVO {
|
|
strategyCode: string
|
|
priority: number
|
|
code: string
|
|
name: string
|
|
description: string
|
|
status: number
|
|
condition: string
|
|
configuration: string
|
|
}
|
|
|
|
// 查询规则列表
|
|
export const getRulePage = async (params) => {
|
|
if (params.isSearch) {
|
|
delete params.isSearch
|
|
const data = {...params}
|
|
return request.post({ url: '/wms/rule/senior', data })
|
|
} else {
|
|
return await request.get({ url: `/wms/rule/page`, params })
|
|
}
|
|
}
|
|
|
|
// 查询规则详情
|
|
export const getRule = async (id: number) => {
|
|
return await request.get({ url: `/wms/rule/get?id=` + id })
|
|
}
|
|
|
|
// 新增规则
|
|
export const createRule = async (data: RuleVO) => {
|
|
return await request.post({ url: `/wms/rule/create`, data })
|
|
}
|
|
|
|
// 修改规则
|
|
export const updateRule = async (data: RuleVO) => {
|
|
return await request.put({ url: `/wms/rule/update`, data })
|
|
}
|
|
|
|
// 删除规则
|
|
export const deleteRule = async (id: number) => {
|
|
return await request.delete({ url: `/wms/rule/delete?id=` + id })
|
|
}
|
|
|
|
// 导出规则 Excel
|
|
export const exportRule = async (params) => {
|
|
return await request.download({ url: `/wms/rule/export-excel`, params })
|
|
}
|
|
|
|
// 下载用户导入模板
|
|
export const importTemplate = () => {
|
|
return request.download({ url: '/wms/rule/get-import-template' })
|
|
}
|