324 lines
7.6 KiB
XML
324 lines
7.6 KiB
XML
|
|
{
|
|
"widgettype":"VBox",
|
|
"options":{"height":"100%","width":"100%"},
|
|
"subwidgets":[
|
|
|
|
{
|
|
"widgettype":"InlineForm",
|
|
"id":"pricing_program_search",
|
|
"options":{
|
|
"css":"card",
|
|
"padding":"8px",
|
|
"show_label":false,
|
|
"submit_label":"搜索",
|
|
"submit_css":"primary",
|
|
"fields":[
|
|
{"name":"name","uitype":"str","placeholder":"项目名称","cwidth":15},
|
|
{"name": "providerid", "uitype": "code", "placeholder": "供应商", "cwidth": 15, "valueField": "providerid", "textField": "providerid_text", "params": {"dbname": "{{get_module_dbname('pricing')}}", "table": "organization", "tblvalue": "id", "tbltext": "orgname", "valueField": "providerid", "textField": "providerid_text"}, "dataurl": "{{entire_url('/appbase/get_code.dspy')}}"}
|
|
]
|
|
},
|
|
"binds":[{
|
|
"wid":"self",
|
|
"event":"submit",
|
|
"actiontype":"script",
|
|
"target":"pricing_program_tbl",
|
|
"script":"var tbl = bricks.getWidgetById('pricing_program_tbl', bricks.app.root); if(tbl) await tbl.render(params);"
|
|
}]
|
|
},
|
|
|
|
{
|
|
"id":"pricing_program_tbl",
|
|
"widgettype":"Tabular",
|
|
"options":{
|
|
"width":"100%",
|
|
"height":"100%",
|
|
|
|
|
|
"title":"定价项目",
|
|
|
|
|
|
|
|
|
|
"toolbar":{
|
|
"tools": [
|
|
{
|
|
"name": "test",
|
|
"label": "测试",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/test.svg')}}"
|
|
},
|
|
{
|
|
"selected_row": true,
|
|
"name": "pricing_program_timing",
|
|
"icon": "{{entire_url('/imgs/pricing_program_timing.svg')}}",
|
|
"label": "定价项目时序"
|
|
}
|
|
]
|
|
},
|
|
|
|
"css":"card",
|
|
|
|
|
|
"editable":{
|
|
|
|
"new_data_url":"{{entire_url('add_pricing_program.dspy')}}",
|
|
|
|
|
|
"delete_data_url":"{{entire_url('delete_pricing_program.dspy')}}",
|
|
|
|
|
|
"update_data_url":"{{entire_url('update_pricing_program.dspy')}}"
|
|
|
|
},
|
|
|
|
|
|
"data_url":"{{entire_url('./get_pricing_program.dspy')}}",
|
|
|
|
"data_method":"GET",
|
|
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
|
"row_options":{
|
|
|
|
|
|
|
|
"browserfields": {
|
|
"exclouded": [
|
|
"id",
|
|
"ownerid",
|
|
"pricing_spec"
|
|
],
|
|
"alters": {
|
|
"discount": {
|
|
"rules": [
|
|
{
|
|
"type": "required",
|
|
"message": "折扣不能为空"
|
|
},
|
|
{
|
|
"type": "number",
|
|
"message": "折扣必须是数字"
|
|
},
|
|
{
|
|
"type": "min",
|
|
"value": 0,
|
|
"message": "折扣不能小于0"
|
|
},
|
|
{
|
|
"type": "max",
|
|
"value": 1,
|
|
"message": "折扣不能大于1"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
|
|
|
|
"editexclouded":[
|
|
"id",
|
|
"ownerid"
|
|
],
|
|
|
|
"fields":[
|
|
{
|
|
"name": "id",
|
|
"title": "id",
|
|
"type": "str",
|
|
"length": 32,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "id"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"title": "项目名称",
|
|
"type": "str",
|
|
"length": 256,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "项目名称"
|
|
},
|
|
{
|
|
"name": "ownerid",
|
|
"title": "所属机构",
|
|
"type": "str",
|
|
"length": 32,
|
|
"label": "所属机构",
|
|
"uitype": "code",
|
|
"valueField": "ownerid",
|
|
"textField": "ownerid_text",
|
|
"params": {
|
|
"dbname": "{{get_module_dbname('pricing')}}",
|
|
"table": "organization",
|
|
"tblvalue": "id",
|
|
"tbltext": "orgname",
|
|
"valueField": "ownerid",
|
|
"textField": "ownerid_text"
|
|
},
|
|
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
|
|
},
|
|
{
|
|
"name": "providerid",
|
|
"title": "供应商",
|
|
"type": "str",
|
|
"length": 32,
|
|
"label": "供应商",
|
|
"uitype": "code",
|
|
"valueField": "providerid",
|
|
"textField": "providerid_text",
|
|
"params": {
|
|
"dbname": "{{get_module_dbname('pricing')}}",
|
|
"table": "organization",
|
|
"tblvalue": "id",
|
|
"tbltext": "orgname",
|
|
"valueField": "providerid",
|
|
"textField": "providerid_text"
|
|
},
|
|
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
|
|
},
|
|
{
|
|
"name": "pricing_belong",
|
|
"title": "定价属于",
|
|
"type": "str",
|
|
"length": 32,
|
|
"label": "定价属于",
|
|
"uitype": "code",
|
|
"valueField": "pricing_belong",
|
|
"textField": "pricing_belong_text",
|
|
"params": {
|
|
"dbname": "{{get_module_dbname('pricing')}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "pricing_belong",
|
|
"textField": "pricing_belong_text",
|
|
"cond": "parentid='pricing_belong'"
|
|
},
|
|
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
|
|
},
|
|
{
|
|
"name": "discount",
|
|
"title": "供应商折扣",
|
|
"type": "float",
|
|
"length": 18,
|
|
"dec": 2,
|
|
"cwidth": 18,
|
|
"uitype": "float",
|
|
"datatype": "float",
|
|
"label": "供应商折扣",
|
|
"rules": [
|
|
{
|
|
"type": "required",
|
|
"message": "折扣不能为空"
|
|
},
|
|
{
|
|
"type": "number",
|
|
"message": "折扣必须是数字"
|
|
},
|
|
{
|
|
"type": "min",
|
|
"value": 0,
|
|
"message": "折扣不能小于0"
|
|
},
|
|
{
|
|
"type": "max",
|
|
"value": 1,
|
|
"message": "折扣不能大于1"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "description",
|
|
"title": "描述",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "描述"
|
|
},
|
|
{
|
|
"name": "pricing_spec",
|
|
"title": "规格明细",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "规格明细"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
"data_filter":{
|
|
"fields": [
|
|
{
|
|
"field": "name",
|
|
"title": "项目名称",
|
|
"uitype": "str"
|
|
},
|
|
{
|
|
"field": "providerid",
|
|
"title": "供应商",
|
|
"uitype": "code"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
"page_rows":160,
|
|
"cache_limit":5
|
|
}
|
|
|
|
,"binds":[
|
|
{
|
|
"wid": "self",
|
|
"event": "test",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"width": "70%",
|
|
"height": "70%",
|
|
"auto_open": true,
|
|
"archor": "cc",
|
|
"title": "定价测试"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('../test_pricing_program.ui')}}",
|
|
"params": {}
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "pricing_program_timing",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "定价项目时序",
|
|
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=pricing_program_timing",
|
|
"resizable": true,
|
|
"height": "70%",
|
|
"width": "70%"
|
|
},
|
|
"params_mapping": {
|
|
"mapping": {
|
|
"id": "ppid",
|
|
"referer_widget": "referer_widget"
|
|
},
|
|
"need_other": false
|
|
},
|
|
"options": {
|
|
"method": "POST",
|
|
"params": {},
|
|
"url": "{{entire_url('../pricing_program_timing')}}"
|
|
}
|
|
}
|
|
]
|
|
|
|
}]
|
|
} |