Browse Source

HL-5438物料包装信息-这个改成0.954,自动变成1了

hella_online_20240819
wangyufei 4 months ago
parent
commit
6cc6f7239c
  1. 16
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

16
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -133,7 +133,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
} }
} }
@ -295,12 +295,22 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
])) ]))
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 ItempackagingRules = reactive({ export const ItempackagingRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }], itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
uom: [{ required: true, message: '计量单位不能为空', trigger: 'change' }], uom: [{ required: true, message: '计量单位不能为空', trigger: 'change' }],
packUnit: [{ required: true, message: '包装单位不能为空', trigger: 'change' }], packUnit: [{ required: true, message: '包装单位不能为空', trigger: 'change' }],
packQty: [{ required: true, message: '包装数量不能为空', trigger: 'change' }], packQty: [
{ required: true, message: '包装数量不能为空', trigger: 'change' },
{ validator: validateQty, trigger: 'change' }
],
available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }] available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }]
}) })

Loading…
Cancel
Save