Ext.define('erp.view.ma.datalimit.LimitForm',{ extend: 'Ext.form.Panel', alias: 'widget.limitform', hideBorders: true, id:'limitform', frame:true, autoScroll:true, dockedItems: [{ xtype: 'toolbar', dock: 'top', ui: 'footer', items: [{ text: '保存权限', itemId:'save', iconCls:'x-button-icon-save', cls: 'x-btn-gray', formBind: true },'-',{ text:'复制权限', itemId:'copy', cls: 'x-btn-gray', iconCls:'x-button-icon-copy' },'-',{ text:'删除权限', itemId:'delete', cls:'x-btn-gray', iconCls:'x-button-icon-deletedetail' }] }], items:[{ xtype: 'container', layout: 'hbox', margin:'0 0 10', items: [{ xtype: 'fieldset', flex: 1, layout: 'anchor', defaults: { anchor: '100%', hideEmptyLabel: false }, items: [{ xtype: 'radiogroup', fieldLabel:'用户类型', defaults: { name: 'type_', margins: '0 15 0 0' }, items: [{ inputValue: 'employee', boxLabel: '人员', checked: true }, { inputValue: 'job', boxLabel: '岗位', disabled:true }] },{ xtype:'multifield', fieldLabel:'当前用户', allowBlank:false, name:'emcode_', id:'emcode_', secondname:'emname_' },{ xtype:'hidden', name:'empid_', id:'empid_' },{ xtype:'hidden', name:'instanceid_', id:'instanceid_', value:0 }] }, { xtype: 'component', width: 10 },{ xtype:'checkbox', flex:1, name:'nolimit_', id:'nolimit_', inputValue:1, boxLabel:'拥有当前数据类型的全部数据权限', checked:true, disabled:true }] },{ xtype: 'container', layout: 'column', margin:'0 0 10', items:[{ xtype: 'fieldset', flex: 1, columnWidth:0.5, layout: 'anchor', defaults: { anchor: '100%', hideEmptyLabel: false }, items:[{ xtype:'fieldcontainer', layout:'hbox', hideLabel:true, items:[{ xtype:'combo', flex:1, margin: '5 0 0 0', fieldLabel:'数据类型', allowBlank:false, name:'limit_id_', id:'limit_id_', listConfig:{ maxHeight:180 }, store: { fields: ['desc_', 'id_','table_'], data :[] }, displayField: 'desc_', valueField: 'id_', queryMode: 'local', editable:false, onTriggerClick:function(trigger){ var me=this,store=this.getStore(); if(store.totalCount<1){ var limitstore=Ext.data.StoreManager.lookup('ma.DataLimitStore'),arr=new Array(); Ext.Array.each(limitstore.data.items,function(item){ arr.push(item.data); });; store.loadData(arr); } if (!me.readOnly && !me.disabled) { if (me.isExpanded) { me.collapse(); } else { me.expand(); } me.inputEl.focus(); } } },{ xtype:'button', iconCls: 'x-button-icon-data', margin: '5 0 0 5', padding:'0 0 2 0', width:22, tooltip:'选择数据', cls: 'x-btn-gray', disabled:true, itemId:'select' }] },{ xtype:'radiogroup', fieldLabel:'授权类型', id:'limittype_', defaults: { name: 'limittype_', margins: '0 15 0 0' }, items:[{ inputValue: 'detail', boxLabel: '按明细数据授权', checked: true },{ inputValue: 'condition', boxLabel:'按条件语句授权' }/*{ inputValue: 'parent', boxLabel:'按上级组授权', disabled:true }*/] },{ xtype:'textareafield', fieldLabel:'条件语句', name:'condition_', id:'condition_', hidden:true, readOnly:true }] },{ flex:1, columnWidth:0.5, margin: '0 0 0 10', xtype:'checkbox', name:'noaddlimit_', id:'noaddlimit_', inputValue:1, boxLabel:'自动具有新增加数据的全部权限', disabled:true },{ xtype:'checkbox', flex:1, margin: '0 0 0 10', columnWidth:0.5, name:'usereport_', id:'usereport_', inputValue:1, boxLabel:'报表查询进行数据检查', disabled:true }] }], initComponent : function(){ var me = this; me.callParent(arguments); } });