fix: ①build.sh xls2ui清单补discount(回退动态扫描方案——product_management等生成目录git跟踪会被重生成弄脏);②index.ui支付管理删「手动充值」「转账信息」菜单项(用户要求,保留充值/退款)

This commit is contained in:
yumoqing 2026-09-09 15:27:29 +08:00
parent f79de02ead
commit 7de5c204bb
2 changed files with 14 additions and 24 deletions

View File

@ -94,20 +94,20 @@ if [ -d "pkgs/pipeline_core/skills_library" ]; then
fi
# 7. Regenerate CRUD from json for all pipeline modules
# 历史事故(硬编码清单两次漏项,均致菜单 500 "fpath is None"
# - pricing 漏列 → 定价管理 5002026-08
# - discount 漏列 → 折扣管理 4 个子菜单全 5002026-09-09
# discount_list/discount_marketing_list/discount_promo_code_list/discount_customer_bind_list
# 从未生成;生成目录在模块 .gitignore 内,只能由部署机生成)
# 根治:不再维护硬编码清单,动态扫描 pkgs/*/json/*.json——凡有 CRUD 定义的模块一律生成。
# evaluate 例外天然成立:其 json 嵌套在包内(evaluate/evaluate/),不在 pkgs/evaluate/json扫不到
for json_dir in "$cdir"/pkgs/*/json; do
[ -d "$json_dir" ] || continue
ls "$json_dir"/*.json >/dev/null 2>&1 || continue
mod=$(basename "$(dirname "$json_dir")")
cd "$json_dir"
"$cdir/py3/bin/xls2ui" -m "../models" -o "../wwwroot" "$mod" *.json 2>&1 | grep -c 'handle' | xargs -I{} echo " xls2ui $mod: {} tables"
cd "$cdir"
# 注意:凡 json/ 下有 CRUD 定义的模块都必须在列——漏掉则页面从未生成,
# 菜单点进去 500fpath is None
# 历史事故pricing 漏列 → 定价管理 5002026-08
# discount 漏列 → 折扣管理 4 个子菜单全 5002026-09-09已补入
# ⚠ 清单不能盲目扩成"全模块动态扫描"product_management/dingdingflow 的生成目录
# 是 git 跟踪的(重生成会弄脏工作树),且第 6 步有 xls2ui 覆盖后的手工修补——
# 新模块入列前先确认其生成目录在模块 .gitignore 内
for mod in appbase pipeline_core pipeline_ops pipeline_dist pipeline-sdlc rbac dapi accounting uapi rag dingdingflow account_resource storage_resource filemgr supplychain pipeline-bidding pricing pipeline-llm pipeline-opportunity discount; do
json_dir="pkgs/$mod/json"
if [ -d "$json_dir" ] && ls "$json_dir"/*.json >/dev/null 2>&1; then
cd "$json_dir"
"$cdir/py3/bin/xls2ui" -m "../models" -o "../wwwroot" "$mod" *.json 2>&1 | grep -c 'handle' | xargs -I{} echo " xls2ui $mod: {} tables"
cd "$cdir"
fi
done

View File

@ -585,16 +585,6 @@
"name": "pay_refund",
"label": "退款",
"script": "this.open_tab({name:'pay_refund',label:'退款',url:'/unipay/refund.ui',removable:true})"
},
{
"name": "pay_manual",
"label": "手动充值",
"script": "this.open_tab({name:'pay_manual',label:'手动充值',url:'/unipay/manual_recharge.ui',removable:true})"
},
{
"name": "pay_transfer",
"label": "转账信息",
"script": "this.open_tab({name:'pay_transfer',label:'转账信息',url:'/unipay/transfer_info.ui',removable:true})"
}
]
},