diff --git a/src/api/wms/itemPull/index.ts b/src/api/wms/itemPull/index.ts new file mode 100644 index 000000000..e66f9d7fb --- /dev/null +++ b/src/api/wms/itemPull/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface ItemPullVO { + id: number + itemCode: string + itemName: string + backNumber: string + receivedNumber: string + productionLine: string + supplierCode: string + replenishType: string + pullType: string + available: string + siteId: string + concurrencyStamp: number +} + +// 查询物料拉动配置列表 +export const getItemPullPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/item-pull/senior', data }) + } else { + return await request.get({ url: `/wms/item-pull/page`, params }) + } +} + +// 查询物料拉动配置详情 +export const getItemPull = async (id: number) => { + return await request.get({ url: `/wms/item-pull/get?id=` + id }) +} + +// 新增物料拉动配置 +export const createItemPull = async (data: ItemPullVO) => { + return await request.post({ url: `/wms/item-pull/create`, data }) +} + +// 修改物料拉动配置 +export const updateItemPull = async (data: ItemPullVO) => { + return await request.put({ url: `/wms/item-pull/update`, data }) +} + +// 删除物料拉动配置 +export const deleteItemPull = async (id: number) => { + return await request.delete({ url: `/wms/item-pull/delete?id=` + id }) +} + +// 导出物料拉动配置 Excel +export const exportItemPull = async (params) => { + return await request.download({ url: `/wms/item-pull/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/item-pull/get-import-template' }) +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 9d7588f3d..133028f2b 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -431,4 +431,6 @@ export enum DICT_TYPE { INVOICE_TYPE = 'invoice_type', // 开票种类 DELISHIF = "deliShif",// 班次 IS_RECEIVE = "is_receive",//是否生成 + REPLENISH_TYPE = "replenish_type",//补充方式 + PULL_TYPE = "pull_type",//拉动方式 } diff --git a/src/views/wms/basicDataManage/itemPull/index.vue b/src/views/wms/basicDataManage/itemPull/index.vue new file mode 100644 index 000000000..95f4f83fa --- /dev/null +++ b/src/views/wms/basicDataManage/itemPull/index.vue @@ -0,0 +1,250 @@ + + + diff --git a/src/views/wms/basicDataManage/itemPull/itemPull.data.ts b/src/views/wms/basicDataManage/itemPull/itemPull.data.ts new file mode 100644 index 000000000..54455365e --- /dev/null +++ b/src/views/wms/basicDataManage/itemPull/itemPull.data.ts @@ -0,0 +1,215 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as SupplierApi from '@/api/wms/supplier' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' + +// 表单校验 +export const ItemPullRules = reactive({ + itemCode: [required], + replenishType: [required], + pullType: [required] +}) + +export const ItemPull = useCrudSchemas( + reactive([ + { + label: '品番', + field: 'itemCode', + sort: 'custom', + isSearch: true, + table: { + width: 180, + fixed: 'left' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, //可输入回车 + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择品番', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '物料基础信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: 'true', + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '品名', + field: 'itemName', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + }, + isSearch: false + }, + { + label: '背番', + field: 'backNumber', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + }, + isSearch: true + }, + { + label: '受入号', + field: 'receivedNumber', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + }, + isSearch: false + }, + { + label: '生产线区分', + field: 'productionLine', + sort: 'custom', + form: { + componentProps: { + disabled: true + } + }, + isSearch: false + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + isSearch: true, + table: { + width: 150, + fixed: 'left' + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ], + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '补充方式', + field: 'replenishType', + sort: 'custom', + dictType: DICT_TYPE.REPLENISH_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + } + }, + { + label: '拉动方式', + field: 'pullType', + sort: 'custom', + dictType: DICT_TYPE.PULL_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 120 + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + isTable: true, + isForm: false + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } + ]) +)