- Added rules to discount field: required, number, min:0, max:1 - Frontend: Form validates on submit, shows error below field - Backend: auto-generated dspy validates before DB write
260 lines
5.7 KiB
XML
260 lines
5.7 KiB
XML
|
|
{
|
|
"widgettype":"VBox",
|
|
"options":{"cheight":40,"width":"100%"},
|
|
"subwidgets":[{
|
|
"id":"pricing_program_timing_tbl",
|
|
"widgettype":"Tabular",
|
|
"options":{
|
|
"width":"100%",
|
|
"height":"100%",
|
|
|
|
|
|
"title":"定价项目时序",
|
|
|
|
|
|
|
|
|
|
"toolbar":{
|
|
"tools": [
|
|
{
|
|
"name": "download_pattern",
|
|
"label": "定价模版",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/download.svg')}}"
|
|
},
|
|
{
|
|
"name": "upload_pricing_data",
|
|
"label": "上传定价数据",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/upload.svg')}}"
|
|
},
|
|
{
|
|
"name": "download_pricing_data",
|
|
"label": "下载定价数据",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/download.svg')}}"
|
|
},
|
|
{
|
|
"name": "test",
|
|
"selected_row": true,
|
|
"label": "验证定价",
|
|
"icon": "{{entire_url('/bricks/imgs/test.svg')}}"
|
|
},
|
|
{
|
|
"selected_row": true,
|
|
"name": "pricing_item",
|
|
"icon": "{{entire_url('/imgs/pricing_item.svg')}}",
|
|
"label": "定价细项"
|
|
}
|
|
]
|
|
},
|
|
|
|
"css":"card",
|
|
|
|
|
|
"editable":{
|
|
|
|
"new_data_url":"{{entire_url('add_pricing_program_timing.dspy')}}",
|
|
|
|
|
|
"delete_data_url":"{{entire_url('delete_pricing_program_timing.dspy')}}",
|
|
|
|
|
|
"update_data_url":"{{entire_url('update_pricing_program_timing.dspy')}}"
|
|
|
|
},
|
|
|
|
|
|
"data_url":"{{entire_url('./get_pricing_program_timing.dspy')}}",
|
|
|
|
"data_method":"GET",
|
|
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
|
"row_options":{
|
|
|
|
|
|
|
|
"browserfields": {
|
|
"exclouded": [
|
|
"id",
|
|
"ppid"
|
|
],
|
|
"alters": {}
|
|
},
|
|
|
|
|
|
"editexclouded":[
|
|
"id",
|
|
"ppid",
|
|
"name"
|
|
],
|
|
|
|
"fields":[
|
|
{
|
|
"name": "id",
|
|
"title": "id",
|
|
"type": "str",
|
|
"length": 32,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "id"
|
|
},
|
|
{
|
|
"name": "ppid",
|
|
"title": "定价项目id",
|
|
"type": "str",
|
|
"length": 32,
|
|
"label": "定价项目id",
|
|
"uitype": "code",
|
|
"valueField": "ppid",
|
|
"textField": "ppid_text",
|
|
"params": {
|
|
"dbname": "{{get_module_dbname('pricing')}}",
|
|
"table": "pricing_program",
|
|
"tblvalue": "id",
|
|
"tbltext": "name",
|
|
"valueField": "ppid",
|
|
"textField": "ppid_text"
|
|
},
|
|
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"title": "名称",
|
|
"type": "str",
|
|
"length": 256,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "名称"
|
|
},
|
|
{
|
|
"name": "pricing_data",
|
|
"title": "定价数据",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "定价数据"
|
|
},
|
|
{
|
|
"name": "enabled_date",
|
|
"title": "启用日期",
|
|
"type": "date",
|
|
"length": 0,
|
|
"uitype": "date",
|
|
"datatype": "date",
|
|
"label": "启用日期"
|
|
},
|
|
{
|
|
"name": "expired_date",
|
|
"title": "失效日期",
|
|
"type": "date",
|
|
"default": "9999-12-31",
|
|
"length": 0,
|
|
"uitype": "date",
|
|
"datatype": "date",
|
|
"label": "失效日期"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"page_rows":160,
|
|
"cache_limit":5
|
|
}
|
|
|
|
,"binds":[
|
|
{
|
|
"wid": "self",
|
|
"event": "download_pattern",
|
|
"actiontype": "newwindow",
|
|
"target": "self",
|
|
"options": {
|
|
"params": {
|
|
"ppid": "{{params_kw.ppid}}"
|
|
},
|
|
"method": "POST",
|
|
"url": "{{entire_url('../download_pricing_pattern.dspy')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "upload_pricing_data",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "上传定价数据"
|
|
},
|
|
"options": {
|
|
"params": {
|
|
"ppid": "{{params_kw.ppid}}"
|
|
},
|
|
"method": "POST",
|
|
"url": "{{entire_url('../load_pricing_data.ui')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "download_pricing_data",
|
|
"actiontype": "newwindow",
|
|
"target": "self",
|
|
"options": {
|
|
"params": {
|
|
"id": "{{params_kw.id}}"
|
|
},
|
|
"method": "POST",
|
|
"url": "{{entire_url('../download_pricing_data.dspy')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "test",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "验证定价"
|
|
},
|
|
"options": {
|
|
"params": {
|
|
"id": "{{params_kw.id}}"
|
|
},
|
|
"method": "POST",
|
|
"url": "{{entire_url('../pricing_test.ui')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "pricing_item",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "定价细项",
|
|
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=pricing_item",
|
|
"resizable": true,
|
|
"height": "70%",
|
|
"width": "70%"
|
|
},
|
|
"params_mapping": {
|
|
"mapping": {
|
|
"id": "pptid",
|
|
"referer_widget": "referer_widget"
|
|
},
|
|
"need_other": false
|
|
},
|
|
"options": {
|
|
"method": "POST",
|
|
"params": {},
|
|
"url": "{{entire_url('../pricing_item')}}"
|
|
}
|
|
}
|
|
]
|
|
|
|
}]
|
|
} |