123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- Ext.define('erp.view.ma.logic.masterManage',{
- extend: 'Ext.Viewport',
- layout: 'border',
- hideBorders: true,
- initComponent : function(){
- var me = this;
- Ext.apply(me, {
- items: [{
- xtype: "form",
- autoShow: true,
- region:'center',
- bodyStyle:'background:#ffffff',
- layout:'column',
- margin:'100% 100% 100% 100%',
- title:'禁用/启用账套(√为已启用帐套,*标记为主账套)',
- id:'master',
- bbar: ['->',{xtype: 'erpConfirmButton'},{ xtype: 'erpCloseButton'},'->']
- }]
- });
- me.callParent(arguments);
- this.show();
- this.showMasters();
- },
- showMasters: function() {
-
- Ext.Ajax.request({
- async:true,
- url : basePath + 'common/getMasters.action',
- method : 'post',
- callback : function(opt,s,res){
- var data = Ext.decode(res.responseText);
- var form=Ext.getCmp('master');
- var check=true;
- var disabled=true;
- for(var i=0;i<data.masters.length;i++){
- /*如果账套不可用,则不勾选*/
- if(data.masters[i].ma_enable!=1){
- check=false;
- }
- /*主账套不可勾选*/
- if(data.masters[i].ma_name!=data.defaultSob){
- disabled=false;
- }else{
- data.masters[i].ma_function=data.masters[i].ma_function+"*";
- }
- var conitem=[{
- xtype: 'checkbox',
- inputValue: data.masters[i].ma_id,
- checked:check,
- disabled : disabled,
- columnWidth:0.25,
- margin:'10 0 0 10',
- text:data.masters[i].ma_enable,
- boxLabel: data.masters[i].ma_function
- }];
- check=true;
- disabled=true;
- form.add(conitem);
- }
- }
- });
- },
- });
|