| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- Ext.define('erp.view.pm.bom.CheckBom',{
- extend: 'Ext.Viewport',
- layout: 'anchor',
- hideBorders: true,
- initComponent : function(){
- var me = this;
- Ext.apply(me, {
- items: [{
- xtype: 'erpFormPanel',
- anchor: '100% 20%',
- id:'formPanel',
- enableTools: false
- },{
- xtype: 'grid',
- id: 'bom-check',
- anchor: '100% 80%',
- columns: [{
- text: '',
- dataIndex: 'check',
- flex: 1,
- renderer: function(val, meta, record) {
- meta.tdCls = val;
- return '';
- }
- },{
- text: '检测项',
- dataIndex: 'VALUE',
- flex: 10,
- renderer: function(val, meta, record) {
- if(record.get('check') == 'error') {
- meta.style = 'color: gray';
- }
- return val;
- }
- },{
- text: '',
- dataIndex: 'link',
- flex: 1,
- renderer: function(val, meta, record) {
- if(record.get('check') == 'error') {
- meta.tdCls = 'detail';
- return '详细情况';
- }
- return '';
- }
- }],
- columnLines: true,
- store: Ext.create('Ext.data.Store',{
- fields: [{name: 'TYPE', type: 'string'}, {name: 'VALUE', type: 'string'}],
- proxy: {
- type: 'ajax',
- url:basePath+'pm/bomCheck/getBomCheckItems.action?caller=BomCheck',
- reader: {
- //数据格式为json
- type: 'json',
- root: 'data'
- }
- },
- autoLoad:true
- })
- }]
- });
- me.callParent(arguments);
- }
- });
|