|
@ -12,13 +12,29 @@ import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre |
|
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
const userStore = useUserStore() |
|
|
const userStore = useUserStore() |
|
|
|
|
|
const validateNumber = (rule: any, value: any, callback: any) => { |
|
|
|
|
|
if (!value) { |
|
|
|
|
|
callback(); |
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
const codeReg = /^[-+]?[0-9]*\.?[0-9]+$/ |
|
|
|
|
|
if (codeReg.test(value)) { |
|
|
|
|
|
callback() |
|
|
|
|
|
} else { |
|
|
|
|
|
callback(new Error('订单号只能是数字')) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const Q1Rules = reactive({ |
|
|
export const Q1Rules = reactive({ |
|
|
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], |
|
|
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], |
|
|
customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }], |
|
|
customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }], |
|
|
qty: [{ required: true, message: '请输入数量', trigger: 'change' }], |
|
|
qty: [{ required: true, message: '请输入数量', trigger: 'change' }, |
|
|
claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }], |
|
|
{ validator:validateNumber, message: '数量必须是数值类型', trigger: 'change'} |
|
|
|
|
|
], |
|
|
|
|
|
claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }, |
|
|
|
|
|
{ validator:validateNumber, message: '索赔金额必须是数值类型', trigger: 'change'} |
|
|
|
|
|
], |
|
|
code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }], |
|
|
code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }], |
|
|
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }], |
|
|
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }], |
|
|
costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }], |
|
|
costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }], |
|
@ -142,11 +158,11 @@ export const Q1 = useCrudSchemas( |
|
|
width: 150 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
// component: 'InputNumber',
|
|
|
componentProps: { |
|
|
// componentProps: {
|
|
|
min: 0, |
|
|
// min: 0,
|
|
|
precision: 2 |
|
|
// precision: 2
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -194,11 +210,11 @@ export const Q1 = useCrudSchemas( |
|
|
width: 150 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
// component: 'InputNumber',
|
|
|
componentProps: { |
|
|
// componentProps: {
|
|
|
min: 0, |
|
|
// min: 0,
|
|
|
precision: 2 |
|
|
// precision: 2
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|