diff --git a/src/api/wms/barbasic/index.ts b/src/api/wms/barbasic/index.ts new file mode 100644 index 000000000..e5a23798d --- /dev/null +++ b/src/api/wms/barbasic/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface BarbasicVO { + id: number + number: string + type: string + template: string + status: string + relateNumber: string + barcodeString: string + printTimes: number + lastPrintTime: string + lastPrintUserId: string + lastPrintUserName: string +} + +// 查询条码实体基类列表 +export const getBarbasicPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/barbasic/senior', data }) + } else { + return await request.get({ url: `/wms/barbasic/page`, params }) + } +} + +// 查询条码实体基类详情 +export const getBarbasic = async (id: number) => { + return await request.get({ url: `/wms/barbasic/get?id=` + id }) +} + +// 新增条码实体基类 +export const createBarbasic = async (data: BarbasicVO) => { + return await request.post({ url: `/wms/barbasic/create`, data }) +} + +// 修改条码实体基类 +export const updateBarbasic = async (data: BarbasicVO) => { + return await request.put({ url: `/wms/barbasic/update`, data }) +} + +// 删除条码实体基类 +export const deleteBarbasic = async (id: number) => { + return await request.delete({ url: `/wms/barbasic/delete?id=` + id }) +} + +// 导出条码实体基类 Excel +export const exportBarbasic = async (params) => { + return await request.download({ url: `/wms/barbasic/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/barbasic/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/barcode/index.ts b/src/api/wms/barcode/index.ts index 74b03a09c..80739036c 100644 --- a/src/api/wms/barcode/index.ts +++ b/src/api/wms/barcode/index.ts @@ -13,7 +13,8 @@ export interface BarcodeVO { encyptMethod: string masterId: number trimEnd: string - isEncypt: string + isEncypt: string, + labelType: string, } // 查询条码片段列表 @@ -21,38 +22,38 @@ export const getBarcodePage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/wms/barcode/senior', data }) + return await request.post({ url: '/label/barcode/senior', data }) } else { - return await request.get({ url: `/wms/barcode/page`, params }) + return await request.get({ url: `/label/barcode/page`, params }) } } // 查询条码片段详情 export const getBarcode = async (id: number) => { - return await request.get({ url: `/wms/barcode/get?id=` + id }) + return await request.get({ url: `/label/barcode/get?id=` + id }) } // 新增条码片段 export const createBarcode = async (data: BarcodeVO) => { - return await request.post({ url: `/wms/barcode/create`, data }) + return await request.post({ url: `/label/barcode/create`, data }) } // 修改条码片段 export const updateBarcode = async (data: BarcodeVO) => { - return await request.put({ url: `/wms/barcode/update`, data }) + return await request.put({ url: `/label/barcode/update`, data }) } // 删除条码片段 export const deleteBarcode = async (id: number) => { - return await request.delete({ url: `/wms/barcode/delete?id=` + id }) + return await request.delete({ url: `/label/barcode/delete?id=` + id }) } // 导出条码片段 Excel export const exportBarcode = async (params) => { - return await request.download({ url: `/wms/barcode/export-excel`, params }) + return await request.download({ url: `/label/barcode/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/wms/barcode/get-import-template' }) + return request.download({ url: '/label/barcode/get-import-template' }) } \ No newline at end of file diff --git a/src/api/wms/labeltype/index.ts b/src/api/wms/labeltype/index.ts new file mode 100644 index 000000000..5a08bf37b --- /dev/null +++ b/src/api/wms/labeltype/index.ts @@ -0,0 +1,63 @@ +import request from '@/config/axios' + +export interface LabeltypeVO { + id: number + labelType: string + description: string + dataProtocol: string + splitMehod: string + header: string + version: string + separators: string + validateMethod: string + validateNumber: number + encyptEthod: string + compressMethod: string + templateName: string + templateFile: string + barcodeSegments: string + labelCode: string + isEncypt: string + isCompress: string +} + +// 查询标签定义列表 +export const getLabeltypePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/labeltype/senior', data }) + } else { + return await request.get({ url: `/wms/labeltype/page`, params }) + } +} + +// 查询标签定义详情 +export const getLabeltype = async (id: number) => { + return await request.get({ url: `/wms/labeltype/get?id=` + id }) +} + +// 新增标签定义 +export const createLabeltype = async (data: LabeltypeVO) => { + return await request.post({ url: `/wms/labeltype/create`, data }) +} + +// 修改标签定义 +export const updateLabeltype = async (data: LabeltypeVO) => { + return await request.put({ url: `/wms/labeltype/update`, data }) +} + +// 删除标签定义 +export const deleteLabeltype = async (id: number) => { + return await request.delete({ url: `/wms/labeltype/delete?id=` + id }) +} + +// 导出标签定义 Excel +export const exportLabeltype = async (params) => { + return await request.download({ url: `/wms/labeltype/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/labeltype/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index a2a896063..166dc3280 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -266,5 +266,7 @@ export enum DICT_TYPE { DATA_TYPE = 'data_type', // 数据类型 PACK_UNIT = 'pack_unit', // 包装单位 DETAIL_STATUS = 'detail_status', // 明细状态 - TRANSFER_MODE = 'transfer_mode' // 运输方式 + TRANSFER_MODE = 'transfer_mode', // 运输方式 + LABEL_TYPE = 'label_type', // 标签类型 + LABEL_STATUS = 'label_status' // 标签状态 } diff --git a/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts b/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts new file mode 100644 index 000000000..894f33e4c --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/barbasic/barbasic.data.ts @@ -0,0 +1,101 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const BarbasicRules = reactive({ + number: [required], + type: [required], + template: [required], + status: [required], + barcodeString: [required], + printTimes: [required], +}) + +export const Barbasic = useCrudSchemas(reactive([ + { + label: '标签号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + fixed: 'left' + } + }, + { + label: '标签类型', + field: 'type', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.LABEL_TYPE, + dictClass: 'string' + }, + { + label: '标签模板', + field: 'template', + sort: 'custom', + }, + { + label: '标签状态', + field: 'status', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.LABEL_STATUS, + dictClass: 'string' + }, + { + label: '关联号', + field: 'relateNumber', + sort: 'custom', + }, + { + label: '标签条码字符串', + field: 'barcodeString', + sort: 'custom', + }, + { + label: '打印次数', + field: 'printTimes', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + value: 0 + }, + }, + { + label: '最后打印时间', + field: 'lastPrintTime', + sort: 'custom', + formatter: dateFormatter, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { + label: '最后打印人ID', + field: 'lastPrintUserId', + sort: 'custom' + }, + { + label: '最后打印人用户名', + field: 'lastPrintUserName', + sort: 'custom', + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 150, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/wms/basicDataManage/labelManage/barbasic/index.vue b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue new file mode 100644 index 000000000..c75936594 --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue @@ -0,0 +1,231 @@ + + + diff --git a/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts b/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts index 6f1a6da9a..a39fb8bc1 100644 --- a/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts +++ b/src/views/wms/basicDataManage/labelManage/barcode/barcode.data.ts @@ -12,17 +12,29 @@ export const BarcodeRules = reactive({ }) export const Barcode = useCrudSchemas(reactive([ + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, { - label: 'id', - field: 'id', + label: '代码', + field: 'code', sort: 'custom', - isForm: false, + isSearch: true, + table: { + fixed: 'left' + } }, { - label: '代码', - field: 'code', + label: '标签类型', + field: 'labelType', sort: 'custom', + dictType: DICT_TYPE.LABEL_TYPE, + dictClass: 'string', isSearch: true, + isTable: true }, { label: '名称', @@ -54,7 +66,7 @@ export const Barcode = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 0 + min: 0, }, value: 0 }, @@ -95,6 +107,16 @@ export const Barcode = useCrudSchemas(reactive([ label: '是否加密', field: 'isEncypt', sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, }, { label: '操作', diff --git a/src/views/wms/basicDataManage/labelManage/barcode/index.vue b/src/views/wms/basicDataManage/labelManage/barcode/index.vue index 1c38f6ee8..fb2ed5e6f 100644 --- a/src/views/wms/basicDataManage/labelManage/barcode/index.vue +++ b/src/views/wms/basicDataManage/labelManage/barcode/index.vue @@ -4,15 +4,15 @@ - - + + @@ -41,13 +41,11 @@ @@ -60,45 +58,31 @@ + \ No newline at end of file diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue new file mode 100644 index 000000000..0920c5eea --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts b/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts new file mode 100644 index 000000000..a6bab3b83 --- /dev/null +++ b/src/views/wms/basicDataManage/labelManage/labeltype/labeltype.data.ts @@ -0,0 +1,154 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const LabeltypeRules = reactive({ + labelType: [required], + dataProtocol: [required], + splitMehod: [required], + validateMethod: [required], + templateName: [required], + labelCode: [required], + isEncypt: [required], + isCompress: [required], +}) + +export const Labeltype = useCrudSchemas(reactive([ + // { + // label: 'id', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, + { + label: '标签代码', + field: 'labelCode', + sort: 'custom', + table: { + width: 150, + fixed: 'left' + }, + isSearch: true, + }, + { + label: '标签类型', + field: 'labelType', + sort: 'custom', + dictType: DICT_TYPE.LABEL_TYPE, + dictClass:'string', + isSearch: true, + table: { + width: 150 + }, + }, + { + label: '描述', + field: 'description', + sort: 'custom', + table: { + width:100 + }, + }, + { + label: '数据协议', + field: 'dataProtocol', + sort: 'custom', + }, + { + label: '拆分方法', + field: 'splitMehod', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '数据头', + field: 'header', + sort: 'custom', + }, + { + label: '版本号', + field: 'version', + sort: 'custom', + }, + { + label: '分隔符', + field: 'separators', + sort: 'custom', + }, + { + label: '校验方法', + field: 'validateMethod', + sort: 'custom', + }, + { + label: '校验数', + field: 'validateNumber', + sort: 'custom', + form: { + component: 'InputNumber', + componentProps: { + min: 0 + }, + }, + }, + { + label: '加密方法', + field: 'encyptEthod', + sort: 'custom', + }, + { + label: '压缩方法', + field: 'compressMethod', + sort: 'custom', + }, + { + label: '模板名称', + field: 'templateName', + sort: 'custom', + }, + { + label: '模板文件', + field: 'templateFile', + sort: 'custom', + }, + { + label: '是否加密', + field: 'isEncypt', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '是否压缩', + field: 'isCompress', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))