huangbin 4 éve
szülő
commit
80e142ea53

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

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

+ 89 - 80
src/common/components/drawer/index.vue

@@ -1,94 +1,95 @@
 <template>
-  <a-drawer placement="right"
-            :closable="false"
-            :visible="visible"
-            :destroyOnClose="true"
-            class="bottomListed"
-            :height="height">
-    <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
-    <div class="collapse"
-         @click="cancel">
-      <DoubleRightOutlined />
-    </div>
-    <div class="collapseCont">
-      <div class="title">{{ title }}</div>
-      <div class="content highContent">
-        <!-- <Listed></Listed> -->
-        <!-- <Delisting></Delisting> -->
-        <slot></slot>
-        <!-- <Trade></Trade> -->
-      </div>
-    </div>
-
-    <div class="gpDetail"
-         style="display: none">
-      <div class="title">挂牌详情</div>
-      <div class="content">
-        <div class="item">
-          <div class="left">交易账户</div>
-          <div class="right">3237545143</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌方式</div>
-          <div class="right">贸易圈</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌价格</div>
-          <div class="right">
-            <span>1680.00</span>
-            <span class="grey">(可议价)</span>
-          </div>
-        </div>
-        <div class="item">
-          <div class="left">现货仓单</div>
-          <div class="right">335999666555222222</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌数量</div>
-          <div class="right">
-            <span>30吨</span>
-            <span class="grey">整单</span>
-          </div>
-        </div>
-        <div class="item">
-          <div class="left">起摘数量</div>
-          <div class="right">2吨</div>
+    <a-drawer
+        placement="right"
+        :closable="false"
+        :visible="visible"
+        :destroyOnClose="true"
+        class="bottomListed"
+        :height="height"
+    >
+        <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
+        <div class="collapse">
+            <div class="collapse-close" @click="cancel">
+                <DoubleRightOutlined />
+            </div>
+            <slot name="titleLeft"></slot>
         </div>
-        <div class="someItems">1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业、1000
-          江**业、1201 *融、1123 南**业</div>
-        <div class="item">
-          <div class="left">现货仓单</div>
-          <div class="right">335999666555222222</div>
+        <div class="collapseCont">
+            <div class="title">{{ title }}</div>
+            <div class="content highContent">
+                <slot></slot>
+            </div>
         </div>
-        <div class="item">
-          <div class="left">指定朋友</div>
-          <div class="right">1000 江**业、1201 *融、1123 南...</div>
-        </div>
-        <div class="item">
-          <div class="left">挂牌金额</div>
-          <div class="right">50400.00</div>
-        </div>
-        <div class="item">
-          <div class="left">履约保证金</div>
-          <div class="right">5040.00</div>
+
+        <div class="gpDetail" style="display: none">
+            <div class="title">挂牌详情</div>
+            <div class="content">
+                <div class="item">
+                    <div class="left">交易账户</div>
+                    <div class="right">3237545143</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌方式</div>
+                    <div class="right">贸易圈</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌价格</div>
+                    <div class="right">
+                        <span>1680.00</span>
+                        <span class="grey">(可议价)</span>
+                    </div>
+                </div>
+                <div class="item">
+                    <div class="left">现货仓单</div>
+                    <div class="right">335999666555222222</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌数量</div>
+                    <div class="right">
+                        <span>30吨</span>
+                        <span class="grey">整单</span>
+                    </div>
+                </div>
+                <div class="item">
+                    <div class="left">起摘数量</div>
+                    <div class="right">2吨</div>
+                </div>
+                <div class="someItems">
+                    1000 江**业、1201 *融、1123 南**业、1000 江**业、1201 *融、1123 南**业、1000
+                    江**业、1201 *融、1123 南**业
+                </div>
+                <div class="item">
+                    <div class="left">现货仓单</div>
+                    <div class="right">335999666555222222</div>
+                </div>
+                <div class="item">
+                    <div class="left">指定朋友</div>
+                    <div class="right">1000 江**业、1201 *融、1123 南...</div>
+                </div>
+                <div class="item">
+                    <div class="left">挂牌金额</div>
+                    <div class="right">50400.00</div>
+                </div>
+                <div class="item">
+                    <div class="left">履约保证金</div>
+                    <div class="right">5040.00</div>
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-  </a-drawer>
+    </a-drawer>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, PropType } from 'vue';
-import { closeModal, ModalName } from '@/common/setup/modal/index';
-import Listed from '@/views/market/warehouseTrade/components/listed/index.vue';
+import { ModalName } from '@/common/setup/modal/index';
 import Delisting from '@/views/market/warehouseTrade/components/delisting/index.vue';
+import Listed from '@/views/market/warehouseTrade/components/listed/index.vue';
 import Trade from '@/views/market/warehouseTrade/components/trade/index.vue';
-import { _closeModal } from '@/common/setup/modal/modal';
 import { DoubleRightOutlined } from '@ant-design/icons-vue';
+import { defineComponent, PropType } from 'vue';
 
 export default defineComponent({
     name: 'drawer',
-    emits: ['cancel', 'update'],
+    emits: ['cancel', 'update', 'showChart'],
     props: {
         modalName: {
             default: 'drawer',
@@ -402,13 +403,17 @@ export default defineComponent({
     }
 }
 .collapse {
-    width: 52px;
+    width: 60px;
     height: 38px;
     cursor: pointer;
     .position(absolute, 0, auto, auto, 0);
     z-index: 11;
     text-align: center;
     line-height: 38px;
+    .collapse-close {
+        display: inline-block;
+        width: 30px;
+    }
     .anticon {
         color: @m-blue25;
         font-weight: bold;
@@ -442,7 +447,11 @@ export default defineComponent({
                             height: 38px;
                             line-height: 38px;
                             text-align: center;
-                            background: linear-gradient(0deg, @m-blue4, @m-blue5);
+                            background: linear-gradient(
+                                0deg,
+                                @m-blue4,
+                                @m-blue5
+                            );
                             font-size: 16px;
                             color: @m-white10;
                             // border-bottom: 2px solid @m-blue0;

+ 2 - 2
src/services/go/ermcp/order/index.ts

@@ -69,9 +69,9 @@ export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<Qu
  * /Order/QueryTradePosition
  * @param //  交易模式 - 格式:1,2,3
  */
-export function queryTradePosition(radeMode?: string): Promise<QueryTradePositionRsp[]> {
+export function queryTradePosition(tradeMode?: string): Promise<QueryTradePositionRsp[]> {
     const accountID = getAccoutIdList()
-    const param = radeMode ? { accountID, radeMode } : { accountID }
+    const param = tradeMode ? { accountID, tradeMode } : { accountID }
     return commonSearch_go('/Order/QueryTradePosition', param).catch((err) => {
         throw new Error(`仓汇总查询(合约市场): ${err}`);
     });

+ 158 - 140
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -1,142 +1,146 @@
 <template>
-  <!-- 挂牌求购 -->
-  <Drawer :title="isBuy() ? '挂牌求购' : '挂牌卖出' "
-          :placement="'right'"
-          :visible="visible"
-          @cancel="cancel"
-          class="top">
-    <div class="title_right">
-      <span class="tline"></span>
-      <svg class="icon svg-icon"
-           aria-hidden="true">
-        <use xlink:href="#icon-B" />
-      </svg>
-      <span @click="changeDirection">{{isBuy() ? '卖出' : '求购'}}</span>
-    </div>
-    <div class="post_buying">
-      <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="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>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="价格类型"
-                           name>
-                <a-radio-group class="commonRadioGroup"
-                               v-model:value="formState.priceType">
-                  <a-radio :value="2">固定价</a-radio>
-                  <!-- 掉期交易商有固定价和浮动价选择 -->
-                  <!-- 普通交易商只有固定价 -->
-                  <a-radio :value="3"
-                           v-if="!useUserType()">浮动价</a-radio>
-                </a-radio-group>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="!isFloat()">
-              <a-form-item label="挂牌价格"
-                           name="FixedPrice"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                v-model:value="formState.FixedPrice" />
-                <MinusOutlined @click="decreasePrice" />
-                <PlusOutlined @click="increasePrice" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-else>
-              <a-form-item label="点差"
-                           name="PriceMove">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                v-model:value="formState.PriceMove" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="isFloat()">
-              <a-form-item label="估算价">
-                <span class="white">{{getPrice()}}</span>
-              </a-form-item>
-            </a-col>
+    <!-- 挂牌求购 -->
+    <Drawer
+        :title="isBuy() ? '挂牌求购' : '挂牌卖出'"
+        :placement="'right'"
+        :visible="visible"
+        @cancel="cancel"
+        class="top"
+    >
+        <div class="title_right">
+            <span class="tline"></span>
+            <svg class="icon svg-icon" aria-hidden="true">
+                <use xlink:href="#icon-B" />
+            </svg>
+            <span @click="changeDirection">{{ isBuy() ? '卖出' : '求购' }}</span>
+        </div>
+        <template v-slot:titleLeft>
+            <div class="collapse-close" @click="showChartAction">
+                <LineChartOutlined />
+            </div>
+        </template>
+        <div class="post_buying">
+            <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="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>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="价格类型" name>
+                                <a-radio-group
+                                    class="commonRadioGroup"
+                                    v-model:value="formState.priceType"
+                                >
+                                    <a-radio :value="2">固定价</a-radio>
+                                    <!-- 掉期交易商有固定价和浮动价选择 -->
+                                    <!-- 普通交易商只有固定价 -->
+                                    <a-radio :value="3" v-if="!useUserType()">浮动价</a-radio>
+                                </a-radio-group>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" v-if="!isFloat()">
+                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
+                                <a-input-number
+                                    class="commonInput"
+                                    style="width: 260px"
+                                    :min="0"
+                                    v-model:value="formState.FixedPrice"
+                                />
+                                <MinusOutlined @click="decreasePrice" />
+                                <PlusOutlined @click="increasePrice" />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" v-else>
+                            <a-form-item label="点差" name="PriceMove">
+                                <a-input-number
+                                    class="commonInput"
+                                    style="width: 260px"
+                                    v-model:value="formState.PriceMove"
+                                />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" v-if="isFloat()">
+                            <a-form-item label="估算价">
+                                <span class="white">{{ getPrice() }}</span>
+                            </a-form-item>
+                        </a-col>
 
-            <a-col :span="24">
-              <a-form-item label="挂牌数量"
-                           name="OrderQty"
-                           class="inputIconBox">
-                <a-input-number class="commonInput"
-                                style="width: 260px"
-                                :min="0"
-                                :max="getMaxNum()"
-                                v-model:value="formState.OrderQty" />
-                <MinusOutlined @click="decreaseNum" />
-                <PlusOutlined @click="increaseNum" />
-                <span class="input-enumdicname">{{selected.enumdicname}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="mt-10">
-              <a-form-item>
-                <a-slider :min="0"
-                          v-model:value="formState.OrderQty"
-                          :max="getMaxNum()"
-                          class="formSlider" />
-                <div class="unit">
-                  <span>{{getMaxNum() ? selected.minivalue : 0}}</span>
-                  <span>{{getMaxNum()}}{{selected.enumdicname}}</span>
+                        <a-col :span="24">
+                            <a-form-item label="挂牌数量" name="OrderQty" class="inputIconBox">
+                                <a-input-number
+                                    class="commonInput"
+                                    style="width: 260px"
+                                    :min="0"
+                                    :max="getMaxNum()"
+                                    v-model:value="formState.OrderQty"
+                                />
+                                <MinusOutlined @click="decreaseNum" />
+                                <PlusOutlined @click="increaseNum" />
+                                <span class="input-enumdicname">{{ selected.enumdicname }}</span>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" class="mt-10">
+                            <a-form-item>
+                                <a-slider
+                                    :min="0"
+                                    v-model:value="formState.OrderQty"
+                                    :max="getMaxNum()"
+                                    class="formSlider"
+                                />
+                                <div class="unit">
+                                    <span>{{ getMaxNum() ? selected.minivalue : 0 }}</span>
+                                    <span>{{ getMaxNum() }}{{ selected.enumdicname }}</span>
+                                </div>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" class="relative mt20">
+                            <a-form-item :label="'挂牌金额'">
+                                <span class="white ml8">{{ getMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24" v-if="getMargin()">
+                            <a-form-item :label="'履约保证金'">
+                                <span class="white ml8">{{ getMargin() }}</span>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="可用资金">
+                                <span class="white ml8">{{ canUseMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
                 </div>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   class="relative mt20">
-              <a-form-item :label="'挂牌金额'">
-                <span class="white ml8">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24"
-                   v-if="getMargin()">
-              <a-form-item :label="'履约保证金'">
-                <span class="white ml8">{{getMargin()}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="可用资金">
-                <span class="white ml8">{{canUseMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="24" class="fixedBtns">
+                        <a-form-item class="btnCenter">
+                            <a-button
+                                class="listedBtn"
+                                :loading="loading"
+                                :disabled="loading"
+                                @click="submit"
+                            >{{ isBuy() ? '买入' : '卖出' }}</a-button>
+                            <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
         </div>
-        <a-row :gutter="24">
-          <a-col :span="24"
-                 class="fixedBtns">
-            <a-form-item class="btnCenter">
-              <a-button class="listedBtn"
-                        :loading="loading"
-                        :disabled="loading"
-                        @click="submit">{{isBuy() ? '买入' : '卖出'}}</a-button>
-              <a-button class="ml10 cancelBtn"
-                        @click="cancel">取消</a-button>
-            </a-form-item>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-  </Drawer>
+        <div>图表</div>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -169,12 +173,12 @@ import { defineComponent, PropType, ref } from 'vue';
 import { RefGoodsList } from '../../interface';
 import { useUserType } from '../setup';
 import { FormParam } from './interface';
-import { handleForm, isFloat, useBuySellDirection, useNum, usePrice } from './setup';
-
+import { handleForm, isFloat, useBuySellDirection, useNum, usePrice, useChart } from './setup';
+import { DoubleRightOutlined, LineChartOutlined } from '@ant-design/icons-vue';
 export default defineComponent({
     emits: ['cancel', 'update'],
     name: ModalEnum.spot_trade_warehouse_post_buying,
-    components: { Des, Drawer, PlusOutlined, MinusOutlined, SwapOutlined },
+    components: { Des, Drawer, PlusOutlined, MinusOutlined, SwapOutlined, LineChartOutlined },
     props: {
         selectedRow: {
             type: Object as PropType<RefGoodsList>,
@@ -267,6 +271,10 @@ export default defineComponent({
             }
             return result;
         }
+        // 显示 行情图表
+        function showChart() {
+
+        }
         function submit() {
             validateAction<FormParam>(formRef, formState).then((res) => {
                 const { goodsid } = props.selectedRow;
@@ -339,9 +347,11 @@ export default defineComponent({
             accountList,
             ...usePrice(),
             ...useNum(getMaxNum),
+            ...useChart(),
             getPrice,
             loading,
             selected,
+            showChart,
         };
     },
 });
@@ -435,14 +445,22 @@ export default defineComponent({
     text-align: center;
     border: 0;
     &:hover {
-        background: linear-gradient(0deg, @m-blue0-hover 0%, @m-blue2-hover 100%);
+        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;
+        background: linear-gradient(
+            0deg,
+            @m-grey12-hover 0%,
+            @m-grey13-hover 100%
+        ) !important;
         color: @m-white0-hover;
     }
 }

+ 9 - 0
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/setup.ts

@@ -80,4 +80,13 @@ export const useNum = (getMaxNum: Function) => {
         }
     }
     return { increaseNum, decreaseNum };
+}
+
+// 图表
+export const useChart = () => {
+    const showChart = ref<boolean>(false)
+    function showChartAction() {
+        showChart.value = !showChart.value
+    }
+    return { showChart, showChartAction }
 }

+ 1 - 0
src/views/order/swap_the_order/components/swap_commodity_contract_summary/components/setup.ts

@@ -7,6 +7,7 @@ import { QueryTradeHolderDetailRsp } from "@/services/go/order/interface";
 // 收益权=(最新价-持仓价)*持仓数量*合约单位*方向(买[1]:卖[-1])(*汇率)
 // 所有权=(最新价*持仓数量*合约单位(*汇率) - 持仓金额)
 export function useProfit(item: QueryTradeHolderDetailRsp, goodcode: string) {
+    debugger
     // 最新价
     const lastPrice = getQuoteDayInfoByCodeFindPrice(goodcode);
     if (lastPrice && lastPrice !== '--') {

+ 74 - 72
src/views/order/swap_the_order/components/swap_commodity_contract_summary/components/swap_commodity_contract_summary_deal_closed/index.vue

@@ -1,79 +1,81 @@
 <template>
-  <!-- 协议平仓-->
-  <Drawer :title="'协议平仓'"
-          :placement="'right'"
-          class="bottom486"
-          :visible="visible"
-          @cancel="cancel">
-    <div class="listed c_c_s_s">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
-        <div class="formBar">
-          <div class="formtop">
-            <div class="firstTitle">
-              <span>合约:{{selectedRow.goodscode}}/{{selectedRow.goodsname}}</span>
-            </div>
-            <div class="secondLine">
-              <div class="left">持仓单号/方向</div>
-              <div class="middle">数量/价格/金额</div>
-              <div class="right">到期日/盈亏</div>
-            </div>
+    <!-- 协议平仓-->
+    <Drawer
+        :title="'协议平仓'"
+        :placement="'right'"
+        class="bottom486"
+        :visible="visible"
+        @cancel="cancel"
+    >
+        <div class="listed c_c_s_s">
+            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+                <div class="formBar">
+                    <div class="formtop">
+                        <div class="firstTitle">
+                            <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
+                        </div>
+                        <div class="secondLine">
+                            <div class="left">持仓单号/方向</div>
+                            <div class="middle">数量/价格/金额</div>
+                            <div class="right">到期日/盈亏</div>
+                        </div>
 
-              <div class="lineBar">
-                <div class="line1">
-                  <div class="name">{{ selectedRow.tradeid }}
-                  </div>
-                  <div class="date">{{formatTime(selectedRow.expiredate, 'd')}}</div>
+                        <div class="lineBar">
+                            <div class="line1">
+                                <div class="name">{{ selectedRow.tradeid }}</div>
+                                <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+                            </div>
+                            <div class="line2">
+                                <div
+                                    class="left"
+                                >{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
+                                <div class="middle">
+                                    <div>{{ selectedRow.holderqty }}</div>
+                                    <div>{{ selectedRow.holderprice }}</div>
+                                    <div>{{ selectedRow.holderamount }}</div>
+                                </div>
+                                <div class="right red">{{ useProfit(selectedRow, goodscode) }}</div>
+                            </div>
+                        </div>
+                    </div>
                 </div>
-                <div class="line2">
-                  <div class="left">{{selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出'}}</div>
-                  <div class="middle">
-                    <div>{{selectedRow.holderqty}}</div>
-                    <div>{{selectedRow.holderprice}}</div>
-                    <div>{{selectedRow.holderamount}}</div>
-                  </div>
-                  <div class="right red">
-                    {{useProfit(selectedRow, goodscode)}}</div>
+                <div class="fixedBtns">
+                    <a-row :gutter="24">
+                        <a-col :span="24" class="mt12">
+                            <a-form-item
+                                label="协议价"
+                                name="price"
+                                class="inputIconBox mb10 not-copy"
+                            >
+                                <a-input-number
+                                    class="commonInput not-copy"
+                                    v-model:value="formState.price"
+                                    style="width: 200px"
+                                    :min="0"
+                                />
+                                <MinusOutlined @click="decreasePrice" />
+                                <PlusOutlined @click="increasePirce" />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="平仓金额" class="mb10 not-copy">
+                                <span class="white">{{ getMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-form-item class="btnCenter mt10">
+                        <a-button
+                            class="listedBtn"
+                            :loading="loading"
+                            :disabled="loading"
+                            @click="submit"
+                        >提交</a-button>
+                        <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                    </a-form-item>
                 </div>
-              </div>
-          </div>
+            </a-form>
         </div>
-        <div class="fixedBtns">
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt12">
-              <a-form-item label="协议价"
-                           name="price"
-                           class="inputIconBox mb10 not-copy">
-                <a-input-number class="commonInput not-copy"
-                                v-model:value="formState.price"
-                                style="width: 200px"
-                                :min="0" />
-                <MinusOutlined @click="decreasePrice" />
-                <PlusOutlined @click="increasePirce" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="平仓金额"
-                           class="mb10 not-copy ">
-                <span class="white">{{getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-          <a-form-item class="btnCenter mt10">
-            <a-button class="listedBtn"
-                      :loading="loading"
-                      :disabled="loading"
-                      @click="submit">提交</a-button>
-            <a-button class="ml10 cancelBtn"
-                      @click="cancel">取消</a-button>
-          </a-form-item>
-        </div>
-      </a-form>
-    </div>
-  </Drawer>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -114,7 +116,7 @@ export default defineComponent({
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm();
-        const goodscode = findGoodsCode(props.selectedRow.goodsid, props.selectedRow.goodscode, props.swapList);
+        const goodscode = findGoodsCode(props.selectedRow.refgoodsid, props.selectedRow.goodscode, props.swapList);
         const loading = ref<boolean>(false);
 
         // 平仓金额

+ 71 - 70
src/views/order/swap_the_order/components/swap_commodity_contract_summary/components/swap_commodity_contract_summary_order_closed/index.vue

@@ -1,76 +1,77 @@
 <template>
-  <!-- 平仓-->
-  <Drawer :title="'平仓'"
-          :placement="'right'"
-          class="bottom486"
-          :visible="visible"
-          @cancel="cancel">
-    <div class="listed c_c_s_s">
-      <a-form class="inlineForm dialogForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
-        <div class="formBar">
-          <div class="formtop">
-            <div class="firstTitle">
-              <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
-            </div>
-            <div class="secondLine">
-              <div class="left">持仓单号/方向</div>
-              <div class="middle">数量/价格/金额</div>
-              <div class="right">到期日/盈亏</div>
-            </div>
-              <div class="lineBar">
-                <div class="line1">
-                  <div class="name">{{ selectedRow.tradeid }}
-                    <template v-if="selectedRow.holderdays">
-                      <span class="red">{{selectedRow.holderdays}}</span>天后可平
-                    </template>
-                  </div>
-                  <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+    <!-- 平仓-->
+    <Drawer
+        :title="'平仓'"
+        :placement="'right'"
+        class="bottom486"
+        :visible="visible"
+        @cancel="cancel"
+    >
+        <div class="listed c_c_s_s">
+            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
+                <div class="formBar">
+                    <div class="formtop">
+                        <div class="firstTitle">
+                            <span>合约:{{ selectedRow.goodscode }}/{{ selectedRow.goodsname }}</span>
+                        </div>
+                        <div class="secondLine">
+                            <div class="left">持仓单号/方向</div>
+                            <div class="middle">数量/价格/金额</div>
+                            <div class="right">到期日/盈亏</div>
+                        </div>
+                        <div class="lineBar">
+                            <div class="line1">
+                                <div class="name">
+                                    {{ selectedRow.tradeid }}
+                                    <template
+                                        v-if="selectedRow.holderdays"
+                                    >
+                                        <span class="red">{{ selectedRow.holderdays }}</span>天后可平
+                                    </template>
+                                </div>
+                                <div class="date">{{ formatTime(selectedRow.expiredate, 'd') }}</div>
+                            </div>
+                            <div class="line2">
+                                <div
+                                    class="left"
+                                >{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
+                                <div class="middle">
+                                    <div>{{ selectedRow.holderqty }}</div>
+                                    <div>{{ selectedRow.holderprice }}</div>
+                                    <div>{{ selectedRow.holderamount }}</div>
+                                </div>
+                                <div class="right red">{{ useProfit(selectedRow, goodscode) }}</div>
+                            </div>
+                        </div>
+                    </div>
                 </div>
-                <div class="line2">
-                  <div class="left">{{ selectedRow.buyorsell === BuyOrSell.buy ? '买入' : '卖出' }}</div>
-                  <div class="middle">
-                    <div>{{ selectedRow.holderqty }}</div>
-                    <div>{{ selectedRow.holderprice }}</div>
-                    <div>{{ selectedRow.holderamount }}</div>
-                  </div>
-                  <div class="right red">
-                    {{useProfit(selectedRow, goodscode)}}</div>
+                <div class="fixedBtns">
+                    <a-row :gutter="24">
+                        <a-col :span="24" class="mt12">
+                            <a-form-item label="估算价" class="inputIconBox mb10 not-copy">
+                                <!-- 估算价取标的商品行情的最新价 -->
+                                <span class="white">{{ getQuoteDayInfoByCodeFindPrice(goodscode) }}</span>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="24">
+                            <a-form-item label="估算金额" class="mb10 not-copy">
+                                <span class="white">{{ getMoney() }}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-form-item class="btnCenter mt10">
+                        <a-button
+                            class="listedBtn"
+                            :loading="loading"
+                            :disabled="loading"
+                            @click="submit"
+                        >提交</a-button>
+                        <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                    </a-form-item>
                 </div>
-              </div>
-          </div>
+            </a-form>
         </div>
-        <div class="fixedBtns">
-          <a-row :gutter="24">
-            <a-col :span="24"
-                   class="mt12">
-              <a-form-item label="估算价"
-                           class="inputIconBox mb10 not-copy">
-                <!-- 估算价取标的商品行情的最新价 -->
-                <span class="white">{{getQuoteDayInfoByCodeFindPrice(goodscode)}}</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="估算金额"
-                           class="mb10 not-copy">
-                <span class="white">{{ getMoney()}}</span>
-              </a-form-item>
-            </a-col>
-          </a-row>
-          <a-form-item class="btnCenter mt10">
-            <a-button class="listedBtn"
-                      :loading="loading"
-                      :disabled="loading"
-                      @click="submit">提交</a-button>
-            <a-button class="ml10 cancelBtn"
-                      @click="cancel">取消</a-button>
-          </a-form-item>
-        </div>
-      </a-form>
-    </div>
-  </Drawer>
+    </Drawer>
 </template>
 
 <script lang="ts">
@@ -112,7 +113,7 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const goodscode = findGoodsCode(props.selectedRow.goodsid, props.selectedRow.goodscode, props.swapList);
+        const goodscode = findGoodsCode(props.selectedRow.refgoodsid, props.selectedRow.goodscode, props.swapList);
 
         const { visible, cancel } = _closeModal(context);
         const { rules, formState, formRef } = handleForm();

+ 1 - 1
src/views/order/swap_the_order/components/swap_commodity_contract_summary/setup.ts

@@ -89,7 +89,7 @@ export const useDetail = () => {
             { key: 'holderamount', title: '建仓金额' },
             { key: 'marketamount', title: '市值' },
             { key: 'profitloss', title: '浮动盈亏' },
-            { key: 'operate', title: '操作' },
+            { key: 'operate', title: '操作', width: 160 },
         ]
         return useSetColumns(list)
     }