Kaynağa Gözat

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 yıl önce
ebeveyn
işleme
f2c70c6a1a

+ 29 - 10
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_blocs/components/post-buying/index.vue

@@ -32,6 +32,7 @@
                                 style="width: 260px"
                                 :min="0"
                                 v-model:value="formState.FixedPrice" />
+                <a-checkbox v-model:checked="priceCheck">可议价</a-checkbox>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -42,10 +43,12 @@
                                 :min="0"
                                 v-model:value="formState.OrderQty" />
                 <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+                <a-checkbox v-model:checked="numCheck">整单</a-checkbox>
               </a-form-item>
             </a-col>
 
-            <a-col :span="24">
+            <a-col :span="24"
+                   v-if="!numCheck">
               <a-form-item label="起摘数量"
                            name="delistingQty">
                 <a-input-number class="commonInput"
@@ -75,22 +78,21 @@
               </a-form-item>
             </a-col>
 
-            <a-col :span="24"
-                   @click="openPermance">
+            <a-col :span="24">
               <a-form-item label="履约方式">
-                <span
-                      class="white ml8">{{selectedPermance ? selectedPermance.templatename : '选择履约模板'}}</span>
+                <span class="white ml8"
+                      @click="openPermance">{{selectedPermance ? selectedPermance.templatename : '选择履约模板'}}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24"
-                   @click="openFriend">
+            <a-col :span="24">
               <a-form-item label="指定朋友">
-                <span class="white ml8">{{frineds ? `已选${frineds.length}人` : '选择朋友'}}</span>
+                <span class="white ml8"
+                      @click="openFriend">{{frineds ? `已选${frineds.length}人` : '选择朋友'}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="挂牌金额">
-                <span class="white ml8">55555</span>
+                <span class="white ml8">{{getMoney()}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -100,7 +102,7 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="可用资金">
-                <span class="white ml8">55555</span>
+                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
               </a-form-item>
             </a-col>
           </a-row>
@@ -173,13 +175,25 @@ export default defineComponent({
         // 履约模板
         const { show: showPermance, selected: selectedPermance, close: choosePermance, open: openPermance } = hanldeOpenAndCloseComponent<QueryPermancePlanTmpRsp>();
         const loading = ref<boolean>(false);
+        // 资金账号
         const accountList = getAccountTypeList([2]);
         if (accountList.length) {
             formState.accountid = accountList[0].accountid;
         }
+        //
+        const priceCheck = ref<boolean>(false);
+        const numCheck = ref<boolean>(false);
         function getSelectedAccount() {
             return accountList.find((e) => e.accountid === formState.accountid);
         }
+        // 挂牌金额
+        function getMoney() {
+            let result = 0;
+            if (formState.FixedPrice && formState.OrderQty) {
+                result = formState.FixedPrice * formState.OrderQty;
+            }
+            return result ? result.toFixed(2) : '--';
+        }
 
         function submit() {
             // const marketInfo = getMarketRunByTradeMode(17);
@@ -268,6 +282,11 @@ export default defineComponent({
             choosePermance,
             openPermance,
             selectedPermance,
+
+            priceCheck,
+            numCheck,
+
+            getMoney,
         };
     },
 });