huangbin 4 rokov pred
rodič
commit
f5e5fd075a

+ 54 - 4
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_floating_price/index.vue

@@ -1,16 +1,66 @@
 <template>
-    <!-- 仓单预售 浮动价预售-->
-    <div class="warehouse_pre_sale_floating_price topTableHeight">浮动价预售</div>
+  <!-- 仓单预售 浮动价预售-->
+  <div class="topTableHeight">
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList"></a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="firstBtn"></contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :enumName="name"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineComponent } from '@/common/export/commonTable';
+import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
+import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { queryOrderQuote } from '@/services/go/wrtrade';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { subscribeInfoType } from '@/services/socket/quota/interface';
+import { v4 as uuidv4 } from 'uuid';
+import { addSubscribeQuotation } from '@/services/socket/quota';
+import { onMounted } from 'vue';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_pre_sale_floating_price,
     setup() {
-        return {};
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+        let uuid = uuidv4();
+        // 获取列表数据
+        const queryTableAction = () => {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 2,
+                haswr: 0,
+            };
+        };
+
+        // 表格通用逻辑
+        const param: ComposeTableParam = {
+            queryFn: queryTableAction,
+            menuType: EnumRouterName.warehouse_pre_sale_floating_price,
+            tableName: 'table_pcweb_spot_trade_warehouse_sale_float',
+            tableFilterKey: [],
+            isDetail: false,
+        };
+        return {
+            ...handleComposeTable<WrOrderQuote>(param),
+            name: EnumRouterName.warehouse_pre_sale_floating_price,
+            loading,
+            tableList,
+        };
     },
 });
 </script>

+ 47 - 4
src/views/market/spot_trade/warehouse_pre_sale/warehouse_pre_sale_price/index.vue

@@ -1,18 +1,61 @@
 <template>
   <!-- 仓单预售 一口价预售-->
-  <div class="capacity_pre_sale_price topTableHeight">
-    一口价预售
+  <div class="topTableHeight">
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 444px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList"></a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="firstBtn"></contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :enumName="name"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
   </div>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { defineComponent } from '@/common/export/commonTable';
+import { queryTableList, BtnList, contextMenu, defineAsyncComponent, defineComponent, ModalEnum, ComposeTableParam } from '@/common/export/commonTable';
+import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
+import { queryOrderQuote } from '@/services/go/wrtrade';
+import { handleComposeTable } from '@/views/market/spot_trade/setup';
 
 export default defineComponent({
     name: EnumRouterName.warehouse_pre_sale_price,
     setup() {
-        return {};
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+        // 获取列表数据
+        const queryTableAction = () => {
+            const param: QueryOrderQuoteReq = {
+                wrpricetype: 1,
+                haswr: 0,
+            };
+            queryTable(queryOrderQuote, param);
+        };
+        // 表格通用逻辑
+        const param: ComposeTableParam = {
+            queryFn: queryTableAction,
+            menuType: EnumRouterName.warehouse_pre_sale_price,
+            tableName: 'table_pcweb_spot_trade_warehouse_sale_price',
+            tableFilterKey: [],
+            isDetail: false,
+        };
+        return {
+            ...handleComposeTable<WrOrderQuote>(param),
+            name: EnumRouterName.warehouse_pre_sale_price,
+            loading,
+            tableList,
+        };
     },
 });
 </script>

+ 21 - 23
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_price/index.vue

@@ -1,27 +1,25 @@
 <template>
-    <!-- 仓单预售 一口价挂牌-->
-    <div class="topTableHeight">
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: 'calc(100vh - 444px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        ></a-table>
-        <!-- 右键 -->
-        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="firstBtn"></contextMenu>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :enumName="name"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </div>
+  <!-- 仓单贸易 一口价挂牌-->
+  <div class="topTableHeight">
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 444px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList"></a-table>
+    <!-- 右键 -->
+    <contextMenu :contextMenu="contextMenu"
+                 @cancel="closeContext"
+                 :list="firstBtn"></contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :enumName="name"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">