Browse Source

代码提交

hy 7 years ago
parent
commit
a9f8c0279b

+ 52 - 0
frontend/saas-web/app/view/core/base/BasePanel.scss

@@ -32,4 +32,56 @@
 .x-basepanel-pagingtoolbar{
     border:1px solid #abdaff !important;
     border-top-width: 0 !important;
+}
+
+.x-btn-import-middle:after{
+    content: ' ';
+    display: block;
+    width: 0;
+    height: 0;
+    border-style: solid;
+    border-width: 15px 0 16px 18px;
+    border-color: transparent transparent transparent #34baf6;
+    position: absolute;
+    left: 0;
+    top: 0;
+}
+
+.x-btn-import-middle-next:after{
+    content: ' ';
+    display: block;
+    width: 0;
+    height: 0;
+    border-style: solid;
+    border-width: 15px 0 16px 18px;
+    border-color: transparent transparent transparent #fff;
+    position: absolute;
+    left: 0;
+    top: 0;
+}
+
+.x-btn-import-first{
+    .x-btn-wrap{
+        .x-btn-button{
+          .x-btn-inner{
+            color:#fff !important
+          }
+        }
+    }
+}
+
+.x-btn-import-last{
+    .x-btn-wrap{
+        .x-btn-button{
+          .x-btn-inner{
+            color:#34baf6 !important
+          }
+        }
+    }
+}
+
+.x-btn-import-last{
+    .x-btn.x-btn-disabled.x-btn-default-toolbar-small .x-btn-inner-default-toolbar-small {
+        color: #34baf6;
+    }
 }

+ 159 - 22
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -4,35 +4,172 @@ Ext.define('saas.view.core.base.ImportWindow', {
     layout:'fit',
 
     requires: [
+        'Ext.form.field.File',
         'Ext.container.ButtonGroup'
     ],
 
-    items:[{
-        xtype:'panel',
-        layout:'column',
-        defaults:{
-            columnWidth:1
-        },
-        tbar:['->',{
-            width:300,
-            text:'下载模板并填写'
-        },{
-            width:300,
-            text:'上传导入文件'
-        },'->'],
-        items:[{
-            xtype:'container',
-            html:'asddddddddddddddddddddd',
-        },{
-            xtype:'fieldset',
-            items:[{
-                text:'asddddddddddddddddddddd'
-            }]
-        }]
+    bbar:['->',{
+        hidden:true,
+        name:'prev',
+        text:'上一步',
+        handler:function(b){
+            var p = this.ownerCt.ownerCt.items.items[0];
+            var tbar = p.dockedItems.items[0];
+            //first
+            var first = tbar.down('[name=first]').el.dom;
+            first.classList.add('x-btn-import-first');
+            first.style.background = '#34baf6';
+            first.childNodes[0].childNodes[0].childNodes[1].style.color = '#fff';
+            //middle
+            var middle = tbar.down('[name=middle]').el.dom;
+            middle.classList.add('x-btn-import-middle');
+            middle.classList.remove('x-btn-import-middle-next');
+            middle.style.background = '#fff';
+            //last
+            var last = tbar.down('[name=last]').el.dom;
+            last.classList.add('x-btn-import-last');
+            last.style.background = '#fff';
+            last.childNodes[0].childNodes[0].childNodes[1].style.color = '#34baf6';
+            //按钮逻辑
+            b.hide();
+            b.ownerCt.down('[name=next]').show();
+            b.ownerCt.down('[name=over]').hide();
+            //字段逻辑
+            p.down('[name=download]').show();
+            p.down('[name=upload]').hide();
+            p.down('[name=detail]').show();
+            p.down('[name=message]').hide();
+        }
+    },{
+        name:'next',
+        text:'下一步',
+        handler:function(b){
+            var p = this.ownerCt.ownerCt.items.items[0];
+            var tbar = p.dockedItems.items[0];
+            //first
+            var first = tbar.down('[name=first]').el.dom;
+            first.classList.remove('x-btn-import-first');
+            first.style.background = '#fff';
+            first.childNodes[0].childNodes[0].childNodes[1].style.color = '#34baf6';
+            //middle
+            var middle = tbar.down('[name=middle]').el.dom;
+            middle.classList.remove('x-btn-import-middle');
+            middle.classList.add('x-btn-import-middle-next');
+            middle.style.background = '#34baf6';
+            //last
+            var last = tbar.down('[name=last]').el.dom;
+            last.classList.remove('x-btn-import-last');
+            last.style.background = '#34baf6';
+            last.childNodes[0].childNodes[0].childNodes[1].style.color = '#fff';
+            //按钮逻辑
+            b.hide();
+            b.ownerCt.down('[name=prev]').show();
+            b.ownerCt.down('[name=over]').show();
+            //字段逻辑
+            p.down('[name=download]').hide();
+            p.down('[name=upload]').show();
+            p.down('[name=detail]').hide();
+            p.down('[name=message]').show();
+        }
+    },{
+        hidden:true,
+        name:'over',
+        text:'完成',
+        handler:function(b){
+            b.ownerCt.ownerCt.close()
+        }
+    },{
+        name:'close',
+        text:'关闭',
+        handler:function(b){
+            b.ownerCt.ownerCt.close()
+        }
     }],
 
     initComponent: function() {
         var me = this;
+        Ext.apply(me, {
+            items:[{
+                cls:'x-panel-import',
+                padding:'10px 100px 10px 100px',
+                xtype:'panel',
+                layout:'vbox',
+                tbar:['->',{
+                    name:'first',
+                    cls:'x-btn-import-first',
+                    style:'background: #34baf6;border-color: #35baf6;    opacity: 1;',
+                    focusable:false,
+                    disabled:true,
+                    width:300,
+                    text:'下载模板并填写',
+                },{
+                    name:'middle',
+                    disabled:true,
+                    focusable:false,
+                    style:'width: 20px;margin: 0px;margin-left: -16px;border-width: 1px 0px;min-width: 0px;border-style: solid;border-color: rgb(53, 186, 246);    opacity: 1;    background-color: #fff;',
+                    width:20,
+                    cls:'x-btn-import-middle'
+                },{
+                    name:'last',
+                    disabled:true,
+                    cls:'x-btn-import-last',
+                    style:'border-left-width: 0px;background: #fff;border-color: #35baf6;opacity:1;background-color: #fff;',
+                    focusable:false,
+                    margin:'0 0 0 -1',
+                    width:300,
+                    text:'上传导入文件',
+                },'->'],
+                items:[{
+                    margin:'15px 0 0 0',
+                    width: 240,
+                    labelWidth:160,
+                    buttonOnly:true,
+                    fieldLabel:'客户导入模板下载',
+                    name:'download',
+                    xtype: 'filefield',
+                    buttonText: '下载模板',
+                    buttonConfig:{
+                        xtype:'button',
+                        handler:function(b){
+                        }
+                    }
+                },{
+                    margin:'10px 0 0 45px',
+                    xtype: 'fieldset',
+                    title: '导入说明',
+                    name:'detail',
+                    collapsible: false,
+                    items: [{
+                        xtype : 'fieldcontainer',
+                        html: me.showDetail?me.showDetail:'请配置showDetail属性',
+                    }]
+                },{
+                    hidden:true,
+                    margin:'15px 0 0 0',
+                    width: 180,
+                    labelWidth:100,
+                    buttonOnly:true,
+                    fieldLabel:'上传文件',
+                    name:'upload',
+                    xtype: 'filefield',
+                    buttonText: '选择文件',
+                    buttonConfig:{
+                        xtype:'button',
+                    }
+                },{
+                    hidden:true,
+                    margin:'10px 0 0 45px',
+                    xtype: 'fieldset',
+                    title: '导入详情',
+                    name:'message',
+                    collapsible: false,
+                    items: [{
+                        xtype : 'fieldcontainer',
+                        html: '暂无',
+                    }]
+                }]
+            }]
+        });
         me.callParent(arguments);
     }
 

+ 16 - 16
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -189,23 +189,23 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                         hidden: '{!auditEnable}'
                     }
                 },  {
-                    text: '导',
+                    text: '导',
                     handler: me.onImport,
-                    menu: {
-                        cls:'x-query-menu',
-                        width: 80,
-                        items: [{
-                            text:'导出',
-                            handler:function(){
-                                me.onExport(this)
-                            }
-                        }],
-                        listeners: {
-                            'mouseleave':function(enu){
-                                this.hide();
-                            } 
-                        }
-                    },
+                    // menu: {
+                    //     cls:'x-query-menu',
+                    //     width: 80,
+                    //     items: [{
+                    //         text:'导出',
+                    //         handler:function(){
+                    //             me.onExport(this)
+                    //         }
+                    //     }],
+                    //     // listeners: {
+                    //     //     'mouseleave':function(enu){
+                    //     //         this.hide();
+                    //     //     } 
+                    //     // }
+                    // },
                     bind: {
                         hidden: '{!importEnable}'
                     }

+ 1 - 1
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -16,7 +16,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
         reference: 'queryform',
         xtype: 'core-query-queryformpanel',
         width: '100%',
-        height:56,
+        height:54,
         margin: '0 0 12 0',
     }, {
         // margin: '12 0 0 0',

+ 51 - 0
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -15,6 +15,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
           if(w.record){
               w.down('form').loadRecord(w.record);
           }
+          //自动适应窗口
+          var items = w.down('form').items.items;
+          var count = 0;
+          Ext.Array.each(items,function(item) {
+            if(item.xtype!='hidden'){
+                count++;
+            }
+          });
+          if(count!=0&&count<4){
+            w.setHeight(114+40*count)
+          }
       }
     },
     initComponent:function(){
@@ -325,9 +336,49 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 fieldLabel: '邮箱',
                 name: 'email',
                 allowBlank:false,
+                beforeLabelTextTpl: "",
                 regex:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
                 regexText:'请输入正确的邮箱',
                 maxLength: 30,
+                listeners:{
+                    blur:function(f,a,b,c){
+                        var form = f.ownerCt;
+                        if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
+                            form.setLoading(true);
+                            f._lastCheckValue = f.value
+                            Ext.Ajax.request({
+                                url: '/api/account/account/checkEmail?email='+f.value,
+                                method: 'GET',
+                                headers:{
+                                    'Access-Control-Allow-Origin': '*',
+                                    "Content-Type": 'application/json;charset=UTF-8'
+                                },
+                                success: function (response) {
+                                    form.setLoading(false);
+                                    var localJson = Ext.decode(response.responseText);
+                                    if(localJson.success){
+                                        if(localJson.data.hasRegister){
+                                            saas.util.BaseUtil.showSuccessToast('校验成功:手机号已在优软云注册');
+                                        }else{
+                                            saas.util.BaseUtil.showErrorToast('校验失败:手机号未在优软云注册');
+                                            f.setValue('');
+                                        }
+                                    }else{
+                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                    }
+                                },
+                                failure: function (response) {
+                                    if(response.responseText){
+                                        var localJson = Ext.decode(response.responseText);
+                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                    }else{
+                                        saas.util.BaseUtil.showErrorToast('邮箱校验接口连接超时');
+                                    }
+                                }
+                            });
+                        }
+                    }
+                }
             }]
         },
         warehouse:{

+ 2 - 2
frontend/saas-web/app/view/sys/account/DataList.js

@@ -19,10 +19,10 @@ Ext.define('saas.view.sys.account.DataList', {
         xtype: 'textfield',
         emptyText : '账户名称'
     },{
-        width: 110,
+        width: 140,
         name: 'mobile',
         xtype: 'textfield',
-        emptyText : '电话'
+        emptyText : '联系电话'
     },{
         xtype:'button',
         text:'查询',

+ 1 - 1
frontend/saas-web/app/view/sys/baseconfig/FormPanel.js

@@ -11,7 +11,7 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
     //字段属性
     _idField: 'id',
     _readUrl:'/api/commons/configs/list',
-    _saveUrl:'/api/commons/configs/save',
+    _saveUrl:'/api/commons/configs/update',
 
     //基础属性
     frame:true,