Browse Source

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

master_hella_20240701
chenfang 8 months ago
parent
commit
b46c238e27
  1. 2
      src/utils/validator.ts
  2. 43
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  3. 62
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  4. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

2
src/utils/validator.ts

@ -729,7 +729,7 @@ function trim(str) {
//校验只可输入大小写字母及数字
export function validateYS(rule, value, callback) {
if (value) {
const regs = /^[a-zA-Z0-9-_]+$/
const regs = /^[a-zA-Z0-9-_.]+$/
if(regs.test(value)){
callback()
} else {

43
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<CrudSchema[]>([
{
@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
// 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<CrudSchema[]>([
// 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
}]
}
}
@ -361,7 +367,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -380,7 +386,8 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: 'TRUE',
}
},
},
@ -407,7 +414,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'

62
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -4,8 +4,7 @@ import { fa } from 'element-plus/es/locale'
import * as PackageunitApi from '@/api/wms/packageunit'
import { Select } from '@element-plus/icons-vue/dist/types'
//新增时针对父包装代码copy出的实体
export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装代码',
field: 'code',
@ -21,7 +20,7 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '包装名称',
@ -85,7 +84,7 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: true,
isSearch: false,
table: {
width: 150
},
@ -278,7 +277,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' }
],
})
//新增时针对父包装代码copy出的实体
export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装代码',
field: 'code',
@ -294,21 +311,6 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
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
}]
}
}
},
{
@ -373,7 +375,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: false,
isSearch: true,
table: {
width: 150
},
@ -565,21 +567,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' }
],
})

3
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -305,6 +305,9 @@ export const PurchasePlanMainRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
deliveryDate: [
{ required: true, message: '请选择送达时间', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],

Loading…
Cancel
Save