فهرست منبع

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

heqinwei 7 سال پیش
والد
کامیت
161fe49265

+ 2 - 0
base-servers/gateway-server/src/main/resources/application.yml

@@ -185,6 +185,8 @@ auth:
     - /api/auth/info
     - /ws/**
     - /api/file/download
+    - /api/commons/excel/import/templet
+    - /api/account/resource/url/list
   cookie:
     name: uid
     secret-key: 0taQcW073Z7G628g5H

+ 9 - 1
frontend/saas-portal-web/src/components/conenter/addgongsi.vue

@@ -92,7 +92,7 @@ import VDistpicker from 'v-distpicker'
                 mytoken: JSON.parse(localStorage.getItem('app-state-session')),//本地储存的用户信息
                 reg: new RegExp(/[\@\#\$\%\&\*!\¥]/),//非法字符
                 isaddress: false,//公司地址验证
-                isname: false,//姓名验证
+                isname: true,//姓名验证
                 isspaceName: false,//公司名验证
                 isemail: true,//验证邮箱
                 disabled: true
@@ -204,7 +204,15 @@ import VDistpicker from 'v-distpicker'
                 let mobile = mytoken.account.mobile;//手机号
                 let company = {'name':qyname,'address':address,'type':qyindustry};
                 let account = {'realname':name,'email':email,'mobile':mobile, 'uu':uu}
+                // console.log('姓名',name)//个人姓名
+                // console.log('企业',qyname)//企业姓名
+                // console.log('企业名字',this.qymingzi)//企业有没有注册
+                // console.log('企业地址',this.isaddress)//企业地址
+                // console.log('姓名',this.isname)//个人姓名正则
+                // console.log('企业名字',this.isspaceName)//企业名字正则
+                // console.log('邮箱',this.isemail)//邮箱正则
                 if (name != '' && qyname != '' && this.qymingzi && this.isaddress && this.isname && this.isspaceName && this.isemail) {
+                    
                     this.$ajax({
                         url: this.$url.api+"/api/account/accountCenter/companyAccount/save",//http://192.168.253.31:8560
                         method: 'post',

+ 1 - 0
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -268,6 +268,7 @@
             },
             //进入saas服务
             showServeWin(){
+                debugger
                 let id = this.saasid;
                 this.isOpensaas = false;
                 // this.$options.methods.selectServe(id);

+ 10 - 5
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -137,14 +137,19 @@ import { setTimeout } from 'timers';
             },
             //退出
             loginout(){
-                this.$router.push({path:'/name'});
-                this.loginout2()
-            },
-            loginout2(){
+                //this.$router.push({path:'/name'});
                 const frame = window.frames[window.frames.length - 1]
                 frame.postMessage('', '*')
                 Session.remove()
-            } 
+                window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
+                // this.loginout2()
+            }
+            // ,
+            // loginout2(){
+            //     const frame = window.frames[window.frames.length - 1]
+            //     frame.postMessage('', '*')
+            //     Session.remove()
+            // } 
         },
     }
 </script>

+ 21 - 22
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -41,7 +41,7 @@
           </ul>
         </div>
         </div>
-        
+
     </div>
 
     <iframe hidden :src="setTokenPage"></iframe>
@@ -339,10 +339,8 @@
       }
     },
     created(){
-      var uid = this.getCookie('uid');
-      if(uid){
         this.$ajax({
-          url: '/api/auth/info',
+          url: this.$url.api+'/api/auth/info',
           method: 'get',
           async:false,
           withCredentials:true
@@ -352,11 +350,11 @@
           account.companies = account.companies || []
           session.account = account
           Session.set(session);
+          this.account = Session.getAccount();
         })
         .catch(err=>{
           console.log("请求失败",err)
         })
-      }
     },
     mounted() {
       this.clientId = Math.random().toString(36).substr(2)
@@ -379,20 +377,20 @@
       }
     },
     methods: {
-        getCookie(cookieName){  
-          var cookieValue="";  
-          if (document.cookie && document.cookie != '') {   
-              var cookies = document.cookie.split(';');  
-              for (var i = 0; i < cookies.length; i++) {   
-                  var cookie = cookies[i];  
-                  if (cookie.substring(0, cookieName.length + 2).trim() == cookieName.trim() + "=") {  
-                        cookieValue = cookie.substring(cookieName.length + 2, cookie.length);   
-                        break;  
-                  }  
-              }  
-          }   
-          return cookieValue;  
-      }, 
+      //   hasCookie(cookieName){
+      //     var hasUid=false;
+      //     if (document.cookie && document.cookie != '') {
+      //         var cookies = document.cookie.split(';');
+      //         for (var i = 0; i < cookies.length; i++) {
+      //             var cookie = cookies[i];
+      //             if (cookie.substring(0, cookieName.length+1).trim() == cookieName.trim() + "=") {
+      //                   hasUid=true;
+      //                   break;
+      //             }
+      //         }
+      //     }
+      //     return hasUid;
+      // },
       tab(i){
         this.Nowindex = i;
       },
@@ -418,7 +416,7 @@
               // 跳转应用页面
               window.location.href = me.$url.web
             }
-           } 
+           }
           }, false)
           frame.postMessage(JSON.stringify(session), '*')
         })
@@ -438,7 +436,8 @@
         const frame = window.frames[window.frames.length - 1]
         frame.postMessage('', '*')
         Session.remove()
-        this.$router.go(0); 
+        window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
+        //this.$router.go(0);
       },
       // 关闭窗口
       closeModal() {
@@ -495,7 +494,7 @@
                 // console.log("请求失败",err)
             })
           }
-        } 
+        }
       },
     }
   }

+ 3 - 2
frontend/saas-portal-web/src/components/footer/footer.vue

@@ -12,7 +12,7 @@
 					</div>
 					<div class="link">
 						<ul>
-							<li><span>常用链接</span></li>
+							<li><span>常用链接</span></li>
 							<li><a href="https://uas.usoftchina.com/" target="_blank">UAS官网</a></li>
 							<li><a href="https://www.usoftchina.com/" target="_blank">U软云</a></li>
 							<li><a href="http://www.yitoa.com/" target="_blank">英唐官网</a></li>
@@ -40,7 +40,8 @@
 					<div class="qr">
 						<div class="qr-top">
 							<div class="qr-tech qr-code">
-								<img src="/static/img/qr-tech.png" alt="">
+								<!-- <img src="/static/img/qr-tech.png" alt=""> -->
+								<img src="/static/img/qrusoftchina_1.jpg" alt="">
 								<div class="db-text">
 									<span>科技公众号</span>
 								</div>

BIN
frontend/saas-portal-web/static/img/qr_mall.jpg


BIN
frontend/saas-portal-web/static/img/qrusoftchina_1.jpg


+ 3 - 0
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -131,6 +131,9 @@ Ext.define('saas.view.core.base.ImportWindow', {
                     buttonConfig:{
                         xtype:'button',
                         handler:function(b){
+                            var caller = b.ownerCt.ownerCt.ownerCt.ownerCt.caller;
+                            //获取模版
+                            window.location.href = 'http://192.168.253.58:8560/api/commons/excel/import/templet?caller='+caller;
                         }
                     }
                 },{

+ 5 - 3
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -123,7 +123,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             from:'sl_namount',
                             to:'pbd_nowbalance'
                         }],
-                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" 
+                        defaultCondition: "sl_vendid<>0 and ((sl_kind in ('采购验收单','采购验退单')) or (sl_kind='期初余额' and sl_ym="+
+                                  "'(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0'"
                     });
                 }
             },
@@ -204,7 +205,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
-
+        debugger
         var sum_pd_amount = store1.sum('pd_amount'); // 付款金额合计
         var pb_discounts = viewModel.get('pb_discounts'); // 折扣金额
         var sum_pbd_nowbalance = store2.sum('pbd_nowbalance'); // 本次核销金额合计
@@ -234,7 +235,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         }else{
             c ='';
         }
-        dbfindtrigger.defaultCondition = "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" + c;
+        dbfindtrigger.defaultCondition="((sl_kind in ('采购验收单','采购验退单')) or (sl_kind='期初余额' and sl_ym="+
+        "(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0" + c
     },
     myInitCopyData: function(formData) {
         var main = formData.main;

+ 4 - 2
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -137,7 +137,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             from: 'sl_namount',
                             to: 'rbd_nowbalance'
                         }],
-                        defaultCondition: "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0"
+                        defaultCondition: "sl_custid<>0 and ((sl_kind in ('出货单','销售退货单')) or (sl_kind='期初余额' and sl_ym="+
+                        "'(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0'"
                     });
 
                 }
@@ -231,7 +232,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         }else{
             c ='';
         }
-        dbfindtrigger.defaultCondition = "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0" + c;
+        dbfindtrigger.defaultCondition="((sl_kind in ('出货单','销售退货单')) or (sl_kind='期初余额' and sl_ym="+
+        "(select min(pd_detno) from periodsdetail  where pd_status=0 and periodsdetail.companyid=subledger.companyid))) and sl_namount<>0 " + c
 
     },
     myInitCopyData: function(formData) {

+ 6 - 2
frontend/saas-web/app/view/viewport/ViewportController.js

@@ -76,7 +76,11 @@ Ext.define('saas.view.viewport.ViewportController', {
             //没有session时  判断cookie中的uid
             var hasValidCookie = Ext.util.Cookies.get('uid')?me.getAccountCookie():false;
             if(!hasValidCookie){
-                me.redirectTo('login', {replace: true});
+                if(window.location.host.indexOf('.usoftchina.com')>-1){
+                    window.location.href = Ext.manifest.server.accountCenter
+                }else{
+                    me.redirectTo('login', {replace: true});
+                }
             }else{
                 me.redirectTo('main', {replace: true});
             }
@@ -94,7 +98,7 @@ Ext.define('saas.view.viewport.ViewportController', {
     getAccountCookie:function(){
         var hasValidCookie = false;
         Ext.Ajax.request({
-            url: 'http://192.168.253.31:8560/api/auth/info',
+            url: '/api/auth/info',
             withCredentials: true,
             async:false,
             dataType: 'json',