Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

guq 7 years ago
parent
commit
d72929a1fd

+ 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>

+ 16 - 19
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -339,10 +339,8 @@
       }
     },
     created(){
-     var uid = this.hasCookie('uid');
-      if(uid){
         this.$ajax({
-          url: this.$url.sso+'/api/auth/info',
+          url: this.$url.api+'/api/auth/info',
           method: 'get',
           async:false,
           withCredentials:true
@@ -357,7 +355,6 @@
         .catch(err=>{
           console.log("请求失败",err)
         })
-      }
     },
     mounted() {
       this.clientId = Math.random().toString(36).substr(2)
@@ -380,20 +377,20 @@
       }
     },
     methods: {
-        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;
-      },
+      //   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;
       },
@@ -439,7 +436,7 @@
         const frame = window.frames[window.frames.length - 1]
         frame.postMessage('', '*')
         Session.remove()
-        window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL='+window.location.host
+        window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
         //this.$router.go(0);
       },
       // 关闭窗口

+ 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) {

+ 5 - 1
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});
             }