fix: correct subtable URLs to use relative aliases for same-module, absolute paths for cross-module

This commit is contained in:
yumoqing 2026-05-06 08:56:03 +08:00
parent ecada505c9
commit 4154d22ed2

View File

@ -2,7 +2,9 @@
"tblname": "opportunities", "tblname": "opportunities",
"title": "商机管理", "title": "商机管理",
"params": { "params": {
"sortby": ["created_at desc"], "sortby": [
"created_at desc"
],
"logined_userid": "owner_id", "logined_userid": "owner_id",
"confidential_fields": [], "confidential_fields": [],
"editor": { "editor": {
@ -16,7 +18,7 @@
}, },
{ {
"wid": "probability", "wid": "probability",
"event": "changed", "event": "changed",
"actiontype": "script", "actiontype": "script",
"target": "predicted_revenue", "target": "predicted_revenue",
"script": "const amount = parseFloat(document.getElementById('estimated_amount')?.value) || 0;\nconst probability = parseFloat(widget.getValue()) || 0;\nconst predicted = (amount * probability / 100).toFixed(2);\ndocument.getElementById('predicted_revenue').value = predicted;" "script": "const amount = parseFloat(document.getElementById('estimated_amount')?.value) || 0;\nconst probability = parseFloat(widget.getValue()) || 0;\nconst predicted = (amount * probability / 100).toFixed(2);\ndocument.getElementById('predicted_revenue').value = predicted;"
@ -24,42 +26,88 @@
] ]
}, },
"browserfields": { "browserfields": {
"exclouded": ["id", "customer_id", "owner_id", "created_at", "updated_at"], "exclouded": [
"id",
"customer_id",
"owner_id",
"created_at",
"updated_at"
],
"alters": { "alters": {
"current_stage": { "current_stage": {
"uitype": "code", "uitype": "code",
"data": [ "data": [
{"value": "初步接洽", "text": "初步接洽"}, {
{"value": "需求确认", "text": "需求确认"}, "value": "初步接洽",
{"value": "方案报价", "text": "方案报价"}, "text": "初步接洽"
{"value": "合同谈判", "text": "合同谈判"}, },
{"value": "成交", "text": "成交"} {
"value": "需求确认",
"text": "需求确认"
},
{
"value": "方案报价",
"text": "方案报价"
},
{
"value": "合同谈判",
"text": "合同谈判"
},
{
"value": "成交",
"text": "成交"
}
] ]
}, },
"source_type": { "source_type": {
"uitype": "code", "uitype": "code",
"data": [ "data": [
{"value": "manual", "text": "手动录入"}, {
{"value": "lead", "text": "线索转化"} "value": "manual",
"text": "手动录入"
},
{
"value": "lead",
"text": "线索转化"
}
] ]
}, },
"status": { "status": {
"uitype": "code", "uitype": "code",
"data": [ "data": [
{"value": "active", "text": "活跃"}, {
{"value": "won", "text": "已成交"}, "value": "active",
{"value": "lost", "text": "已丢失"}, "text": "活跃"
{"value": "closed", "text": "已关闭"} },
{
"value": "won",
"text": "已成交"
},
{
"value": "lost",
"text": "已丢失"
},
{
"value": "closed",
"text": "已关闭"
}
] ]
} }
} }
}, },
"editexclouded": ["id", "customer_id", "owner_id", "created_at", "updated_at", "predicted_revenue"], "editexclouded": [
"id",
"customer_id",
"owner_id",
"created_at",
"updated_at",
"predicted_revenue"
],
"subtables": [ "subtables": [
{ {
"field": "opportunity_id", "field": "opportunity_id",
"title": "阶段变更历史", "title": "阶段变更历史",
"url": "{{entire_url('opportunity_stage_history')}}", "url": "{{entire_url('stage_history_list')}}",
"subtable": "opportunity_stage_history" "subtable": "opportunity_stage_history"
} }
] ]