diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_report.js b/yuthon_report/static/src/components/yuthon_report/yuthon_report.js index 5cae3eab5..9371708e4 100644 --- a/yuthon_report/static/src/components/yuthon_report/yuthon_report.js +++ b/yuthon_report/static/src/components/yuthon_report/yuthon_report.js @@ -6,6 +6,8 @@ import { Component, onMounted, useRef, useState } from "@odoo/owl"; import { useBus, useService } from "@web/core/utils/hooks"; import { standardActionServiceProps } from "@web/webclient/actions/action_service"; import { DateTimeInput } from "@web/core/datetime/datetime_input"; +import { CheckBox } from "@web/core/checkbox/checkbox"; +import { Many2XAutocomplete } from "@web/views/fields/relational_utils"; class YouthonReport extends Component { setup() { @@ -19,6 +21,17 @@ class YouthonReport extends Component { startDate: null, endDate: null, keyword: "", + booleanValue:true, + partnerValue:false, + selectPartner:{}, + condition:false, + conditions:[{ + 'name':'name1', + 'value':'value1' + },{ + 'name':'name2', + 'value':'value2' + }] }); this.config = this.props.action.context.report_config || {}; @@ -33,12 +46,31 @@ class YouthonReport extends Component { rowData: [], sideBar: true, defaultColDef: { resizable: true, sortable: true, filter: true }, + }; this.grid = new agGrid.createGrid(this.gridRef.el, this.gridOptions); }); } + /** + * 改变布尔值 + * @param e + */ + async onChangeBoolean(v){ + this.state.booleanValue = v + } + + getDomain(){ + // 过滤条件 + return []; + } + async onUpdatePartner(v){ + console.log(v) + this.state.selectPartner = v + this.state.partnerValue = v.display_name + } + async onSearch() { const params = { date_start: this.state.startDate, @@ -71,7 +103,9 @@ class YouthonReport extends Component { YouthonReport.props = {...standardActionServiceProps }; YouthonReport.template = "youthon_report.YouthonReport"; YouthonReport.components = { - DateTimeInput + DateTimeInput, + CheckBox, + Many2XAutocomplete, }; registry.category("actions").add("youthon_report_client", YouthonReport); diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss index 8b1378917..b48b3cd88 100644 --- a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss +++ b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss @@ -1 +1,26 @@ - +.stat-card { + border-radius: 0.75rem; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); + padding: 1.5rem; + position: relative; + } + .stat-card.danger { + border-top: 4px solid #f87171; /* 红色 */ + } + .stat-card.success { + border-top: 4px solid #4ade80; /* 绿色 */ + } + .stat-card.info { + border-top: 4px solid #60a5fa; /* 蓝色 */ + } + .stat-value { + font-size: 1.5rem; + font-weight: bold; + } + .stat-label { + font-size: 1rem; + color: #6b7280; + } + .stat-change { + font-size: 0.9rem; + } \ No newline at end of file diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_report.xml b/yuthon_report/static/src/components/yuthon_report/yuthon_report.xml index aa9958f79..d4597e4e8 100644 --- a/yuthon_report/static/src/components/yuthon_report/yuthon_report.xml +++ b/yuthon_report/static/src/components/yuthon_report/yuthon_report.xml @@ -4,42 +4,164 @@
+
+
+ + +
+
+
未处理违约金
+
¥245,890.00
+
+ ▲ 12.5% 较上月 +
+
+
+ + +
+
+
已收回违约金
+
¥1,320,560.00
+
+ ▲ 8.2% 较上月 +
+
+
+ + +
+
+
违约合同数
+
148
+
+ ▲ 3.1% 较上月 +
+
+
+ +
+
+ +
-
- 销售报表 -
-
+ +
+ + +
+ +
+ + +
+ +
+ + + ​ + +
+
- - - + + + +
+ +
+ +
+
+ +
+
至
+
+ +
+
+
+ +
+ + + +
- -
- -
+ + + +
- - - - -
+ + +
+
diff --git a/yuthon_report/views/menu.xml b/yuthon_report/views/menu.xml index 7a2536986..140196efd 100644 --- a/yuthon_report/views/menu.xml +++ b/yuthon_report/views/menu.xml @@ -2,12 +2,12 @@ - - - - - - + \ No newline at end of file diff --git a/yuthon_report/views/yuthon_report_res_partner.xml b/yuthon_report/views/yuthon_report_res_partner.xml index 58ad0c5c2..cf80283c6 100644 --- a/yuthon_report/views/yuthon_report_res_partner.xml +++ b/yuthon_report/views/yuthon_report_res_partner.xml @@ -25,12 +25,12 @@ - - - - - - + \ No newline at end of file