huangbin 4 år sedan
förälder
incheckning
0d261228fb

+ 37 - 3
src/router/index.ts

@@ -528,26 +528,60 @@ const routes: Array<RouteRecordRaw> = [
             {
                 path: '/finance_report',
                 name: 'finance_report',
-                component: () => import('@/views/report/finance-report/index.vue'),
+                component: Main,
                 meta: {
                     requireAuth: true,
                 },
+                redirect: { name: 'finance_report_finance' },
+                children: [
+                    {
+                        path: '/finance_report/finance',
+                        name: 'finance_report_finance',
+                        component: () => import('@/views/report/finance-report/list/finance_report_finance/index.vue'),
+                        meta: {
+                            requireAuth: true,
+                        },
+                    },
+                ]
             },
             {
                 path: '/inventory_report',
                 name: 'inventory_report',
-                component: () => import('@/views/report/inventory-report/index.vue'),
+                component: Main,
                 meta: {
                     requireAuth: true,
                 },
+                redirect: { name: 'inventory_report_inventory' },
+                children: [
+                    {
+                        path: '/inventory_report/inventory',
+                        name: 'inventory_report_inventory',
+                        component: () => import('@/views/report/inventory-report/list/inventory_report_inventory/index.vue'),
+                        meta: {
+                            requireAuth: true,
+                        },
+                    },
+                ]
             },
+
             {
                 path: '/spot_report',
                 name: 'spot_report',
-                component: () => import('@/views/report/spot-report/index.vue'),
+                component: Main,
                 meta: {
                     requireAuth: true,
                 },
+                redirect: { name: 'spot_report_spot' },
+                children: [
+                    {
+                        path: '/spot_report/spot',
+                        name: 'spot_report_spot',
+                        component: () => import('@/views/report/spot-report/list/spot_report/index.vue'),
+                        meta: {
+                            requireAuth: true,
+                        },
+                    },
+                ]
             },
         ],
     },

+ 0 - 23
src/views/report/finance-report/index.vue

@@ -1,23 +0,0 @@
-<template>
-  <!-- 财务报表 -->
-  <div class="finance-report">
-    财务报表
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'finance-report',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.finance-report {
-}
-</style>;

+ 24 - 4
src/views/report/finance-report/list/finance_report_finance/index.vue

@@ -1,16 +1,36 @@
 <template>
   <!-- 财务报表 -->
-  <div class="finance-report">
-    财务报表
+  <div class="finance-report"
+       :loading="loading">
+    <Filter @search="search"></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <!-- <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList"> -->
+      <!-- 额外的展开行 -->
+      <!-- <template #expandedRowRender="{ record }">
+                    <BtnList :btnList="record.btnList"/>
+                </template> -->
+      <!-- </a-table> -->
+    </contextMenu>
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import Filter from '../../components/filterTable/index.vue';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 
 export default defineComponent({
     name: 'finance-report',
-    components: {},
+    components: {
+        Filter,
+        contextMenu,
+        BtnList,
+    },
     setup() {
         return {};
     },

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

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

+ 24 - 4
src/views/report/inventory-report/list/inventory_report_inventory/index.vue

@@ -1,16 +1,36 @@
 <template>
   <!-- 库存报表-->
-  <div class="inventory-report">
-    库存报表
+  <div class="inventory-report"
+       :loading="loading">
+    <Filter @search="search"></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <!-- <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList"> -->
+      <!-- 额外的展开行 -->
+      <!-- <template #expandedRowRender="{ record }">
+                    <BtnList :btnList="record.btnList"/>
+                </template> -->
+      <!-- </a-table> -->
+    </contextMenu>
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import Filter from '../../components/filterTable/index.vue';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 
 export default defineComponent({
     name: 'inventory-report',
-    components: {},
+    components: {
+        Filter,
+        contextMenu,
+        BtnList,
+    },
     setup() {
         return {};
     },

+ 0 - 23
src/views/report/spot-report/index.vue

@@ -1,23 +0,0 @@
-<template>
-  <!-- 现货报表 -->
-  <div class="spot-report">
-    现货报表
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent } from 'vue';
-
-export default defineComponent({
-    name: 'spot-report',
-    components: {},
-    setup() {
-        return {};
-    },
-});
-</script>
-
-<style lang="less">
-.spot-report {
-}
-</style>;

+ 43 - 0
src/views/report/spot-report/list/spot_report/index.vue

@@ -0,0 +1,43 @@
+<template>
+  <!-- 现货报表 -->
+  <div class="spot-report"
+       :loading="loading">
+    <Filter @search="search"></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <!-- <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList"> -->
+      <!-- 额外的展开行 -->
+      <!-- <template #expandedRowRender="{ record }">
+                    <BtnList :btnList="record.btnList"/>
+                </template> -->
+      <!-- </a-table> -->
+    </contextMenu>
+  </div>
+</template>
+
+<script lang="ts">
+import Filter from '../../components/filterTable/index.vue';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+
+export default defineComponent({
+    name: 'spot-report',
+    components: {
+        Filter,
+        contextMenu,
+        BtnList,
+    },
+    setup() {
+        return {};
+    },
+});
+</script>
+
+<style lang="less">
+.spot-report {
+}
+</style>;