You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besure_web/src/api/mes/printconfig/index.ts

50 lines
1.6 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/config/axios'
// 打印机配置 VO
export interface ConfigVO {
id: number // 主键ID
hostName: string // 主机名如PACKING-PC-01不可修改
systemPrinterName: string // 系统打印机名称,关联下拉选项
isDefault: boolean // 是否默认0-否1-是
isEnabled: boolean // 是否启用0-禁用1-启用
businessScenarioCode: string // 业务场景编码
businessScenario: string // 业务场景(字典标签)
scenarioCount: number // 场景数
remark: string // 备注,记录打印机用途说明,用户不可修改
createdAt: Date // 创建时间
updatedAt: Date // 更新时间
}
// 打印机配置 API
export const ConfigApi = {
// 查询打印机配置分页
getConfigPage: async (params: any) => {
return await request.get({ url: `/printer/config/page`, params })
},
// 查询打印机配置详情
getConfig: async (id: number) => {
return await request.get({ url: `/printer/config/get?id=` + id })
},
// 新增打印机配置
createConfig: async (data: ConfigVO) => {
return await request.post({ url: `/printer/config/create`, data })
},
// 修改打印机配置
updateConfig: async (data: ConfigVO) => {
return await request.put({ url: `/printer/config/update`, data })
},
// 删除打印机配置
deleteConfig: async (id: number) => {
return await request.delete({ url: `/printer/config/delete?id=` + id })
},
// 导出打印机配置 Excel
exportConfig: async (params) => {
return await request.download({ url: `/printer/config/export-excel`, params })
},
}