!10080 Merge branch 'dev' of <a href="https://gitee.com/jinan-pengyusen-data/gzth">https://gitee.com/jinan-pengyusen-data/gzth</a> into dev_wang
Merge pull request !10080 from 李鹏宇/dev_wang
This commit is contained in:
@@ -173,13 +173,12 @@ class ReceivableFlowReport(models.Model):
|
||||
"收款时间": payment_date.strftime("%Y-%m-%d") if payment_date else "",
|
||||
"收款备注": payment_remark,
|
||||
"状态": charge_status,
|
||||
"违约金计算时间": billing_period,
|
||||
"违约天数": days_diff,
|
||||
"违约金明细": {
|
||||
'model': 'penalty.line.wizard',
|
||||
'model': 'property.accounts.receivable',
|
||||
'display_name': '违约金明细',
|
||||
'id': wz_list[0].id if wz_list else None,
|
||||
} if wz_list else "",
|
||||
'method': 'penalty_wizard',
|
||||
'id': rec.id,
|
||||
},
|
||||
"违约金收款时间": penalty_payment_date.strftime("%Y-%m-%d") if penalty_payment_date else "",
|
||||
"违约金收款金额": round(total_penalty_collected, 2),
|
||||
"合同编号": {
|
||||
|
||||
@@ -122,7 +122,8 @@ class ReceivableReport extends Component {
|
||||
return items;
|
||||
},
|
||||
context: {
|
||||
actionService: this.actionService // 传递 actionService 用于穿透跳转
|
||||
actionService: this.actionService, // 传递 actionService 用于穿透跳转
|
||||
orm: this.serviceOrm, // 传递 orm 用于调用模型方法
|
||||
},
|
||||
onFilterChanged: () => {
|
||||
// 过滤后重新编号序号列
|
||||
@@ -153,15 +154,22 @@ class ReceivableReport extends Component {
|
||||
|
||||
// 如果是对象格式(包含 model),渲染为可点击链接
|
||||
if (typeof params.value === 'object' && params.value.model) {
|
||||
const { model, id, display_name, view_mode, domain, view_id } = params.value;
|
||||
const { model, id, display_name, view_mode, domain, view_id, method } = params.value;
|
||||
|
||||
const el = document.createElement('div');
|
||||
el.className = 'o_record_cell';
|
||||
el.innerText = display_name || '';
|
||||
el.classList.add('btn');
|
||||
el.classList.add('btn-link');
|
||||
el.onclick = () => {
|
||||
if (view_mode === 'tree') {
|
||||
el.onclick = async () => {
|
||||
if (method) {
|
||||
// 调用模型方法,执行返回的 action
|
||||
const action = await params.context.orm.call(model, method, [[id]]);
|
||||
if (action && !action.views) {
|
||||
action.views = [[false, 'form']];
|
||||
}
|
||||
params.context.actionService.doAction(action);
|
||||
} else if (view_mode === 'tree') {
|
||||
// tree 弹窗:用 domain 过滤多条记录
|
||||
params.context.actionService.doAction({
|
||||
type: 'ir.actions.act_window',
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
{"headerName": "收款时间", "field": "收款时间", "flex": 1},
|
||||
{"headerName": "收款备注", "field": "收款备注", "flex": 2, "wrapText": true},
|
||||
{"headerName": "状态", "field": "状态", "flex": 1},
|
||||
{"headerName": "违约金计算时间", "field": "违约金计算时间", "flex": 2.5, "wrapText": true},
|
||||
{"headerName": "违约天数", "field": "违约天数", "flex": 1, "type": "number"},
|
||||
{"headerName": "违约金明细", "field": "违约金明细", "flex": 1, "cellRenderer": "linkRender"},
|
||||
{"headerName": "违约金收款时间", "field": "违约金收款时间", "flex": 1},
|
||||
{"headerName": "违约金收款金额", "field": "违约金收款金额", "flex": 1, "type": "number"}
|
||||
|
||||
Reference in New Issue
Block a user