• EXT总结例子


     //页面按钮点击展开隐藏
    {     空格
                        xtype:'fieldset',
                        title:'<b>高级搜索</b>',
                        collapsible: true, //默认显示页面隐藏
                        collapsed: true, //默认显示页面隐藏
                 
                        items:[{
                            xtype:'panel',
                            title:'受理范围',
                            height: 245,
                            collapsible:true,
                            items:[{
                                xtype:'kindeditor',
                                height:200,
                                name:'visa_range'
                            }]
                        },{
                            xtype:'panel',
                            title:'所需材料',
                            height: 245,
                            collapsible:true,
                            items:[{
                                xtype:'kindeditor',
                                height:200,
                                name:'visa_data'
                            }]
                        },{
                            xtype:'panel',
                            title:'详情说明',
                            height: 245,
                            collapsible:true,
                            margin:'10 0 10 0',
                            items:[{
                                xtype:'kindeditor',
                                height:200,
                                name:'visa_detail'
                            }]
                        },{
                            xtype:'panel',
                            title:'办证流程',
                            height: 245,
                            collapsible:true,
                            margin:'10 0 10 0',
                            items:[{
                                xtype:'kindeditor',
                                height:200,
                                name:'visa_flow'
                            }]
                        }]
             }
     
     
    //页面累加功能
     {
                                xtype: 'container',
                                layout: 'vbox',
                                items: [
                                    {
                                        xtype: 'button',
                                        text: '添加',
                                        handler: function(btn) {
                                            var con = btn.up();
                                            var len = con.items.length;
                                            con.add({
                                                xtype: 'container',
                                                layout: 'hbox',
                                                items: [
                                                    {
                                                        xtype: 'textfield',
                                                        fieldLabel: '文本' + len
                                                    },
                                                    {
                                                        xtype: 'button',
                                                        text: '移除',
                                                        handler: function(bb) {
                                                            var con1 = bb.up();
                                                            con.remove(con1);
                                                        }
                                                    }
                                                ]
                                            });
                                        }
                                    }
                                ]
                            }
    //提交按钮样式
     {
                        text:'提交',name:'ok',
                        cls:'btn btn-success',
                        handler:function(){
                            //找到当前窗口
                            var thiswindow =this;
                            this.up('addVisaView').down('form').submit({
                                waitMsg:'正在提交中',
                                clientValidation: true,
                                submitEmptyText: false,
                                url:__APP__+'Visa/addVisa',
                                params:{},
                                success:function(form, action){
                                    console.log(action.result);
                                    if(action.result.success == "true"){
                                        if(datas['rid']){
                                            Ext.Msg.alert('提示','编辑成功');
                                        }else{  
                                            Ext.Msg.alert('提示','添加成功');
                                        }
                                        thiswindow.up('addVisaView').close();
                                        Ext.getCmp('addListView').getStore().load();
                                    } else {
                                        // console.log("=====");
                                        // Ext.Msg.alert('提示', action.result.msg);
                                        Ext.Msg.alert('提示', "添加失败");
                                    }
                                },
                                failure:function(form, action){
                                    console.log(action.result);
                                    // Ext.Msg.alert('提示', action.result.msg);
                                }
                            });
                        }
                    } 
     
    //操作按钮换成图标(var  与   if)

    var m_confiureAuthRole = "<a href='javascript:void(0)' onclick=configureAuthRole("+record.get('id')+")>"+"<img src='./Gui/Public/Common/images/xinxi/s_44.png' title='设置权限'>"+"</a>&nbsp&nbsp&nbsp&nbsp";

    if(data.name=='distributionGroup_editProduct')setProductOfProductGroup = "<a href='javascript:void(0)' onclick=productDistributionView_setProductOfProductGroup('"+m_distributionGroupId+"')>"+"<img src='./Gui/Public/Common/images/xinxi/s_102.png' title='"+data.title+"'>"+"</a>&nbsp&nbsp";

    //直接汉字
    <img src="./Gui/Public/Common/images/xinxi/s_03.png" title="+编辑+">

    <img src='./Gui/Public/Common/images/xinxi/s_03.png' title='恢复绑定'>

    //循环的操作改图标

    Ext.Array.each(value,function(mv){
    //console.log(mv);

    var orderinfo = '';
    if(mv.name == 'resendCode')
    {
    orderinfo = "<img src='./Gui/Public/Common/images/xinxi/s_11.png' title='"+mv.title+"'>";
    }else if(mv.name == 'delayOrders')
    {
    orderinfo = "<img src='./Gui/Public/Common/images/xinxi/s_12.png' title='"+mv.title+"'>";
    }else if(mv.name == 'showOrders')
    {
    orderinfo = "<img src='./Gui/Public/Common/images/xinxi/s_13.png' title='"+mv.title+"'>";
    }else if(mv.name == 'noteOrders')
    {
    orderinfo = "<img src='./Gui/Public/Common/images/xinxi/s_14.png' title='"+mv.title+"'>";
    }else if(mv.name == 'refundOrders')
    {
    orderinfo = "<img src='./Gui/Public/Common/images/xinxi/s_113.png' title='"+mv.title+"'>";
    }
    var data = "<a href='javascript:void(0)' onclick=allOrderListView_orderFunc_"+mv.name+"('"+recordId+"','"+orders_id+"','"+orderNO+"')>"+orderinfo+"</a>";
    operationStr.push(data);
    //console.log(operationStr);

    });

    return operationStr.join('&nbsp');
    }

     
     
     //页面弹出显示列表


    '<table>',


    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">状态:</div>{status.name}&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">电子码:</div>{code}</td>',
    '</tr>',



    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">产品名称:</div>{scenicSpotTicketName}&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">单价:</div>{unitPrice}</td>',
    '</tr>',


    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">退款数量:</div>{refundNum}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">退款金额:</div>{returnPrice}</td>',



    '</tr>',




    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">申请时间:</div>{createTime}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">手续费:</div>{refundPoundagePrice}</td>',

    '</tr>',


    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">手续费类型:</div>{refundPoundageType.name}{refundPrice}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">退款类型:</div>{refundType.name}</td>',

    '</tr>',

    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">退款原因:</div>{refundReason}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">退款人:</div>{createdBy}</td>',

    '</tr>',

    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">审核人:</div>{auditBy}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',
    '<td style="padding-left:104px"><div style="color:rgb(56,146,211);80px;float:left;text-align:left">审核时间:</div>{auditAt}</td>',

    '</tr>',

    '<tr>',
    '<td><div style="color:rgb(56,146,211);80px;float:left;text-align:left">审核说明:</div>{auditNotes}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>',

    '</tr>',


    '</table>',

     //列表页面对应

    {
    xtype:'fieldcontainer',layout:{type:'hbox',align:'middle'},800, //包含里面页面
    items:[{

    xtype: 'filefield',
    name: 'idnumber_img',
    fieldLabel: '<b style="color:red">*</b>身份证上传',
    buttonText: '浏览...',
    disabled: sz_check,
    160,
    buttonOnly: true,
    style: 'float:left'

    }, {
    xtype: 'panel',
    65,
    height: 25,
    html: getDetailImageNode(business_licence_img),
    labelWidth: 30,
    style: 'float:left',
    fieldLabel: '图片浏览'
    }]

    },

     //登录加载页面

    public/bass.css

    app/tpl/index/index.html  登录加载静态页面

     
     
     
     
     
     
     
     
     
  • 相关阅读:
    JSP教程(八)—— Servlet实现验证码
    JSP教程(七)—— JSP实现登录界面
    JSP教程(六)—— JSP实现整型加法
    JSP教程(五)—— JSP内置对象(下)
    windows下使用python2.7.6 安装django
    python 旧类中使用property特性的方法
    python 中property函数如何实现
    python 属性 property、getattr()、setattr()详解
    linux下调试使用的 一些shell命令
    shell脚本中处理 路径中中文和空格方法
  • 原文地址:https://www.cnblogs.com/smallning/p/6155572.html
Copyright © 2020-2023  润新知