From b46c238e27b40a97d83f6332cd3d4e86c9147632 Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 28 Mar 2024 11:13:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=BA=93=E5=8C=BA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8C=85=E8=A3=85=E8=A7=84=E6=A0=BC=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8C=85=E8=A3=85=E4=BF=A1=E6=81=AF=EF=BC=8C?= =?UTF-8?q?=E5=8C=85=E8=A3=85=E8=A7=84=E6=A0=BC=E9=9A=90=E8=97=8F=E7=88=B6?= =?UTF-8?q?=E5=8C=85=E8=A3=85=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/validator.ts | 2 +- .../itemManage/itemarea/itemarea.data.ts | 43 +++++++------ .../packageunit/packageunit.data.ts | 64 +++++++------------ .../purchasePlanMain/purchasePlanMain.data.ts | 3 + 4 files changed, 53 insertions(+), 59 deletions(-) diff --git a/src/utils/validator.ts b/src/utils/validator.ts index 60671f771..cafde51c7 100644 --- a/src/utils/validator.ts +++ b/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 { diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 43e97c5fd..d3d4ff013 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 }] } } @@ -361,7 +367,7 @@ export const Itemarea = useCrudSchemas(reactive([ dictClass: 'string', form: { component: 'Switch', - value: 'FALSE', + value: 'TRUE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' @@ -380,7 +386,8 @@ export const Itemarea = useCrudSchemas(reactive([ value: 'FALSE', componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE' + activeValue: 'TRUE', + disabled: 'TRUE', } }, }, @@ -407,7 +414,7 @@ export const Itemarea = useCrudSchemas(reactive([ dictClass: 'string', form: { component: 'Switch', - value: 'TRUE', + value: 'FALSE', componentProps: { inactiveValue: 'FALSE', activeValue: 'TRUE' diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 5775eec34..398fba678 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/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([ +export const Packageunit = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -21,7 +20,7 @@ export const PackageunitCopy = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - } + }, }, { label: '包装名称', @@ -85,7 +84,7 @@ export const PackageunitCopy = useCrudSchemas(reactive([ 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([ } ])) -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' } + ], +}) + +//新增时针对父包装代码copy出的实体 +export const PackageunitCopy = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -294,21 +311,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 - }] - } } }, { @@ -373,7 +375,7 @@ export const Packageunit = useCrudSchemas(reactive([ sort: 'custom', dictType: DICT_TYPE.PACK_UNIT, dictClass: 'string', - isSearch: false, + isSearch: true, table: { width: 150 }, @@ -564,22 +566,4 @@ export const Packageunit = useCrudSchemas(reactive([ fixed: 'right' } } -])) - -// 表单校验 -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' } - ], -}) - +])) \ No newline at end of file diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts index 45cc14d71..01a6dbe7b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts +++ b/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' } ],