• 常用窗体表单布局


      1 Ext.define('PMS.view.whm.dailyWarehouseManagement.suppliesInventoryPlan.EditSuppliesInventoryPlan', {
      2     extend: 'Ext.window.Window',
      3     alias: 'widget.editSuppliesInventoryPlan',
      4     border: false,
      5     modal: true,
      6     autoScroll: true,
      7      580,
      8     height: 250,
      9     layout: 'fit',
     10     title: '新建物资盘点计划',
     11     initComponent: function () {
     12         var me = this;
     13         var record = me.record;
     14         Ext.applyIf(me, {
     15             items: [{
     16                 xtype: 'form',
     17                 name: 'addPlanForm',
     18                 layout: 'vbox',
     19                 frame: true,
     20                 border: true,
     21                 bodyPadding: 20,
     22                 items: [
     23                    {
     24                        xtype: 'fieldcontainer',
     25                        layout: 'hbox',
     26                        defaults: {
     27                            labelWidth: 80,
     28                             240,
     29                            margin: '5 0 5 0',
     30                            msgTarget: 'side',
     31                            autoFitErrors: false,
     32                            labelAlign: 'right'
     33                        },
     34                        items: [{
     35                            //第一行
     36                            //1.1 计划名称-编制说明
     37                            xtype: 'textfield',
     38                            fieldLabel: '计划名称',
     39                            name: 'InventoryPlanName',
     40                            allowBlank: false,
     41                            blankText: "plann name cannot be empty.",
     42                            value: me.edit ? record.get('InventoryPlanName') : null
     43                        }, {
     44                            xtype: 'textfield',
     45                            fieldLabel: '编制说明',
     46                            name: 'PrepareState',
     47                            value: me.edit ? record.get('PrepareState') : null
     48                        }]
     49                    }, {
     50                        xtype: 'fieldcontainer',
     51                        layout: 'hbox',
     52                        defaults: {
     53                            labelWidth: 80,
     54                             240,
     55                            margin: '5 0 5 0',
     56                            msgTarget: 'side',
     57                            autoFitErrors: false,
     58                            labelAlign: 'right'
     59                        },
     60                        items: [{
     61                            //第二行
     62                            //2.编制人 2.编制人部门 
     63                            xtype: 'textfield',
     64                            fieldLabel: '编制人',
     65                            name: 'Preparer',
     66                            disabled: true,
     67                            value: me.edit ? record.get('Preparer') : 'Admin'
     68                        }, {
     69                            xtype: 'textfield',
     70                            fieldLabel: '部门',
     71                            name: 'Depart',
     72                            disabled: true,
     73                            value: me.edit ? record.get('Depart') : '机动部'
     74                        }]
     75                    }, {
     76                        xtype: 'fieldcontainer',
     77                        layout: 'hbox',
     78                        defaults: {
     79                            labelWidth: 80,
     80                             240,
     81                            margin: '5 0 5 0',
     82                            msgTarget: 'side',
     83                            autoFitErrors: false,
     84                            labelAlign: 'right'
     85                        },
     86                        items: [{
     87                            //第三行 编制日期  备注
     88                            xtype: 'datefield',
     89                            anchor: '100%',
     90                            fieldLabel: '编制日期',
     91                            maxValue: new Date(),
     92                            name: 'PrepareDate',
     93                            disabled:true,
     94                            value: me.edit ? record.get('PrepareDate') : new Date()
     95                        }, {
     96                            xtype: 'textfield',
     97                            anchor: '100%',
     98                            fieldLabel: '备注',
     99                            name: 'Remark',
    100                            value: me.edit ? record.get('Remark') : null
    101                        }]
    102                    }]
    103             }],
    104             dockedItems: [{
    105                 xtype: 'toolbar',
    106                 dock:'bottom',
    107                 items: ['->', {
    108                     xtype: 'button',
    109                     name: 'saveBtn',
    110                     iconCls: 'save',
    111                     text: '保存'
    112                 }, {
    113                     xtype: 'button',
    114                     name: 'cancelBtn',
    115                     iconCls: 'delete',
    116                     text: '取消',
    117                     margin: '0 10 0 10'
    118                 }]
    119             }]
    120         });  //Ext.applyIf
    121         me.callParent(arguments);
    122     } // 构造函数
    123 
    124 
    125 });     //定义window
  • 相关阅读:
    差分约束
    DevOps系列【centos 7离线安装中文版GitLab】
    Linux系列【硬盘的插入、分区、格式化、挂载】
    并发编程系列【ThreadLocal】
    Linux系列【从一台linux通过ssh登录另一台linux服务器】
    idea系列【配置git忽略文件和目录规则】
    网络编程系列【文件上传(C/S)】
    常见的问题系列【tar: Error is not recoverable: exiting now】
    网络编程系列【TCP通信原理】
    DevOps系列【Jenkinsfile+Dockerfile+nginx+vue】
  • 原文地址:https://www.cnblogs.com/denghuachengle/p/3867863.html
Copyright © 2020-2023  润新知