|
@@ -24,9 +24,21 @@ export function handleForm(data: WrHoldLB) {
|
|
|
return Promise.reject('请选择商品')
|
|
return Promise.reject('请选择商品')
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+ const v_num = async (rule: RuleObject, value: number) => {
|
|
|
|
|
+ if (value) {
|
|
|
|
|
+ if (value > data.enableqty || value < 1) {
|
|
|
|
|
+ return Promise.reject('提示挂牌数量有误')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Promise.reject('请输入挂牌数量')
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const rules = {
|
|
const rules = {
|
|
|
FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
|
|
FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
|
|
|
- OrderQty: [{ required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number', min: 1, ma: data.enableqty }],
|
|
|
|
|
|
|
+ OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
|
|
|
PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
|
|
PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
|
|
|
goodsid: [{ required: true, validator: v_group }],
|
|
goodsid: [{ required: true, validator: v_group }],
|
|
|
}
|
|
}
|