123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- 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);
- }
- });
|