ExtJs fieldset区域中,动态添加多个块集合

电脑杂谈  发布时间:2020-02-10 15:01:02  来源:网络整理

extjs fieldset溢出_extjs fieldset 隐藏_extjs的fieldset

var formPssq = new Beidasoft.Bap.FormPanel({

title: '线下评审',

renderTo: 'main',

submitServiceUrl: 'pingshenService/saveBelowlinePsjl/',

labelWidth : 120,

frame: true,

border: false,

baseCls: 'x-panel',

autoWidth : true,

// autoHeight: true,

fileUpload : true,

autoScroll : true,

defaultType : 'textfield',

plugins: [new Ext.ux.plugins.FitToParent()],

items: [ {

xtype : 'panel',

layout : 'column',

labelWidth : 80,

id : 'gzcp',

anchor : '96%',

border : false,

frame : true,

items : [ {

columnWidth : .95,

xtype : 'panel',

layout : 'form',

items : [ fieldSet = new Ext.form.FieldSet({

title : '评审产品',

fieldLabel : '',

extjs fieldset 隐藏_extjs的fieldset_extjs fieldset溢出

id : 'addTaskReportFieldSetID',

autoHeight : true,

defaultType : 'textfield',

anchor : '100%',

defaultType : 'displayfield',

// autoScroll : true,

labelWidth : 60

}) ]

}, addFileButton = new Ext.Button({

text : '添加',

id : 'semip_storage_btn',

iconCls : 'page_add',

handler : addFile

}) ]

},

{

xtype : 'panel',

layout : 'form',

defaultType : 'textfield',

items : [ repFileNumber = new Ext.form.Field({

inputType : 'hidden',

name : 'repFileNumber',

value : 0

}), repFileDelete = new Ext.form.Field({

inputType : 'hidden',

name : 'repFileDelete'

}) ]

}]

})

extjs fieldset溢出_extjs的fieldset_extjs fieldset 隐藏

// 添加fieldset区域的步骤

function addFile() {

// 如果没有PDM,则隐藏单选框的那一行

var number = repFileNumber.getValue();

var fileName = 'file_' + number;

//fileNames += fileName + ','; // 到时候隐藏时用的

repFileNumber.setValue(parseInt(number) + 1);

var lText = '<a href="#">删除</a>&nbsp;&nbsp;';

fieldSet.add(new Ext.form.FieldSet({

title: lText,

id : fileName,

frame : true,

//bodyStyle : 'padding:5px 5px 0',

items : [ {

layout : 'column',

xtype : 'panel',

anchor: '92%',

items : [ {

columnWidth : .5,

layout : 'form',

items : [ {

xtype : 'filefield',

id : fileName + 'pscp',

nameValue : 'pscp' + number,

fieldLabel : '评审产品<font color=\'red\'>*</font>',

allowBlank:false,

anchor : '95%'

}]

} ,

extjs fieldset 隐藏_extjs的fieldset_extjs fieldset溢出

{

columnWidth : .5,

layout : 'form',

items : [{

xtype : 'combo',

id : fileName + 'psjcd',

hiddenName : 'psjcd' + number,

fieldLabel : '评审检查单',

store : jcdStore,

mode : 'local',

editable : false,

allowBlank:false,

valueField : 'id',

displayField : 'text',

triggerAction : 'all',

anchor:'95%'

}]

}]

},

{

xtype: 'panel',

layout: 'column',

anchor: '92%',

items: [{

columnWidth: .5,

layout: 'form',

items: [{

xtype: 'numberfield',

fieldLabel: '评审产品规模',

extjs fieldset 隐藏_extjs fieldset溢出_extjs的fieldset

allowDecimals : false, // 不允许小数

allowNegative : false, // 不允许负数

allowBlank:false,

id: fileName+'pscpgm',

name: 'pscpgm' + number,

anchor: '95%'

}]

},

{

columnWidth: .5,

layout: 'form',

items: [{

xtype : 'combo',

id: fileName+'gmlx',

hiddenName : 'gmlx' + number,

fieldLabel : '规模类型',

store : gmlxStore,

mode : 'local',

editable : false,

allowBlank:false,

valueField : 'id',

displayField : 'text',

value: '01',

triggerAction : 'all',

anchor:'95%'

}]

}]

}]

}));

fieldSet.doLayout();

}


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-140305-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...