diff --git a/src/api/wms/printBusinesstypeTemplate/index.ts b/src/api/wms/printBusinesstypeTemplate/index.ts new file mode 100644 index 000000000..0ae7cbc70 --- /dev/null +++ b/src/api/wms/printBusinesstypeTemplate/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +export interface PrintBusinesstypeTemplateVO { + id: number + businesstypeCode: string + templateCode: string + remark: string +} + +// 查询打印服务业务类型和打印模板关系列表 +export const getPrintBusinesstypeTemplatePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/print-businesstype-template/senior', data }) + } else { + return await request.get({ url: `/wms/print-businesstype-template/page`, params }) + } +} + +// 查询打印服务业务类型和打印模板关系详情 +export const getPrintBusinesstypeTemplate = async (id: number) => { + return await request.get({ url: `/wms/print-businesstype-template/get?id=` + id }) +} + +// 新增打印服务业务类型和打印模板关系 +export const createPrintBusinesstypeTemplate = async (data: PrintBusinesstypeTemplateVO) => { + return await request.post({ url: `/wms/print-businesstype-template/create`, data }) +} + +// 修改打印服务业务类型和打印模板关系 +export const updatePrintBusinesstypeTemplate = async (data: PrintBusinesstypeTemplateVO) => { + return await request.put({ url: `/wms/print-businesstype-template/update`, data }) +} + +// 删除打印服务业务类型和打印模板关系 +export const deletePrintBusinesstypeTemplate = async (id: number) => { + return await request.delete({ url: `/wms/print-businesstype-template/delete?id=` + id }) +} + +// 导出打印服务业务类型和打印模板关系 Excel +export const exportPrintBusinesstypeTemplate = async (params) => { + return await request.download({ url: `/wms/print-businesstype-template/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/print-businesstype-template/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/report/printBusinesstypeTemplate/index.vue b/src/views/report/printBusinesstypeTemplate/index.vue new file mode 100644 index 000000000..11b0bec0c --- /dev/null +++ b/src/views/report/printBusinesstypeTemplate/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts b/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts new file mode 100644 index 000000000..c8e645d77 --- /dev/null +++ b/src/views/report/printBusinesstypeTemplate/printBusinesstypeTemplate.data.ts @@ -0,0 +1,43 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const PrintBusinesstypeTemplateRules = reactive({ + businesstypeCode: [required], + templateCode: [required], +}) + +export const PrintBusinesstypeTemplate = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isForm: false, + }, + { + label: '业务类型', + field: 'businesstypeCode', + sort: 'custom', + isSearch: true, + }, + { + label: '模板代码', + field: 'templateCode', + sort: 'custom', + isSearch: true, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))