From 315ff358162b358d1cb17dfa3d5efa40f74cf1ac Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 11 Dec 2025 13:41:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/js/financial.js | 32 ++++++++++- .../static/src/js/information.js | 30 ++++++++++ .../static/src/xml/financial.xml | 57 +++++++++++-------- .../static/src/xml/information.xml | 7 ++- yuthon_account_report/views/custom.xml | 54 +++++++++++++++--- .../views/yuthon_hr_employee_views.xml | 2 +- 6 files changed, 147 insertions(+), 35 deletions(-) diff --git a/yuthon_account_report/static/src/js/financial.js b/yuthon_account_report/static/src/js/financial.js index 9838416bc..d8e307ade 100644 --- a/yuthon_account_report/static/src/js/financial.js +++ b/yuthon_account_report/static/src/js/financial.js @@ -1,7 +1,7 @@ /** @odoo-module **/ import {registry} from "@web/core/registry"; -import {useService} from "@web/core/utils/hooks"; +import { useService } from "@web/core/utils/hooks"; const {Component, useState, onWillStart, onMounted} = owl; @@ -409,6 +409,36 @@ class FinancialPage extends Component { } + // 数据点击事件 + onDataCellClick(params){ + const queryParams = { + project_id: params.row.id, + group_id: params.group.id, + date: params.filters.date, + }; + let domain = [] + if(queryParams.date){ + domain.push(['sheet_id.create_date', '<=', queryParams.date]) + } + if(queryParams.group_id){ + domain.push(['sheet_id.company_id.id', '=', queryParams.group_id]) + } + if(queryParams.project_id){ + domain.push(['collection_id', '=', queryParams.project_id]) + } + this.action.doAction({ + type: 'ir.actions.act_window', + res_model: 'financial.sheet.line', + name: '提报数据明细', + view_mode: 'tree', + view_type: 'tree', + views: [[false, 'tree']], + target: 'new', // 以弹窗形式打开 + domain: domain, + context: {}, + }) + } + // 重置筛选条件 onReset() { this.state.filters = { diff --git a/yuthon_account_report/static/src/js/information.js b/yuthon_account_report/static/src/js/information.js index cf2e171e5..fd4aec66d 100644 --- a/yuthon_account_report/static/src/js/information.js +++ b/yuthon_account_report/static/src/js/information.js @@ -260,6 +260,36 @@ export class FinancialSinglePage extends Component { this.notification.add("使用演示数据", { type: "info" }); } + // 数据点击事件 + onDataCellClick(params){ + const queryParams = { + project_id: params.row.id, + group_id: params.group.id, + date: params.filters.date, + }; + let domain = [] + if(queryParams.date){ + domain.push(['summary_id.create_date', '<=', queryParams.date]) + } + if(queryParams.group_id && Number.isFinite(queryParams.group_id)){ + domain.push(['summary_id.company_id.id', '=', queryParams.group_id]) + } + if(queryParams.project_id){ + domain.push(['table_id', '=', queryParams.project_id]) + } + this.action.doAction({ + type: 'ir.actions.act_window', + res_model: 'information.summary.line', + name: '信息汇总明细', + view_mode: 'tree', + view_type: 'tree', + views: [[false, 'tree']], + target: 'new', // 以弹窗形式打开 + domain: domain, + context: {}, + }) + } + fillExampleData() { // 填充一些示例数据以便预览 const rows = this.state.tableData.rows; diff --git a/yuthon_account_report/static/src/xml/financial.xml b/yuthon_account_report/static/src/xml/financial.xml index 3a923dbb7..a44013689 100644 --- a/yuthon_account_report/static/src/xml/financial.xml +++ b/yuthon_account_report/static/src/xml/financial.xml @@ -12,10 +12,10 @@
@@ -23,9 +23,9 @@
@@ -50,19 +50,19 @@
- - + +
@@ -125,7 +127,8 @@ - +
@@ -155,9 +158,14 @@
- + - + @@ -169,7 +177,8 @@ - +

暂无数据

diff --git a/yuthon_account_report/static/src/xml/information.xml b/yuthon_account_report/static/src/xml/information.xml index 13338651d..ebec09c7d 100644 --- a/yuthon_account_report/static/src/xml/information.xml +++ b/yuthon_account_report/static/src/xml/information.xml @@ -160,7 +160,12 @@ - + diff --git a/yuthon_account_report/views/custom.xml b/yuthon_account_report/views/custom.xml index fd9cf7032..741ab03bd 100644 --- a/yuthon_account_report/views/custom.xml +++ b/yuthon_account_report/views/custom.xml @@ -11,15 +11,53 @@ - - - - + - - - - + + + + financial.sheet.line.tree + financial.sheet.line + + + + + + + + + + + + 财务数据表收集明细 + financial.sheet.line + tree + + + + + information.summary.line.tree + information.summary.line + + + + + + + + + + + 信息汇总收集明细 + information.summary.line + tree + diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index 035bb0bdd..0ad85d1b5 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -704,4 +704,4 @@ - \ No newline at end of file +