diff --git a/src/api/wms/printClientPrinter/index.ts b/src/api/wms/printClientPrinter/index.ts new file mode 100644 index 000000000..d93047159 --- /dev/null +++ b/src/api/wms/printClientPrinter/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +export interface PrintClientPrinterVO { + id: number + clientCode: string + printerName: string + remark: string +} + +// 查询打印服务客户端与打印机名称关系列表 +export const getPrintClientPrinterPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/print-client-printer/senior', data }) + } else { + return await request.get({ url: `/wms/print-client-printer/page`, params }) + } +} + +// 查询打印服务客户端与打印机名称关系详情 +export const getPrintClientPrinter = async (id: number) => { + return await request.get({ url: `/wms/print-client-printer/get?id=` + id }) +} + +// 新增打印服务客户端与打印机名称关系 +export const createPrintClientPrinter = async (data: PrintClientPrinterVO) => { + return await request.post({ url: `/wms/print-client-printer/create`, data }) +} + +// 修改打印服务客户端与打印机名称关系 +export const updatePrintClientPrinter = async (data: PrintClientPrinterVO) => { + return await request.put({ url: `/wms/print-client-printer/update`, data }) +} + +// 删除打印服务客户端与打印机名称关系 +export const deletePrintClientPrinter = async (id: number) => { + return await request.delete({ url: `/wms/print-client-printer/delete?id=` + id }) +} + +// 导出打印服务客户端与打印机名称关系 Excel +export const exportPrintClientPrinter = async (params) => { + return await request.download({ url: `/wms/print-client-printer/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/print-client-printer/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/report/printClientPrinter/index.vue b/src/views/report/printClientPrinter/index.vue new file mode 100644 index 000000000..98f685147 --- /dev/null +++ b/src/views/report/printClientPrinter/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/report/printClientPrinter/printClientPrinter.data.ts b/src/views/report/printClientPrinter/printClientPrinter.data.ts new file mode 100644 index 000000000..d7c112767 --- /dev/null +++ b/src/views/report/printClientPrinter/printClientPrinter.data.ts @@ -0,0 +1,43 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const PrintClientPrinterRules = reactive({ + clientCode: [required], + printerName: [required], +}) + +export const PrintClientPrinter = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '客户端代码', + field: 'clientCode', + sort: 'custom', + isSearch: true, + }, + { + label: '打印机名称', + field: 'printerName', + sort: 'custom', + isSearch: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))