huangbin 4 gadi atpakaļ
vecāks
revīzija
b8173ce732

+ 2 - 1
src/hooks/form/verify.ts

@@ -66,7 +66,8 @@ export const useVerifyListingBasis = <T, k extends keyof T>(formState: T, key: k
                 }
                 return Promise.reject('商品合约不存在');
             } else {
-                return Promise.reject('请输入基差');
+                // return Promise.reject('请输入基差');
+                return Promise.resolve();
             }
         } else {
             return Promise.reject('请选择商品合约');

+ 2 - 3
src/views/market/spot_trade/components/post_buying/index.vue

@@ -46,8 +46,7 @@
             </a-col>
             <a-col :span="24"
                    v-if="isFloat()">
-              <a-form-item label="估算价"
-                           name="PriceMove">
+              <a-form-item label="估算价">
                 <span class="white">{{ getPrice() }}</span>
               </a-form-item>
             </a-col>
@@ -241,7 +240,7 @@ export default defineComponent({
                         WRPriceType: isFloat() ? 2 : 1, // 价格方式 1:固定价 2:浮动价
                         FixedPrice: res.FixedPrice, // 固定价格
                         PriceFactor: 1, // 价格系数(浮动价时填写)
-                        PriceMove: res.PriceMove, // 升贴水(浮动价时填写)
+                        PriceMove: res.PriceMove ? res.PriceMove : 0, // 升贴水(浮动价时填写)
                         TimevalidType: 4, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效
                         // ValidTime: moment('2021-08-25 00:00:00').format('YYYY-MM-DD HH:mm:ss'), // 有效期限
                         ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'),

+ 1 - 1
src/views/market/spot_trade/components/post_buying/setup.ts

@@ -107,7 +107,7 @@ export function handleNumAndPrice(enumName: EnumRouterName, selectedRow: WrOrder
     function getPrice() {
         let result = '--'
         const goodsPrice = getGoodsPrice()
-        if (goodsPrice.value && goodsPrice.value !== '--') {   // 有实时行情价格
+        if (goodsPrice.value && goodsPrice.value !== '--' && formState.PriceMove) {   // 有实时行情价格
             result = ((goodsPrice.value as number) + formState.PriceMove).toFixed(2)
         }
         return result