Browse Source

小数点后六位校验问题

master_hella_20240701
zhang_li 5 months ago
parent
commit
6f89369e01
  1. 10
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

10
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -2,7 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime' import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum } from '@/utils/validator' import {validateTwoNum,validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
@ -716,18 +716,18 @@ export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const InspectionRecordPackageRules = reactive({ export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [ qualifiedAmount: [
required, required,
{ validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
], ],
frozenAmount: [ frozenAmount: [
required, required,
{ validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
], ],
destroyAmount: [ destroyAmount: [
required, required,
{ validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
], ],
noQualifiedAmount: [ noQualifiedAmount: [
required, required,
{ validator:validateTwoNum, message: '小数点后最多6位', trigger: 'blur'} { validator:validateSixNum, message: '小数点后最多6位', trigger: 'blur'}
], ],
}) })

Loading…
Cancel
Save