Browse Source

杨玉福提: 实际申请发货数量为0.954,输入后点击保存系统会自动变为1

linshi20240813
wangyufei 4 months ago
parent
commit
2099474d9f
  1. 16
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

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

@ -687,13 +687,13 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'InputNumber',
componentProps: {
min: 1,
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
min: 0,
precision: 6
}
},
@ -1255,11 +1255,11 @@ const validateBatch = (rule: any, value: any, callback: any) => {
const validateQty = (rule: any, value: any, callback: any,a,b) => {
console.log('validateQty',rule, value,a,b)
// if (!reg.test(value)) {
// callback(new Error('英文字母、数字或下划线'));
// } else {
if (!value) {
callback(new Error('发货数量必须大于0'));
} else {
callback();
// }
}
}
//表单校验
export const SupplierdeliverRequestDetailRules = reactive({
@ -1267,8 +1267,8 @@ export const SupplierdeliverRequestDetailRules = reactive({
// { required: true, message: '请输入包装号', trigger: 'blur' }
// ],
qty:[
{ required: true, message: '请输入发货数量1', trigger: 'change' },
// { validator: validateQty, trigger: 'change' },
{ required: true, message: '请输入发货数量', trigger: 'change' },
{ validator: validateQty, trigger: 'change' },
],
supplierBatch: [
{ required: true, message: '请输入供应商批次', trigger: 'blur' }

Loading…
Cancel
Save