pricing/wwwroot/pricing_test.ui
Hermes Agent 810cd4549b fix: 修复定价项目时序验证定价500错误 + 移除过时的pricing_item子表引用
- init.py: 注册 get_pricing_program_timeing 到 env(pricing_test.ui模板依赖此函数)
- pricing_test.ui: 修复拼写错误 amoumt → "amount"(生成无效JSON导致500)
- json/pricing_program_timing.json: 移除指向已删除的pricing_item CRUD的subtables配置
2026-06-23 23:59:13 +08:00

60 lines
1.1 KiB
XML

{% set amount = test_pricing(params_kw.id, params_kw) %}
{% set ppt = get_pricing_program_timeing(params_kw.id) %}
{% if ppt %}
{
"widgettype": "Form",
"options": {
"width": "100%",
"height": "100%",
"fields": [
{% if amount is not None %}
{
"name": "amount",
"label": "价格",
"value": {{amount}},
"uitype": "float"
},
{% endif %}
{% for f,spec in ppt.pricing_data.fields.items() %}
{
{% if params_kw.get(f) %}
"value": "{{params_kw.get(f)}}",
{% endif %}
"name": "{{f}},
"label": "{{spec.label}}",
"uitype": "{{spec.type}}"
}
{% if not loop.last %},{% endif %}
{% endfor %}
]
},
"binds":[
{
"wid": "self",
"event": "submit",
"actiontype": "urlwidget",
"target": "self",
"options": {
"params": {
"id": "{{params_kw.id}}"
},
"method": "POST",
"url": "{{entire_url('pricing_test.ui')}}"
}
}
]
}
{% else %}
{
"widgettype": "Text",
"options": {
"i18n": true,
"otext": "定价时序数据没找到",
"wrap": true,
"halign": "left",
"width": "100%",
"height": "100%"
}
}
{% endif %}