zhangwencui
6 天以前 7619c19a67c2ac824f803090bab753fc5ea14408
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import type { PageParam, PageResult } from '@vben/request';
 
import { requestClient } from '#/api/request';
 
export namespace WlsBarcodeConfigApi {
  /** MES 条码配置 */
  export interface BarcodeConfig {
    id?: number; // 编号
    format?: number; // 条码格式
    bizType?: number; // 业务类型
    contentFormat?: string; // 内容格式模板
    contentExample?: string; // 内容样例
    autoGenerateFlag?: boolean; // 是否自动生成
    defaultTemplate?: string; // 默认打印模板
    status?: number; // 状态
    remark?: string; // 备注
    createTime?: Date; // 创建时间
  }
}
 
/** 查询条码配置分页 */
export function getBarcodeConfigPage(params: PageParam) {
  return requestClient.get<PageResult<WlsBarcodeConfigApi.BarcodeConfig>>(
    '/mes/wm/barcode-config/page',
    { params },
  );
}
 
/** 查询条码配置详情 */
export function getBarcodeConfig(id: number) {
  return requestClient.get<WlsBarcodeConfigApi.BarcodeConfig>(
    `/mes/wm/barcode-config/get?id=${id}`,
  );
}
 
/** 新增条码配置 */
export function createBarcodeConfig(data: WlsBarcodeConfigApi.BarcodeConfig) {
  return requestClient.post('/mes/wm/barcode-config/create', data);
}
 
/** 修改条码配置 */
export function updateBarcodeConfig(data: WlsBarcodeConfigApi.BarcodeConfig) {
  return requestClient.put('/mes/wm/barcode-config/update', data);
}
 
/** 删除条码配置 */
export function deleteBarcodeConfig(id: number) {
  return requestClient.delete(`/mes/wm/barcode-config/delete?id=${id}`);
}