li.shaoyi 3 jaren geleden
bovenliggende
commit
a293725c85

+ 18 - 32
src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue

@@ -1,35 +1,21 @@
 <template>
-  <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-  <a-table :columns="handleColumn(columns)"
-           :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
-           :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-           :pagination="false"
-           :loading="loading"
-           :expandedRowKeys="expandedRowKeys"
-           :customRow="Rowclick"
-           :expandIcon="expandIcon"
-           :expandIconAsCell="false"
-           rowKey="key"
-           :data-source="tableList">
-    <!-- ,  -->
-    <!-- 额外的展开行 -->
-    <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
-               :record="record"
-               class="btn-list-sticky"
-               @click="openComponent" />
-    </template>
-    <template #username="{text, record }">
-      <span>{{record.userid + " "}}{{text}}</span>
-    </template>
-  </a-table>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :buyOrSell="BuyOrSell.buy"
-             :enumName="enumName"
-             :parantSelectedRow="parantSelectedRow"
-             @cancel="closeComponent"></component>
+    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
+    <a-table :columns="handleColumn(columns)"
+        :class="['buyHallTable', isBottom ? '' : 'buyHallTableHigh', tableList.length ? '' : 'noDataTable']"
+        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false"
+        :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon"
+        :expandIconAsCell="false" rowKey="key" :data-source="tableList">
+        <!-- ,  -->
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+            <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+        </template>
+        <template #username="{ text, record }">
+            <span>{{ record.userid + " " }}{{ text }}</span>
+        </template>
+    </a-table>
+    <component :is="componentId" v-bind="{ enumName, selectedRow, parantSelectedRow, buyOrSell: BuyOrSell.buy }"
+        @cancel="closeComponent" v-if="componentId" />
 </template>
 
 <script lang="ts">
@@ -113,7 +99,7 @@ export default defineComponent({
             });
             return columns;
         }
-        function handleBtnList() {}
+        function handleBtnList() { }
         return {
             isBottom,
             ...handleComposeTable<WrOrderQuoteDetail>(param),

+ 1 - 1
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -204,7 +204,7 @@ export default defineComponent({
         }
       } else {
         // 仓单预售市场,任务 #3687
-        const marketConfig = getRulesByMarketid(17202);
+        const marketConfig = getRulesByMarketid(props.selectedRow.marketid);
         if (marketConfig) {
           // 是否效验无仓单额度
           if (marketConfig.nowrquotaflag) {

+ 16 - 29
src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue

@@ -1,33 +1,20 @@
 <template>
-  <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
-  <a-table :columns="handleColumn(columns)"
-           :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
-           :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }"
-           :pagination="false"
-           :loading="loading"
-           :expandedRowKeys="expandedRowKeys"
-           :customRow="Rowclick"
-           :expandIcon="expandIcon"
-           :expandIconAsCell="false"
-           rowKey="key"
-           :data-source="tableList">
-    <!-- 额外的展开行 -->
-    <template #expandedRowRender="{ record }">
-      <BtnList :btnList="btnList"
-               :record="record"
-               @click="openComponent" />
-    </template>
-    <template #username="{text, record }">
-      <span>{{record.userid + " " }}{{text}}</span>
-    </template>
-  </a-table>
-  <component :is="componentId"
-             v-if="componentId"
-             :selectedRow="selectedRow"
-             :enumName="enumName"
-             :buyOrSell="BuyOrSell.sell"
-             :parantSelectedRow="parantSelectedRow"
-             @cancel="closeComponent"></component>
+    <!-- 现货贸易 - 买卖大厅 - 买报价牌 -->
+    <a-table :columns="handleColumn(columns)"
+        :class="['sellHallTable', isBottom ? '' : 'sellHallTableHigh', tableList.length ? '' : 'noDataTable']"
+        :scroll="{ x: '100%', y: isBottom ? 'calc(100vh- 378px)' : 'calc(100vh - 135px)' }" :pagination="false"
+        :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :expandIcon="expandIcon"
+        :expandIconAsCell="false" rowKey="key" :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{ record }">
+            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
+        </template>
+        <template #username="{ text, record }">
+            <span>{{ record.userid + " " }}{{ text }}</span>
+        </template>
+    </a-table>
+    <component :is="componentId" v-bind="{ enumName, selectedRow, parantSelectedRow, buyOrSell: BuyOrSell.sell }"
+        @cancel="closeComponent" v-if="componentId" />
 </template>
 
 <script lang="ts">

+ 5 - 5
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -72,12 +72,12 @@
     </div>
     <a-row class="buySellHall">
       <a-col :span="12" v-if="sellMarket.isMarket">
-        <Sell :enumName="enumName" ref="sellRef" :parantSelectedRow="selectedRow" :time="time"
-          :btnList="handleBtnList(sellMarket.btnList)" />
+        <Sell ref="sellRef"
+          v-bind="{ enumName, parantSelectedRow: selectedRow, time, btnList: handleBtnList(sellMarket.btnList) }" />
       </a-col>
       <a-col :span="12" v-if="buyMarket.isMarket">
-        <Buy :enumName="enumName" ref="buyRef" :time="time" :parantSelectedRow="selectedRow"
-          :btnList="handleBtnList(buyMarket.btnList)" />
+        <Buy ref="buyRef"
+          v-bind="{ enumName, parantSelectedRow: selectedRow, time, btnList: handleBtnList(buyMarket.btnList) }" />
       </a-col>
     </a-row>
     <component :is="componentId" v-bind="{ selectedMarket, selectedRow: getSelectedRow(), enumName, time }"
@@ -113,7 +113,7 @@ export default defineComponent({
   props: {
     selectedMarket: {
       type: Object as PropType<TjmdMarketSectionConfig>,
-      required: true,
+      default: () => ({})
     },
     selectedRow: {
       type: Object as PropType<WrOrderQuote>,

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

@@ -228,6 +228,9 @@ export default defineComponent({
             }
           })
         }
+      } else {
+        message.error('市场参数未配置')
+        return;
       }
     }
 

+ 92 - 57
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/index.vue

@@ -14,17 +14,22 @@
       </div>
     </template>
     <template #default="{ scroll }">
-      <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :loading="loading" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="goodsid" ref="tableRef" :data-source="goodsList">
+      <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :loading="loading"
+        :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="goodsid" ref="tableRef"
+        :data-source="goodsList">
         <!-- <template #totalturnover="{ text }">
         <span>{{changeUnit(text)}}</span>
       </template>-->
         <!-- 涨跌 -->
         <template #change="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{ quoteChange_out(record.refgoodscode) }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{ quoteChange_out(record.refgoodscode)
+          }}</span>
         </template>
         <!-- 幅度 -->
         <template #amplitude="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{ quoteAmplitude_out(record.refgoodscode) }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{
+              quoteAmplitude_out(record.refgoodscode)
+          }}</span>
         </template>
         <!-- 振幅 -->
         <template #vibration="{ record }">
@@ -45,15 +50,21 @@
       </template>-->
         <!-- 最新价 -->
         <template #last="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{ getQuoteValue_out(record.refgoodscode, 'last') }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'last')">{{
+              getQuoteValue_out(record.refgoodscode, 'last')
+          }}</span>
         </template>
         <!-- 开盘 -->
         <template #opened="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'opened')">{{ getQuoteValue_out(record.refgoodscode, 'opened') }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'opened')">{{
+              getQuoteValue_out(record.refgoodscode, 'opened')
+          }}</span>
         </template>
         <!-- 结算 -->
         <template #settle="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'settle')">{{ getQuoteValue_out(record.refgoodscode, 'settle') }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'settle')">{{
+              getQuoteValue_out(record.refgoodscode, 'settle')
+          }}</span>
         </template>
         <!-- 昨结算 -->
         <template #presettle="{ record }">
@@ -61,11 +72,15 @@
         </template>
         <!-- 最低价 -->
         <template #lowest="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'lowest')">{{ getQuoteValue_out(record.refgoodscode, 'lowest') }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'lowest')">{{
+              getQuoteValue_out(record.refgoodscode, 'lowest')
+          }}</span>
         </template>
         <!-- 最高价 -->
         <template #highest="{ record }">
-          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'highest')">{{ getQuoteValue_out(record.refgoodscode, 'highest') }}</span>
+          <span :class="handleQuotePriceColor_out(record.refgoodscode, 'highest')">{{
+              getQuoteValue_out(record.refgoodscode, 'highest')
+          }}</span>
         </template>
       </a-table>
     </template>
@@ -76,6 +91,7 @@
 </template>
 
 <script lang="ts">
+import { PropType } from 'vue'
 import MtpTableScroll from '@/common/components/tableScroll/index.vue';
 import { getShowBottomValue } from '@/common/config/constrolBottom';
 import { contextMenu, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
@@ -85,6 +101,7 @@ import { getQuoteValue_out, handleQuotePriceColor_out, handleSubcriteOnDemandQuo
 import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 import { QueryQuoteGoodsListRsp } from '@/services/go/Tjmd/interface';
 import { columnsList, getBtnList, useSwapList } from './setup';
+import { TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface'
 
 export default defineComponent({
   name: 'spot_trade_order_transaction_swap',
@@ -95,6 +112,12 @@ export default defineComponent({
     PostBuying: defineAsyncComponent(() => import('./components/post_buying/index.vue')),
     Detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
   },
+  props: {
+    selectedMarket: {
+      type: Object as PropType<TjmdMarketSectionConfig>,
+      default: () => ({})
+    },
+  },
   setup() {
     const isBottom = getShowBottomValue();
     const { loading, goodsList, getRefGoodsList, filterGoodsList } = useSwapList();
@@ -134,62 +157,74 @@ export default defineComponent({
 </script>
 <style lang="less">
 .noData {
-    .position(absolute, 28px, 0, 0, 0);
+  .position(absolute, 28px, 0, 0, 0);
 }
+
 .filter-custom-table {
-    display: inline-flex;
-    padding-top: 4px;
-    height: 34px;
-    .conditionSelect:first-child {
-        margin-right: 10px;
-    }
-    .btnDeafault.ant-btn,
-    .operBtn.ant-btn {
-        height: 26px !important;
-        line-height: 26px !important;
-    }
+  display: inline-flex;
+  padding-top: 4px;
+  height: 34px;
 
-    .ant-select-single:not(.ant-select-customize-input) + .ant-select-single:not(.ant-select-customize-input),
-    .ant-select + .ant-space.ant-space-vertical {
-        margin-left: 10px;
-    }
-    .ant-select-single:not(.ant-select-customize-input) {
+  .conditionSelect:first-child {
+    margin-right: 10px;
+  }
+
+  .btnDeafault.ant-btn,
+  .operBtn.ant-btn {
+    height: 26px !important;
+    line-height: 26px !important;
+  }
+
+  .ant-select-single:not(.ant-select-customize-input)+.ant-select-single:not(.ant-select-customize-input),
+  .ant-select+.ant-space.ant-space-vertical {
+    margin-left: 10px;
+  }
+
+  .ant-select-single:not(.ant-select-customize-input) {
+    height: 26px;
+    line-height: 26px !important;
+
+    .ant-select-selector {
+      height: 26px;
+      border-color: @m-grey46  !important;
+      background: @m-grey47;
+      .rounded-corners(3px);
+
+      .ant-select-selection-item {
+        line-height: 26px;
+      }
+
+      .ant-select-selection-search {
         height: 26px;
-        line-height: 26px !important;
-        .ant-select-selector {
-            height: 26px;
-            border-color: @m-grey46 !important;
-            background: @m-grey47;
-            .rounded-corners(3px);
-            .ant-select-selection-item {
-                line-height: 26px;
-            }
-            .ant-select-selection-search {
-                height: 26px;
-                .ant-select-selection-search-input {
-                    height: 26px;
-                    line-height: 27px !important;
-                }
-            }
-            .ant-select-selection-placeholder {
-                line-height: 26px;
-            }
-        }
-    }
 
-    .allDatePicker.ant-calendar-picker {
-        height: 26px !important;
-        border: 1px solid @m-grey46 !important;
-        .ant-calendar-picker-input.ant-input {
-            height: 26px;
-            line-height: 26px;
-            &::placeholder {
-                color: @m-grey10 !important;
-            }
+        .ant-select-selection-search-input {
+          height: 26px;
+          line-height: 27px !important;
         }
+      }
+
+      .ant-select-selection-placeholder {
+        line-height: 26px;
+      }
     }
-    .conditionSelect + .conditionSelect {
-        margin-left: 10px;
+  }
+
+  .allDatePicker.ant-calendar-picker {
+    height: 26px !important;
+    border: 1px solid @m-grey46  !important;
+
+    .ant-calendar-picker-input.ant-input {
+      height: 26px;
+      line-height: 26px;
+
+      &::placeholder {
+        color: @m-grey10  !important;
+      }
     }
+  }
+
+  .conditionSelect+.conditionSelect {
+    margin-left: 10px;
+  }
 }
 </style>

+ 8 - 1
src/views/market/spot_trade/spot_trade_reference_market/index.vue

@@ -93,7 +93,8 @@ import { queryOrderQuote } from '@/services/go/wrtrade';
 import { QueryOrderQuoteReq } from '@/services/go/wrtrade/interface';
 import { changeUnit } from '@/utils/qt/common';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
-import { ref } from 'vue';
+import { ref, PropType } from 'vue';
+import { TjmdMarketSectionConfig } from '@/services/go/Tjmd/interface'
 
 const columnsList = [
   { title: '序号', key: 'index', width: 80 },
@@ -127,6 +128,12 @@ export default defineComponent({
     buyAndSell: defineAsyncComponent(() => import('../components/goods-chart/index.vue')),
     // postBuying: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
   },
+  props: {
+    selectedMarket: {
+      type: Object as PropType<TjmdMarketSectionConfig>,
+      default: () => ({})
+    },
+  },
   setup() {
     const isBottom = getShowBottomValue();
     // 表头