|
@ -596,13 +596,11 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
}, |
|
|
}, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'InputNumber', |
|
|
type: 'InputNumber', |
|
|
min: 1, |
|
|
|
|
|
precision: 6 |
|
|
precision: 6 |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
component: 'InputNumber', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
min: 1, |
|
|
|
|
|
precision: 6 |
|
|
precision: 6 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -716,7 +714,15 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
isTableForm: false, |
|
|
isTableForm: false, |
|
|
} |
|
|
} |
|
|
])) |
|
|
])) |
|
|
|
|
|
const validatePlanQty = (rule, value, callback) => { |
|
|
|
|
|
console.log('validatePlanQty',value) |
|
|
|
|
|
const numReg = /^[\d]+$/ |
|
|
|
|
|
if (numReg.test(value)&&value>0) { |
|
|
|
|
|
callback() |
|
|
|
|
|
} else { |
|
|
|
|
|
callback(new Error('计划数量不能为0')) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//表单校验
|
|
|
//表单校验
|
|
|
export const PurchasePlanDetailRules = reactive({ |
|
|
export const PurchasePlanDetailRules = reactive({ |
|
|
// available: [
|
|
|
// available: [
|
|
@ -729,7 +735,8 @@ export const PurchasePlanDetailRules = reactive({ |
|
|
{ required: true, message: '请选择计量单位', trigger: 'change' } |
|
|
{ required: true, message: '请选择计量单位', trigger: 'change' } |
|
|
], |
|
|
], |
|
|
planQty: [ |
|
|
planQty: [ |
|
|
{ required: true, message: '请输入计划数量', trigger: 'blur' } |
|
|
{ required: true, message: '请输入计划数量', trigger: 'blur' }, |
|
|
|
|
|
{ validator:validatePlanQty, message: '计划数量不能为0', trigger: 'blur'} |
|
|
], |
|
|
], |
|
|
remark: [ |
|
|
remark: [ |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|