Browse Source

代码提交

hy 7 years ago
parent
commit
b07baed5b2

+ 10 - 0
frontend/saas-web/app/Application.scss

@@ -153,6 +153,16 @@ body.launching {
   }
 }
 
+.x-btn-showicon{
+  .x-btn-wrap{
+    .x-btn-button{
+      .x-btn-inner{
+        color:#999 !important;
+      }
+    }
+  }
+}
+
 .x-keyboard-mode .x-btn-focus.x-btn-default-toolbar-small {
   background: inherit;
   opacity: 1;

+ 22 - 20
frontend/saas-web/app/view/core/base/BasePanelController.js

@@ -36,28 +36,30 @@ Ext.define('saas.view.core.base.BasePanelController', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -194,28 +194,30 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -377,28 +377,30 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/core/form/MseeageLog.js

@@ -155,28 +155,30 @@ Ext.define('saas.view.core.form.MseeageLog', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

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

@@ -137,28 +137,30 @@ Ext.define('saas.view.core.query.QueryPanel', {
                 value = moreItems[k],
                 condition;
     
-                if(typeof func == 'function') {
-                    condition = {
-                        type: 'condition',
-                        value: func(value)
-                    }
-                }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
+                if(value&&value!=''){
+                    if(typeof func == 'function') {
+                        condition = {
+                            type: 'condition',
+                            value: func(value)
+                        }
+                    }else {
+                        var xtype = item.xtype || 'textfield',
+                        type = item.fieldType || me.getDefaultFieldType(xtype),
+                        operation = item.operation || me.getDefaultFieldOperation(xtype),
+                        conditionValue = me.getConditionValue(xtype, value);
+            
+                        if(!conditionValue) {
+                            continue;
+                        }
+                        condition = {
+                            type: type,
+                            field: field,
+                            operation: operation,
+                            value: conditionValue
+                        }
                     }
+                    conditions.push(condition);
                 }
-                conditions.push(condition);
             }
         }else {
             for(k in bindItems) {
@@ -170,28 +172,30 @@ Ext.define('saas.view.core.query.QueryPanel', {
                 value = bindItems[k],
                 condition;
     
-                if(typeof func == 'function') {
-                    condition = {
-                        type: 'condition',
-                        value: func(value)
-                    }
-                }else {
-                    var xtype = item.xtype || 'textfield',
-                    type = item.fieldType || me.getDefaultFieldType(xtype),
-                    operation = item.operation || me.getDefaultFieldOperation(xtype),
-                    conditionValue = me.getConditionValue(xtype, value);
-        
-                    if(!conditionValue) {
-                        continue;
-                    }
-                    condition = {
-                        type: type,
-                        field: field,
-                        operation: operation,
-                        value: conditionValue
+                if(value&&value!=''){
+                    if(typeof func == 'function') {
+                        condition = {
+                            type: 'condition',
+                            value: func(value)
+                        }
+                    }else {
+                        var xtype = item.xtype || 'textfield',
+                        type = item.fieldType || me.getDefaultFieldType(xtype),
+                        operation = item.operation || me.getDefaultFieldOperation(xtype),
+                        conditionValue = me.getConditionValue(xtype, value);
+            
+                        if(!conditionValue) {
+                            continue;
+                        }
+                        condition = {
+                            type: type,
+                            field: field,
+                            operation: operation,
+                            value: conditionValue
+                        }
                     }
+                    conditions.push(condition);
                 }
-                conditions.push(condition);
             }
         }
 

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

@@ -143,7 +143,7 @@ Ext.define('saas.view.document.kind.ChildForm', {
         var me = this, kind = me.dataKind;
         var conf = {
             xtype: 'form',
-            bodyPadding: 10,
+            bodyPadding: '10 30 10 10',
             border: false,
             autoScroll:true,
             modelValidation: true,
@@ -152,10 +152,10 @@ Ext.define('saas.view.document.kind.ChildForm', {
                 align: 'stretch'
             },
             defaults: {
-                labelAlign:'right',
                 beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
                 xtype: 'textfield'
             },
+            buttonAlign:'center',
             buttons: [{
                 text: '保存',
                 formBind:true,

+ 88 - 52
frontend/saas-web/app/view/sys/account/AddWindow.js

@@ -5,6 +5,7 @@ Ext.define('saas.view.sys.account.AddWindow', {
     extend: 'saas.view.document.kind.ChildForm',
     xtype: 'sys-account-addwindow',
     dataKind:'accountadd',//类型标识
+    height: 325,
     belong:{
         columns:[{
             dataIndex:'realname',
@@ -18,61 +19,88 @@ Ext.define('saas.view.sys.account.AddWindow', {
     etc:{
         accountadd:{
             items:[{
-                xtype:'textfield',
-                fieldLabel: '联系号码',
-                name: 'mobile',
-                hideTrigger:true,
-                allowBlank:false,
-                maxLength: 30,
-                regex:/^1(3|4|5|7|8)\d{9}$/,
-                regexText:'请输入正确的手机号码',
-                listeners:{
-                    change:function(f,a,b){
-                        if(a==''){
-                            f._lastCheckValue = ''
-                        }
-                    },
-                    blur:function(f,a,b,c){
-                        var form = f.ownerCt;
-                        if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
-                            f._lastCheckValue = f.value;
-                            form.setLoading(true);
-                            Ext.Ajax.request({
-                                url: '/api/account/account/checkMobile?mobile='+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('校验成功:手机号已在优软云注册');
+                xtype: 'fieldcontainer',
+                layout: 'column',
+                items: [{
+                    xtype:'textfield',
+                    fieldLabel: '手机号码',
+                    name: 'mobile',
+                    hideTrigger:true,
+                    allowBlank:false,
+                    maxLength: 30,
+                    columnWidth:0.7,
+                    regex:/^1(3|4|5|7|8)\d{9}$/,
+                    regexText:'请输入正确的手机号码',
+                    listeners:{
+                        change:function(f,a,b){
+                            if(a==''){
+                                f._lastCheckValue = ''
+                            }
+                        },
+                        blur:function(f,a,b,c){
+                            var form = f.ownerCt;
+                            if(f.value&&f.value!=''&&f.isValid()&&f._lastCheckValue!=f.value){
+                                f._lastCheckValue = f.value;
+                                form.setLoading(true);
+                                Ext.Ajax.request({
+                                    url: '/api/account/account/checkMobile?mobile='+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){
+                                            f.hasRegister = localJson.data.hasRegister;
+                                            if(localJson.data.hasRegister){
+                                                f.ownerCt.down('[name=hasAccount]').show();
+                                                f.ownerCt.down('[name=noAccount]').hide();
+                                            }else{
+                                                f.ownerCt.down('[name=hasAccount]').hide();
+                                                f.ownerCt.down('[name=noAccount]').show();
+                                            }
                                         }else{
-                                            saas.util.BaseUtil.showErrorToast('校验失败:手机号未在优软云注册');
+                                            saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                            f.setValue('');
+                                            f.ownerCt.down('[name=hasAccount]').hide();
+                                            f.ownerCt.down('[name=noAccount]').hide();
+                                        }
+                                    },
+                                    failure: function (response) {
+                                        if(response.responseText){
+                                            var localJson = Ext.decode(response.responseText);
+                                            saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
+                                            f.setValue('');
+                                        }else{
+                                            saas.util.BaseUtil.showErrorToast('手机号校验接口连接超时');
                                             f.setValue('');
                                         }
-                                    }else{
-                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
-                                        f.setValue('');
-                                    }
-                                },
-                                failure: function (response) {
-                                    if(response.responseText){
-                                        var localJson = Ext.decode(response.responseText);
-                                        saas.util.BaseUtil.showErrorToast('校验失败:'+localJson.message);
-                                        f.setValue('');
-                                    }else{
-                                        saas.util.BaseUtil.showErrorToast('手机号校验接口连接超时');
-                                        f.setValue('');
                                     }
-                                }
-                            });
+                                });
+                            }
                         }
                     }
-                }
+                },{
+                    hidden:true,
+                    name:'hasAccount',
+                    xtype:'button',
+                    cls:'x-btn-showicon',
+                    style:'background:#fff;border:none;padding:7px 0 7px 0;',
+                    text:'已注册优软云',
+                    icon:'resources/images/default/toast_over.png',
+                    columnWidth:0.3,
+                },{
+                    name:'noAccount',
+                    hidden:true,
+                    xtype:'button',
+                    cls:'x-btn-showicon',
+                    style:'background:#fff;border:none;padding:7px 0 7px 0;',
+                    text:'未注册优软云',
+                    icon:'resources/images/default/toast_close.png',
+                    columnWidth:0.3,
+                }]
             },{
                 xtype:'textfield',
                 fieldLabel: '真实姓名',
@@ -132,10 +160,17 @@ Ext.define('saas.view.sys.account.AddWindow', {
             },{
                 xtype:'datamulticombo',
                 dataUrl:'/api/account/role/list',
-                fieldLabel: '关联角色',
+                fieldLabel: '岗位角色',
                 name: 'roleIds',
                 allowBlank:false,
                 maxLength: 30,
+            },{
+                margin:'10 0 0 0',
+                xtype:'displayfield',
+                fieldLabel: '温馨提示',
+                beforeLabelTextTpl: "",
+                value:'已注册优软云可以访问优软云门户网',
+                fieldStyle:'color:#999;margin-top: 9px;'
             }]
         }
     },
@@ -144,7 +179,6 @@ Ext.define('saas.view.sys.account.AddWindow', {
         var belong = this.belong;
         me.setLoading(true);
         var form=this.down('form');
-        var combo = this._combo;
         var params = {};
         var names = belong.columns.map(column => column.dataIndex);
 
@@ -153,7 +187,9 @@ Ext.define('saas.view.sys.account.AddWindow', {
                 var dataField = form.down('[name='+name+']');
                 if(dataField&&dataField.value){
                     params[name] = dataField.value;
-                    params._value = dataField.value;
+                }
+                if(dataField.name=='mobile'){
+                    params['hasRegister'] = dataField.hasRegister;
                 }
             }
         });

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

@@ -22,7 +22,7 @@ Ext.define('saas.view.sys.account.DataList', {
         width: 140,
         name: 'mobile',
         xtype: 'textfield',
-        emptyText : '联系电话'
+        emptyText : '手机号码'
     },{
         xtype:'button',
         text:'查询',
@@ -311,28 +311,30 @@ Ext.define('saas.view.sys.account.DataList', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 3 - 3
frontend/saas-web/app/view/sys/account/EditWindow.js

@@ -38,14 +38,14 @@ Ext.define('saas.view.sys.account.EditWindow', {
             },{
                 xtype:'datamulticombo',
                 dataUrl:'/api/account/role/list',
-                fieldLabel: '关联角色',
+                fieldLabel: '岗位角色',
                 name: 'roleNames',
                 allowBlank:true,
                 maxLength: 20,
                 beforeLabelTextTpl: "",
             },{
                 xtype:'textfield',
-                fieldLabel: '联系电话',
+                fieldLabel: '手机号码',
                 name: 'mobile',
                 readOnly:true,
                 editable:false,
@@ -90,7 +90,7 @@ Ext.define('saas.view.sys.account.EditWindow', {
         o = o.substring(0,o.length-1);
 
         if(o==""){
-            saas.util.BaseUtil.showErrorToast('关联角色未选择,无法保存!')
+            saas.util.BaseUtil.showErrorToast('岗位角色未选择,无法保存!')
         }
 
         var _params = {

+ 22 - 20
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -196,28 +196,30 @@ Ext.define('saas.view.sys.finish.DataList', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -292,28 +292,30 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },

+ 22 - 20
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -160,28 +160,30 @@ Ext.define('saas.view.sys.messagelog.DataList', {
             value = item.value,
             condition;
 
-            if(typeof func == 'function') {
-                condition = {
-                    type: 'condition',
-                    value: func(value)
-                }
-            }else {
-                var xtype = item.xtype || 'textfield',
-                type = item.fieldType || me.getDefaultFieldType(xtype),
-                operation = item.operation || me.getDefaultFieldOperation(xtype),
-                conditionValue = me.getConditionValue(xtype, value);
-    
-                if(!conditionValue) {
-                    continue;
-                }
-                condition = {
-                    type: type,
-                    field: field,
-                    operation: operation,
-                    value: conditionValue
+            if(value&&value!=''){
+                if(typeof func == 'function') {
+                    condition = {
+                        type: 'condition',
+                        value: func(value)
+                    }
+                }else {
+                    var xtype = item.xtype || 'textfield',
+                    type = item.fieldType || me.getDefaultFieldType(xtype),
+                    operation = item.operation || me.getDefaultFieldOperation(xtype),
+                    conditionValue = me.getConditionValue(xtype, value);
+        
+                    if(!conditionValue) {
+                        continue;
+                    }
+                    condition = {
+                        type: type,
+                        field: field,
+                        operation: operation,
+                        value: conditionValue
+                    }
                 }
+                conditions.push(condition);
             }
-            conditions.push(condition);
         };
         return conditions;
     },