diff --git a/src/api/wms/itemSyntheticRelation/index.ts b/src/api/wms/itemSyntheticRelation/index.ts new file mode 100644 index 000000000..a3139afed --- /dev/null +++ b/src/api/wms/itemSyntheticRelation/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +export interface ItemSyntheticRelationVO { + code: string + name: string + itemCode: string + itemName: string + creatorName: string + updaterName: string + deleteTime: Date + deleter: string + deleteName: string +} + +// 查询物料组合关系列表 +export const getItemSyntheticRelationPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/item-synthetic-relation/senior', data }) + } else { + return await request.get({ url: `/wms/item-synthetic-relation/page`, params }) + } +} + +// 查询物料组合关系详情 +export const getItemSyntheticRelation = async (id: number) => { + return await request.get({ url: `/wms/item-synthetic-relation/get?id=` + id }) +} + +// 新增物料组合关系 +export const createItemSyntheticRelation = async (data: ItemSyntheticRelationVO) => { + return await request.post({ url: `/wms/item-synthetic-relation/create`, data }) +} + +// 修改物料组合关系 +export const updateItemSyntheticRelation = async (data: ItemSyntheticRelationVO) => { + return await request.put({ url: `/wms/item-synthetic-relation/update`, data }) +} + +// 删除物料组合关系 +export const deleteItemSyntheticRelation = async (id: number) => { + return await request.delete({ url: `/wms/item-synthetic-relation/delete?id=` + id }) +} + +// 导出物料组合关系 Excel +export const exportItemSyntheticRelation = async (params) => { + return await request.download({ url: `/wms/item-synthetic-relation/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/wms/item-synthetic-relation/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue new file mode 100644 index 000000000..a8b25d9e0 --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts new file mode 100644 index 000000000..4b6996416 --- /dev/null +++ b/src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts @@ -0,0 +1,95 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import {Area} from "@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data"; +import * as AreaApi from "@/api/wms/areabasic"; +import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; +import * as ItembasicApi from "@/api/wms/itembasic"; + +// 表单校验 +export const ItemSyntheticRelationRules = reactive({ + name: [required], + itemCode: [required], + available: [required], +}) + +export const ItemSyntheticRelation = useCrudSchemas(reactive([ + { + label: '组合号', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '组合名称', + field: 'name', + sort: 'custom', + isSearch: true, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + multiple: true, + 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', + isSearch: true, + isForm:false, + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + table: { + width: 120 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))