Ext简单表单

  小小的表单,给大家分享一下,有可能大家会用的到。

啥也不说啦,童鞋们也没心情看这些废话,请看表单的代码吧!

一、

//定义一个表单

var form = new Ext.form.FormPanel({
   title:'资产租赁登记',
   randerTo:'form',
   layout: 'anchor',
   frame:true,
   width: 500,
   height: 500,
   padding: 5,   
   //tbar:tb,
   reader: new Ext.data.JsonReader({ //用于通过JSON将数据填充到表单
     success : 'success',
     root : 'root'
    }, [{
     name: 'lsh',type: 'string'},

{name: 'codw',type: 'string'},

{name: 'cojbr',type: 'string'},

{name: 'colxfs',type: 'string'},

{name: 'cidw',type: 'string'},

{name: 'cijbr',type: 'string'},

{name: 'cilxfs',type: 'string'},

{ name: 'zcbh',type: 'string'},

{ name: 'zljg',type: 'string'},

{name: 'qsrq',type: 'string'},

{name: 'jzrq',type: 'string'},

{name: 'bz',type: 'string'}

]),
 items: [{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'lsh',name:'lsh',border:false,anchor:'70%',fieldLabel: '申请单号',readOnly:false}]}] },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'zcbh',name:'zcbh',border:false,anchor:'70%',fieldLabel: '资产编号',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'zljg',name:'zljg',border:false,anchor:'70%',fieldLabel: '租赁价格',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'codw',name:'codw',border:false,anchor:'70%',fieldLabel: '出租方',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'cidw',name:'cidw',border:false,anchor:'70%',fieldLabel: '承租方',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'cojbr',name:'cojbr',border:false,anchor:'70%',fieldLabel: '出租方经办人',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'cijbr',name:'cijbr',border:false,anchor:'70%',fieldLabel: '承租方经办人',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'colxfs',name:'colxfs',border:false,anchor:'70%',fieldLabel: '出租方联系方式',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'textfield',id:'cilxfs',name:'cilxfs',border:false,anchor:'70%',fieldLabel: '承租方联系方式',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'datefield',id:'qsrq',name:'qsrq',border:false,anchor:'70%',fieldLabel: '租赁起始日期',readOnly:false}]
      }]
     },{
      layout: 'column',
      border:false,
      padding: 0,

      items: [{
       columnWidth: 0.99,
       layout: 'form',
       border:false,
       items: [{xtype: 'datefield',id:'jzrq',name:'jzrq',border:false,anchor:'70%',fieldLabel: '租赁截止日期',readOnly:false}]
      }]
     },{
      border:false,
      items: [{
       layout: 'form',
       border:false,
       items: [{xtype: 'textarea',id:'bz',name:'bz',border:false,anchor:'80%',fieldLabel: '备注',readOnly:false}]
      }]
     }]
    

二、图片效果如图:
  });

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值