Browse Source

Merge remote-tracking branch 'origin/dev' into dev

heqinwei 7 years ago
parent
commit
2aae504a44

+ 13 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
+import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.IOException;
@@ -252,6 +253,18 @@ public class AuthController {
             authorizeLogService.save(AuthorizeLog.from(request)
             authorizeLogService.save(AuthorizeLog.from(request)
                     .setAccountId(accountDTO.getId())
                     .setAccountId(accountDTO.getId())
                     .setAppId(appId).build());
                     .setAppId(appId).build());
+            //将cookies
+            Cookie[] cookies = request.getCookies();
+            Cookie ssoCookies = null;
+            for (Cookie cookie : cookies) {
+                if (cookieConfig.getName().equals(cookie.getName())) {
+                    ssoCookies = cookie;
+                    break;
+                }
+            }
+            if (null != ssoCookies) {
+                response.addCookie(ssoCookies);
+            }
             // 将登录信息推送到客户端
             // 将登录信息推送到客户端
             if (!StringUtils.isEmpty(clientId)) {
             if (!StringUtils.isEmpty(clientId)) {
                 Long companyId = null;
                 Long companyId = null;

+ 0 - 25
frontend/saas-portal-web/src/pages/cell/cell.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Document</title>
-</head>
-<body>
-    <div id="app">hello</div>
-    <script>
-        // iframe接收消息
-        window.addEventListener('message', function(e) {
-            if (e.data == 'removeToken') {
-                if (e.source != window.parent) {
-                    return;
-                }
-                var storeKey = 'app-state-session';
-                localStorage.removeItem(storeKey);
-                window.parent.postMessage("success", "*");
-            }
-        });
-    </script>
-</body>
-</html>

+ 0 - 0
frontend/saas-portal-web/src/pages/cell/cell.js


+ 0 - 15
frontend/saas-portal-web/src/pages/cell/cell.vue

@@ -1,15 +0,0 @@
-<template>
-    <div>
-
-    </div>
-</template>
-
-<script>
-    export default {
-        
-    }
-</script>
-
-<style scoped>
-
-</style>

BIN
frontend/saas-portal-web/static/img/assets/1@2x.png


BIN
frontend/saas-portal-web/static/img/assets/2@3x.png


BIN
frontend/saas-portal-web/static/img/assets/3@2x.png


BIN
frontend/saas-portal-web/static/img/gongneng/Group 32.png


BIN
frontend/saas-portal-web/static/img/logo_w.png


BIN
frontend/saas-portal-web/static/img/qr-tech.png


+ 1 - 0
frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js

@@ -55,6 +55,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
             bind: {
             bind: {
                 title: '新增仓库资料'
                 title: '新增仓库资料'
             },
             },
+            _parent:this,
             caller:'WareHouse',
             caller:'WareHouse',
             session: true
             session: true
         });
         });

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

@@ -24,7 +24,7 @@ Ext.define('saas.view.document.kind.ChildForm', {
                 codeField = item.name
                 codeField = item.name
             }
             }
           });
           });
-          if(count!=0&&count<4){
+          if(count!=0&&count<6){
             w.setHeight(114+40*count)
             w.setHeight(114+40*count)
           }
           }
           if(w.record){
           if(w.record){
@@ -208,9 +208,13 @@ Ext.define('saas.view.document.kind.ChildForm', {
         .then(function(localJson) {
         .then(function(localJson) {
             me.setLoading(false);
             me.setLoading(false);
             if(localJson.success){
             if(localJson.success){
-                var grid = form.ownerCt._parent ? form.ownerCt._parent.lookup('document-kind-Grid') : null;
+                var grid = form.ownerCt._parent;
                 if(grid){
                 if(grid){
-                    grid.store.load();
+                    if(form.ownerCt._parent.lookup('document-kind-Grid')!=null){
+                        form.ownerCt._parent.lookup('document-kind-Grid').store.load()
+                    }else{
+                        grid.store.load();
+                    }
                 }
                 }
                 if(relativeField&&relativeValue&&form.ownerCt._parent){
                 if(relativeField&&relativeValue&&form.ownerCt._parent){
                     var grid = form.ownerCt._parent.down('grid');
                     var grid = form.ownerCt._parent.down('grid');

+ 1 - 1
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -14,7 +14,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         width:300, 
         width:300, 
         emptyText:'输入物料编号、名称、型号、规格或品牌',
         emptyText:'输入物料编号、名称、型号、规格或品牌',
         getCondition: function (v) {
         getCondition: function (v) {
-            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,'')'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
+            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,''),'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
         },
         },
     },{
     },{
         editable:true,
         editable:true,

+ 36 - 15
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -47,24 +47,45 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 allowBlank : false
                 allowBlank : false
             }, {
             }, {
                 name : "sa_toplace", 
                 name : "sa_toplace", 
-                xtype : "textfield", 
+                xtype : "remotecombo", 
                 fieldLabel : "交货地址", 
                 fieldLabel : "交货地址", 
+                editable:false,
                 allowBlank : false, 
                 allowBlank : false, 
                 columnWidth : 0.5,
                 columnWidth : 0.5,
-                hiddenBtn:false,//true 则会关闭新增按钮功能
-                addHandler:function(b){
-                    var form = this.ownerCmp.ownerCt;
-                    this.dialog = form.add({
-                        xtype: 'document-address-window',
-                        bind: {
-                            title: '新增交货地址'
-                        },
-                        _parent:form,
-                        _combo:this.ownerCmp,
-                        record:null,
-                        session: true
-                    });
-                    this.dialog.show();
+                storeUrl:'/api/document/customer/getAddressCombo',
+                hiddenBtn:true,//true 则会关闭新增按钮功能
+                setValue:function(value){
+                    var me = this,bind, valueBind;
+                    if(value&&value!=''){
+                        me.setDisabled(false);
+                    }else{
+                        me.setDisabled(true);
+                    }
+                    if (me.hasFocus) {
+                        bind = me.getBind();
+                        valueBind = bind && bind.value;
+                        if (valueBind && valueBind.syncing) {
+                            if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
+                                return me;
+                            } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
+                                return me;
+                            }
+                        }
+                    } else {
+                        me.lastSelectedRecords = null;
+                    }
+            
+                    if (value != null) {
+                        me.doSetValue(value);
+                    }
+                    else {
+                        me.suspendEvent('select');
+                        me.valueCollection.beginUpdate();
+                        me.pickerSelectionModel.deselectAll();
+                        me.valueCollection.endUpdate();
+                        me.resumeEvent('select');
+                    }
+                    return me;
                 }
                 }
             }, {
             }, {
                 name : "detailGridField", 
                 name : "detailGridField", 

+ 20 - 0
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -69,6 +69,26 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                     });
                     });
 
 
                 }
                 }
+            },
+            'remotecombo[name=sa_toplace]':{
+                focus:function(f){
+                    //获取客户ID
+                    var sa_custid = f.ownerCt.down('[name=sa_custid]').value;
+                    if(sa_custid&&sa_custid!=""){
+                        Ext.apply(f.store.proxy.extraParams, {
+                            id:sa_custid
+                        });
+                        f.store.load();
+                    }else{
+                        saas.util.BaseUtil.showErrorToast('请先选择客户后在维护交货地址');
+                        f.setDisabled(true);
+                    }
+                },
+                expand:function(f){
+                    if(f.picker&&f.isExpanded){
+                        f.picker.setHeight(33*f.store.getCount())
+                    }
+                }
             }
             }
         });
         });