huangbin 4 years ago
parent
commit
2d3b77fff8

+ 1 - 1
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/index.vue

@@ -45,7 +45,7 @@
             <a-col :span="24">
               <a-form-item label="挂牌数量"
                            class="relative"
-                           name="num">
+                           name="OrderQty">
                 <a-input-number class="dialogInput yellowInput"
                                 style="width: 260px"
                                 :min="0"

+ 4 - 2
src/views/market/spot_trade/spot_trade_order_transaction/components/listing/setup.ts

@@ -14,11 +14,13 @@ export function handleForm() {
     const v_price = async (rule: RuleObject, value: number) => {
         return validateCommon(value, '请输入挂牌价格');
     };
+    const v_num = async (rule: RuleObject, value: number) => {
+        return validateCommon(value, '请输入挂牌数量');
+    };
     const rules = {
         accountid: [{ required: true, message: '请选择交易账户' }],
         OrderQty: [
-            { required: true, message: '请输入挂牌数量', trigger: 'blur', type: 'number' },
-            { message: '挂牌数量不能小于0', min: 1, type: 'number' }
+            { required: true, trigger: 'blur', type: 'number', validator: v_num },
         ],
         FixedPrice: [
             { required: true, trigger: 'blur', type: 'number', validator: v_price },