Browse Source

WMS bug:HL-5517 WMS发料管理-隔离退料申请字段变更 前端校验

hella_online_20240828
gaojs 3 months ago
parent
commit
8e02ace9a9
  1. 18
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  2. 13
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

18
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -1169,6 +1169,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
]))
const validateQty = (rule: any, value: any, callback: any,a,b) => {
if (!value) {
callback(new Error('包装数量必须大于0'));
} else {
callback();
}
}
//表单校验
export const ProductionreturnRequestDetailRules = reactive({
workStationCode: [
@ -1183,9 +1192,12 @@ export const ProductionreturnRequestDetailRules = reactive({
// packingNumber: [
// { required: true, message: '请选择包装号', trigger: 'change' }
// ],
// batch: [
// { required: true, message: '请输入批次', trigger: 'blur' }
// ],
qty:[
{ validator:validateQty, message: '数量必须大于0', trigger: 'change'}
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],

13
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -680,6 +680,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(
])
)
const validateQty = (rule: any, value: any, callback: any,a,b) => {
if (!value) {
callback(new Error('包装数量必须大于0'));
} else {
callback();
}
}
//表单校验
export const ProductionreturnRequestDetailRules = reactive({
workStationCode: [
@ -694,6 +702,9 @@ export const ProductionreturnRequestDetailRules = reactive({
// packingNumber: [
// { required: true, message: '请选择包装号', trigger: 'change' }
// ],
qty:[
{ validator:validateQty, message: '数量必须大于0', trigger: 'change'}
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
@ -717,6 +728,8 @@ export const ProductionreturnRequestDetailRules = reactive({
],
})
/**
* @returns {Array} 退
*/

Loading…
Cancel
Save