用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - java代码库

Extjs添加用户信息的弹出页面

2016-01-05 作者: 云代码会员举报

[java]代码库

Ext.define('voole.view.vrm.cpManage.CpManageModify',{
    extend:'Ext.window.Window',
    alias : 'widget.cpManageModify',
    title : '增加内容提供商信息',
    frame:true,
    modal:true,
    id:'cpManageModify_win',
    autoScroll: true,
    height: 434,
    width: 330,
    closeAction:"destroy",
    layout: 'form',
    frame:true,
    initComponent: function() {
        //内容提供商的类型
        var cptype_store =Ext.widget("commonGlbDictionaryStore",{keyStore:'cptype'});
        cptype_store.load();
        var isnotsync_store =voole.biz.service.Dict.getDictStore("isnotsync",false);
        isnotsync_store.load();
        var needauth_store =voole.biz.service.Dict.getDictStore("needauth",false);
        needauth_store.load();
        var synctype_store =voole.biz.service.Dict.getDictStore("synctype",false);
        synctype_store.load();
         
           this.items = [
            
           {   
                xtype:'form',
                frame:true,
                id:'cpManage_form_find_id',
                items:[
                        {
                            fieldLabel: '内容商编号',
                            xtype: 'textfield',
                            id: 'acpid',
                            name: 'cpid',
                            allowBlank:false,
                         afterLabelTextTpl: VooleUtil.required,
                            msgTarget :'side',
                            blankText: '内容商编号不允许为空',
                            regex: /^[1-9]{1}\d{7}$/,
                            regexText: '有效编号是8位数字',
                            listeners: {
                              blur:function(){
                                var acpid=Ext.getCmp("acpid").getValue();
                                if(acpid!=""&&null!=acpid && Ext.getCmp('acpid').isValid()){//为空不验证
                                    Ext.Ajax.request({
                                            method:'POST',
                                           url: 'vrm-CpManage-checkUnique.action',
                                            params: {
                                                acpid: acpid
                                            },
                                            success: function(response){
                                                var obj = eval('(' + response.responseText + ')');
                                                if(obj['success']==true) {
                                                    Ext.getCmp('acpidcheck').setValue('1');
                                                    Ext.getCmp('acpidUnique').setValue('<font color="green">' + obj['data'] + '</font>');
                                                }else{
                                                    Ext.getCmp('acpidcheck').setValue('0');
                                                    Ext.getCmp('acpidUnique').setValue('<font color="red">' + obj['data'] + '</font>');
                                                }
                                            }
                                    })
                                  }
                              }
                                               
                             }
                        },
                            {
                                xtype: 'displayfield',
                                id: 'acpidUnique',
                                name: 'acpidUnique',
                                value: '请输入内容提供商编号'
                            },
                            {
                                xtype: 'hidden',
                                id: 'cpManage_seqno',
                                name: 'seqno',
                                value: ''
                            },
                            {
                                xtype: 'hidden',
                                id: 'acpidcheck',
                                name: 'cpidcheck',
                                value: '0'
                            },
                          {
                            xtype: 'textfield',
                            fieldLabel: '内容商名称',
                            afterLabelTextTpl: VooleUtil.required,
                            id: 'acpname',
                            name: 'cpname',
                            regex: /^\S*$/,
                            regexText: '名称中不允许包含空格',
                            maxLength: 30,
                            allowBlank:false,
                            msgTarget :'side',
                            blankText: '内容提供商名称不允许为空'
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: '英文名称',
                            id: 'acpenname',
                            name: 'cpenname',
                            allowBlank:false,
                            afterLabelTextTpl: VooleUtil.required,
                            msgTarget :'side',
                            labelwidth:70,
                            blankText: '内容商英文名称不允许为空'
                        },
                       {
                            xtype:'combo',
                            id: 'acptype',
                            store: cptype_store,
                            fieldLabel: '内容商类型',
                            allowBlank:false,
                            name: 'cptype',
                            editable:false,
                            afterLabelTextTpl: VooleUtil.required,
                            valueField : 'keyvalue',
                            displayField : 'keyname',
                            forceSelection: true,
                            typeAhead: true,
                            msgTarget :'side',
                            queryMode : 'local',
                            triggerAction: 'all',
                            selectOnFocus:true,
                            blankText: '内容商类型不允许为空'
                        },
                        new Ext.form.TextArea({
                            fieldLabel: '内容商简介',
                            autoScroll :true,
                            id: 'acpintro',
                            name: 'cpintro',
                            height: 60,
                            width:255
                        }),
                        {
                            xtype: 'textfield',
                            fieldLabel: '联系人',
                            id: 'acontact',
                            name: 'contact'
                        },
                        new Ext.form.TextArea({
                            fieldLabel: '联系地址',
                            autoScroll :true,
                            id: 'aaddress',
                            name: 'address',
                            height: 50,
                            width:255
 
                        }),
                        {
                            xtype: 'textfield',
                            fieldLabel: '联系电话',
                            id: 'atelephone',
                            name: 'telephone',
                            msgTarget :'side',
                            regex: /^\d+$/,
                            regexText:'电话格式错误'
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: '电子邮件',
                            id: 'aemail',
                            name: 'email',
                            msgTarget :'side',
                            vtype: 'email'
                             
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: '网站地址',
                            id: 'aweburl',
                            name: 'weburl'
                        },
                        {
                            xtype:'combo',
                            id: 'aisnotsync',
                            name: 'isnotsync',
                            store: isnotsync_store,
                            fieldLabel: '是否执行同步任务',
                            allowBlank:false,
                            editable:false,
                            valueField : 'keyvalue',
                            displayField : 'keyname',
                            value:'0',
                            forceSelection: true,
                            msgTarget :'side',
                            selectOnFocus:true,
                        },
                        {
                            xtype:'combo',
                            id: 'asynctype',
                            name: 'synctype',
                            value:'0',
                            store: synctype_store,
                            fieldLabel: '同步任务类型',
                            allowBlank:false,
                            editable:false,
                            valueField : 'keyvalue',
                            displayField : 'keyname',
                            forceSelection: true,
                            msgTarget :'side',
                            selectOnFocus:true,
                        },
                        {
                            xtype:'combo',
                            id: 'aneedauth',
                            name: 'needauth',
                            store: needauth_store,
                            fieldLabel: '是否授权',
                            allowBlank:false,
                            editable:false,
                            valueField : 'keyvalue',
                            displayField : 'keyname',
                            value:'0',
                            forceSelection: true,
                            msgTarget :'side',
                            selectOnFocus:true,
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: '同步任务地址',
                            id: 'asyncurl',
                            name: 'syncurl'
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: '同步任务结果地址',
                            id: 'aresulturl',
                            name: 'resulturl'
                        }
 
                ]}
            ];
                 
        this.buttons = [
                        {
                            text: '保存',
                             scope: this,
                             action: 'cpManage_save'
                        },
                        {
                            text: '取消',
                            scope: this,
                            handler: this.close
                        }
                 
                    ];
                     
        this.callParent(arguments);
    }
});


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...