|
|
@ -2207,7 +2207,14 @@ export const ProductionscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[] |
|
|
|
isTableForm:false, |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
const validateQty = (rule: any, value: any, callback: any,a,b) => { |
|
|
|
console.log('validateQty',rule, value,a,b) |
|
|
|
if (!value) { |
|
|
|
callback(new Error('数量必须大于0')); |
|
|
|
} else { |
|
|
|
callback(); |
|
|
|
} |
|
|
|
} |
|
|
|
//表单校验
|
|
|
|
export const ProductionscrapRequestDetailRules = reactive({ |
|
|
|
workStationCode: [ |
|
|
@ -2225,6 +2232,10 @@ export const ProductionscrapRequestDetailRules = reactive({ |
|
|
|
remark: [ |
|
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
|
], |
|
|
|
qty: [ |
|
|
|
{ validator: validateQty, trigger: 'change' } |
|
|
|
], |
|
|
|
|
|
|
|
// packUnit: [
|
|
|
|
// { required: true, message: '请选择包装规格', trigger: 'blur' }
|
|
|
|
// ]
|
|
|
|