...
03.根据列表某一字段的值进行按钮的隐藏显示
代码块 | ||||
---|---|---|---|---|
| ||||
{ "condition": ["ITEM"], "label": "提交", "key": "submit", "hide": "=function(){if(ITEM()==null){return true} else { return ITEM().state!=1?false:true}}", "func": "=function(){var data=ITEM();if (data.state==1){SCOPE.show_warning('该数据已提交');return;};SCOPE.show_warning('正在处理,不要重复点击');SCOPE.dynamicAction('submit',{'data':data}).then(function(data){SCOPE.fetchData();});SCOPE.fetchData();}" }, { "label": "发送通知", "condition": "MULTI_ITEM", "key": "send_message", "hide": "=function(){if(ITEMS()==null){return true} else {var datas=ITEMS();var len=datas.length;for(var index=0;index<len;index++){if(datas[index].status==1){return true;}}return false;}}", "func": "=function(){var data=ITEMS();SCOPE.show_warning('正在处理,不要重复点击');SCOPE.dynamicAction('send_message',{'data':data}).then(function(data){SCOPE.fetchData();});SCOPE.fetchData();}" } |
04.点击按钮弹出另一个模型卡片
代码块 | ||
---|---|---|
| ||
{ "action": "DYNAMIC_INFO", "key": "dialog", "label": "编辑", "params": { "async": true, "model": "recruitment_plan_year", "state": "single_view", "mode": "edit", #new|edit|view "data": "=function(){return dataService.callHcmOpenApi('hcm.model.get',{'model':'recruitment_plan_year','id_':ITEM().id}) }" } } |
...
代码块 | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"label": "查看流程",
"key": "workflow_check",
"condition": "ITEM",
"hide": "=function(){if(ITEM()==null){return true} else {return ITEM().workFlowInstance.state==null?true:false}}",
"left": true,
"func": "=function(){console.log(ITEM().wf_inst_id);SCOPE.super_go('workflow_bill_v3',{'business_id':229,'wf_inst_id':ITEM().wf_inst_id})}"
} |
06.info层子模型增加导入导出按钮
代码块 | ||||
---|---|---|---|---|
| ||||
{
"sequence": 30,
"key": "import",
"label": "导入",
"func": "=SCOPE.sub_import"
},
{
"sequence": 40,
"key": "export",
"label": "导出",
"func": "=SCOPE.sub_export"
} |
07.点击按钮弹出 List界面
代码块 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
{
"key": "list",
"label": "封存",
"action": "DYNAMIC_LIST",
"params": {
"model": "salary_budget_warn",
"filter_dict": "=function(){return SCOPE.getAllFilterDict()}"
},
"sequence": 1
}, |