Browse Source

字符长度校验

master
zhang_li 10 months ago
parent
commit
9b7251e2b6
  1. 1
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  2. 18
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  3. 27
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  4. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  5. 42
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

1
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -380,6 +380,7 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
} ,
form: {
component: 'DatePicker',
value:'activeTime',
componentProps: {
style: {width:'100%'},
type: 'datetime',

18
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts

@ -239,12 +239,12 @@ export const DemandforecastingMainRules = reactive({
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],
// number: [
// { required: true, message: '请输入单据号', trigger: 'blur' }
// ],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
version: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
/**
@ -533,7 +533,8 @@ export const DemandforecastingDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const DemandforecastingDetailRules = reactive({
predictTimeType: [
{ required: true, message: '请选择预测时间类型', trigger: 'change' }
{ required: true, message: '请选择预测时间类型', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
predictTime: [
{ required: true, message: '请输入预测时间', trigger: 'change' }
@ -550,4 +551,7 @@ export const DemandforecastingDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

27
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -338,15 +338,24 @@ export const PurchaseMainRules = reactive({
taxRate: [
{ required: true, message: '请输入税率', trigger: 'blur' }
],
version: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactName: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactEmail: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
// number: [
// { required: true, message: '请输入单据号', trigger: 'blur' }
// ],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
/**
@ -775,7 +784,8 @@ export const PurchaseDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const PurchaseDetailRules = reactive({
lineNumber: [
{ required: true, message: '请输入行号', trigger: 'blur' }
{ required: true, message: '请输入行号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
stdPackQty: [
{ required: true, message: '请输入标包数量', trigger: 'blur' }
@ -819,4 +829,7 @@ export const PurchaseDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

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

@ -245,6 +245,9 @@ export const PurchasePlanMainRules = reactive({
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
/**
@ -548,4 +551,7 @@ export const PurchasePlanDetailRules = reactive({
planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

42
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -13,6 +13,7 @@ import * as PurchaseMainApi from '@/api/wms/purchaseMain'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
import { PurchasePlanDetail, PurchasePlanMain } from '../purchasePlanMain/purchasePlanMain.data'
import {validateHanset,validateEmail} from '@/utils/validator'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
@ -475,15 +476,32 @@ export const SupplierdeliverRequestMainRules = reactive({
ppNumber: [
{ required: true, message: '请输入要货计划单号', trigger: 'blur' }
],
// fromWarehouseCode: [
// { required: true, message: '请输入从仓库代码', trigger: 'blur' }
// ],
// toWarehouseCode: [
// { required: true, message: '请输入到仓库代码', trigger: 'blur' }
// ],
// toDockCode: [
// { required: true, message: '请输入到月台代码', trigger: 'change' }
// ],
asnNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactName: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateHanset, message: '请输入正确的手机号', trigger: 'blur'}
],
contactEmail: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateEmail, message: '请输入正确的手机号', trigger: 'blur'}
],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
transferMode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
planArriveTime: [
{ required: true, message: '请输入计划到货时间', trigger: 'blur' }
],
@ -1001,7 +1019,8 @@ export const SupplierdeliverRequestDetailRules = reactive({
// { required: true, message: '请输入包装号', trigger: 'blur' }
// ],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
produceDate: [
{ required: true, message: '请输入生产日期', trigger: 'blur' }
@ -1027,4 +1046,7 @@ export const SupplierdeliverRequestDetailRules = reactive({
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})

Loading…
Cancel
Save