huangbin 4 yıl önce
ebeveyn
işleme
ece3282661

+ 26 - 2
src/common/setup/order/orderData.ts

@@ -4,10 +4,12 @@ import APP from '@/services';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 import { ref } from 'vue';
 
+
+// 单据菜单数据
+const orderList = ref<OperationTabMenu[]>([])
+
 // 处理页面下半部分数据
 export function handleOrderData() {
-    // 单据菜单数据
-    const orderList = ref<OperationTabMenu[]>([])
     const isBottom = ref<boolean>(false)
     const componentId = ref<enumOrderComponents>()
     initData(() => {
@@ -24,4 +26,26 @@ export function handleOrderData() {
     });
 
     return { isBottom, orderList, componentId }
+}
+
+// 根据 code 获取单据对应子菜单配置数据
+export function handleOrderDetailList(coode: enumOrderComponents) {
+    // 选中的组件,默认第一个
+    const componentId = ref<enumOrderComponents>()
+    const tabList = ref<OperationTabMenu[]>([])
+    // 过滤,获取当前tab页配置数据
+    function filerAction() {
+        const temp = orderList.value.find(e => e.code === coode)
+        if (temp) {
+            tabList.value = temp.children
+            if (temp.children.length) {
+                componentId.value = temp.children[0].code as enumOrderComponents
+            }
+        }
+    }
+    function changeTab(index: number, item: OperationTabMenu) {
+        componentId.value = item.code as enumOrderComponents
+    }
+    filerAction()
+    return { tabList, componentId, changeTab }
 }

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_deal/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 成交 -->
+  <section class="spot_warrant_deal">
+    成交
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_deal,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_designated_deal/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 指定成交 -->
+  <section class="spot_warrant_designated_deal">
+    指定成交
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_designated_deal,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_in_and_out_warehouse/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 出入库 -->
+  <section class="spot_warrant_in_and_out_warehouse">
+    出入库
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_in_and_out_warehouse,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_inventory_summary/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 库存汇总 -->
+  <section class="spot_warrant_inventory_summary">
+    库存汇总
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_inventory_summary,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_pending_order/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 挂单 -->
+  <section class="spot_warrant_pending_order">
+    挂单
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_pending_order,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_spot_details/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 现货明细 -->
+  <section class="spot_warrant_spot_details">
+    现货明细
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_spot_details,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 0
src/views/business/order/spot_warran/components/spot_warrant_spot_summary/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <!-- 现货汇总 -->
+  <section class="spot_warrant_spot_summary">
+    现货汇总
+  </section>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+export default defineComponent({
+    name: enumOrderComponents.spot_warrant_spot_summary,
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+</style>;

+ 21 - 4
src/views/business/order/spot_warran/index.vue

@@ -1,18 +1,35 @@
 <template>
   <!-- 现货仓单 -->
   <section class="spot_warran">
-    现货仓单
+    <component :is="componentId"
+               v-if="componentId">
+    </component>
+    <thirdMenu :list="tabList"
+               @selectMenu="changeTab"
+               :value="'title'"></thirdMenu>
   </section>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { defineAsyncComponent, defineComponent, ref } from 'vue';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import thirdMenu from '@/common/components/thirdMenu/index.vue';
+import { handleOrderDetailList } from '@/common/setup/order/orderData';
+
 export default defineComponent({
     name: enumOrderComponents.spot_warrant,
-    components: {},
+    components: {
+        thirdMenu,
+        [enumOrderComponents.spot_warrant_deal]: defineAsyncComponent(() => import('./components/spot_warrant_deal/index.vue')),
+        [enumOrderComponents.spot_warrant_designated_deal]: defineAsyncComponent(() => import('./components/spot_warrant_designated_deal/index.vue')),
+        [enumOrderComponents.spot_warrant_in_and_out_warehouse]: defineAsyncComponent(() => import('./components/spot_warrant_in_and_out_warehouse/index.vue')),
+        [enumOrderComponents.spot_warrant_inventory_summary]: defineAsyncComponent(() => import('./components/spot_warrant_inventory_summary/index.vue')),
+        [enumOrderComponents.spot_warrant_pending_order]: defineAsyncComponent(() => import('./components/spot_warrant_pending_order/index.vue')),
+        [enumOrderComponents.spot_warrant_spot_summary]: defineAsyncComponent(() => import('./components/spot_warrant_spot_summary/index.vue')),
+        [enumOrderComponents.spot_warrant_spot_details]: defineAsyncComponent(() => import('./components/spot_warrant_spot_details/index.vue')),
+    },
     setup() {
-        return {};
+        return { ...handleOrderDetailList(enumOrderComponents.spot_warrant) };
     },
 });
 </script>