huangbin 4 年之前
父节点
当前提交
fb2a778cfc

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

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://218.17.158.45:21001/cfg?key=test_118"
+    "apiUrl": "http://192.168.31.136:8080/cfg?key=test_136"
 }

+ 5 - 5
src/services/request/serviceURL.ts

@@ -80,10 +80,10 @@ export const setServiceURL = (config: URL): void => {
     // console.log('URL', config);
     //外网环境(175),外包同事使用
     serviceURL = config;
-    if (process.env.NODE_ENV === 'development') {
-        serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
-        serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
-        serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
-    }
+    // if (process.env.NODE_ENV === 'development') {
+    //     serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
+    //     serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
+    //     serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
+    // }
     console.log(serviceURL);
 };

+ 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;