From 7de5c204bbe440462c1ccbf66a2528459af5e821 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 9 Sep 2026 15:27:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E2=91=A0build.sh=20xls2ui=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E8=A1=A5discount(=E5=9B=9E=E9=80=80=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=96=B9=E6=A1=88=E2=80=94=E2=80=94product?= =?UTF-8?q?=5Fmanagement=E7=AD=89=E7=94=9F=E6=88=90=E7=9B=AE=E5=BD=95git?= =?UTF-8?q?=E8=B7=9F=E8=B8=AA=E4=BC=9A=E8=A2=AB=E9=87=8D=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=BC=84=E8=84=8F);=E2=91=A1index.ui=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=88=A0=E3=80=8C=E6=89=8B=E5=8A=A8=E5=85=85?= =?UTF-8?q?=E5=80=BC=E3=80=8D=E3=80=8C=E8=BD=AC=E8=B4=A6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=8D=E8=8F=9C=E5=8D=95=E9=A1=B9(=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=A6=81=E6=B1=82,=E4=BF=9D=E7=95=99=E5=85=85=E5=80=BC/?= =?UTF-8?q?=E9=80=80=E6=AC=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 28 ++++++++++++++-------------- wwwroot/index.ui | 10 ---------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/build.sh b/build.sh index 2cf5681..dfb8f91 100644 --- a/build.sh +++ b/build.sh @@ -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 漏列 → 定价管理 500(2026-08) -# - discount 漏列 → 折扣管理 4 个子菜单全 500(2026-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 定义的模块都必须在列——漏掉则页面从未生成, +# 菜单点进去 500(fpath is None)。 +# 历史事故:pricing 漏列 → 定价管理 500(2026-08); +# discount 漏列 → 折扣管理 4 个子菜单全 500(2026-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 diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 7316789..d80c850 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -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})" } ] },