yumoqing b69bd38b27 fix: toolbar buttons open CRUD page directly, remove ensure dspy layer
Suppliers '供销协议' → /supplychain/supply_contracts_list?supplier_id=
Sub-distributors '分销协议' → /supplychain/distribution_agreements_list?sub_reseller_id=

No more DataViewer/HTML-redirect popup issues.
2026-07-12 10:32:45 +08:00

393 lines
8.7 KiB
XML

{
"widgettype":"VBox",
"options":{"width":"100%"},
"subwidgets":[{
"id":"sub_distributors_tbl",
"widgettype":"Tabular",
"options":{
"width":"100%",
"title":"二级分销商表",
"toolbar":{
"tools": [
{
"selected_row": true,
"name": "distribution_agreements",
"icon": "{{entire_url('/imgs/distribution_agreement_items.svg')}}",
"label": "分销协议"
},
{
"selected_row": true,
"name": "add_admin",
"icon": "{{entire_url('/imgs/userrole.svg')}}",
"label": "添加管理员"
},
{
"selected_row": true,
"name": "reset_admin_pwd",
"icon": "{{entire_url('/imgs/key.svg')}}",
"label": "重置管理员密码"
}
]
},
"css":"card",
"editable":{
"new_data_url":"{{entire_url('/supplychain/sub_distributors_list/add_sub_distributors.dspy')}}",
"delete_data_url":"{{entire_url('/supplychain/sub_distributors_list/delete_sub_distributors.dspy')}}",
"update_data_url":"{{entire_url('/supplychain/sub_distributors_list/update_sub_distributors.dspy')}}"
},
"data_url":"{{entire_url('/supplychain/sub_distributors_list/get_sub_distributors.dspy')}}",
"data_method":"GET",
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
"row_options":{
"browserfields": {
"exclouded": [
"id",
"resellerid",
"created_by",
"created_at",
"updated_at"
],
"alters": {
"status": {
"uitype": "code",
"data": [
{
"value": "1",
"text": "正常"
},
{
"value": "0",
"text": "停用"
}
]
}
}
},
"editexclouded":[
"id",
"resellerid",
"sub_dist_code",
"created_by",
"created_at",
"updated_at"
],
"fields":[
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "主键ID"
},
{
"name": "resellerid",
"title": "所属主分销商机构ID",
"type": "str",
"length": 32,
"nullable": "no",
"label": "所属主分销商机构ID",
"uitype": "code",
"valueField": "resellerid",
"textField": "resellerid_text",
"params": {
"dbname": "{{get_module_dbname('supplychain')}}",
"table": "organization",
"tblvalue": "id",
"tbltext": "orgname",
"valueField": "resellerid",
"textField": "resellerid_text"
},
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
},
{
"name": "sub_dist_code",
"title": "二级分销商编号",
"type": "str",
"length": 64,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "二级分销商编号"
},
{
"name": "sub_dist_name",
"title": "二级分销商名称",
"type": "str",
"length": 255,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "二级分销商名称"
},
{
"name": "contact_person",
"title": "联系人",
"type": "str",
"length": 100,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "联系人"
},
{
"name": "contact_phone",
"title": "联系电话",
"type": "str",
"length": 50,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "联系电话"
},
{
"name": "contact_email",
"title": "联系邮箱",
"type": "str",
"length": 255,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "联系邮箱"
},
{
"name": "address",
"title": "地址",
"type": "str",
"length": 500,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "地址"
},
{
"name": "tax_number",
"title": "税号",
"type": "str",
"length": 64,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "税号"
},
{
"name": "bank_name",
"title": "开户银行",
"type": "str",
"length": 255,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "开户银行"
},
{
"name": "bank_account",
"title": "银行账号",
"type": "str",
"length": 64,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "银行账号"
},
{
"name": "managed_by",
"title": "负责销售ID",
"type": "str",
"length": 32,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "负责销售ID"
},
{
"name": "status",
"title": "状态",
"type": "char",
"length": 1,
"nullable": "no",
"default": "1",
"cwidth": 4,
"uitype": "code",
"datatype": "char",
"label": "状态",
"data": [
{
"value": "1",
"text": "正常"
},
{
"value": "0",
"text": "停用"
}
]
},
{
"name": "remark",
"title": "备注",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "备注"
},
{
"name": "created_by",
"title": "创建人",
"type": "str",
"length": 32,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "创建人"
},
{
"name": "created_at",
"title": "创建时间",
"type": "datetime",
"nullable": "no",
"length": 0,
"uitype": "str",
"datatype": "datetime",
"label": "创建时间"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "datetime",
"length": 0,
"uitype": "str",
"datatype": "datetime",
"label": "更新时间"
}
]
},
"data_filter":{
"AND": [
{
"field": "sub_dist_name",
"op": "LIKE",
"var": "sub_dist_name"
},
{
"field": "sub_dist_code",
"op": "LIKE",
"var": "sub_dist_code"
},
{
"field": "status",
"op": "=",
"var": "status"
}
]
},
"filter_labels":{
"sub_dist_name": "分销商名称",
"sub_dist_code": "分销商编号",
"status": "状态"
},
"page_rows":160,
"cache_limit":5
}
,"binds":[
{
"wid": "self",
"event": "distribution_agreements",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "分销协议",
"height": "80%",
"width": "85%"
},
"params_mapping": {
"mapping": {"id": "sub_reseller_id"},
"need_other": false
},
"options": {
"method": "GET",
"url": "{{entire_url('/supplychain/distribution_agreements_list')}}?sub_reseller_id={{params_kw.get('id','')}}"
}
},
{
"wid": "self",
"event": "add_admin",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "添加管理员",
"height": "250px",
"width": "400px"
},
"params_mapping": {
"mapping": {"id": "sub_distributor_id"},
"need_other": false
},
"options": {
"method": "POST",
"url": "{{entire_url('/supplychain/api/add_sub_distributor_admin.dspy')}}"
}
},
{
"wid": "self",
"event": "reset_admin_pwd",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "重置管理员密码",
"height": "250px",
"width": "400px"
},
"params_mapping": {
"mapping": {"id": "sub_distributor_id"},
"need_other": false
},
"options": {
"method": "POST",
"url": "{{entire_url('/supplychain/api/reset_sub_distributor_admin_pwd.dspy')}}"
}
}
]
}]
}