huangbin 4 år sedan
förälder
incheckning
d27125237f

+ 38 - 0
src/router/index.ts

@@ -591,6 +591,44 @@ const routes: Array<RouteRecordRaw> = [
                     },
                 ]
             },
+            {
+                path: '/sum_pl_report',
+                name: 'sum_pl_report',
+                component: Main,
+                meta: {
+                    requireAuth: true,
+                },
+                redirect: { name: 'sum_pl_report_sum_pl' },
+                children: [
+                    {
+                        path: '/sum_pl_report/sum_pl',
+                        name: 'sum_pl_report_sum_pl',
+                        component: () => import('@/views/report/sum_pl_report/list/sum_pl_report/index.vue'),
+                        meta: {
+                            requireAuth: true,
+                        },
+                    },
+                ]
+            },
+            {
+                path: '/future_report',
+                name: 'future_report',
+                component: Main,
+                meta: {
+                    requireAuth: true,
+                },
+                redirect: { name: 'future_report_future' },
+                children: [
+                    {
+                        path: '/future_report/future',
+                        name: 'future_report_future',
+                        component: () => import('@/views/report/future_report/list/future_report/index.vue'),
+                        meta: {
+                            requireAuth: true,
+                        },
+                    },
+                ]
+            },
         ],
     },
     {

+ 89 - 0
src/views/report/future_report/components/filterTable/index.vue

@@ -0,0 +1,89 @@
+<template>
+  <!-- 过滤客户资料表格 -->
+  <Filter @update="update">
+    <!-- <FilterOption :selectList="selectList"
+                    :inputList="[]"
+                    :fixedBtnList="fixedBtnList" /> -->
+  </Filter>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent } from 'vue';
+import { ref } from 'vue';
+import { handleFilter, SelectList } from '@/common/setup/filter';
+import { handlerManagerList } from '@/common/setup/user';
+import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo';
+import { SelectOption } from '@/common/setup/filter/interface';
+import Filter from '../../../components/filter/index.vue';
+import { TypeAndTime } from '@/views/report/interface';
+
+export default defineComponent({
+    name: 'inventory-filter-table',
+    components: { FilterOption, Filter },
+    setup(props, context) {
+        function update(value: TypeAndTime) {
+            context.emit('update', value);
+        }
+        const select: SelectList[] = [
+            {
+                value: undefined,
+                key: 'userId',
+                placeholder: '全部交易用户',
+                list: [],
+            },
+            {
+                value: undefined,
+                key: 'warehousetype',
+                placeholder: '全部套保品种',
+                list: [],
+            },
+        ];
+        const loading = ref<boolean>(false);
+        // 交易用户
+        const { tableList: userList, queryTable } = handlerManagerList(loading, 2);
+        const { selectList, inputList, fixedBtnList, updateSelected } = handleFilter(select, [], context);
+        // 获取交易用户
+        function getUserList() {
+            return queryTable().then(() => {
+                const result: SelectOption[] = [];
+                userList.value.forEach((e) => {
+                    e.userlist.forEach((el) => {
+                        result.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
+                    });
+                });
+                return result;
+            });
+        }
+        // 获取套保品种
+        function getTBList() {
+            return QueryMiddleGoodsDetail().then((res) => {
+                const result: SelectOption[] = [];
+                res.forEach((e) => {
+                    const { isvalid, middlegoodsname, middlegoodsid } = e.mg;
+                    if (isvalid) {
+                        result.push({ value: middlegoodsid, lable: middlegoodsname });
+                    }
+                });
+                return result;
+            });
+        }
+        // initData(() => {
+        //     Promise.all([getUserList(), getTBList()]).then((res) => {
+        //         select[0].list = res[0]; // 交易用户
+        //         select[1].list = res[1]; // 套保品种
+        //         updateSelected(select);
+        //     });
+        // });
+        return {
+            selectList,
+            inputList,
+            fixedBtnList,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;
+

+ 81 - 0
src/views/report/future_report/list/future_report/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <!-- 库存报表(品类) -->
+  <div class="spot-report"
+       :loading="loading">
+    <Filter @update="update"></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+      </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';
+import { queryTableList } from '../../../setup';
+import { handleInitTypeAndTime } from '@/views/report/setup';
+import { qryAreaSpotplReport } from '@/services/go/ermcp/report';
+import { Ermcp3AreaSpotPLReport } from '@/services/go/ermcp/report/interface';
+import { TypeAndTime } from '@/views/report/interface';
+
+export default defineComponent({
+    name: 'inventory_report_inventory_category',
+    components: {
+        Filter,
+        contextMenu,
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<any>({});
+        // // 表格操作按钮列表
+        // const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<Ermcp3AreaSpotPLReport>(qryAreaSpotplReport);
+        initData(() => {
+            const { getInitTime, getInitType } = handleInitTypeAndTime();
+            // 获取列表数据
+            queryTable({ cycletype: getInitType(), cycletime: getInitTime() });
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_warehouse_category_report', []);
+        });
+        function update(value: TypeAndTime) {
+            queryTable(value);
+        }
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
+
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            btnClick,
+            update,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.spot-report {
+}
+</style>;

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

@@ -19,7 +19,7 @@
 <script lang="ts">
 import Filter from '../../components/filterTable/index.vue';
 import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { queryTableList } from '../../../setup';
+import { queryTableList } from '@/views/report/setup';
 import { handleInitTypeAndTime } from '@/views/report/setup';
 import { qryAreaSpotplReport } from '@/services/go/ermcp/report';
 import { Ermcp3AreaSpotPLReport } from '@/services/go/ermcp/report/interface';

+ 89 - 0
src/views/report/sum_pl_report/components/filterTable/index.vue

@@ -0,0 +1,89 @@
+<template>
+  <!-- 过滤客户资料表格 -->
+  <Filter @update="update">
+    <!-- <FilterOption :selectList="selectList"
+                    :inputList="[]"
+                    :fixedBtnList="fixedBtnList" /> -->
+  </Filter>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent } from 'vue';
+import { ref } from 'vue';
+import { handleFilter, SelectList } from '@/common/setup/filter';
+import { handlerManagerList } from '@/common/setup/user';
+import { QueryMiddleGoodsDetail } from '@/services/go/ermcp/goodsInfo';
+import { SelectOption } from '@/common/setup/filter/interface';
+import Filter from '../../../components/filter/index.vue';
+import { TypeAndTime } from '@/views/report/interface';
+
+export default defineComponent({
+    name: 'exposure-filter-table',
+    components: { FilterOption, Filter },
+    setup(props, context) {
+        function update(value: TypeAndTime) {
+            context.emit('update', value);
+        }
+        const select: SelectList[] = [
+            {
+                value: undefined,
+                key: 'userId',
+                placeholder: '全部交易用户',
+                list: [],
+            },
+            {
+                value: undefined,
+                key: 'warehousetype',
+                placeholder: '全部套保品种',
+                list: [],
+            },
+        ];
+        const loading = ref<boolean>(false);
+        // 交易用户
+        const { tableList: userList, queryTable } = handlerManagerList(loading, 2);
+        const { selectList, inputList, fixedBtnList, updateSelected } = handleFilter(select, [], context);
+        // 获取交易用户
+        function getUserList() {
+            return queryTable().then(() => {
+                const result: SelectOption[] = [];
+                userList.value.forEach((e) => {
+                    e.userlist.forEach((el) => {
+                        result.push({ value: el.loginid, lable: `${el.loginname}-${el.logincode}` });
+                    });
+                });
+                return result;
+            });
+        }
+        // 获取套保品种
+        function getTBList() {
+            return QueryMiddleGoodsDetail().then((res) => {
+                const result: SelectOption[] = [];
+                res.forEach((e) => {
+                    const { isvalid, middlegoodsname, middlegoodsid } = e.mg;
+                    if (isvalid) {
+                        result.push({ value: middlegoodsid, lable: middlegoodsname });
+                    }
+                });
+                return result;
+            });
+        }
+        // initData(() => {
+        //     Promise.all([getUserList(), getTBList()]).then((res) => {
+        //         select[0].list = res[0]; // 交易用户
+        //         select[1].list = res[1]; // 套保品种
+        //         updateSelected(select);
+        //     });
+        // });
+        return {
+            selectList,
+            inputList,
+            fixedBtnList,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+</style>;
+

+ 80 - 0
src/views/report/sum_pl_report/list/sum_pl_report/index.vue

@@ -0,0 +1,80 @@
+<template>
+  <!-- 敞口报表 -->
+  <div class="exposure_report"
+       :loading="loading">
+    <Filter @update="update"></Filter>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+      </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';
+import { queryTableList } from '@/views/report/setup';
+import { TypeAndTime } from '@/views/report/interface';
+import { handleInitTypeAndTime } from '@/views/report/setup';
+import { Ermcp3ExpourseReport } from '@/services/go/ermcp/report/interface';
+import { qryAreaExpourseReport } from '@/services/go/ermcp/report';
+export default defineComponent({
+    name: 'sum_pl_report',
+    components: {
+        Filter,
+        contextMenu,
+        BtnList,
+    },
+    setup() {
+        // 表头数据
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        // 表格事件
+        const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<any>({});
+        // // 表格操作按钮列表
+        // const { commonBtn, forDataBtn } = getBtnList('warehouse_info_normal', true);
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<Ermcp3ExpourseReport>(qryAreaExpourseReport);
+        initData(() => {
+            const { getInitTime, getInitType } = handleInitTypeAndTime();
+            // 获取列表数据
+            queryTable({ cycletype: getInitType(), cycletime: getInitTime() });
+            // 注册表头信息 过滤
+            registerColumn('table_pcweb_exposure_report', []);
+        });
+        function update(value: TypeAndTime) {
+            queryTable(value);
+        }
+        // 查询
+        function search(value: any) {
+            filteredInfo.value = value;
+            // 更新表信息
+            updateColumn();
+        }
+
+        return {
+            columns,
+            filteredInfo,
+            expandedRowKeys,
+            selectedRow,
+            Rowclick,
+            loading,
+            tableList,
+            search,
+            queryTable,
+            btnClick,
+            update,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.exposure-report {
+}
+</style>;