diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 43e97c5fd..58b11628f 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -7,14 +7,12 @@ import { Itembasic } from '../itembasic/itembasic.data' import * as AreaApi from '@/api/wms/areabasic' import { Area } from '../../factoryModeling/areabasic/areabasic.data' -import * as LocationgroupApi from '@/api/wms/locationgroup' -import { Locationgroup } from '../../factoryModeling/locationgroup/locationgroup.data' - import * as LocationApi from '@/api/wms/location' import { Location } from '../../factoryModeling/location/location.data' -import * as PackageunitApi from '@/api/wms/packageunit' -import { Packageunit } from '../packageunit/packageunit.data' +import * as ItempackageApi from '@/api/wms/itempackage' +import { Itempackaging } from '../itempackage/itempackage.data' +import { t } from '@/hooks/web/useI18n' export const Itemarea = useCrudSchemas(reactive([ { @@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } @@ -122,15 +124,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 6e3fd6394..25079eb5d 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime' import { fa } from 'element-plus/es/locale' import * as PackageunitApi from '@/api/wms/packageunit' -export const PackageunitCopy = useCrudSchemas(reactive([ +export const Packageunit = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -13,14 +13,29 @@ export const PackageunitCopy = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '父包装代码', - field: 'parentCode', - sort: 'custom', - table: { - width: 150 - } - }, + // { + // label: '父包装代码', + // field: 'parentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择父包装代码', + // searchField: 'code', + // searchTitle: '包装规格信息', + // searchAllSchemas: PackageunitCopy.allSchemas, + // searchPage: PackageunitApi.getPackageunitPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, { label: '包装名称', field: 'name', @@ -270,7 +285,25 @@ export const PackageunitCopy = useCrudSchemas(reactive([ } ])) -export const Packageunit = useCrudSchemas(reactive([ +// 表单校验 +export const PackageunitRules = reactive({ + code: [ + { required: true, message: '请输入包装代码', trigger: 'change' } + ], + name: [ + { required: true, message: '请输入包装名称', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择包装类型', trigger: 'change' } + ], + desc: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + { required: true, message: '请输入包装描述', trigger: 'change' } + ], +}) + +//已取消 保留只是为了预防日后使用 +export const PackageunitCopy = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -286,21 +319,6 @@ export const Packageunit = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - }, - form: { - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择父包装代码', - searchField: 'code', - searchTitle: '包装规格信息', - searchAllSchemas: PackageunitCopy.allSchemas, - searchPage: PackageunitApi.getPackageunitPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } } }, { @@ -551,21 +569,3 @@ export const Packageunit = useCrudSchemas(reactive([ } } ])) - -// 表单校验 -export const PackageunitRules = reactive({ - code: [ - { required: true, message: '请输入包装代码', trigger: 'change' } - ], - name: [ - { required: true, message: '请输入包装名称', trigger: 'change' } - ], - type: [ - { required: true, message: '请选择包装类型', trigger: 'change' } - ], - desc: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { required: true, message: '请输入包装描述', trigger: 'change' } - ], -}) -