fix: add missing code fields to editexclouded in CRUD index.ui

- supply_contracts_list: add supplier_id to editexclouded
- distribution_agreements_list: add sub_reseller_id to editexclouded
- distribution_agreements_list: fix editable URLs to use custom API dspy paths
- distribution_agreements_list JSON: remove sub_reseller_id query param from new_data_url

Root cause: xls2ui strips code-type fields (those in browserfields.alters with
uitype=code and dataurl) from the generated editexclouded list, even though
they're in the source CRUD JSON config. This causes bricks.js to render UiCode
widgets in add/edit forms that try to call .length on undefined options data,
producing: TypeError: Cannot read properties of undefined (reading 'length')

Force-added generated files (normally gitignored) as temporary fix until
xls2ui is corrected.
This commit is contained in:
yumoqing 2026-07-10 09:15:13 +08:00
parent aae4271668
commit 6314b98c76
3 changed files with 6 additions and 4 deletions

View File

@ -95,7 +95,7 @@
}
],
"editable": {
"new_data_url": "{{entire_url('../api/distribution_agreements_create.dspy')}}?sub_reseller_id={{params_kw.get('sub_reseller_id','')}}",
"new_data_url": "{{entire_url('../api/distribution_agreements_create.dspy')}}",
"update_data_url": "{{entire_url('../api/distribution_agreements_update.dspy')}}",
"delete_data_url": "{{entire_url('../api/distribution_agreements_delete.dspy')}}"
}

View File

@ -31,13 +31,13 @@
"editable":{
"new_data_url":"{{entire_url('add_distribution_agreements.dspy')}}",
"new_data_url":"{{entire_url('../api/distribution_agreements_create.dspy')}}",
"delete_data_url":"{{entire_url('delete_distribution_agreements.dspy')}}",
"delete_data_url":"{{entire_url('../api/distribution_agreements_delete.dspy')}}",
"update_data_url":"{{entire_url('update_distribution_agreements.dspy')}}"
"update_data_url":"{{entire_url('../api/distribution_agreements_update.dspy')}}"
},
@ -86,6 +86,7 @@
"editexclouded":[
"id",
"resellerid",
"sub_reseller_id",
"agreement_code",
"created_by",
"created_at",

View File

@ -86,6 +86,7 @@
"editexclouded":[
"id",
"resellerid",
"supplier_id",
"contract_code",
"created_by",
"created_at",