huangbin 4 yıl önce
ebeveyn
işleme
97e03fbf20

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

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204"
+    "apiUrl": "http://192.168.31.176:8080/cfg?key=test_176"
 }

+ 1 - 1
src/assets/styles/mixin.less

@@ -3401,7 +3401,7 @@ input:-internal-autofill-selected {
     line-height: 22px;
     background: @m-grey48;
     font-size: 14px;
-    color: @m-grey49;
+    color: @error-color;
     text-align: center;
     cursor: pointer;
 }

+ 4 - 4
src/services/socket/quota/adapter/index.ts

@@ -37,10 +37,10 @@ export function parseSubscribeRsp(rspPackage: any): Promise<string | SubscribeIn
             resolve('');
         }
         const count = byteArrayToUInt(content.subarray(0, 4), false);
-        // if (count > 1000) {
-        //     // 游客模式 刷新成长问题,为了不让页面卡死,暂时处理
-        //     return null;
-        // }
+        if (count > 1000) {
+            // 游客模式 刷新成长问题,为了不让页面卡死,暂时处理
+            return null;
+        }
         switch (count) {
             case -1:
                 reject('订阅失败');

+ 161 - 125
src/views/market/spot_trade/components/goods-chart/chart/index.vue

@@ -1,133 +1,169 @@
 <template>
-    <!-- 交易图表  -->
-    <div class="chart-container">
-        <div class="chart-content">
-            <div class="chart-content__header">
-                <a-menu class="chart-content__tabs" v-model:selectedKeys="activeCycleName" mode="horizontal" @click="changeCycleType">
-                    <a-menu-item v-for="item in chartType" :key="item.name">{{ item.label }}</a-menu-item>
-                </a-menu>
-                <a-menu class="chart-content__tabs" v-model:selectedKeys="activeSeriesType" mode="horizontal" v-show="activeCycleType !== CycleType.time">
-                    <a-menu-item key="MACD">MACD</a-menu-item>
-                    <a-menu-item key="VOL">VOL</a-menu-item>
-                    <a-menu-item key="KDJ">KDJ</a-menu-item>
-                    <a-menu-item key="CCI">CCI</a-menu-item>
-                </a-menu>
-            </div>
-            <echart-time class="chart-content__main" :quote-data="selectedRow" @change="getHistoryTikDatas" v-if="activeCycleType === CycleType.time"></echart-time>
-            <echart-kline class="chart-content__main" :quote-data="selectedRow" :cycle-type="activeCycleType" :series-type="activeSeriesType[0]" v-else></echart-kline>
-            <div class="chart-content__footer"></div>
+  <!-- 交易图表  -->
+  <div class="chart-container">
+    <div class="chart-content">
+      <div class="chart-content__header">
+        <a-menu class="chart-content__tabs"
+                v-model:selectedKeys="activeCycleName"
+                mode="horizontal"
+                @click="changeCycleType">
+          <a-menu-item v-for="item in chartType"
+                       :key="item.name">{{ item.label }}</a-menu-item>
+        </a-menu>
+        <a-menu class="chart-content__tabs"
+                v-model:selectedKeys="activeSeriesType"
+                mode="horizontal"
+                v-show="activeCycleType !== CycleType.time">
+          <a-menu-item key="MACD">MACD</a-menu-item>
+          <a-menu-item key="VOL">VOL</a-menu-item>
+          <a-menu-item key="KDJ">KDJ</a-menu-item>
+          <a-menu-item key="CCI">CCI</a-menu-item>
+        </a-menu>
+      </div>
+      <echart-time class="chart-content__main"
+                   :quote-data="selectedRow"
+                   @change="getHistoryTikDatas"
+                   v-if="activeCycleType === CycleType.time"></echart-time>
+      <echart-kline class="chart-content__main"
+                    :quote-data="selectedRow"
+                    :cycle-type="activeCycleType"
+                    :series-type="activeSeriesType[0]"
+                    v-else></echart-kline>
+      <div class="chart-content__footer"></div>
+    </div>
+    <div class="chart-slider">
+      <div class="chart-slider__button"></div>
+    </div>
+    <div class="chart-tips">
+      <div>
+        <div class="chart-tips__nav">
+          <div class="content content--left">{{ selectedRow.goodscode }}</div>
+          <div class="content content--right">{{ selectedRow.goodsname }}</div>
+        </div>
+        <div class="chart-tips__last">
+          <div
+               :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]">
+            {{ handleNoneValue(selectedRow.last) }}</div>
+          <div class="content content--right">
+            <span
+                  :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow) }}</span>
+            <span
+                  :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow) }}</span>
+          </div>
+        </div>
+        <div class="chart-tips__volume">
+          <a-row>
+            <a-col :span="8">卖一</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
+                   :span="8">{{ handleNoneValue(selectedRow.ask) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.askvolume, selectedRow.presettle)"
+                   :span="8">{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
+          </a-row>
+          <a-row>
+            <a-col :span="8">买一</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
+                   :span="8">{{ handleNoneValue(selectedRow.bid) }}</a-col>
+            <a-col :class="handleQuotePriceColor(selectedRow.bidvolume, selectedRow.presettle)"
+                   :span="8">{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
+          </a-row>
         </div>
-        <div class="chart-slider">
-            <div class="chart-slider__button"></div>
+      </div>
+      <div class="chart-tips__tik">
+        <div class="row-header">
+          <h4>分时成交</h4>
+          <a-row>
+            <a-col :span="8">时间</a-col>
+            <a-col :span="8">价格</a-col>
+            <a-col :span="8">现量</a-col>
+          </a-row>
         </div>
-        <div class="chart-tips">
-            <div>
-                <div class="chart-tips__nav">
-                    <div class="content content--left">{{ selectedRow.goodscode }}</div>
-                    <div class="content content--right">{{ selectedRow.goodsname }}</div>
-                </div>
-                <div class="chart-tips__last">
-                    <div :class="['content content--left', handleQuotePriceColor(selectedRow.last, selectedRow.presettle)]"> {{ handleNoneValue(selectedRow.last) }}</div>
-                    <div class="content content--right">
-                        <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteChange(selectedRow) }}</span>
-                        <span :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">{{ quoteAmplitude(selectedRow) }}</span>
-                    </div>
-                </div>
-                <div class="chart-tips__volume">
-                    <a-row>
-                        <a-col :span="8">卖一</a-col>
-                        <a-col :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.ask) }}</a-col>
-                        <a-col :class="handleQuotePriceColor(selectedRow.askvolume, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.askvolume) }}</a-col>
-                    </a-row>
-                    <a-row>
-                        <a-col :span="8">买一</a-col>
-                        <a-col :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bid) }}</a-col>
-                        <a-col :class="handleQuotePriceColor(selectedRow.bidvolume, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.bidvolume) }}</a-col>
-                    </a-row>
-                </div>
-            </div>
-            <div class="chart-tips__tik">
-                <div class="row-header">
-                    <h4>分时成交</h4>
-                    <a-row>
-                        <a-col :span="8">时间</a-col>
-                        <a-col :span="8">价格</a-col>
-                        <a-col :span="8">现量</a-col>
-                    </a-row>
-                </div>
-                <div class="row-content">
-                    <a-row v-for="(item, index) in tradedList" :key="index + '11'">
-                        <a-col :span="8">{{ formatTime(item.TS, 'hm') }}</a-col>
-                        <a-col :class="handleQuotePriceColor(item.PE, selectedRow.presettle)" :span="8">{{ item.PE }}</a-col>
-                        <a-col :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)" :span="8">{{ item.Vol }}</a-col>
-                    </a-row>
-                </div>
-            </div>
-            <div class="chart-tips__info">
-                <a-row>
-                    <a-col :span="4">最新</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.last) }}</a-col>
-                    <a-col :span="4">均价</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">涨跌</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteChange(selectedRow) }}</a-col>
-                    <a-col :span="4">今开</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.opened) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">涨幅</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)" :span="8">{{ quoteAmplitude(selectedRow) }}</a-col>
-                    <a-col :span="4">最高</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.highest) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">总量</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.totalvolume) }}</a-col>
-                    <a-col :span="4">最低</a-col>
-                    <a-col :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)" :span="8">{{ handleNoneValue(selectedRow.lowest) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">金额</a-col>
-                    <a-col :span="8" style="color: #0d96ff">{{ changeUnit(selectedRow.totalturnover) }}</a-col>
-                    <a-col :span="4">量比</a-col>
-                    <a-col :span="8">{{ '--' }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">涨停</a-col>
-                    <a-col class="red1" :span="8">{{ handleNoneValue(selectedRow.limitup) }}</a-col>
-                    <a-col :span="4">跌停</a-col>
-                    <a-col class="green" :span="8">{{ handleNoneValue(selectedRow.limitdown) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">外盘</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.totalbidvolume) }}</a-col>
-                    <a-col :span="4">内盘</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.totalaskvolume) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">持仓</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.holdvolume) }}</a-col>
-                    <a-col :span="4">结算</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.settle) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">仓差</a-col>
-                    <a-col :span="8">{{ '--' }}</a-col>
-                    <a-col :span="4">昨结</a-col>
-                    <a-col :span="8">{{ handleNoneValue(selectedRow.presettle) }}</a-col>
-                </a-row>
-                <a-row>
-                    <a-col :span="4">日增</a-col>
-                    <a-col :span="8">{{ '--' }}</a-col>
-                    <a-col :span="4">开平</a-col>
-                    <a-col :span="8">{{ '--' }}</a-col>
-                </a-row>
-            </div>
-            <div @click="watchMore" class="watchMore">查看更多</div>
+        <div class="row-content">
+          <a-row v-for="(item, index) in tradedList"
+                 :key="index + '11'">
+            <a-col :span="8">{{ formatTime(item.TS, 'hm') }}</a-col>
+            <a-col :class="handleQuotePriceColor(item.PE, selectedRow.presettle)"
+                   :span="8">{{ item.PE }}</a-col>
+            <a-col :class="handleQuotePriceColor(item.Vol, selectedRow.presettle)"
+                   :span="8">{{ item.Vol }}</a-col>
+          </a-row>
         </div>
+      </div>
+      <div class="chart-tips__info">
+        <a-row>
+          <a-col :span="4">最新</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+                 :span="8">{{ handleNoneValue(selectedRow.last) }}</a-col>
+          <a-col :span="4">均价</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.averageprice, selectedRow.presettle)"
+                 :span="8">{{ handleNoneValue(selectedRow.averageprice) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">涨跌</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+                 :span="8">{{ quoteChange(selectedRow) }}</a-col>
+          <a-col :span="4">今开</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.opened, selectedRow.presettle)"
+                 :span="8">{{ handleNoneValue(selectedRow.opened) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">涨幅</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)"
+                 :span="8">{{ quoteAmplitude(selectedRow) }}</a-col>
+          <a-col :span="4">最高</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.highest, selectedRow.presettle)"
+                 :span="8">{{ handleNoneValue(selectedRow.highest) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">总量</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.totalvolume) }}</a-col>
+          <a-col :span="4">最低</a-col>
+          <a-col :class="handleQuotePriceColor(selectedRow.lowest, selectedRow.presettle)"
+                 :span="8">{{ handleNoneValue(selectedRow.lowest) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">金额</a-col>
+          <a-col :span="8"
+                 style="color: #0d96ff">{{ changeUnit(selectedRow.totalturnover) }}</a-col>
+          <a-col :span="4">量比</a-col>
+          <a-col :span="8">{{ '--' }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">涨停</a-col>
+          <a-col class="red1"
+                 :span="8">{{ handleNoneValue(selectedRow.limitup) }}</a-col>
+          <a-col :span="4">跌停</a-col>
+          <a-col class="green"
+                 :span="8">{{ handleNoneValue(selectedRow.limitdown) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">外盘</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.totalbidvolume) }}</a-col>
+          <a-col :span="4">内盘</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.totalaskvolume) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">持仓</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.holdvolume) }}</a-col>
+          <a-col :span="4">结算</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.settle) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">仓差</a-col>
+          <a-col :span="8">{{ '--' }}</a-col>
+          <a-col :span="4">昨结</a-col>
+          <a-col :span="8">{{ handleNoneValue(selectedRow.presettle) }}</a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="4">日增</a-col>
+          <a-col :span="8">{{ '--' }}</a-col>
+          <a-col :span="4">开平</a-col>
+          <a-col :span="8">{{ '--' }}</a-col>
+        </a-row>
+      </div>
+      <div @click="watchMore"
+           class="watchMore"><strong>查看更多</strong></div>
     </div>
+  </div>
 </template>
 
 <script lang="ts">

+ 33 - 36
src/views/market/spot_trade/spot_trade_order_transaction/components/sell-market/index.vue

@@ -1,37 +1,35 @@
 <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="btnListData" :record="record" @click="openComponent" />
-        </template>
-        <template #username="{text, record }">
-            <span>{{record.userid + " " }}{{text}}</span>
-        </template>
-        <template #fixedprice="{record }">
-            <span>{{record.useorderpricerid }}</span>
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :parantSelectedRow="parantSelectedRow"
-        :buyOrSell="BuyOrSell.sell"
-        @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="btnListData"
+               :record="record"
+               @click="openComponent" />
+    </template>
+    <template #username="{text, record }">
+      <span>{{record.userid + " " }}{{text}}</span>
+    </template>
+    <template #fixedprice="{record }">
+      <span>{{record.useorderpricerid }}</span>
+    </template>
+  </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             :parantSelectedRow="parantSelectedRow"
+             :buyOrSell="BuyOrSell.sell"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -70,9 +68,8 @@ export default defineComponent({
         const columnsList = [
             { title: '序号', key: 'index', width: 60 },
             { title: '销售方', key: 'username' },
-            { title: '买量', key: 'orderqty' },
-
-            { title: '买价', key: 'orderprice' },
+            { title: '卖量', key: 'orderqty' },
+            { title: '卖价', key: 'orderprice' },
         ];
         const btnListData: BtnListType[] = [{ lable: '摘牌', code: 'Delisting', className: 'operBtn' }];
         // 获取列表数据

+ 21 - 4
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue

@@ -227,10 +227,26 @@ export default defineComponent({
         const getPrice = () => (isFloat() && isLimit() ? formState.price : props.selectedRow.orderprice);
         // 金额
         const getMoney = () => {
+            let result = 0;
             const temp = getGoodsAgreeunitByGoodsId(props.selectedRow.goodsid);
-            const argeeunit = temp ? temp : 1;
-            const price = getPrice();
-            return Math.round(formState.num * argeeunit * price * 100) / 100;
+            const price = getQuoteDayInfoByCodeFindPrice(props.parantSelectedRow.refgoodscode);
+            if (price && price !== '--') {
+                const argeeunit = temp ? temp : 1;
+                let priceTemp: string | number = price;
+                if (isLimit()) {
+                    priceTemp = formState.price;
+                } else {
+                    if (isFloat()) {
+                        priceTemp = price;
+                    } else {
+                        priceTemp = props.selectedRow.orderprice;
+                    }
+                }
+                result = formState.num * argeeunit * Number(priceTemp);
+                // const price = isFloat() ? getPrice() + props.selectedRow.marketmaxsub : getPrice();
+            }
+
+            // return Math.round(formState.num * argeeunit * price * 100) / 100;
         };
         // 估算价
         const getRatio = () => {
@@ -243,10 +259,11 @@ export default defineComponent({
         };
         // 保证金
         const getMargin = () => {
+            debugger;
             const marginvalue = getReckonMarginValueByTradeMode(TradeMode.DiaoQi);
             let result = 0;
             if (formState.num && marginvalue) {
-                result = (getMoney() + props.selectedRow.marketmaxsub) * formState.num * (marginvalue / 100);
+                // result = getMoney() * formState.num * (marginvalue / 100);
             }
             return result ? result.toFixed(2) : '--';
         };

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

@@ -63,14 +63,13 @@ const columns = [
         width: 60,
     },
     {
-        key: '1th',
-        dataIndex: 'orderprice',
-        title: '卖价',
+        key: '3th',
+        dataIndex: 'username',
+        title: '销售方',
         align: 'center',
         slots: {
-            customRender: 'orderprice',
+            customRender: 'username',
         },
-        width: 120,
     },
     {
         key: '2th',
@@ -83,13 +82,14 @@ const columns = [
         width: 120,
     },
     {
-        key: '3th',
-        dataIndex: 'username',
-        title: '销售方',
+        key: '1th',
+        dataIndex: 'orderprice',
+        title: '卖价',
         align: 'center',
         slots: {
-            customRender: 'username',
+            customRender: 'orderprice',
         },
+        width: 120,
     },
 ];
 

+ 2 - 2
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/index.vue

@@ -338,7 +338,7 @@ export default defineComponent({
         // 切换商品组
         function handleGoodsGroups(value: number) {
             groupsChange(value);
-            formRef.value.validate();
+            // formRef.value.validate();
         }
         const uuid = v4();
         const goodsCode = ref<string>('');
@@ -349,7 +349,7 @@ export default defineComponent({
             goodsCode.value = goodsList.value.find((e) => e.goodsid === id)?.goodscode as string;
             const arr = [{ exchangeCode: 250, goodsCode: goodsCode.value, subState: 0 }];
             addSubscribeQuotation(uuid, arr);
-            formRef.value.validate();
+            // formRef.value.validate();
         }
         // 估算价
         function getPrice() {