diff --git a/src/api/wms/callmaterials/index.ts b/src/api/wms/callmaterials/index.ts new file mode 100644 index 000000000..88f0f0cf6 --- /dev/null +++ b/src/api/wms/callmaterials/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface CallmaterialsVO { + id: number + itemCode: string + batch: string + isRecive: string + packUnit: string + location: string + qty: number + uom: string +} + +// 查询叫料标签列表 +export const getCallmaterialsPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/callmaterials/senior', data }) + } else { + return await request.get({ url: `/wms/callmaterials/page`, params }) + } +} + +// 查询叫料标签详情 +export const getCallmaterials = async (id: number) => { + return await request.get({ url: `/wms/callmaterials/get?id=` + id }) +} + +// 新增叫料标签 +export const createCallmaterials = async (data: CallmaterialsVO) => { + return await request.post({ url: `/wms/callmaterials/create`, data }) +} + +// 修改叫料标签 +export const updateCallmaterials = async (data: CallmaterialsVO) => { + return await request.put({ url: `/wms/callmaterials/update`, data }) +} + +// 删除叫料标签 +export const deleteCallmaterials = async (id: number) => { + return await request.delete({ url: `/wms/callmaterials/delete?id=` + id }) +} + +// 导出叫料标签 Excel +export const exportCallmaterials = async (params) => { + return await request.download({ url: `/wms/callmaterials/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/callmaterials/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/labelManage/callMaterials/callMaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callMaterials/callMaterials.data.ts deleted file mode 100644 index 378ee51c6..000000000 --- a/src/views/wms/basicDataManage/labelManage/callMaterials/callMaterials.data.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' - -// 表单校验 -export const PackageRules = reactive({ - number: [required], - itemCode: [required], - itemName: [required], - barcodeString: [required] -}) -export const Package = 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', - form: { - // component: 'textarea', - componentProps: { - type: "textarea", - rows: "6" - }, - }, - table: { - width: 180, - } - }, - { - label: '打印次数', - field: 'printTimes', - sort: 'custom', - form: { - component: 'InputNumber', - componentProps: { - min: 0 - }, - value: 0 - }, - isForm: false - }, - { - 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', - } - }, - isForm: false - }, - { - label: '最后打印人ID', - field: 'lastPrintUserId', - sort: 'custom', - isForm: false - }, - { - label: '最后打印人用户名', - field: 'lastPrintUserName', - sort: 'custom', - isForm: false, - table: { - width: 180, - } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' - } - } -])) - diff --git a/src/views/wms/basicDataManage/labelManage/callMaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callMaterials/index.vue index 2c61be8e5..a5605811e 100644 --- a/src/views/wms/basicDataManage/labelManage/callMaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callMaterials/index.vue @@ -1,7 +1,7 @@