huangbin преди 4 години
родител
ревизия
7a35d0d9e8

+ 2 - 2
src/common/setup/table/tableQuote.ts

@@ -150,13 +150,13 @@ export function quoteChange(record: QueryQuoteDayRsp, decimalplace = 2) {
     return result
 }
 
-// 幅度(最新价 - 昨结价) / 100 %
+// 幅度(最新价 - 昨结价) / 昨结价) *  100 %
 export function quoteAmplitude(record: QueryQuoteDayRsp, decimalplace = 2) {
     const result = quoteChange(record, decimalplace)
     return result === '--' ? '--' : (+result / record.presettle * 100).toFixed(decimalplace) + '%'
 }
 
-// (最高价 - 最低价 ) / 最新价  * 100 %
+// 振幅 (最高价 - 最低价 ) / 最新价  * 100 %
 export function quoteAmplituOfVibration(record: QueryQuoteDayRsp, decimalplace = 2) {
     const { highest, lowest, last } = record
     let result = '--'

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

@@ -1,95 +1,91 @@
 <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 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', 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 green">
+              <div class="numBlock ml15">
+                <div class="first">卖价</div>
+                <div class="last"
+                     :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)">
+                  {{selectedRow.ask}}</div>
+              </div>
+              <div class="numBlock">
+                <div class="first">卖量</div>
+                <div class="last">{{selectedRow.askvolume}}</div>
+              </div>
             </div>
-            <div class="inlineBar">
-                <div class="valNums bdf1 ml10">
-                    <!-- 最新价 -->
-                    <div
-                        :class="['firstNum', 'start', 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)"
-                        >{{quoteAmplituOfVibration(selectedRow, selectedRow.decimalplace)}}</div>
-                    </div>
-                </div>
-                <div class="priceBar ml20">
-                    <div class="inlineBar start">
-                        <div class="greenBar green">
-                            <div class="numBlock ml15">
-                                <div class="first">卖价</div>
-                                <div
-                                    class="last"
-                                    :class="handleQuotePriceColor(selectedRow.ask, selectedRow.presettle)"
-                                >{{selectedRow.ask}}</div>
-                            </div>
-                            <div class="numBlock">
-                                <div class="first">卖量</div>
-                                <div class="last">{{selectedRow.askvolume}}</div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="inlineBar start">
-                        <div class="redBar red1">
-                            <div class="numBlock">
-                                <div class="first">买价</div>
-                                <div
-                                    class="last"
-                                    :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)"
-                                >{{selectedRow.bid}}</div>
-                            </div>
-                            <div class="numBlock">
-                                <div class="first">买量</div>
-                                <div class="last">{{selectedRow.bidvolume}}</div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <BtnList :btnList="btnListData" :record="selectedRow" @click="openComponent" />
+          </div>
+          <div class="inlineBar start">
+            <div class="redBar red1">
+              <div class="numBlock">
+                <div class="first">买价</div>
+                <div class="last"
+                     :class="handleQuotePriceColor(selectedRow.bid, selectedRow.presettle)">
+                  {{selectedRow.bid}}</div>
+              </div>
+              <div class="numBlock">
+                <div class="first">买量</div>
+                <div class="last">{{selectedRow.bidvolume}}</div>
+              </div>
             </div>
+          </div>
         </div>
-        <!-- 交易图表 -->
-        <Chart
-            v-if="showComponentsId === ComponentType.chart"
-            @update="changeComponent"
-            :deliverGoods="deliverGoods"
-        />
-        <!-- 买卖大厅内容 -->
-        <a-row class="buySellHall" v-if="showComponentsId === ComponentType.marketContent">
-            <a-col :span="12">
-                <Sell ref="sellRef" :parantSelectedRow="deliverGoods" />
-            </a-col>
-            <a-col :span="12">
-                <Buy ref="buyRef" :parantSelectedRow="deliverGoods" />
-            </a-col>
-        </a-row>
-        <!-- 成交明细 -->
-        <StockExchange
-            :deliverGoods="deliverGoods"
-            v-if="showComponentsId === ComponentType.tradeDetail"
-        />
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            :deliverGoods="deliverGoods"
-            @cancel="closeComponent"
-        ></component>
+        <BtnList :btnList="btnListData"
+                 :record="selectedRow"
+                 @click="openComponent" />
+      </div>
     </div>
+    <!-- 交易图表 -->
+    <Chart v-if="showComponentsId === ComponentType.chart"
+           @update="changeComponent"
+           :deliverGoods="deliverGoods" />
+    <!-- 买卖大厅内容 -->
+    <a-row class="buySellHall"
+           v-if="showComponentsId === ComponentType.marketContent">
+      <a-col :span="12">
+        <Sell ref="sellRef"
+              :parantSelectedRow="deliverGoods" />
+      </a-col>
+      <a-col :span="12">
+        <Buy ref="buyRef"
+             :parantSelectedRow="deliverGoods" />
+      </a-col>
+    </a-row>
+    <!-- 成交明细 -->
+    <StockExchange :deliverGoods="deliverGoods"
+                   v-if="showComponentsId === ComponentType.tradeDetail" />
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               :deliverGoods="deliverGoods"
+               @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">

+ 1 - 1
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_basis_difference/index.vue

@@ -20,7 +20,7 @@
       </template>
       <!-- 幅度 -->
       <template #amplitude="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
       </template>
       <!-- 振幅 -->
       <template #vibration="{ record }">

+ 1 - 1
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_listing_transfer/index.vue

@@ -20,7 +20,7 @@
       </template>
       <!-- 幅度 -->
       <template #amplitude="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
       </template>
       <!-- 振幅 -->
       <template #vibration="{ record }">

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

@@ -35,7 +35,7 @@
       </template>
       <!-- 幅度 -->
       <template #amplitude="{ record }">
-        <span>{{quoteAmplituOfVibration(record, record.decimalplace)}}</span>
+        <span>{{quoteAmplitude(record, record.decimalplace)}}</span>
       </template>
       <!-- 振幅 -->
       <template #vibration="{ record }">

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

@@ -23,7 +23,7 @@
             <!-- 涨跌幅 -->
             <div class="ml20"
                  :class="handleQuotePriceColor(selectedRow.last, selectedRow.presettle)">
-              {{ quoteAmplituOfVibration(selectedRow, selectedRow.decimalplace) }}</div>
+              {{ quoteAmplitude(selectedRow, selectedRow.decimalplace) }}</div>
           </div>
         </div>
         <div class="priceBar ml20">

+ 6 - 6
src/views/order/commodity_contract/components/commodity_contract_commission/components/cancel/index.vue

@@ -38,13 +38,13 @@ export default defineComponent({
 
         function submit() {
             const param = {
-                ClientSerialNo: uuidv4(), // string 客户端流水号
-                ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
-                ClientType: 4, // uint32 终端类型
-                OperateType: 5, // 操作类型
-                OldOrderId: props.selectedRow.orderid,
+                // ClientSerialNo: uuidv4(), // string 客户端流水号
+                // ClientOrderTime: moment().format('YYYY-MM-DD HH:mm:ss'), // string 客户端委托时间
+                // ClientType: 4, // uint32 终端类型
+                // OperateType: 5, // 操作类型
+                OldOrderId: Long.fromString(props.selectedRow.orderid),
                 AccountID: getInTaAccount(), // uint64 资金账号
-                OrderSrc: 1, // uint32 委托来源
+                // OrderSrc: 1, // uint32 委托来源
                 OperatorID: Number(geLoginID_number()), // uint64 操作员账号ID
                 MarketID: props.selectedRow.marketid,
                 GoodsID: props.selectedRow.goodsid,