Browse Source

手机号邮编校验

master
zhang_li 1 year ago
parent
commit
daa40fd489
  1. 1
      src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts
  2. 11
      src/views/wms/basicDataManage/orderManage/owner/owner.data.ts
  3. 8
      src/views/wms/basicDataManage/orderManage/shift/shift.data.ts

1
src/views/wms/basicDataManage/documentSetting/documentsetting/documentsetting.data.ts

@ -223,6 +223,7 @@ export const DocumentsettingRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
description: [ description: [
{ required: true, message: '请输入描述', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
type: [ type: [

11
src/views/wms/basicDataManage/orderManage/owner/owner.data.ts

@ -2,6 +2,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
import {validateHanset,validateFax,validatePostCode} from '@/utils/validator'
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -273,13 +275,16 @@ export const OwnerRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
phone: [ phone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
], ],
fax: [ fax: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateFax, message: '请输入正确的传真', trigger: 'blur'}
], ],
postId: [ postId: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validatePostCode, message: '请输入正确的邮编', trigger: 'blur'}
], ],
contacts: [ contacts: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }

8
src/views/wms/basicDataManage/orderManage/shift/shift.data.ts

@ -68,6 +68,14 @@ export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isSearch: true, isSearch: true,
search: {
show: true,
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
}
}
}, },
{ {
label: '是否跨天', label: '是否跨天',

Loading…
Cancel
Save