|
|
@ -160,7 +160,8 @@ const defaultForm = { |
|
|
|
update_name: null, |
|
|
|
update_time: null, |
|
|
|
cron: null, |
|
|
|
notify_type: null |
|
|
|
notify_type: null, |
|
|
|
tableData: [] |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
@ -175,6 +176,19 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
const numberOne = (rule, value, callback) => { |
|
|
|
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/ |
|
|
|
const numRe = new RegExp(numReg) |
|
|
|
if (value) { |
|
|
|
if (!numRe.test(value)) { |
|
|
|
callback(new Error('只能输入数字')) |
|
|
|
} else { |
|
|
|
callback() |
|
|
|
} |
|
|
|
} else { |
|
|
|
callback() |
|
|
|
} |
|
|
|
} |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
dtlShow: false, |
|
|
@ -188,6 +202,17 @@ export default { |
|
|
|
], |
|
|
|
stor_code: [ |
|
|
|
{ required: true, message: '仓库编码不能为空', trigger: 'blur' } |
|
|
|
], safe_qty_lower_limit: [ |
|
|
|
{ required: false, message: '不能为空', trigger: 'blur' }, |
|
|
|
{ validator: numberOne } |
|
|
|
], |
|
|
|
safe_qty_upper_limit: [ |
|
|
|
{ required: false, message: '不能为空', trigger: 'blur' }, |
|
|
|
{ validator: numberOne } |
|
|
|
], |
|
|
|
safe_days: [ |
|
|
|
{ required: false, message: '不能为空', trigger: 'blur' }, |
|
|
|
{ validator: numberOne } |
|
|
|
] |
|
|
|
}, |
|
|
|
stors: [] |
|
|
|