Ext 中grid 子columns 取store 中变量

var grid=Ext.create('Ext.grid.Panel',{
id:'grid',
region:'center',
width:1760,
height:570,
store:vstore,
border:true,
autoScroll:true,
//'CONSUMAGE','MAT_NAME','MAT_NO','NOWKC','PLANTCODE','PLANTNAME','PLANT_NUM','PLAN_NUM','PRICE','SUMKC','SUMNUMB','YEARJFIVE','YEARJFOUR','YEARJONE','YEARJTHREE','YEARJTWO','YEARNOWJ'
columns:[{header:'物资编码',text:'a',dataIndex:'MAT_NO',sortable:true,align:'center',width:'114'},
         {header:'物资名称',text:'b',dataIndex:'MAT_NAME',sortable:true,align:'center',width:'75'},
         {header:'所属厂矿',text:'c',dataIndex:'PLANTNAME',sortable:true,align:'center',width:'75'},
         {header:'厂矿',store:vstore,columns:[
                               {header:sysYear-5+'年',text:'d',width:'60',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{YEARJFIVE}'},
                               {header:sysYear-4+'年',text:'e',width:'60',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{YEARJFOUR}'},
                               {header:sysYear-3+'年',text:'f',width:'60',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{YEARJTHREE}'},
                               {header:sysYear-2+'年',text:'g',width:'60',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{YEARJTWO}'},
                               {header:sysYear-1+'年',text:'h',width:'60',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{YEARJONE}'},
                               {header:sysYear+'年',text:'i',width:'60',sortable:true, dataInder:'YEARNOWJ',align:'center',xtype:'templatecolumn', tpl:'{YEARNOWJ}'},
                               {header:'年计划数量',text:'j',width:'80',sortable:true, dataInder:'PLANT_NUM',align:'center',xtype:'templatecolumn', tpl:'{PLANT_NUM}'},
                               {header:'当前库存',text:'k',width:'80',sortable:true, dataInder:'NOWKC',align:'center',xtype:'templatecolumn', tpl:'{NOWKC}'},
                               {header:'消耗平均信息',text:'l',width:'85',sortable:true, dtaInder:'CONSUMAGE',align:'center',xtype:'templatecolumn', tpl:'{CONSUMAGE}'},
                               {header:'审核后数量',text:'m',width:'80',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{0}'}
                               ]},
         {header:'合计',store:vstore,columns:[
                               {header:'总库存(所有厂矿)',text:'n',width:'115',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{SUMKC}'},
                         {header:'2018年计划合计',text:'o',width:'105',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{PLAN_NUM}'},
                         {header:'当前库存合计',text:'p',width:'90',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{SUMKC}'},
                         {header:'审核后数量合计',text:'q',width:'100',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{0}'},
                         {header:'计划金额合计',text:'r',width:'90',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{PRICE}'},
                         {header:'审核后金额合计',text:'s',width:'100',sortable:true,align:'center',xtype:'templatecolumn', tpl:'{0}'}
                         ]}
         ]
});
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值