Browse Source

物料库区配置包装规格改:物料包装信息,包装规格隐藏父包装

master_hella_20240701
chenfang 8 months ago
parent
commit
7cd0aa00f4
  1. 36
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  2. 86
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

36
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 * as AreaApi from '@/api/wms/areabasic'
import { Area } from '../../factoryModeling/areabasic/areabasic.data' 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 * as LocationApi from '@/api/wms/location'
import { Location } from '../../factoryModeling/location/location.data' import { Location } from '../../factoryModeling/location/location.data'
import * as PackageunitApi from '@/api/wms/packageunit' import * as ItempackageApi from '@/api/wms/itempackage'
import { Packageunit } from '../packageunit/packageunit.data' import { Itempackaging } from '../itempackage/itempackage.data'
import { t } from '@/hooks/web/useI18n'
export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题 searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false },{
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}] }]
} }
} }
@ -122,15 +124,19 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题 searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false },{
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}] }]
} }
} }

86
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 { fa } from 'element-plus/es/locale'
import * as PackageunitApi from '@/api/wms/packageunit' import * as PackageunitApi from '@/api/wms/packageunit'
export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装代码', label: '包装代码',
field: 'code', field: 'code',
@ -13,14 +13,29 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '父包装代码', // label: '父包装代码',
field: 'parentCode', // field: 'parentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // },
}, // form: {
// componentProps: {
// isSearchList: true,
// searchListPlaceholder: '请选择父包装代码',
// searchField: 'code',
// searchTitle: '包装规格信息',
// searchAllSchemas: PackageunitCopy.allSchemas,
// searchPage: PackageunitApi.getPackageunitPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
// },
{ {
label: '包装名称', label: '包装名称',
field: 'name', field: 'name',
@ -270,7 +285,25 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
} }
])) ]))
export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([ // 表单校验
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<CrudSchema[]>([
{ {
label: '包装代码', label: '包装代码',
field: 'code', field: 'code',
@ -286,21 +319,6 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 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<CrudSchema[]>([
} }
} }
])) ]))
// 表单校验
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' }
],
})

Loading…
Cancel
Save