huangbin před 4 roky
rodič
revize
1dfb44957f

+ 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) {
         result.value = [[], []]
     }
+    console.log('按钮列表数据', result);
 
     return result
 }
@@ -173,6 +174,19 @@ export function _getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean):
 
 export function getBtnList_(menuType: EnumRouterName, hasDetail: boolean) {
     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)
 }

+ 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>
 <style lang="less">
 .warehouse_receipt_trade {
+    position: relative;
     height: calc(100% - 40px);
 }
 </style>

+ 9 - 2
src/views/market/spot_trade/warehouse_receipt_trade/warehouse_receipt_trade_floating_price/index.vue

@@ -14,8 +14,12 @@
     <!-- 右键 -->
     <contextMenu :contextMenu="contextMenu"
                  @cancel="closeContext"
-                 :list="secondBtn">
+                 :list="firstBtn">
     </contextMenu>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
   </div>
 </template>
 
@@ -30,6 +34,9 @@ export default defineComponent({
     name: EnumRouterName.warehouse_receipt_trade_floating_price,
     components: {
         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() {
         // 表格列表数据
@@ -49,7 +56,7 @@ export default defineComponent({
             menuType: EnumRouterName.warehouse_receipt_trade_floating_price,
             tableName: 'table_pcweb_agreement',
             tableFilterKey: [],
-            isDetail: true,
+            isDetail: false,
         };
         return {
             ...handleComposeTable<WrOrderQuote>(param),