extjs数据显示

lixionggangpo 2016-04-28 10:48:26

else if(helper_request.htlx=="分包合同")
{
var gysds = new Ext.data.Store({
// load using HTTP
proxy: new Ext.data.HttpProxy({url: '../../ExtUtil/getxmldata_xml.aspx'}),
baseParams: {cfgpath:'../ext1.1/budget/finishbalance_def.xml',sqlid: jssqlid,condition:"1=1" },
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'Table',
id: 'autoid',totalRecords: 'total'
}, ['autoid','ht_gid','ht_code','ht_name','ht_statid','ht_statstyle','ht_statdate','ht_statman','ht_statprice','ht_unit1','ht_statamount','ht_unit2',
'ht_statmoney','ht_isfinally','ht_id','jsdw','cbssbje','sjbl','wfstate','spcz','effectivedirect','rowindex','shzt','yfgck','bqyfgck'
])
});
var gyscm = new Ext.grid.ColumnModel([
{header: '序号',dataIndex: 'rowindex', width: 35,align:'center'},
{header: '合同名称',dataIndex: 'ht_name', width: 80},
{header: '结算单号',dataIndex: 'ht_statid', width: 80},
{header: '填报类型',dataIndex: 'effectivedirect', width: 60,renderer:transferdirect,hidden:true},
{header: '审批状态',dataIndex: 'wfstate', width: 60,renderer:transfershenpi,hidden:true},
{header: '结算时间',dataIndex: 'ht_statdate', width: 80},
// 2011-03-17 edit ------
{header: '本期完成产值',dataIndex: 'spcz', align:'right', width: 90,renderer:renderAmountZJ},
{header: '预付工程款',dataIndex: 'yfgck', align:'right', width: 90,renderer:renderAmountZJ},
{header: '本期应付工程款',dataIndex: 'bqyfgck', align:'right', width: 90,renderer:renderAmountZJ},
{header: '本期实际应付款',dataIndex: 'ht_statmoney', align:'right', width: 90,renderer:renderAmountZJ},
//-------------end---------------
{header: '分包单位',dataIndex: 'jsdw', width: 80},
{header: '提交状态',dataIndex: 'shzt', width: 80}

/*shzt是数据库查询出来的值,我想要当shzt为0时显示已删除,为1时显示已提交,为2时显示未提交*/
]);
}

...全文
168 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lixionggangpo 2016-05-09
  • 打赏
  • 举报
回复
很好,虽然第一次用还是学renderer花费了一些时间,但是很简单的就解决了我的问题,谢谢
y1g1y1 2016-05-01
  • 打赏
  • 举报
回复
使用 renderer
lixionggangpo 2016-04-28
  • 打赏
  • 举报
回复
shzt是数据库查询出来的值,我想要当shzt为0时显示已删除,为1时显示已提交,为2时显示未提交 大神们赐教一下

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧