li.shaoyi vor 3 Jahren
Ursprung
Commit
5367a02c08

+ 1 - 1
public/config/app.config.json

@@ -1,4 +1,4 @@
 {
-    "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139",
+    "apiUrl": "http://103.40.249.123:38280/cfg?key=mtp_20",
     "icoTitle": "云融"
 }

+ 2 - 1
src/common/components/description/index.vue

@@ -9,13 +9,14 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, watchEffect, PropType } from 'vue';
+import { defineComponent, ref, PropType } from 'vue';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { TabList } from './interface';
 import { ColumnType } from '@/common/methods/table/interface';
 
 export default defineComponent({
   name: 'description',
+  emits: ['changeTab', 'close'],
   components: {
     ThridMenu,
   },

+ 89 - 110
src/views/market/spot_trade/components/goods-chart/index.vue

@@ -1,85 +1,64 @@
 <template>
-    <!-- 买卖大厅 -->
-    <div class="buy-sell-market">
-        <div class="buy-sell-market-title">
-            <a class="backIcon" @click="cancelAction">
-                <LeftOutlined />
-            </a>
-            <div class="titleBtn">
-                <div class="name">{{ selectedRow.goodscode }} {{ selectedRow.goodsname }}</div>
-                <div class="arrowRightIcon"></div>
-            </div>
-            <div class="inlineBar">
-                <div class="valNums bdf1 ml10">
-                    <!-- 最新价 -->
-                    <div
-                        class="firstNum start"
-                        :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-                    >{{ selectedRow.last }}</div>
-                    <div class="lastNum start">
-                        <!-- 涨跌值 -->
-                        <div
-                            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-                        >{{ quoteChange(selectedRow, selectedRow.decimalplace) }}</div>
-                        <!-- 涨跌幅 -->
-                        <div
-                            class="ml20"
-                            :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
-                        >{{ quoteAmplitude(selectedRow, selectedRow.decimalplace) }}</div>
-                    </div>
-                </div>
-                <div class="priceBar ml20">
-                    <div class="inlineBar start">
-                        <div class="greenBar">
-                            <div class="numBlock ml15">
-                                <div class="first grey">卖价</div>
-                                <div
-                                    class="last"
-                                    :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
-                                >{{ selectedRow.ask }}</div>
-                            </div>
-                            <div class="numBlock">
+  <!-- 买卖大厅 -->
+  <div class="buy-sell-market">
+    <div class="buy-sell-market-title">
+      <a class="backIcon" @click="cancelAction">
+        <LeftOutlined />
+      </a>
+      <div class="titleBtn">
+        <div class="name">{{ selectedRow.goodscode }} {{ selectedRow.goodsname }}</div>
+        <div class="arrowRightIcon"></div>
+      </div>
+      <div class="inlineBar">
+        <div class="valNums bdf1 ml10">
+          <!-- 最新价 -->
+          <div class="firstNum start" :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ selectedRow.last }}</div>
+          <div class="lastNum start">
+            <!-- 涨跌值 -->
+            <div :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow, selectedRow.decimalplace) }}</div>
+            <!-- 涨跌幅 -->
+            <div class="ml20" :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow, selectedRow.decimalplace) }}</div>
+          </div>
+        </div>
+        <div class="priceBar ml20">
+          <div class="inlineBar start">
+            <div class="greenBar">
+              <div class="numBlock ml15">
+                <div class="first grey">卖价</div>
+                <div class="last" :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)">{{ selectedRow.ask }}</div>
+              </div>
+              <!-- <div class="numBlock">
                                 <div class="first grey">卖量</div>
                                 <div
                                     class="last"
                                     :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
                                 >{{ selectedRow.askvolume }}</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="inlineBar start">
-                        <div class="redBar">
-                            <div class="numBlock">
-                                <div class="first grey">买价</div>
-                                <div
-                                    class="last"
-                                    :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
-                                >{{ selectedRow.bid }}</div>
-                            </div>
-                            <div class="numBlock">
+                            </div> -->
+            </div>
+          </div>
+          <div class="inlineBar start">
+            <div class="redBar">
+              <div class="numBlock">
+                <div class="first grey">买价</div>
+                <div class="last" :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)">{{ selectedRow.bid }}</div>
+              </div>
+              <!-- <div class="numBlock">
                                 <div class="first grey">买量</div>
                                 <div
                                     class="last"
                                     :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
                                 >{{ selectedRow.bidvolume }}</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
+                            </div> -->
             </div>
+          </div>
         </div>
-        <!-- 交易图表 -->
-        <Chart
-            v-if="showComponentsId === ComponentType.chart"
-            @update="changeComponent"
-            :selectedRow="selectedRow"
-        />
-        <!-- 成交明细 -->
-        <StockExchange
-            :selectedRow="selectedRow"
-            v-if="showComponentsId === ComponentType.tradeDetail"
-        />
+      </div>
     </div>
+    <!-- 交易图表 -->
+    <Chart v-if="showComponentsId === ComponentType.chart" @update="changeComponent" :selectedRow="selectedRow" />
+    <!-- 成交明细 -->
+    <StockExchange :selectedRow="selectedRow" v-if="showComponentsId === ComponentType.tradeDetail" />
+  </div>
 </template>
 
 <script lang="ts">
@@ -95,51 +74,51 @@ import StockExchange from './stock-exchange/index.vue';
 
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            default: {},
-        },
-    },
-    components: {
-        Chart,
-        LeftOutlined,
-        StockExchange,
+  emits: ['cancel', 'update'],
+  name: 'buy-sell-market',
+  props: {
+    selectedRow: {
+      type: Object as PropType<QueryQuoteDayRsp>,
+      default: {},
     },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
+  },
+  components: {
+    Chart,
+    LeftOutlined,
+    StockExchange,
+  },
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
 
-        const showComponentsId = ref<ComponentType>(ComponentType.chart);
+    const showComponentsId = ref<ComponentType>(ComponentType.chart);
 
-        // 切换组件
-        function changeComponent(type: ComponentType) {
-            showComponentsId.value = type;
-        }
-        // 返回上层组件
-        function cancelAction() {
-            if (showComponentsId.value === ComponentType.chart) {
-                cancel();
-            } else {
-                showComponentsId.value = ComponentType.chart;
-            }
-        }
-        return {
-            cancel,
-            visible,
-            changeComponent,
-            ComponentType,
-            showComponentsId,
-            cancelAction,
-            handleSubcriteOnDemandQuote,
-            handleQuotePriceColor,
-            quoteChange,
-            quoteAmplitude,
-            quoteAmplituOfVibration,
-        };
-    },
+    // 切换组件
+    function changeComponent(type: ComponentType) {
+      showComponentsId.value = type;
+    }
+    // 返回上层组件
+    function cancelAction() {
+      if (showComponentsId.value === ComponentType.chart) {
+        cancel();
+      } else {
+        showComponentsId.value = ComponentType.chart;
+      }
+    }
+    return {
+      cancel,
+      visible,
+      changeComponent,
+      ComponentType,
+      showComponentsId,
+      cancelAction,
+      handleSubcriteOnDemandQuote,
+      handleQuotePriceColor,
+      quoteChange,
+      quoteAmplitude,
+      quoteAmplituOfVibration,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 74 - 87
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy-sell-market/index.vue

@@ -2,15 +2,14 @@
   <!-- 买卖大厅 -->
   <div class="buy-sell-market">
     <div class="buy-sell-market-title">
-      <a class="backIcon"
-         @click="cancel">
+      <a class="backIcon" @click="cancel">
         <LeftOutlined />
       </a>
       <div class="titleBtn">
         <div class="name">{{selectedRow.goodsname}}</div>
         <div class="arrowRightIcon"></div>
       </div>
-      <div class="priceBar bdf1 ml20">
+      <!-- <div class="priceBar bdf1 ml20">
         <div class="greenBar">
           <div class="numBlock">
             <div class="first">卖量</div>
@@ -21,35 +20,23 @@
             <div class="last white">{{selectedRow.bidvolume ? selectedRow.bidvolume : '--'}}</div>
           </div>
         </div>
-      </div>
+      </div> -->
       <!-- 历史走势按钮 -->
-      <a-button class="historyBtn"
-                @click="openComponent({code: 'HisChart'})">
+      <a-button class="historyBtn" @click="openComponent({code: 'HisChart'})">
         历史走势
         <LineChartOutlined />
       </a-button>
-      <BtnList :btnList="firstBtn"
-               :record="selectedRow"
-               @click="openComponent" />
+      <BtnList :btnList="firstBtn" :record="selectedRow" @click="openComponent" />
     </div>
     <a-row class="buySellHall">
       <a-col :span="12">
-        <Sell :enumName="enumName"
-              ref="sellRef"
-              :parantSelectedRow="selectedRow" />
+        <Sell :enumName="enumName" ref="sellRef" :parantSelectedRow="selectedRow" />
       </a-col>
       <a-col :span="12">
-        <Buy :enumName="enumName"
-             ref="buyRef"
-             :parantSelectedRow="selectedRow" />
+        <Buy :enumName="enumName" ref="buyRef" :parantSelectedRow="selectedRow" />
       </a-col>
     </a-row>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               :goodsPrice="getGoodsPrice()"
-               :enumName="enumName"
-               @cancel="closeComponent"></component>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :goodsPrice="getGoodsPrice()" :enumName="enumName" @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -76,77 +63,77 @@ import { getBtnList } from '../../setup';
 import { RefGoodsList } from '../../interface';
 
 export default defineComponent({
-    emits: ['cancel', 'update'],
-    name: 'buy-sell-market',
-    props: {
-        selectedRow: {
-            type: Object as PropType<RefGoodsList>,
-            default: {},
-        },
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
+  emits: ['cancel', 'update'],
+  name: 'buy-sell-market',
+  props: {
+    selectedRow: {
+      type: Object as PropType<RefGoodsList>,
+      default: {},
     },
-    components: {
-        Buy,
-        Sell,
-        BtnList,
-        LeftOutlined,
-        DownOutlined,
-        LineChartOutlined,
-        Detail: defineAsyncComponent(() => import('../detail/index.vue')),
-        PostBuying: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    setup(props, context) {
-        const loading = ref<boolean>(false);
-        const { visible, cancel } = _closeModal(context);
+  },
+  components: {
+    Buy,
+    Sell,
+    BtnList,
+    LeftOutlined,
+    DownOutlined,
+    LineChartOutlined,
+    Detail: defineAsyncComponent(() => import('../detail/index.vue')),
+    PostBuying: defineAsyncComponent(() => import('../post_buying/index.vue')),
+    HisChart: defineAsyncComponent(() => import('../history-chart/index.vue')),
+  },
+  setup(props, context) {
+    const loading = ref<boolean>(false);
+    const { visible, cancel } = _closeModal(context);
 
-        // const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
-        // 买卖大厅 配置数据
-        // 表格操作按钮列表
-        // 获取浮动价商品实时价格
+    // const { isWR, isFloat } = handleIs(props.enumName, BuyOrSell.buy);
+    // 买卖大厅 配置数据
+    // 表格操作按钮列表
+    // 获取浮动价商品实时价格
 
-        function getGoodsPrice() {
-            const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
-            // setGoodsPrice(result);
-            return result;
-        }
-        const buyRef = ref<null | { queryTableAction: Function }>(null);
-        const sellRef = ref<null | { queryTableAction: Function }>(null);
-        const queryFn = () => {
-            buyRef.value?.queryTableAction();
-            sellRef.value?.queryTableAction();
-        };
-        const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
-        // const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
-        function handleBtnList(list: BtnListType[]) {
-            // if (!hasFinacing()) {
-            //     return list.filter((e) => e.code !== 'spot_trade_warehouse_financing_delisting');
-            // } else {
-            //     return list;
-            // }
-        }
-        // 单据挂牌成功 通知买大厅刷新数据
-        Bus.$on('spotTrade', queryFn);
+    function getGoodsPrice() {
+      const result = getQuoteDayInfoByCodeFindPrice(props.selectedRow.goodscode);
+      // setGoodsPrice(result);
+      return result;
+    }
+    const buyRef = ref<null | { queryTableAction: Function }>(null);
+    const sellRef = ref<null | { queryTableAction: Function }>(null);
+    const queryFn = () => {
+      buyRef.value?.queryTableAction();
+      sellRef.value?.queryTableAction();
+    };
+    const { componentId, closeComponent, openComponent } = handleModalComponent(queryFn, ref({}));
+    // const { hasFinacing } = handleFinacing(loading, props.selectedRow.wrfactortypeid);
+    function handleBtnList(list: BtnListType[]) {
+      // if (!hasFinacing()) {
+      //     return list.filter((e) => e.code !== 'spot_trade_warehouse_financing_delisting');
+      // } else {
+      //     return list;
+      // }
+    }
+    // 单据挂牌成功 通知买大厅刷新数据
+    Bus.$on('spotTrade', queryFn);
 
-        return {
-            buyRef,
-            sellRef,
-            cancel,
-            getGoodsPrice,
-            visible,
-            firstBtn: getBtnList(false),
-            buyMarket: [],
-            sellMarket: [],
-            componentId,
-            closeComponent,
-            openComponent,
-            enumName: props.enumName,
-            handleBtnList,
-        };
-    },
+    return {
+      buyRef,
+      sellRef,
+      cancel,
+      getGoodsPrice,
+      visible,
+      firstBtn: getBtnList(false),
+      buyMarket: [],
+      sellMarket: [],
+      componentId,
+      closeComponent,
+      openComponent,
+      enumName: props.enumName,
+      handleBtnList,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 113 - 137
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/buy/index.vue

@@ -1,44 +1,19 @@
 <template>
-    <!--  现货贸易 - 买卖大厅 - 卖报价牌 -->
-    <a-table
-        :columns="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>
-        <template #orderprice="{ record }">
-            <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</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="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>
+    <template #orderprice="{ record }">
+      <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" :enumName="enumName" :parantSelectedRow="parantSelectedRow" @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -59,114 +34,115 @@ import { findItemGoods } from '../../setup';
 import { getBuyOrSellMarketPrice, sortPirce, useBuyOrSellBtnList, hasFloat } from '../setup';
 
 const columns = [
-    {
-        key: '0th',
-        dataIndex: 'index',
-        title: '序号',
-        align: 'center',
-        slots: {
-            customRender: 'index',
-        },
-        width: 60,
+  {
+    key: '0th',
+    dataIndex: 'index',
+    title: '序号',
+    align: 'center',
+    slots: {
+      customRender: 'index',
     },
-    {
-        key: '1th',
-        dataIndex: 'orderprice',
-        title: '买价',
-        align: 'center',
-        slots: {
-            customRender: 'orderprice',
-        },
-        width: 120,
+    width: 60,
+  },
+  {
+    key: '1th',
+    dataIndex: 'orderprice',
+    title: '买价',
+    align: 'center',
+    slots: {
+      customRender: 'orderprice',
     },
-    {
-        key: '2th',
-        dataIndex: 'orderqty',
-        title: '买量',
-        align: 'center',
-        slots: {
-            customRender: 'orderqty',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '2th',
+    dataIndex: 'orderqty',
+    title: '买量',
+    align: 'center',
+    slots: {
+      customRender: 'orderqty',
     },
-    {
-        key: '3th',
-        dataIndex: 'username',
-        title: '购买方',
-        align: 'center',
-        slots: {
-            customRender: 'username',
-        },
+    width: 120,
+  },
+  {
+    key: '3th',
+    dataIndex: 'username',
+    title: '购买方',
+    align: 'center',
+    slots: {
+      customRender: 'username',
     },
+  },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_buy',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<RefGoodsList>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_buy',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+    parantSelectedRow: {
+      type: Object as PropType<RefGoodsList>,
+      default: {},
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryTjmdTradeOrderDetailReq = {
-                buyorsell: 0,
-                userid: getUserId(),
-                usertype: getUserAccountType(),
-                goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
-            };
-            queryTable(queryTjmdTradeOrderDetail, param).then((res) => {
-                // 先置空 要不然数据变更了,视图不更新
-                const fn = () => {
-                    tableList.value = [];
-                    tableList.value = sortPirce(res, props.parantSelectedRow, false).filter(el => el.userid !== getUserId());
-                };
-                fn()
-                if (hasFloat(res)) {
-                    // 有浮动价, 则每三秒更新一次数据
-                    TimerUtils.setInterval(fn, 3 * 1000, 'buyMarket');
-                }
-            });
-        };
-        onBeforeUnmount(() => {
-            TimerUtils.clearInterval('buyMarket');
-        });
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: props.enumName,
-            tableFilterKey: [],
-            isDetail: false,
+  },
+  components: {
+    BtnList,
+    Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
+    // 获取列表数据
+    const queryTableAction = () => {
+      TimerUtils.clearInterval('buyMarket');
+      const param: QueryTjmdTradeOrderDetailReq = {
+        buyorsell: 0,
+        userid: getUserId(),
+        usertype: getUserAccountType(),
+        goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
+      };
+      queryTable(queryTjmdTradeOrderDetail, param).then((res) => {
+        // 先置空 要不然数据变更了,视图不更新
+        const fn = () => {
+          tableList.value = [];
+          tableList.value = sortPirce(res, props.parantSelectedRow, false).filter(el => el.userid !== getUserId());
         };
+        fn()
+        if (hasFloat(res)) {
+          // 有浮动价, 则每三秒更新一次数据
+          TimerUtils.setInterval(fn, 3 * 1000, 'buyMarket');
+        }
+      });
+    };
+    onBeforeUnmount(() => {
+      TimerUtils.clearInterval('buyMarket');
+    });
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: props.enumName,
+      tableFilterKey: [],
+      isDetail: false,
+    };
 
-        return {
-            isBottom,
-            ...handleComposeTable<WrOrderQuoteDetail>(param),
-            queryTableAction,
-            BuyOrSell,
-            loading,
-            tableList,
-            enumName: props.enumName,
-            expandIcon,
-            btnList: useBuyOrSellBtnList(),
-            columns,
-            getBuyOrSellMarketPrice,
-        };
-    },
+    return {
+      isBottom,
+      ...handleComposeTable<WrOrderQuoteDetail>(param),
+      queryTableAction,
+      BuyOrSell,
+      loading,
+      tableList,
+      enumName: props.enumName,
+      expandIcon,
+      btnList: useBuyOrSellBtnList(),
+      columns,
+      getBuyOrSellMarketPrice,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 193 - 244
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue

@@ -1,13 +1,6 @@
 <template>
   <!-- 挂牌求购 -->
-  <Drawer
-    :title="!isBuy() ? '摘牌买入' : '摘牌卖出'"
-    :placement="'right'"
-    :visible="visible"
-    :width="1052"
-    @cancel="cancel"
-    class="post-buying-container"
-  >
+  <Drawer :title="!isBuy() ? '摘牌买入' : '摘牌卖出'" :placement="'right'" :visible="visible" :width="1052" @cancel="cancel" class="post-buying-container">
     <a-row>
       <a-col :span="12">
         <div class="post_buying_chart">
@@ -16,47 +9,32 @@
             <div class="content--right">{{ parantSelectedRow.goodsname }}</div>
           </div>
           <div class="chart-tips__last">
-            <div
-              :class="['content--left', handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')]"
-            >{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'last') }}</div>
+            <div :class="['content--left', handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')]">{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'last') }}</div>
             <div class="content--right">
-              <span
-                :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')"
-              >{{ quoteChange_out(parantSelectedRow.refgoodscode) }}</span>
-              <span
-                :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')"
-              >{{ quoteAmplitude_out(parantSelectedRow.refgoodscode) }}</span>
+              <span :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')">{{ quoteChange_out(parantSelectedRow.refgoodscode) }}</span>
+              <span :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'last')">{{ quoteAmplitude_out(parantSelectedRow.refgoodscode) }}</span>
             </div>
           </div>
           <a-row>
             <a-col :span="4" :offset="2">最高价</a-col>
             <a-col :span="6">
-              <span
-                :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'highest')"
-              >{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'highest') }}</span>
+              <span :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'highest')">{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'highest') }}</span>
             </a-col>
             <a-col :span="4" :offset="2">开盘价</a-col>
             <a-col :span="6">
-              <span
-                :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'opened')"
-              >{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'opened') }}</span>
+              <span :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'opened')">{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'opened') }}</span>
             </a-col>
           </a-row>
           <a-row>
             <a-col :span="4" :offset="2">最低价</a-col>
             <a-col :span="6">
-              <span
-                :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'lowest')"
-              >{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'lowest') }}</span>
+              <span :class="handleQuotePriceColor_out(parantSelectedRow.refgoodscode, 'lowest')">{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'lowest') }}</span>
             </a-col>
             <a-col :span="4" :offset="2">昨结价</a-col>
             <a-col :span="6">{{ getQuoteValue_out(parantSelectedRow.refgoodscode, 'presettle') }}</a-col>
           </a-row>
           <div class="chart-content">
-            <Chart
-              :selectedRow="getQuoteDayInfoByCode(parantSelectedRow.refgoodscode)"
-              :showExchange="false"
-            />
+            <Chart :selectedRow="getQuoteDayInfoByCode(parantSelectedRow.refgoodscode)" :showExchange="false" />
           </div>
         </div>
       </a-col>
@@ -67,17 +45,8 @@
               <a-row :gutter="24">
                 <a-col :span="24">
                   <a-form-item label="贸易账户" name="accountid">
-                    <a-select
-                      class="inlineFormSelect"
-                      style="width: 260px"
-                      v-model:value="formState.accountid"
-                      placeholder="请选择"
-                    >
-                      <a-select-option
-                        v-for="item in accountList"
-                        :value="item.accountid"
-                        :key="item.accountid"
-                      >{{ item.accountid }}</a-select-option>
+                    <a-select class="inlineFormSelect" style="width: 260px" v-model:value="formState.accountid" placeholder="请选择">
+                      <a-select-option v-for="item in accountList" :value="item.accountid" :key="item.accountid">{{ item.accountid }}</a-select-option>
                     </a-select>
                   </a-form-item>
                 </a-col>
@@ -106,12 +75,7 @@
                 </a-col>
                 <a-col :span="24" v-if="isFloat() && isLimit()">
                   <a-form-item label="摘牌价格" name="price" class="inputIconBox">
-                    <a-input-number
-                      class="commonInput"
-                      style="width: 260px"
-                      :min="0"
-                      v-model:value="formState.price"
-                    />
+                    <a-input-number class="commonInput" style="width: 260px" :min="0" v-model:value="formState.price" />
                     <MinusOutlined @click="decreasePrice" />
                     <PlusOutlined @click="increasePrice" />
                   </a-form-item>
@@ -128,13 +92,7 @@
                 </a-col>
                 <a-col :span="24" v-if="useUserType()">
                   <a-form-item label="摘牌数量" name="num" class="inputIconBox">
-                    <a-input-number
-                      class="commonInput"
-                      style="width: 260px"
-                      :min="0"
-                      :max="selectedRow.orderqty"
-                      v-model:value="formState.num"
-                    />
+                    <a-input-number class="commonInput" style="width: 260px" :min="0" :max="selectedRow.orderqty" v-model:value="formState.num" />
                     <MinusOutlined @click="decreaseNumber" />
                     <PlusOutlined @click="increaseNumber" />
                     <span class="input-enumdicname">{{ selectedRow.enumdicname }}</span>
@@ -142,12 +100,7 @@
                 </a-col>
                 <a-col :span="24" v-if="useUserType()" class="mt-10">
                   <a-form-item>
-                    <a-slider
-                      :min="0"
-                      v-model:value="formState.num"
-                      :max="selectedRow.orderqty"
-                      class="formSlider"
-                    />
+                    <a-slider :min="0" v-model:value="formState.num" :max="selectedRow.orderqty" class="formSlider" />
                     <div class="unit">
                       <span>0</span>
                       <span>{{ selectedRow.orderqty }}{{ selectedRow.enumdicname }}</span>
@@ -179,8 +132,8 @@
             <a-row :gutter="24">
               <a-col :span="24" class="fixedBtns">
                 <a-form-item class="btnCenter">
-                  <a-button class="listedBtn" @click="submit">{{ !isBuy() ? '买入' : '卖出' }}</a-button>
-                  <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                  <a-button class="listedBtn" :loading="loading" @click="submit">{{ !isBuy() ? '买入' : '卖出' }}</a-button>
+                  <a-button class="ml10 cancelBtn" :loading="loading" @click="cancel">取消</a-button>
                 </a-form-item>
               </a-col>
             </a-row>
@@ -417,239 +370,235 @@ export default defineComponent({
 
 <style lang="less">
 .post-buying-container {
-  top: 101px;
-  .ant-drawer-content-wrapper {
-    height: 605px;
-  }
+    top: 101px;
+    .ant-drawer-content-wrapper {
+        height: 605px;
+    }
 }
 .chart-content {
-  height: 400px;
-  .chart-content__header,
-  .chart-content__main {
-    width: 90% !important;
-    margin: auto !important;
-  }
+    height: 400px;
+    .chart-content__header,
+    .chart-content__main {
+        width: 90% !important;
+        margin: auto !important;
+    }
 
-  .chart-slider {
-    display: none;
-  }
+    .chart-slider {
+        display: none;
+    }
 }
 .formBar {
-  height: 100%;
-  max-height: 100%;
+    height: 100%;
+    max-height: 100%;
 }
 .post_buying_chart {
-  [theme="light"] & {
-    --bgcolor: #fff;
-    --tab-border-color: #dae5ec;
-    --tab-checked-color: #0866b8;
-    --tab-checked-bgcolor: #d4e0ff;
-    --slider-border-color: #b2c4dd;
-    --slider-bgcolor: #edf2f7;
-    --slider-button-color: #b2c4dd;
-    --row-border-color: #dae5ec;
-    --row-title-color: #acb8c0;
-    --row-content-color: #3c454b;
-    --tik-title-bgcolor: #ecf2f5;
-    --tik-title-color: #7a8a94;
-  }
-  color: @m-grey67;
+    [theme='light'] & {
+        --bgcolor: #fff;
+        --tab-border-color: #dae5ec;
+        --tab-checked-color: #0866b8;
+        --tab-checked-bgcolor: #d4e0ff;
+        --slider-border-color: #b2c4dd;
+        --slider-bgcolor: #edf2f7;
+        --slider-button-color: #b2c4dd;
+        --row-border-color: #dae5ec;
+        --row-title-color: #acb8c0;
+        --row-content-color: #3c454b;
+        --tik-title-bgcolor: #ecf2f5;
+        --tik-title-color: #7a8a94;
+    }
+    color: @m-grey67;
 
-  // background-color: var(--bgcolor, #0e0e0f);
+    // background-color: var(--bgcolor, #0e0e0f);
 
-  // background: @m-blue37;
-  // color: @m-grey67;
-  .buying_chart {
-    display: flex;
+    // background: @m-blue37;
+    // color: @m-grey67;
+    .buying_chart {
+        display: flex;
 
-    // background-color: @m-blue36;
-    &__nav {
-      display: flex;
-      justify-content: center;
-      align-items: center;
+        // background-color: @m-blue36;
+        &__nav {
+            display: flex;
+            justify-content: center;
+            align-items: center;
 
-      .content {
-        &:first-child:not(:last-child) {
-          margin-right: 16px;
-        }
+            .content {
+                &:first-child:not(:last-child) {
+                    margin-right: 16px;
+                }
 
-        &--left {
-          font-size: 16px;
-          color: var(--row-content-color, #acb8c0);
-          margin-right: 6px;
-        }
+                &--left {
+                    font-size: 16px;
+                    color: var(--row-content-color, #acb8c0);
+                    margin-right: 6px;
+                }
 
-        &--right {
-          font-size: 24px;
-          color: #fc9618;
+                &--right {
+                    font-size: 24px;
+                    color: #fc9618;
+                }
+            }
         }
-      }
     }
-  }
-  .chart-tips {
-    display: flex;
-    flex-direction: column;
-    width: 300px;
-    height: 100%;
+    .chart-tips {
+        display: flex;
+        flex-direction: column;
+        width: 300px;
+        height: 100%;
 
-    &__last {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      padding: 16px 0;
-      .content {
-        &--left {
-          font-size: 24px;
-          margin-right: 16px;
-        }
+        &__last {
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            padding: 16px 0;
+            .content {
+                &--left {
+                    font-size: 24px;
+                    margin-right: 16px;
+                }
 
-        &--right {
-          display: flex;
-          flex-direction: column;
-          align-items: flex-start;
+                &--right {
+                    display: flex;
+                    flex-direction: column;
+                    align-items: flex-start;
+                }
+            }
         }
-      }
     }
-  }
 }
 .post_buying {
-  width: 100%;
-  height: 100%;
-  .flex;
-  flex-direction: column;
-  position: relative;
-  overflow: hidden;
-  .ant-form {
-    height: 100%;
-  }
-  .condition {
     width: 100%;
-    height: 48px;
-    margin: 0 16px;
-    padding: 10px 0;
-    border-bottom: 1px solid @m-black6;
-    .inlineflex;
-    .conditionBtn {
-      align-self: center;
-      align-items: center;
-      border: 0;
-      min-width: 80px;
-      height: 28px;
-      line-height: 28px;
-      background: @m-black7;
-      .rounded-corners(3px);
-      font-size: 14px;
-      color: @m-blue0;
-      &:hover {
-        background: @m-black7-hover;
-        color: @m-blue0-hover;
-      }
+    height: 100%;
+    .flex;
+    flex-direction: column;
+    position: relative;
+    overflow: hidden;
+    .ant-form {
+        height: 100%;
     }
-    .conditionBtn + .conditionBtn {
-      margin-left: 10px;
+    .condition {
+        width: 100%;
+        height: 48px;
+        margin: 0 16px;
+        padding: 10px 0;
+        border-bottom: 1px solid @m-black6;
+        .inlineflex;
+        .conditionBtn {
+            align-self: center;
+            align-items: center;
+            border: 0;
+            min-width: 80px;
+            height: 28px;
+            line-height: 28px;
+            background: @m-black7;
+            .rounded-corners(3px);
+            font-size: 14px;
+            color: @m-blue0;
+            &:hover {
+                background: @m-black7-hover;
+                color: @m-blue0-hover;
+            }
+        }
+        .conditionBtn + .conditionBtn {
+            margin-left: 10px;
+        }
     }
-  }
 }
 
 .unit {
-  margin-left: 70px;
-  width: 260px;
-  .flex;
-  justify-content: space-between;
-  font-size: 14px;
-  color: @m-grey41;
-  height: 14px;
-  line-height: 14px;
+    margin-left: 70px;
+    width: 260px;
+    .flex;
+    justify-content: space-between;
+    font-size: 14px;
+    color: @m-grey41;
+    height: 14px;
+    line-height: 14px;
 }
 .listedBtn {
-  width: 120px;
-  height: 30px;
-  line-height: 30px;
-  background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
-  border-radius: 3px;
-  color: @m-white0;
-  font-size: 14px;
-  text-align: center;
-  border: 0;
-  &:hover {
-    background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
-    color: @m-white0-hover;
-  }
+    width: 120px;
+    height: 30px;
+    line-height: 30px;
+    background: linear-gradient(0deg, @m-blue2 0%, @m-blue0 100%);
+    border-radius: 3px;
+    color: @m-white0;
+    font-size: 14px;
+    text-align: center;
+    border: 0;
+    &:hover {
+        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        color: @m-white0-hover;
+    }
 }
 .cancelBtn:extend(.listedBtn) {
-  background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
-  &:hover {
-    background: linear-gradient(
-      0deg,
-      @m-grey12-hover 0%,
-      @m-grey13-hover 100%
-    ) !important;
-    color: @m-white0-hover;
-  }
+    background: linear-gradient(0deg, @m-grey12 0%, @m-grey13 100%) !important;
+    &:hover {
+        background: linear-gradient(0deg, @m-grey12-hover 0%, @m-grey13-hover 100%) !important;
+        color: @m-white0-hover;
+    }
 }
 .ml10 {
-  margin-left: 10px;
+    margin-left: 10px;
 }
 .ant-form.dialogForm .ant-row.ant-form-item {
-  margin-bottom: 14px;
+    margin-bottom: 14px;
 }
 .mt20 {
-  margin-top: 20px;
+    margin-top: 20px;
 }
 .mt-10 {
-  margin-top: -10px;
+    margin-top: -10px;
 }
 .ant-input-suffix {
-  position: absolute;
-  right: -25px;
+    position: absolute;
+    right: -25px;
 }
 .minusBtn,
 .plusBtn {
-  width: 15px;
-  height: 32px;
-  line-height: 32px;
-  font-size: 15px;
-  color: @m-blue15;
-  cursor: pointer;
+    width: 15px;
+    height: 32px;
+    line-height: 32px;
+    font-size: 15px;
+    color: @m-blue15;
+    cursor: pointer;
 }
 .minusBtn {
-  position: absolute;
-  top: -6px;
-  left: 14px;
-  z-index: 1;
+    position: absolute;
+    top: -6px;
+    left: 14px;
+    z-index: 1;
 }
 .plusBtn {
-  position: absolute;
-  top: -6px;
-  right: 14px;
-  z-index: 1;
+    position: absolute;
+    top: -6px;
+    right: 14px;
+    z-index: 1;
 }
 .stepper {
-  padding-left: 30px;
-  padding-right: 30px;
-  text-align: center;
-  color: @m-yellow1;
-  font-size: 16px;
+    padding-left: 30px;
+    padding-right: 30px;
+    text-align: center;
+    color: @m-yellow1;
+    font-size: 16px;
 }
 .ant-slider.formSlider {
-  width: 260px !important;
-  margin-left: 70px;
-  .ant-slider-rail {
-    margin-right: 0;
-    padding-right: 0;
-    height: 3px !important;
-    border-radius: 2px !important;
-    background-color: @m-blue14;
-  }
-  .ant-slider-track {
-    height: 3px;
-    background-color: @m-blue0;
-  }
-  .ant-slider-step {
-    height: 3px;
-  }
-  .ant-progress-text {
-    display: none;
-  }
+    width: 260px !important;
+    margin-left: 70px;
+    .ant-slider-rail {
+        margin-right: 0;
+        padding-right: 0;
+        height: 3px !important;
+        border-radius: 2px !important;
+        background-color: @m-blue14;
+    }
+    .ant-slider-track {
+        height: 3px;
+        background-color: @m-blue0;
+    }
+    .ant-slider-step {
+        height: 3px;
+    }
+    .ant-progress-text {
+        display: none;
+    }
 }
 </style>

+ 122 - 141
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/sell/index.vue

@@ -1,38 +1,18 @@
 <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 #orderprice="{ record }">
-            <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</span>
-        </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 #orderprice="{ record }">
+      <span>{{ getBuyOrSellMarketPrice(record, parantSelectedRow) }}</span>
+    </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>
 </template>
 
 <script lang="ts">
@@ -59,125 +39,126 @@ import { RefGoodsList } from '../../interface';
 import TimerUtils from '@/utils/timer/timerUtil';
 
 const columns = [
-    {
-        key: '0th',
-        dataIndex: 'index',
-        title: '序号',
-        align: 'center',
-        slots: {
-            customRender: 'index',
-        },
-        width: 60,
+  {
+    key: '0th',
+    dataIndex: 'index',
+    title: '序号',
+    align: 'center',
+    slots: {
+      customRender: 'index',
     },
-    {
-        key: '3th',
-        dataIndex: 'username',
-        title: '销售方',
-        align: 'center',
-        slots: {
-            customRender: 'username',
-        },
+    width: 60,
+  },
+  {
+    key: '3th',
+    dataIndex: 'username',
+    title: '销售方',
+    align: 'center',
+    slots: {
+      customRender: 'username',
     },
-    {
-        key: '2th',
-        dataIndex: 'orderqty',
-        title: '卖量',
-        align: 'center',
-        slots: {
-            customRender: 'orderqty',
-        },
-        width: 120,
+  },
+  {
+    key: '2th',
+    dataIndex: 'orderqty',
+    title: '卖量',
+    align: 'center',
+    slots: {
+      customRender: 'orderqty',
     },
-    {
-        key: '1th',
-        dataIndex: 'orderprice',
-        title: '卖价',
-        align: 'center',
-        slots: {
-            customRender: 'orderprice',
-        },
-        width: 120,
+    width: 120,
+  },
+  {
+    key: '1th',
+    dataIndex: 'orderprice',
+    title: '卖价',
+    align: 'center',
+    slots: {
+      customRender: 'orderprice',
     },
+    width: 120,
+  },
 ];
 
 export default defineComponent({
-    emits: ['cancel', 'openComponent'],
-    name: 'warehouse_receipt_trade_price_delisting_sell',
-    props: {
-        enumName: {
-            default: '',
-            type: String as PropType<EnumRouterName>,
-        },
-        parantSelectedRow: {
-            type: Object as PropType<RefGoodsList>,
-            default: {},
-        },
+  emits: ['cancel', 'openComponent'],
+  name: 'warehouse_receipt_trade_price_delisting_sell',
+  props: {
+    enumName: {
+      default: '',
+      type: String as PropType<EnumRouterName>,
     },
-    components: {
-        BtnList,
-        Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+    parantSelectedRow: {
+      type: Object as PropType<RefGoodsList>,
+      default: {},
     },
-    setup(props, context) {
-        const isBottom = getShowBottomValue();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
+  },
+  components: {
+    BtnList,
+    Listing: defineAsyncComponent(() => import('../delisting/index.vue')),
+  },
+  setup(props, context) {
+    const isBottom = getShowBottomValue();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<QueryTjmdTradeOrderDetailRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            const param: QueryTjmdTradeOrderDetailReq = {
-                buyorsell: 1,
-                userid: getUserId(),
-                usertype: getUserAccountType(),
-                goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
-            };
-            queryTable(queryTjmdTradeOrderDetail, param).then((res) => {
-                // 先置空 要不然数据变更了,视图不更新
-                const fn = () => {
-                    tableList.value = [];
-                    tableList.value = sortPirce(res, props.parantSelectedRow).filter(el => el.userid !== getUserId());
-                };
-                fn()
-                if (hasFloat(res)) {
-                    // 有浮动价, 则每三秒更新一次数据
-                    TimerUtils.setInterval(fn, 3 * 1000, 'sellMarket');
-                }
-            });
+    // 获取列表数据
+    const queryTableAction = () => {
+      TimerUtils.clearInterval('sellMarket');
+      const param: QueryTjmdTradeOrderDetailReq = {
+        buyorsell: 1,
+        userid: getUserId(),
+        usertype: getUserAccountType(),
+        goodsid: findItemGoods(props.parantSelectedRow.goodscode)?.goodsid,
+      };
+      queryTable(queryTjmdTradeOrderDetail, param).then((res) => {
+        // 先置空 要不然数据变更了,视图不更新
+        const fn = () => {
+          tableList.value = [];
+          tableList.value = sortPirce(res, props.parantSelectedRow).filter(el => el.userid !== getUserId());
         };
-        onBeforeUnmount(() => {
-            TimerUtils.clearInterval('sellMarket');
-        });
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
-            tableFilterKey: [],
-            isDetail: false,
-        };
-        function handleColumn(columns: ColumnType[]) {
-            columns.forEach((item) => {
-                columns.forEach((item) => {
-                    if (item.dataIndex == 'username') {
-                        delete item.width;
-                    }
-                });
-            });
-            return columns;
+        fn()
+        if (hasFloat(res)) {
+          // 有浮动价, 则每三秒更新一次数据
+          TimerUtils.setInterval(fn, 3 * 1000, 'sellMarket');
         }
-        return {
-            isBottom,
-            ...handleComposeTable<QueryTjmdTradeOrderDetailRsp>(param),
-            queryTableAction,
-            loading,
-            tableList,
-            BuyOrSell,
-            enumName: props.enumName,
-            expandIcon,
-            handleColumn,
-            btnList: useBuyOrSellBtnList(),
-            columns,
-            getBuyOrSellMarketPrice,
-        };
-    },
+      });
+    };
+    onBeforeUnmount(() => {
+      TimerUtils.clearInterval('sellMarket');
+    });
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
+      tableFilterKey: [],
+      isDetail: false,
+    };
+    function handleColumn(columns: ColumnType[]) {
+      columns.forEach((item) => {
+        columns.forEach((item) => {
+          if (item.dataIndex == 'username') {
+            delete item.width;
+          }
+        });
+      });
+      return columns;
+    }
+    return {
+      isBottom,
+      ...handleComposeTable<QueryTjmdTradeOrderDetailRsp>(param),
+      queryTableAction,
+      loading,
+      tableList,
+      BuyOrSell,
+      enumName: props.enumName,
+      expandIcon,
+      handleColumn,
+      btnList: useBuyOrSellBtnList(),
+      columns,
+      getBuyOrSellMarketPrice,
+    };
+  },
 });
 </script>
 <style lang="less">

+ 67 - 84
src/views/order/funding_information/components/funding_information_funding_summary/components/funding_information_funding_summary_recharge/index.vue

@@ -1,47 +1,30 @@
 <template>
-  <Drawer :title="'充值'"
-          :placement="'right'"
-          :visible="visible"
-          class="delistingBottom"
-          @cancel="cancel">
+  <Drawer :title="'充值'" :placement="'right'" :visible="visible" class="delistingBottom" @cancel="cancel">
     <div class="listed">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
         <div class="formBar">
           <a-row :gutter="24">
             <a-col :span="24">
-              <a-form-item label="充值金额"
-                           name="price">
-                <a-input-number class="commonInput"
-                                v-model:value="formState.price"
-                                style="width: 100%" />
+              <a-form-item label="充值金额" name="price">
+                <a-input-number class="commonInput" v-model:value="formState.price" style="width: 100%" />
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="凭证">
-                <UploadImg :visible="visible"
-                           @upload="uploadImgAction"></UploadImg>
+                <UploadImg :visible="visible" @upload="uploadImgAction"></UploadImg>
               </a-form-item>
             </a-col>
-            <a-col :span="24">
+            <!-- <a-col :span="24">
               <span class="red">充值提现时间段:{{getApplyInOrOutTime()}}</span>
-            </a-col>
+            </a-col> -->
           </a-row>
         </div>
         <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
+          <a-col :span="24" class="fixedBtns">
             <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="submit">提交
+              <a-button class="listedBtn" :loading="loading" :disabled="loading" @click="submit">提交
               </a-button>
-              <a-button key="submit"
-                        class="ml10 cancelBtn"
-                        @click="cancel">取消</a-button>
+              <a-button key="submit" class="ml10 cancelBtn" @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -69,65 +52,65 @@ import { handleForm } from './setup';
 import Bus from '@/utils/eventBus/index';
 
 export default defineComponent({
-    name: 'funding_information_funding_summary_recharge',
-    components: { Drawer, UploadImg },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<Taaccount>,
-            default: {},
-        },
+  name: 'funding_information_funding_summary_recharge',
+  components: { Drawer, UploadImg },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<Taaccount>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleForm();
-        // 附件
-        const { getFirstImg, uploadImgAction } = getUploadImg();
-        // 签约银行
-        const { hasSignBank, getSignBank } = useSignBank();
-        function submit() {
-            if (!hasSignBank()) {
-                message.error('请先签约银行!');
-                return;
-            }
-            const url = getFirstImg();
-            if (!url) {
-                message.error('请先上传凭证');
-                return;
-            }
-            validateAction<FormState>(formRef, formState).then((res) => {
-                const signBank = getSignBank()!;
-                const extendInfo = { certificatephotourl: url };
-                const param: BuildInMoneyReq = {
-                    ExtOperatorID: Date.now(), // 外部操作流水号
-                    AccountCode: signBank.accountcode,
-                    Currency: signBank.currency,
-                    CusBankID: signBank.cusbankid,
-                    BankAccoutNum: signBank.bankaccountno2,
-                    BankAccoutName: signBank.bankaccountname2,
-                    Amount: res.price!,
-                    extend_info: JSON.stringify(extendInfo),
-                };
-                requestResultLoadingAndInfo(buildInMoney, param, loading, ['充值成功', '充值失败:']).then(() => {
-                    cancel(true);
-                    Bus.$emit('applyInOrOut', true);
-                });
-            });
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            rules,
-            formState,
-            formRef,
-            getFirstImg,
-            uploadImgAction,
-            getApplyInOrOutTime,
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const loading = ref<boolean>(false);
+    const { rules, formState, formRef } = handleForm();
+    // 附件
+    const { getFirstImg, uploadImgAction } = getUploadImg();
+    // 签约银行
+    const { hasSignBank, getSignBank } = useSignBank();
+    function submit() {
+      if (!hasSignBank()) {
+        message.error('请先签约银行!');
+        return;
+      }
+      const url = getFirstImg();
+      if (!url) {
+        message.error('请先上传凭证');
+        return;
+      }
+      validateAction<FormState>(formRef, formState).then((res) => {
+        const signBank = getSignBank()!;
+        const extendInfo = { certificatephotourl: url };
+        const param: BuildInMoneyReq = {
+          ExtOperatorID: Date.now(), // 外部操作流水号
+          AccountCode: signBank.accountcode,
+          Currency: signBank.currency,
+          CusBankID: signBank.cusbankid,
+          BankAccoutNum: signBank.bankaccountno2,
+          BankAccoutName: signBank.bankaccountname2,
+          Amount: res.price!,
+          extend_info: JSON.stringify(extendInfo),
         };
-    },
+        requestResultLoadingAndInfo(buildInMoney, param, loading, ['充值成功', '充值失败:']).then(() => {
+          cancel(true);
+          Bus.$emit('applyInOrOut', true);
+        });
+      });
+    }
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      rules,
+      formState,
+      formRef,
+      getFirstImg,
+      uploadImgAction,
+      getApplyInOrOutTime,
+    };
+  },
 });
 </script>
 

+ 3 - 3
src/views/order/funding_information/components/funding_information_funding_summary/components/funding_information_funding_summary_withdraw/index.vue

@@ -11,7 +11,7 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="可提现金额">
-                <span class="white ml8"> {{canUseMoney}} <span class="blue" @click="chooseAll">全部</span></span>
+                <span class="white ml8"> {{canUseMoney}} <span class="blue" @click="chooseAll" style="cursor:pointer;">全部</span></span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -34,9 +34,9 @@
                 <span class="white ml8">{{getItemSignBankValue('branchbankname')}}</span>
               </a-form-item>
             </a-col>
-            <a-col :span="24">
+            <!-- <a-col :span="24">
               <span class="red">充值提现时间段:{{getApplyInOrOutTime()}}</span>
-            </a-col>
+            </a-col> -->
           </a-row>
         </div>
         <a-row :gutter="24">

+ 1 - 1
src/views/order/funding_information/components/funding_information_funding_summary/setup.ts

@@ -311,7 +311,7 @@ export function useHazardRates() {
             }
         }
         const decimalplace = getDecimalplace()
-        return result.toFixed(decimalplace)
+        return Number(result.toFixed(decimalplace))
     }
 
     return {