|
|
@@ -1,3 +1,5 @@
|
|
|
+import { validateCommon } from "@/common/setup/validate";
|
|
|
+import { RuleObject } from "ant-design-vue/lib/form/interface";
|
|
|
import { reactive, ref, UnwrapRef } from "vue";
|
|
|
import { FormState } from "./interface";
|
|
|
|
|
|
@@ -9,6 +11,9 @@ export function handleForm() {
|
|
|
FixedPrice: 0,
|
|
|
PriceMove: 0
|
|
|
})
|
|
|
+ const v_price = async (rule: RuleObject, value: number) => {
|
|
|
+ return validateCommon(value, '请输入挂牌价格');
|
|
|
+ };
|
|
|
const rules = {
|
|
|
accountid: [{ required: true, message: '请选择交易账户' }],
|
|
|
OrderQty: [
|
|
|
@@ -16,8 +21,7 @@ export function handleForm() {
|
|
|
{ message: '挂牌数量不能小于0', min: 1, type: 'number' }
|
|
|
],
|
|
|
FixedPrice: [
|
|
|
- { required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number' },
|
|
|
- { message: '挂牌价格不能小于0', min: 1, type: 'number' }
|
|
|
+ { required: true, trigger: 'blur', type: 'number', validator: v_price },
|
|
|
],
|
|
|
|
|
|
}
|