Merge branch 'dev' of gitee.com:jinan-pengyusen-data/gzth into dev_zhou
Signed-off-by: 李鹏宇 <pengyuthon@163.com>
This commit is contained in:
@@ -35,6 +35,8 @@ class IrUiMenu(models.Model):
|
||||
is_phone = fields.Boolean(string="手机菜单",default=False)
|
||||
is_pc = fields.Boolean(string="PC菜单",default=True)
|
||||
|
||||
badge_function = fields.Char(string="菜单角标计算函数")
|
||||
|
||||
@api.model
|
||||
@tools.ormcache_context('self._uid', 'debug', keys=('lang',))
|
||||
def load_menus(self, debug):
|
||||
@@ -43,7 +45,7 @@ class IrUiMenu(models.Model):
|
||||
:return: the menu root
|
||||
:rtype: dict('children': menu_nodes)
|
||||
"""
|
||||
fields = ['name', 'sequence', 'parent_id', 'action', 'web_icon','show_badge_count']
|
||||
fields = ['name', 'sequence', 'parent_id', 'action', 'web_icon','show_badge_count','badge_function']
|
||||
menu_roots = self.get_user_roots()
|
||||
menu_roots_data = menu_roots.read(fields) if menu_roots else []
|
||||
menu_root = {
|
||||
@@ -166,7 +168,10 @@ class IrUiMenu(models.Model):
|
||||
# 不仅仅是 form 表单,获取 model
|
||||
res_model = action_record.res_model
|
||||
if res_model in self.env:
|
||||
if hasattr(self.env[res_model], 'get_menu_badge_count'):
|
||||
# 先检查 menu['badge_function']
|
||||
if 'badge_function' in menu and menu['badge_function'] and hasattr(self.env[res_model], menu['badge_function']):
|
||||
badge_count = getattr(self.env[res_model], menu['badge_function'])(action_record)
|
||||
elif hasattr(self.env[res_model], 'get_menu_badge_count'):
|
||||
badge_count = self.env[res_model].get_menu_badge_count(action_record)
|
||||
elif hasattr(self.env[res_model], 'get_no_read_count'):
|
||||
badge_count = self.env[res_model].get_no_read_count()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='sequence']" position="after">
|
||||
<field name="show_badge_count"/>
|
||||
<field name="badge_function"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -43,6 +43,7 @@ class YouthonReport extends Component {
|
||||
localeText: AG_GRID_LOCALE_CN,
|
||||
theme:agGrid.themeMaterial,
|
||||
columnDefs: this.config.columns || [],
|
||||
groupDefaultExpanded:1, // 分组展开
|
||||
rowData: [],
|
||||
sideBar: true,
|
||||
defaultColDef: { sortable: true, filter: true, width: 200,minWidth: 150,flex: false, resizable: false },
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="row g-4">
|
||||
|
||||
<!-- 未处理违约金 -->
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4">
|
||||
<div class="stat-card danger bg-white">
|
||||
<div class="stat-label mb-2">未处理违约金</div>
|
||||
<div class="stat-value text-dark">¥245,890.00</div>
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
<!-- 已收回违约金 -->
|
||||
<div class="col-md-4">
|
||||
<div class="stat-card success bg-white">
|
||||
<div class="stat-card success bg-white">
|
||||
<div class="stat-label mb-2">已收回违约金</div>
|
||||
<div class="stat-value text-dark">¥1,320,560.00</div>
|
||||
<div class="stat-change text-success mt-1">
|
||||
▲ 8.2% <small class="text-muted">较上月</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 违约合同数 -->
|
||||
<div class="col-md-4">
|
||||
@@ -111,6 +111,15 @@
|
||||
<button class="btn btn-success" t-on-click="onExportExcel">导出</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--表 标题 居中 -->
|
||||
<div class="row mb-2">
|
||||
<div class="col-12 text-center">
|
||||
<h5>报表名称</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{"headerName": "申请原因", "field": "申请原因", "flex": 1},
|
||||
{"headerName": "发起时间", "field": "发起时间", "flex": 1},
|
||||
{"headerName": "最后操作时间", "field": "最后操作时间", "flex": 1},
|
||||
{"headerName": "审批状态", "field": "审批状态", "flex": 1}
|
||||
{"headerName": "审批状态", "field": "审批状态", "flex": 1,'rowGroup':true}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user