Browse Source

代码校验添加

master
李胜楠 1 year ago
parent
commit
5a08e8159c
  1. 5
      src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts
  2. 5
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  3. 24
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  4. 5
      src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts
  5. 5
      src/views/wms/basicDataManage/factoryModeling/process/process.data.ts
  6. 5
      src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts
  7. 6
      src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts
  8. 6
      src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts
  9. 5
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

5
src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts

@ -4,6 +4,8 @@ import { dateFormatter } from '@/utils/formatTime'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -200,7 +202,8 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
export const AreaRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validate: validateYS, message: '请输入正确的代码', trigger: 'blur' }
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -7,7 +7,7 @@ import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {validateHanset} from '@/utils/validator'
import {validateHanset,validateYS} from '@/utils/validator'
const { t } = useI18n() // 国际化
@ -237,7 +237,8 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
export const DockRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

24
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -9,6 +9,9 @@ import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse
import * as LocationgroupApi from '@/api/wms/locationgroup'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -68,7 +71,12 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage // 查询弹窗所需分页方法
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'warehouseCode',
value:'warehouseCode',
isMainValue: true
}]
}
}
},
@ -83,11 +91,16 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库代码', // 输入框占位文本
searchListPlaceholder: '请选择库位组代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库信息', // 查询弹窗标题
searchTitle: '库位组信息', // 查询弹窗标题
searchAllSchemas: Locationgroup.allSchemas, // 查询弹窗所需类
searchPage: LocationgroupApi.getLocationgroupPage // 查询弹窗所需分页方法
searchPage: LocationgroupApi.getLocationgroupPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'areaCode',
value:'areaCode',
isMainValue: true
}]
}
}
},
@ -349,7 +362,8 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
export const LocationRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts

@ -7,6 +7,8 @@ import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/area
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -197,7 +199,8 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
export const LocationgroupRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/factoryModeling/process/process.data.ts

@ -7,6 +7,8 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -208,7 +210,8 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
export const ProcessRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts

@ -7,6 +7,8 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -222,7 +224,8 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionlineRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

6
src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts

@ -1,5 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -166,7 +169,8 @@ export const Warehouse = useCrudSchemas(reactive<CrudSchema[]>([
export const WarehouseRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

6
src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts

@ -1,5 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -158,7 +161,8 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
export const WorkshopRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

5
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -10,6 +10,8 @@ import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/prod
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { validateYS } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
@ -249,7 +251,8 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
export const WorkstationRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

Loading…
Cancel
Save