Skip to content

Store 与 XWL 文件

Store 数据源、serverScript 和 dataprovider SQL 的配置说明。

Updated View as Markdown

store 数据源

//store 的加载
app.gridFee.store.load({
  params:{
    ID:records[0].data.ID
  },//方法1
  out: app.panel//方法2
});
//store beforeLoad
operation.params = {
    billId: app.fileBillId.getValue()
};

store不使用xwl

//设置fieds
['label1','label2','label3']
//或
[{
  name: 'BILL_NO',
  type: 'string'
}, {
  name: 'INV_NO',
  type: 'string'
}, {
  name: 'PLAN_MNY',
  type: 'string'
}, {
  name: 'COIN',
  type: 'string'
},
{
  name: 'NOTES',
  type: 'string'
}]

xwl文件

serverScript

var sql, data = app.get();//获取页面传过来的参数
sql = " ";//拼接sql字符串
if (!Wb.isEmpty(data.lineId)){
  sql += "  and  LINE_ID like '%'||{?lineId?}||'%'";
}
request.setAttribute("whereSql",sql);

dataprovider的sql

select ID, LINE_ID, SIZE_CODE, TYPE_CODE, YARD_CODE, 
       NOTE, CREATED_BY, CREATED_ON,UPDATED_BY, UPDATED_ON
from C_EIRPLAN_TEMPLATE WHERE 1=1 {#whereSql#}	
select ID, LINE_ID, SIZE_CODE, TYPE_CODE, YARD_CODE, 
       NOTE, CREATED_BY, CREATED_ON,UPDATED_BY, UPDATED_ON
from C_EIRPLAN_TEMPLATE WHERE 1=1 {?lineId?}	
Navigation

Type to search…

↑↓ navigate↵ selectEsc close