huangbin 4 gadi atpakaļ
vecāks
revīzija
6fbd76e2f1

+ 19 - 13
src/layout/top.vue

@@ -160,8 +160,17 @@ const handleMenu = () => {
             openKeys.value = preOpenKeys.value;
         }
     }
-
+    // 配置是否显示下半部分
+    function setShowBottomPart(code: string): boolean {
+        // 显示下半部分 这里保存的是市场对应的 code
+        const show = [
+            'outaccount_status', // 仓单贸易
+        ];
+        return show.includes(code);
+    }
     function menuClick(value: any) {
+        console.log('菜单: ', value);
+        setShowBottomPart(value.key);
         router.push({ name: value.key });
     }
     // 一级菜单图标
@@ -189,7 +198,7 @@ const handleMenu = () => {
         }
         return '#' + result;
     }
-    return { collapsed, selectedKeys, menuList, openKeys, collapse, menuClick, fontIcon };
+    return { collapsed, selectedKeys, menuList, openKeys, collapse, menuClick, setShowBottomPart, fontIcon };
 };
 
 function testAction() {
@@ -227,14 +236,7 @@ const onSearch = () => {
     }
     return { search };
 };
-// 配置是否显示下半部分
-function setShowBottomPart(code: string): boolean {
-    // 不显示下半部分 这里保存的是市场对应的 code
-    const unShow = [
-        'outaccount_status', // 仓单贸易
-    ];
-    return unShow.includes(code);
-}
+
 // 控制消息弹窗
 function controlNotice() {
     const { openAction } = openModal('notice');
@@ -250,7 +252,7 @@ export default defineComponent({
         Drawer,
     },
     setup(props, context) {
-        const { collapsed, selectedKeys, openKeys, menuList, collapse, menuClick, fontIcon } = handleMenu();
+        const { collapsed, selectedKeys, openKeys, menuList, collapse, menuClick, setShowBottomPart, fontIcon } = handleMenu();
         const router = useRouter();
         // 控制消息弹窗
         const { openNotice } = controlNotice();
@@ -272,8 +274,12 @@ export default defineComponent({
                     }
                 }
                 const code = list[firstIndex].children[secondeIndex].code;
-                selectedKeys.value = [code];
-                openKeys.value = [list[firstIndex].code];
+                selectedKeys.value.length = 0;
+                selectedKeys.value.push(code);
+                openKeys.value.length = 0;
+                openKeys.value.push(list[firstIndex].code);
+                // selectedKeys.value = [code];
+                // openKeys.value = [list[firstIndex].code];
                 context.emit('chooseMenu', setShowBottomPart(code));
                 // 处理页面刷新时候 引发路由乱跳的bug
                 if (router.currentRoute.value.fullPath === '/home') {

+ 17 - 9
src/router/index.ts

@@ -41,14 +41,6 @@ const routes: Array<RouteRecordRaw> = [
                 component: () => import('@/views/market/warehouseTrade/index.vue'),
             },
             {
-                path: '/outaccount_status',
-                name: 'accountStatus',
-                component: () => import('@/views/account/accountStatus.vue'),
-                meta: {
-                    requireAuth: true
-                },
-            },
-            {
                 path: 'custom_info',
                 name: 'custom_info',
                 component: () => import('@/views/information/custom/index.vue'),
@@ -101,7 +93,23 @@ const routes: Array<RouteRecordRaw> = [
                         },
                     },
                 ],
-            }
+            },
+            {
+                path: '/outaccount_status',
+                name: 'outaccount_status',
+                component: () => import('@/views/search/outaccount_status/index.vue'),
+                meta: {
+                    requireAuth: true
+                },
+            },
+            {
+                path: '/inventory',
+                name: 'inventory',
+                component: () => import('@/views/search/inventory/index.vue'),
+                meta: {
+                    requireAuth: true
+                },
+            },
         ],
     },
     {

+ 42 - 0
src/views/information/custom/compoments/addCustom/index.vue

@@ -0,0 +1,42 @@
+<template>
+  <!-- 新增客户资料 -->
+  <a-modal class="add-custom"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px"
+           :footer="null"
+           @ok="handleOk">
+    新增客户资料
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/setup/controlModal/index';
+import NoticeContent from './components/noticeContent.vue';
+import { initData } from '@/setup/methods/index';
+import { queryNotice } from '@/goServiceAPI/commonService/index';
+import { queryNoticeRsp } from '@/goServiceAPI/commonService/interface';
+
+export default defineComponent({
+    name: 'add-custom',
+    components: {
+        NoticeContent,
+    },
+    setup() {
+        const { visible, cancel, handleOk } = closeModal('notice');
+
+        initData(() => {});
+        return {
+            visible,
+            cancel,
+            handleOk,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style>;

+ 5 - 5
src/views/information/custom/list/normal-use/index.vue

@@ -2,12 +2,12 @@
   <!-- 客户信息: 正常 -->
   <div class="custom-normal">
     客户信息: 正常
-    <!-- <div class="table-operations">
-      <a-button @click="setAgeSort">Sort age</a-button>
-      <a-button @click="clearFilters">Clear filters</a-button>
-      <a-button @click="clearAll">Clear filters and sorters</a-button>
+    <div class="table-operations">
+      <a-button>查询</a-button>
+      <a-button>重置</a-button>
+      <a-button>新增</a-button>
     </div>
-    <a-table :columns="columns"
+    <!-- <a-table :columns="columns"
              :data-source="data"
              @change="handleChange" /> -->
   </div>

+ 23 - 0
src/views/search/inventory/index.vue

@@ -0,0 +1,23 @@
+<template>
+  <!-- 库存查询 -->
+  <div class="inventory">
+    "库存查询"
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+
+export default defineComponent({
+    name: 'inventory',
+    components: {},
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+.inventory {
+}
+</style>;

+ 0 - 0
src/views/account/accountStatus.vue → src/views/search/outaccount_status/index.vue