marymelisa 4 лет назад
Родитель
Сommit
4382bb97d2

+ 15 - 1
src/common/setup/table/button.ts

@@ -110,6 +110,7 @@ export function _handleBtnList_(list: OperationTabMenu | undefined, hasDetail: b
     if (result.value.length === 0) {
     if (result.value.length === 0) {
         result.value = [[], []]
         result.value = [[], []]
     }
     }
+    console.log('按钮列表数据', result);
 
 
     return result
     return result
 }
 }
@@ -173,6 +174,19 @@ export function _getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean):
 
 
 export function getBtnList_(menuType: EnumRouterName, hasDetail: boolean) {
 export function getBtnList_(menuType: EnumRouterName, hasDetail: boolean) {
     const data = getThirdMenuData()
     const data = getThirdMenuData()
-    const list = data.find((e) => e.code === menuType);
+    let list: OperationTabMenu | undefined = undefined
+    // 这里处理有两层路由菜单
+    data.map(el => {
+        if (el.code === menuType) {
+            list = el
+            return;
+        }
+        el.children.map(e => {
+            if (e.code === menuType) {
+                list = e
+                return;
+            }
+        })
+    })
     return _handleBtnList_(list, hasDetail)
     return _handleBtnList_(list, hasDetail)
 }
 }

+ 35 - 0
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -0,0 +1,35 @@
+<template>
+  <!-- 买卖大厅 -->
+  <div class="buy-sell-market">买卖大厅
+    <button @click="cancel">关闭</button>
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ModalEnum } from '@/common/export/commonTable';
+import { _closeModal } from '@/common/setup/modal/modal';
+
+export default defineComponent({
+    emits: ['cancel'],
+    name: ModalEnum.warehouse_receipt_trade_price_delisting,
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        return {
+            cancel,
+            visible,
+        };
+    },
+});
+</script>
+<style lang="less">
+.buy-sell-market {
+    position: absolute;
+    z-index: 99;
+    top: 0;
+    height: 100%;
+    width: 100%;
+    bottom: 30px;
+    background: #fff;
+    left: 0;
+}
+</style>

+ 57 - 0
src/views/market/spot_trade/components/detail/index.vue

@@ -0,0 +1,57 @@
+<template>
+  <!-- 详情-->
+  <a-modal class="add-custom custom-detail"
+           title="详情"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                @click="cancel">关闭</a-button>
+    </template>
+    详情
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { Des } from '@/common/components/commonDes';
+import { QhjAgreementConfig } from '@/services/go/ermcp/qhj/interface';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+
+export default defineComponent({
+    emits: ['cancel'],
+    name: ModalEnum.detail,
+    components: { Des },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QhjAgreementConfig>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        return {
+            cancel,
+            visible,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+    .upload {
+        .look {
+            margin-left: 0;
+        }
+    }
+}
+</style>;

+ 49 - 0
src/views/market/spot_trade/components/post_buying/index.vue

@@ -0,0 +1,49 @@
+<style lang="less">
+</style>
+<template>
+  <!-- 发布求购 -->
+  <a-modal class="add-custom custom-detail"
+           title="发布求购"
+           centered
+           v-model:visible="visible"
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                @click="cancel">关闭</a-button>
+    </template>
+    发布求购
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { Des } from '@/common/components/commonDes';
+import { QhjAgreementConfig } from '@/services/go/ermcp/qhj/interface';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { ModalEnum } from '@/common/constants/modalNameEnum';
+
+export default defineComponent({
+    emits: ['cancel'],
+    name: ModalEnum.warehouse_receipt_trade_price_post_buying,
+    components: { Des },
+    props: {
+        selectedRow: {
+            type: Object as PropType<QhjAgreementConfig>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        return {
+            cancel,
+            visible,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 1 - 0
src/views/market/spot_trade/warehouse_receipt_trade/index.vue

@@ -26,6 +26,7 @@ export default defineComponent({
 </script>
 </script>
 <style lang="less">
 <style lang="less">
 .warehouse_receipt_trade {
 .warehouse_receipt_trade {
+    position: relative;
     height: calc(100% - 40px);
     height: calc(100% - 40px);
 }
 }
 </style>
 </style>

+ 29 - 1
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -1,4 +1,5 @@
 <template>
 <template>
+<<<<<<< HEAD
     <!-- 仓单贸易 浮动价挂牌-->
     <!-- 仓单贸易 浮动价挂牌-->
     <div class="warehouse_receipt_trade_floating_price topTableHeight">
     <div class="warehouse_receipt_trade_floating_price topTableHeight">
         <a-table
         <a-table
@@ -15,6 +16,30 @@
         <!-- 右键 -->
         <!-- 右键 -->
         <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="secondBtn"></contextMenu>
         <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="secondBtn"></contextMenu>
     </div>
     </div>
+=======
+  <!-- 仓单贸易 浮动价挂牌-->
+  <div class="warehouse_receipt_trade_floating_price">
+    <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"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </div>
+>>>>>>> 1dfb44957fac2bbd7eb2be1010fc4e0db8651b33
 </template>
 </template>
 
 
 <script lang="ts">
 <script lang="ts">
@@ -28,6 +53,9 @@ export default defineComponent({
     name: EnumRouterName.warehouse_receipt_trade_floating_price,
     name: EnumRouterName.warehouse_receipt_trade_floating_price,
     components: {
     components: {
         contextMenu,
         contextMenu,
+        [ModalEnum.warehouse_receipt_trade_floating_price_detail]: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+        [ModalEnum.warehouse_receipt_trade_floating_price_post_buying]: defineAsyncComponent(() => import('../../components/post_buying/index.vue')),
+        [ModalEnum.warehouse_receipt_trade_floating_price_delisting]: defineAsyncComponent(() => import('../../components/buy-sell-market/index.vue')),
     },
     },
     setup() {
     setup() {
         // 表格列表数据
         // 表格列表数据
@@ -47,7 +75,7 @@ export default defineComponent({
             menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
             menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
             tableName: 'table_pcweb_agreement',
             tableName: 'table_pcweb_agreement',
             tableFilterKey: [],
             tableFilterKey: [],
-            isDetail: true,
+            isDetail: false,
         };
         };
         return {
         return {
             ...handleComposeTable<WrOrderQuote>(param),
             ...handleComposeTable<WrOrderQuote>(param),