فهرست منبع

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

guq 7 سال پیش
والد
کامیت
aa2cbbbb2b

+ 12 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProdStorageDTO.java

@@ -17,6 +17,10 @@ public class ProdStorageDTO implements Serializable {
     private String prodBrand;
     private String prodUnit;
     private String prodLeadtime;
+    /**
+     * 上传状态
+     */
+    private String b2bStatus;
     /**
      * 绑定状态
      */
@@ -86,6 +90,14 @@ public class ProdStorageDTO implements Serializable {
         this.prodLeadtime = prodLeadtime;
     }
 
+    public String getB2bStatus() {
+        return b2bStatus;
+    }
+
+    public void setB2bStatus(String b2bStatus) {
+        this.b2bStatus = b2bStatus;
+    }
+
     public Short getStatus() {
         return status;
     }

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -167,6 +167,11 @@ public class ProductController {
         return Result.success(productService.getProdStorage(page, listReqDTO));
     }
 
+    /**
+     * 上传个人物料库
+     * @param productSalerDTO
+     * @return
+     */
     @PostMapping("/prodStorage/saler")
     public Result createProdSaler(@RequestBody ProductSalerDTO productSalerDTO){
         productService.createProdSaler(productSalerDTO);

+ 4 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -802,13 +802,15 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         Long enUU = companyApi.getCompanyById(BaseContextHolder.getCompanyId()).getData().getUu();
         Long userUU = accountApi.getAccountById(BaseContextHolder.getUserId()).getData().getUu();
         ProductSalerUploadDTO productSalerUploadDTO = new ProductSalerUploadDTO(productSalerDTO.getProdId(), productSalerDTO.getProdCode(), enUU, userUU);
+        List<ProductSalerDTO> productSalerDTOList = new ArrayList<ProductSalerDTO>();
+        productSalerDTOList.add(productSalerDTO);
         if (productSalerDTO.getOperate() == 0){
             //解绑
-            publicProductApi.uploadProductSalerForCancel(JsonUtils.toJsonString(productSalerDTO));
+            publicProductApi.uploadProductSalerForCancel(JsonUtils.toJsonString(productSalerDTOList));
             productSalerMapper.unbind(productSalerDTO.getProdId(), BaseContextHolder.getUserId(), BaseContextHolder.getCompanyId());
         }else if (productSalerDTO.getOperate() == 1){
             //绑定
-            publicProductApi.updateProdSaler(JsonUtils.toJsonString(productSalerDTO));
+            publicProductApi.updateProdSaler(JsonUtils.toJsonString(productSalerDTOList));
             productSalerMapper.bind(productSalerDTO.getProdId(), BaseContextHolder.getUserId(), BaseContextHolder.getCompanyId());
         }
     }

+ 4 - 4
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -972,8 +972,8 @@
     </update>
     <select id="getProdStorage" resultType="com.usoftchina.saas.document.dto.ProdStorageDTO">
       SELECT * FROM (
-      SELECT pr_id prodId, pr_detail prodName, pr_code prodCode, pr_spec prodSpec, pr_unid prodUnit, pr_brand prodBrand,
-      pr_orispeccode prodSpeccode,pr_leadtime prodLeadtime, 1 status
+      SELECT pr_id prodId, pr_detail prodName, pr_code prodCode, pr_spec prodSpec, pr_unit prodUnit, pr_brand prodBrand,
+      pr_orispeccode prodSpeccode,pr_leadtime prodLeadtime, 1 status, b2bStatus
       FROM product
       <where>
           <if test="userId != null">
@@ -984,8 +984,8 @@
           </if>
         </where>
         union all
-        SELECT pr_id prodId, pr_detail prodName, pr_code prodCode, pr_spec prodSpec, pr_unid prodUnit, pr_brand prodBrand,
-        pr_orispeccode prodSpeccode,pr_leadtime prodLeadtime, 0 status
+        SELECT pr_id prodId, pr_detail prodName, pr_code prodCode, pr_spec prodSpec, pr_unit prodUnit, pr_brand prodBrand,
+        pr_orispeccode prodSpeccode,pr_leadtime prodLeadtime, 0 status, b2bStatus
         FROM product
         <where>
           <if test="userId != null">

+ 3 - 0
frontend/saas-portal-web/src/components/conenter/addenterprise.vue

@@ -187,6 +187,7 @@ import { setTimeout, clearTimeout } from 'timers';
             //取消添加企业
             tjquxiao(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.$router.push({name:'company',}); 
             },
             //检测企业名称1
@@ -401,6 +402,7 @@ import { setTimeout, clearTimeout } from 'timers';
                             setTimeout(()=>{
                                 this.$router.push({name:'company'});
                                 document.documentElement.scrollTop = 0;
+                                window.pageYOffset = 0;
                             },3000)
                         } else {
                             this.$message.error(res.data.message);
@@ -494,6 +496,7 @@ import { setTimeout, clearTimeout } from 'timers';
                                 this.isadd = true;//添加成功弹窗
                                 setTimeout(()=>{
                                     document.documentElement.scrollTop = 0;
+                                    window.pageYOffset = 0;
                                     let session = Session.get();
                                     session.account.realname = name;
                                     session.account.email = email;

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

@@ -220,6 +220,7 @@
             //分页
             handleCurrentChange(val){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.pagingtion(val,this.size);
             },
             //分页函数
@@ -383,12 +384,14 @@
             //查看企业详情
             getEnterpriseInfo(d){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 window.sessionStorage.setItem('content',JSON.stringify(d))
                 this.$router.push({path:'/details'});
             },
              //添加企业
             addEnterprise(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
             },
             //关闭弹窗
             guanbitc(){

+ 3 - 0
frontend/saas-portal-web/src/components/conenter/details.vue

@@ -141,6 +141,7 @@ import Session from '@/utils/session'
             //修改企业信息
             xiugaiqiye(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.modify = false;
                 setTimeout(()=>{
                     this.selects()
@@ -170,6 +171,7 @@ import Session from '@/utils/session'
             // 取消修改
             quxiaoxiugai(){
                 document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
                 this.modify = true;
             },
             // 保存修改
@@ -199,6 +201,7 @@ import Session from '@/utils/session'
                     .then(res=>{
                         if (res.data.success) {
                             document.documentElement.scrollTop = 0;
+                            window.pageYOffset = 0;
                             this.modify = true;
                             let session = Session.get();
                             session.account.email = email;

+ 19 - 11
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -35,10 +35,10 @@
                 </div>
             <div class="collapse navbar-collapse navbar-right" role="navigation" style="position: absolute;left: 35%;">
             <ul @click="gohome" id="nav" class="nav navbar-nav menu">
-                <li><router-link to="/home"><a @click="setTurnHome"><span style="color: white">首页</span></a></router-link></li>
-                <li><a href="#" @click="feature"><span>特色</span></a></li>
-                <li><a href="#" @click="service"><span>功能</span></a></li>
-                <li><a href="#" @click="download"><span>下载</span></a></li>
+                <li><router-link to="/home"><a @click="home"><span style="color: white">首页</span></a></router-link></li>
+                <li><a class="xs" @click="feature"><span>特色</span></a></li>
+                <li><a class="xs" @click="service"><span>功能</span></a></li>
+                <li><a class="xs" @click="download"><span>下载</span></a></li>
                 <!-- <router-link to="/invitation"><a ><span style="color: white">邀请</span></a></router-link> -->
                 <li>
                     <el-menu  
@@ -241,7 +241,7 @@ import { setTimeout } from 'timers';
             if (!this.mytoken) {
                 this.$router.push({path:'/home'})
             };
-            document.documentElement.scrollTop = 0;
+            this.scrollout();
         },
         mounted(){
             let phone = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
@@ -345,7 +345,7 @@ import { setTimeout } from 'timers';
             },
             // 分页
             handleCurrentChange(val) {
-                document.documentElement.scrollTop = 0;
+                this.scrollout();
                 this.pagingtion(val,this.size);
             },
             //分页函数
@@ -447,27 +447,35 @@ import { setTimeout } from 'timers';
             navproblem(){
                 this.$router.push({name: 'Home', params: {isporblem: false}})
                 this.$store.commit('problemfalse');
-                document.documentElement.scrollTop = 0;
+                this.scrollout();
+                this.setTurnHome();
+            },
+            home(){
+                this.scrollout();
                 this.setTurnHome();
             },
             // 特色
             feature(){
-                this.$router.push({name: 'Home', params: {isfeature: 690}});
+                this.$router.push({name: 'Home', params: {isfeature: 'feature'}});//690
                 this.setTurnHome();
             },
             //功能
             service(){
-                this.$router.push({name: 'Home', params: {isfeature: 3530}});
+                this.$router.push({name: 'Home', params: {isfeature: 'service'}});//3530
                 this.setTurnHome();
             },
             // 下载
             download(){
-                this.$router.push({name: 'Home', params: {isfeature: 4190}});
+                this.$router.push({name: 'Home', params: {isfeature: 'download'}});//4190
                 this.setTurnHome();
             },
             gohome(e){
                 this.$store.commit('problemtrue')
-                // this.isproblem = true
+            },
+            scrollout(){
+                document.documentElement.scrollTop = 0;
+                window.pageYOffset = 0;
+                document.body.scrollTop = 0;
             },
             //内容不足500固定高度
             boxheight(){

+ 69 - 42
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -256,7 +256,7 @@
       </section>
       <!-- end Service section -->
       <!-- 下载 -->
-      <section>
+      <section id="download">
         <div class="container ts-worp" style="padding-top: 30px;">
           <div class="section-title text-center" style="margin-bottom: 50px">
             <p class="ts-title">下载</p>
@@ -353,16 +353,52 @@
       })
     },
     beforeDestroy(){
-      clearInterval(this.timer)
+      clearInterval(this.timer);
+      window.removeEventListener("scroll",this.handleFun);
     },
     mounted() {
-      this.clientId = Math.random().toString(36).substr(2)
+      this.clientId = Math.random().toString(36).substr(2);
       // 从本地加载已经登录的信息
-      this.account = Session.getAccount()
-      document.documentElement.scrollTop = this.isfeature;
-      $(window).scroll(function() {
+      this.account = Session.getAccount();
+      switch (this.isfeature) {
+        case 'feature':
+          this.feature2()
+          break;
+        case 'service':
+          this.service2()
+          break;
+        case 'download':
+          this.download()
+          break;
+      };
+      // document.documentElement.scrollTop = this.isfeature;
+      window.addEventListener("scroll",this.handleFun);
+    },
+    computed: {
+      setTokenPage() {
+        return this.$url.web + '/set-token.html'
+      },
+      ssoPage() {
+        if (this.isLogin) {
+          return this.$url.sso + '/sassLogin?appId=sp&baseUrl=' +
+            encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
+        }
+        if (this.isRegister) {
+          return this.$url.sso + '/sassLogin/register?appId=sp&baseUrl=' +
+            encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
+        }
+      },
+      getnewproblem() {
+        return this.$store.state.isproblem;
+      },
+    },
+    methods: {
+      handleFun(){
         let Y = $(window).scrollTop();
-        if (Y >= 500 && Y <= 1500) {
+        if ($('#feature').offset()) {
+          var scrollH = Math.floor($('#feature').offset().top) - 260;//500
+        }
+        if (Y >= scrollH && Y <= scrollH + 1000) {
           $(".animate1").stop();
           $(".animate1").animate({
             top:'0px',
@@ -375,7 +411,7 @@
             opacity:'0'
           },1000);
         };
-        if (Y > 1200 && Y < 2200) {
+        if (Y > scrollH + 700 && Y < scrollH + 1700) {
           $(".animate2").stop();
           $(".animate2").animate({
             top:'0px',
@@ -388,7 +424,7 @@
             opacity:'0'
           },1000);
         };
-        if (Y > 1900 && Y < 2900) {
+        if (Y > scrollH + 1400 && Y < scrollH + 2400) {
           $(".animate3").stop();
           $(".animate3").animate({
             top:'0px',
@@ -411,7 +447,7 @@
             opacity:'0'
           },1000);
         };
-        if (Y > 2600 && Y < 3600) {
+        if (Y > scrollH + 2100 && Y < scrollH + 3100) {
           $(".animate4").stop();
           $(".animate4").animate({
             top:'0px',
@@ -434,27 +470,7 @@
             opacity:'0'
           },1000);
         };
-      })
-    },
-    computed: {
-      setTokenPage() {
-        return this.$url.web + '/set-token.html'
-      },
-      ssoPage() {
-        if (this.isLogin) {
-          return this.$url.sso + '/sassLogin?appId=sp&baseUrl=' +
-            encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
-        }
-        if (this.isRegister) {
-          return this.$url.sso + '/sassLogin/register?appId=sp&baseUrl=' +
-            encodeURIComponent(this.$url.api + '/api/auth/sso/callback/' + this.clientId)
-        }
-      },
-      getnewproblem() {
-        return this.$store.state.isproblem;
       },
-    },
-    methods: {
       listenOnCallback() {
         const me = this
         subscribe(this.clientId, '/sso/callback').then(data => {
@@ -509,7 +525,7 @@
           me.isRegister = false
         })
       },
-      // 下载1
+      // 下载
       downloadOne(){
         let url = 'https://saas-assets.usoftchina.com/UsoftchinaSaasClient_setup.exe';
         let alink = document.createElement("a");
@@ -578,34 +594,38 @@
       //常见问题
       navproblem(){
         this.$store.commit('problemfalse');
-        // document.documentElement.scrollTop = 0;
         clearInterval(this.timer);
         this.animate(0);
       },
       home() {
         clearInterval(this.timer);
         this.animate(0);
-        this.setTurnHome();
       },
       //特色
       feature2(){
         clearInterval(this.timer);
-        this.animate(690);
-        this.setTurnHome();
+        setTimeout(()=>{
+          let featH = Math.floor($('#feature').offset().top) - 70;
+          this.animate(featH);//690
+        },10);
       },
       //功能
       service2(){
         clearInterval(this.timer);
-        this.animate(3530);
-        this.setTurnHome();
+        setTimeout(()=>{
+          let servH = Math.floor($('#service').offset().top) - 129;
+          this.animate(servH);//3530
+        },10);
       },
       // 下载
       download(){
         // document.documentElement.scrollTop = 4190;
         // window.scrollTo(0,4190);
         clearInterval(this.timer);
-        this.animate(4190);
-        this.setTurnHome();
+        setTimeout(()=>{
+          let dowH = Math.floor($('#download').offset().top) - 100;
+          this.animate(dowH);
+        },10)
       },
       //添加鼠标滚轮事件,鼠标滚动的时候清除定时器,否则无法滚动
       scrollout(){
@@ -615,18 +635,25 @@
       animate(target) {
         clearInterval(this.timer);
         this.timer = setInterval(function () {
-            var leader = document.documentElement.scrollTop;
+            var leader = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
             var step = (target - leader) / 10;
             step = step > 0 ? Math.ceil(step) : Math.floor(step);
             leader = leader + step;
             document.documentElement.scrollTop = leader;
+            window.pageYOffset = leader;
+            document.body.scrollTop = leader;
             if (leader === target) {
                 clearInterval(this.timer);
             }
         }, 5);
       },
-      gohome(e){
-        this.$store.commit('problemtrue')
+      gohome(ev){
+        var ev = ev || window.event;
+        if (ev.target.childNodes[0].data == '帮助中心') {
+          return
+        } else {
+          this.$store.commit('problemtrue')
+        }
         // this.isproblem = true
       }
     }

+ 2 - 1
frontend/saas-portal-web/src/components/conenter/invitation.vue

@@ -87,7 +87,6 @@ import { log } from 'util';
         },
         methods:{
             browserRedirect() {
-                let param = this.getUrlParam('param');
                 var sUserAgent = navigator.userAgent.toLowerCase();
                 var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                 var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
@@ -99,6 +98,8 @@ import { log } from 'util';
                 var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                 if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                     // 移动端访问跳转到移动端页面
+                    let index = window.location.href.indexOf('=');
+                    let param=window.location.href.substr(index+1);
                     window.location.href = 'invitation_mobile_join.html?param='+param
                 } else {
                     this.param();//获取pc端页面参数

+ 3 - 3
frontend/saas-portal-web/static/css/main.css

@@ -331,10 +331,10 @@ main > section {
 }
 .bz-yuandian {
     background: #FFCC01;
-    width: 16px;
-    height: 16px;
+    width: 14px;
+    height: 14px;
     border-radius: 50%;
-    margin: 4px 8px 0 0;
+    margin: 7px 8px 0 0;
 }
 .bz-right-conent li {
     border-bottom: 1px solid #E8ECEF;

+ 1 - 1
frontend/saas-web/app/model/report/RecDetail.js

@@ -4,7 +4,7 @@ Ext.define('saas.model.report.RecDetail', {
     fields: [
         { name: 'rd_date', type: 'string' },
         { name: 'rd_code', type: 'string' },
-        { name: 'rd_kind', type: 'date' },
+        { name: 'rd_kind', type: 'string' },
         { name: 'rd_sellername', type: 'string' },
         { name: 'rd_currency', type: 'string' },
         { name: 'rd_addrec', type: 'float' },

+ 2 - 0
frontend/saas-web/app/view/document/currencys/AddWindow.js

@@ -28,6 +28,8 @@ Ext.define('saas.view.document.currencys.AddWindow', {
                 xtype:'textfield',
                 name:'cr_name',
                 allowBlank:false,
+                regex:/^[A-Z]+$/,
+                regexText:'请输入大写英文字母',
                 fieldLabel:'币别',
                 maxLength: 20
             },{

+ 2 - 2
frontend/saas-web/app/view/document/currencys/DataList.js

@@ -26,7 +26,7 @@ Ext.define('saas.view.document.currencys.DataList', {
             columns: [{
                 text: '币别',
                 dataIndex: 'cr_name',
-                flex: 1,
+                width:150,
                 renderer:function(a,b,c){
                     if(c.get('cr_standard')==1){
                         return a + '(本位币)'
@@ -36,7 +36,7 @@ Ext.define('saas.view.document.currencys.DataList', {
             },{
                 text: '默认汇率',
                 dataIndex: 'cr_rate',
-                flex: 1
+                width:150
             }],
             keyField:'id',
             reqUrl:'/api/document/currency/save',

+ 1 - 1
frontend/saas-web/app/view/stock/report/DataList.js

@@ -18,7 +18,7 @@ Ext.define('saas.view.stock.report.DataList', {
 
     searchItems: [{
         xtype: 'productDbfindTrigger',
-        name: 'pr_detail',
+        name: 'pr_code',
         emptyText: '请输入物料编号、名称或规格',
         columnWidth: 0.25
     }, {