瀏覽代碼

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 年之前
父節點
當前提交
6f913de9bb

+ 1 - 0
src/services/go/wrtrade/index.ts

@@ -101,6 +101,7 @@ export function queryWrSpecialMatchOrder(req: QueryWrSpecialMatchOrderReq): Prom
  * 查询仓单成交明细 /WrTrade2/QueryWrTradeDetail
  */
 export function queryWrTradeDetail(req: QueryWrTradeDetailReq): Promise<WrTradeDetail[]> {
+    req.userid = getUsrId();
     return commonSearch_go('/WrTrade2/QueryWrTradeDetail', req).catch((err) => {
         throw new Error(`查询仓单成交明细: ${err}`);
     });

+ 24 - 26
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_designated_deal/index.vue

@@ -1,29 +1,27 @@
 <template>
-    <!-- 指定成交 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 指定成交 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -47,7 +45,7 @@ export default defineComponent({
             const param: QueryWrSpecialMatchOrderReq = {
                 haswr: 0,
             };
-            queryTable(queryWrSpecialMatchOrder, param);
+            queryTable(queryWrTradeDetail, param);
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {

+ 42 - 33
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_pending_order/index.vue

@@ -1,37 +1,35 @@
 <template>
-    <!-- 仓单预售 挂单 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-            <!--  委托状态-->
-            <template #wrtradeorderstatus="{ record }">
-                <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
-            </template>
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 仓单预售 挂单 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="filterBtnList(btnList, record)"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+      <!--  委托状态-->
+      <template #wrtradeorderstatus="{ record }">
+        <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -43,6 +41,7 @@ import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { getWrOrderTypeName, getWrTradeOrderStatusName } from '@/common/constants/enumsName';
+import { BtnList as btnType } from '@/common/components/btnList/interface';
 
 export default defineComponent({
     name: enumOrderComponents.pre_sale_warehouse_receipt_pending_order,
@@ -66,8 +65,18 @@ export default defineComponent({
             tableName: 'table_pcweb_spot_trade_bottom_pre_sale_pending_order',
             recordList: getRecordItemTab(),
         };
+        function filterBtnList(list: btnType[], record: WrOrderDetail) {
+            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
+            const arr = [3, 10];
+            if (!arr.includes(record.wrtradeorderstatus)) {
+                return list.filter((e) => e.code !== ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order);
+            } else {
+                return list;
+            }
+        }
         return {
             ...handleComposeOrderTable<WrOrderDetail>(param),
+            filterBtnList,
             loading,
             tableList,
             getWrTradeOrderStatusName,

+ 34 - 38
src/views/order/spot_warran/components/spot_warrant_pending_order/index.vue

@@ -1,41 +1,35 @@
 <template>
-    <!-- 现货仓单 挂单 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="filterBtnList(btnList, record)"
-                    :record="record"
-                    @click="openComponent"
-                />
-            </template>
-            <!--  委托状态-->
-            <template #wrtradeorderstatus="{ record }">
-                <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
-            </template>
-            <!-- 挂牌类型 -->
-            <template #wrtradetype="{ record }">
-                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 现货仓单 挂单 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template #expandedRowRender="{ record }">
+        <BtnList :btnList="filterBtnList(btnList, record)"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+      <!--  委托状态-->
+      <template #wrtradeorderstatus="{ record }">
+        <a>{{ getWrTradeOrderStatusName(record.wrtradeorderstatus) }}</a>
+      </template>
+      <!-- 挂牌类型 -->
+      <template #wrtradetype="{ record }">
+        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -72,7 +66,9 @@ export default defineComponent({
             recordList: getRecordItemTab(),
         };
         function filterBtnList(list: btnType[], record: WrOrderDetail) {
-            if (record.wrtradeorderstatus === 6) {
+            //委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 1number;
+            const arr = [3, 10];
+            if (!arr.includes(record.wrtradeorderstatus)) {
                 return list.filter((e) => e.code !== ModalEnum.spot_warrant_pending_order_cancel_order);
             } else {
                 return list;