Browse Source

数量不能为0

hella_online_20240829
wangyufei 4 months ago
parent
commit
761f038c7e
  1. 11
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

11
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -1206,7 +1206,13 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
hiddenInMain:true
}
]))
function validateQty(rule, value, callback) {
if (value>0) {
callback()
}else{
callback(new Error('数量必须大于0'))
}
}
//表单校验
export const CustomerreturnRequestDetailRules = reactive({
itemCode: [
@ -1221,6 +1227,9 @@ export const CustomerreturnRequestDetailRules = reactive({
packQty: [
{ required: true, message: '请选择包装数量', trigger: 'blur' }
],
qty:[
{ validator:validateQty, message: '数量必须大于0', trigger: 'change'}
]
})
export const CustomerReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([

Loading…
Cancel
Save