Eos开发——构造查询条件

时间:2022-04-25 22:32:33

1、ajax 方式

var data = { orgid :orgid,year:year ,month: month,type:type,sortField:'sellEmpname' ,sortOrder: 'asc'};
var json = nui.encode( { criteria: {_expr:[data] }, configCode: configCode });

2、datagrid 构造对象

var param = [ { projectId:projectId }, {projectType:projectType }];
grid.load( { criteria: { _expr:param,_orderby:[{ _property: 'appStatusOrder',_sort: 'asc' }] }});

e.g:

 function find(){
param1=;
var orgId=nui.get("orgidInput").getValue();
debugger;
var param = [ { orgid:orgId}];
grid.load({ 'criteria': { _expr:param},'param':param1});
}