Browse Source

新增客户资料

huangbin 4 years ago
parent
commit
f40a9386fd

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.114:8080/cfg?key=test_114"
+    "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
 }

+ 1 - 0
src/components/firstMenu/index.vue

@@ -66,6 +66,7 @@ export default defineComponent({
         height: 34px;
         line-height: 34px;
         .ant-menu-item {
+            min-width: 120px;
             height: 34px;
             line-height: 34px;
             background: linear-gradient(0deg, #343d46 0%, #38444f 100%);

+ 1 - 1
src/layout/index.vue

@@ -17,7 +17,7 @@ import { defineComponent, ref } from 'vue';
 
 // 控制下半部分是否显示
 function submitBottomIsShow() {
-    const isShowBottomPart = ref<boolean>(true);
+    const isShowBottomPart = ref<boolean>(false);
     function chooseMenu(value: boolean) {
         isShowBottomPart.value = value;
     }

+ 9 - 3
src/layout/top.vue

@@ -229,8 +229,11 @@ const onSearch = () => {
 };
 // 配置是否显示下半部分
 function setShowBottomPart(code: string): boolean {
-    const unShow = ['outaccount_status'];
-    return !unShow.includes(code);
+    // 不显示下半部分 这里保存的是市场对应的 code
+    const unShow = [
+        'outaccount_status', // 仓单贸易
+    ];
+    return unShow.includes(code);
 }
 // 控制消息弹窗
 function controlNotice() {
@@ -260,7 +263,10 @@ export default defineComponent({
                 selectedKeys.value = [code];
                 openKeys.value = [list[0].code];
                 context.emit('chooseMenu', setShowBottomPart(code));
-                router.push(code);
+                // 处理页面刷新时候 引发路由乱跳的bug
+                if (router.currentRoute.value.fullPath === '/home') {
+                    router.push(code);
+                }
             }
         });
 

+ 27 - 0
src/router/index.ts

@@ -48,6 +48,33 @@ const routes: Array<RouteRecordRaw> = [
                     requireAuth: true
                 },
             },
+            {
+                path: '/custom_info',
+                name: 'custom',
+                component: () => import('@/views/information/custom/index.vue'),
+                meta: {
+                    requireAuth: true
+                },
+                redirect: to => { return { name: 'custom_info_normal' } },
+                children: [
+                    {
+                        path: '/custom_info/normal',
+                        name: 'custom_info_normal',
+                        component: () => import('@/views/information/custom/list/normal-use/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                    {
+                        path: '/custom_info/stop',
+                        name: 'custom_info_stop',
+                        component: () => import('@/views/information/custom/list/stop-use/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                ],
+            },
 
         ],
     },

+ 0 - 2
src/setup/controlModal/index.ts

@@ -4,5 +4,3 @@ import { closeModal, ModalName, openModal } from './controlModal';
 export { closeModal, openModal };
 export type { ModalName };
 
-
-

+ 17 - 9
src/views/error-page/404.vue

@@ -1,16 +1,24 @@
 <template>
-    <div class="404">
-        <h1>404 Not Found.</h1>
-    </div>
+  <div class="error-page">
+    <h1>功能建设中...</h1>
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent } from 'vue';
+import { defineComponent } from 'vue';
 
-    export default defineComponent({
-        name: 'NotFound',
-        components: {},
-    });
+export default defineComponent({
+    name: 'NotFound',
+    components: {},
+});
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.error-page {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+</style>

+ 41 - 0
src/views/information/custom/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <!-- 客户信息 -->
+  <div class="custom">
+    <firstMenu :list="list"
+               :value="'value'"
+               @selectMenu="selectMenu" />
+    <router-view />
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+import firstMenu from '@/components/firstMenu/index.vue';
+import { useRouter } from 'vue-router';
+
+// 处理菜单
+function handleMenu() {
+    const router = useRouter();
+    const list = [
+        { key: 'custom_info_normal', value: '正常' },
+        { key: 'custom_info_stop', value: '停用' },
+    ];
+    function selectMenu(item: any) {
+        router.push({ name: item.key });
+    }
+    return { list, selectMenu };
+}
+
+export default defineComponent({
+    name: 'custom',
+    components: {
+        firstMenu,
+    },
+    setup() {
+        const { list, selectMenu } = handleMenu();
+        return { list, selectMenu };
+    },
+});
+</script>
+
+<style lang="less"></style>;

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

@@ -0,0 +1,28 @@
+<template>
+  <!-- 客户信息: 正常 -->
+  <div class="custom-normal">
+    客户信息: 正常
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+
+import { initData } from '@/setup/methods/index';
+
+export default defineComponent({
+    name: 'custom-normal',
+    components: {},
+    setup() {
+        initData(() => {
+            // 加载数据在这里
+        });
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+.custom-normal {
+}
+</style>;

+ 28 - 0
src/views/information/custom/list/stop-use/index.vue

@@ -0,0 +1,28 @@
+<template>
+  <!-- 客户信息: 停用 -->
+  <div class="custom-stop">
+    客户信息: 停用
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue';
+
+import { initData } from '@/setup/methods/index';
+
+export default defineComponent({
+    name: 'custom-stop',
+    components: {},
+    setup() {
+        initData(() => {
+            // 加载数据在这里
+        });
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+.custom-stop {
+}
+</style>;

+ 1 - 0
src/views/market/forward/index.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 期货市场 -->
   <section class="forward-section">
     <forwardTrade />
     <firstMenu :list="list"

+ 86 - 92
src/views/market/warehouseTrade/components/listed/index.vue

@@ -1,73 +1,70 @@
 <template>
-    <!-- 挂牌 -->
+  <!-- 挂牌 -->
   <div class="listed">
     <div class="condition">
-        <a-button class="conditionBtn">螺纹钢</a-button>
-        <a-button class="conditionBtn">12</a-button>
-        <a-button class="conditionBtn">江铜</a-button>
-        <a-button class="conditionBtn">华南仓库</a-button>
+      <a-button class="conditionBtn">螺纹钢</a-button>
+      <a-button class="conditionBtn">12</a-button>
+      <a-button class="conditionBtn">江铜</a-button>
+      <a-button class="conditionBtn">华南仓库</a-button>
     </div>
     <div class="formBar">
-        <a-form class="inlineForm" :form="form" @submit="handleSearch">
-            <a-row :gutter="24">
-                <a-col
-                :span="12"
-                >
-                    <a-form-item label="挂牌方式">
-                        <a-select class="inlineFormSelect"  default-value="1" style="width: 140px">
-                            <a-select-option value="1">
-                                一口价
-                            </a-select-option>
-                            <a-select-option value="2">
-                                一口价2
-                            </a-select-option>
-                        </a-select>
-                    </a-form-item>
-                </a-col>
-                <a-col
-                :span="12"
-                >
-                    <a-form-item label="挂牌价">
-                        <a-input class="commonInput" style="width: 140px"/>
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col
-                :span="12"
-                >
-                    <a-form-item label="挂牌数量">
-                        <a-input class="commonInput" suffix="吨" style="width: 140px"/>
-                    </a-form-item>
-                </a-col>
-                <a-col
-                :span="12"
-                >
-                    <a-form-item label="起摘数量">
-                        <a-input class="commonInput" suffix="吨" style="width: 140px" />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col
-                :span="24"
-                >
-                    <a-form-item>
-                        <a-progress :percent="30" />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-            <a-row :gutter="24">
-                <a-col
-                :span="24"
-                >
-                    <a-form-item>
-                        <a-button>挂牌</a-button>
-                        <a-button>取消</a-button>
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="挂牌方式">
+              <a-select class="inlineFormSelect"
+                        default-value="1"
+                        style="width: 140px">
+                <a-select-option value="1">
+                  一口价
+                </a-select-option>
+                <a-select-option value="2">
+                  一口价2
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="挂牌价">
+              <a-input class="commonInput"
+                       style="width: 140px" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="挂牌数量">
+              <a-input class="commonInput"
+                       suffix="吨"
+                       style="width: 140px" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="起摘数量">
+              <a-input class="commonInput"
+                       suffix="吨"
+                       style="width: 140px" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item>
+              <a-progress :percent="30" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-item>
+              <a-button>挂牌</a-button>
+              <a-button>取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
     </div>
   </div>
 </template>
@@ -79,7 +76,7 @@ export default defineComponent({
     components: {},
     setup() {
         const form = {
-            type: '1'
+            type: '1',
         };
         return {
             form,
@@ -108,15 +105,15 @@ export default defineComponent({
             height: 28px;
             line-height: 28px;
             background: @m-black7;
-           .rounded-corners(3px);
-           font-size: 14px;
-           color: @m-blue0;
-           &:hover {
-               background: rgba(@m-black7, .8);
-               color: rgba(@m-blue0, .8);
-           }
+            .rounded-corners(3px);
+            font-size: 14px;
+            color: @m-blue0;
+            &:hover {
+                background: rgba(@m-black7, 0.8);
+                color: rgba(@m-blue0, 0.8);
+            }
         }
-        .conditionBtn+.conditionBtn {
+        .conditionBtn + .conditionBtn {
             margin-left: 10px;
         }
     }
@@ -126,7 +123,7 @@ export default defineComponent({
         padding: 28px 16px 7px;
     }
 }
-::v-deep.ant-form.inlineForm {
+::deep.ant-form.inlineForm {
     .ant-row.ant-form-item {
         margin-bottom: 21px;
         .ant-form-item-label {
@@ -136,7 +133,7 @@ export default defineComponent({
             label {
                 color: @m-grey1;
                 &::after {
-                    content: ''
+                    content: '';
                 }
             }
         }
@@ -144,52 +141,49 @@ export default defineComponent({
             .ant-form-item-control {
                 line-height: 30px;
             }
-
         }
     }
 }
-::v-deep.ant-select-single {
+::deep.ant-select-single {
     .ant-select-selector {
         height: 30px;
         padding: 0 8px;
-        background: #15202B;
-        border: 1px solid #0C95FF;
+        background: #15202b;
+        border: 1px solid #0c95ff;
         border-radius: 3px;
-        color: #E5E5E5;
+        color: #e5e5e5;
     }
     .ant-select-arrow {
         right: 8px;
-        color: #3A87F7;
+        color: #3a87f7;
     }
 }
-::v-deep.ant-select-dropdown {
-    background:  #15202B;
-    color: #E5E5E5;
+::deep.ant-select-dropdown {
+    background: #15202b;
+    color: #e5e5e5;
     .ant-select-dropdown-content {
         .rc-virtual-list {
             .rc-virtual-list-holder {
                 .rc-virtual-list-holder-inner {
                     .ant-select-item {
-
                     }
                     .ant-select-item-option-selected {
-
                     }
                 }
             }
         }
     }
 }
-::v-deep.commonInput {
-    background: #15202B;
-    border: 1px solid #2B3F52;
+::deep.commonInput {
+    background: #15202b;
+    border: 1px solid #2b3f52;
     border-radius: 3px;
     .ant-input {
-        color: #7A8A94;
+        color: #7a8a94;
         background: transparent;
     }
     .ant-input-suffix {
-        color: #7A8A94;
+        color: #7a8a94;
     }
 }
 </style>;