diff --git a/wwwroot/discount_setting/get_products_with_discount.dspy b/wwwroot/discount_setting/get_products_with_discount.dspy index 5c960e6..8fabdcd 100644 --- a/wwwroot/discount_setting/get_products_with_discount.dspy +++ b/wwwroot/discount_setting/get_products_with_discount.dspy @@ -2,6 +2,7 @@ # 参数: discountid (必需) discountid = params_kw.get('discountid') +debug(f'get_products_with_discount called: params_kw keys={list(params_kw.keys())}, discountid={discountid}') if not discountid: return {"total": 0, "rows": []} diff --git a/wwwroot/discount_setting/index.ui b/wwwroot/discount_setting/index.ui index 6c5f5a1..e5a573f 100644 --- a/wwwroot/discount_setting/index.ui +++ b/wwwroot/discount_setting/index.ui @@ -67,5 +67,14 @@ } ] } + ], + "binds": [ + { + "wid": "self", + "event": "init", + "actiontype": "script", + "target": "product_discount_tbl", + "script": "var discountid = new URLSearchParams(window.location.search).get('discountid') || ''; if (discountid) { await this.render({discountid: discountid}); }" + } ] }