于继渤 1 жил өмнө
parent
commit
35fa45ce75

+ 1 - 0
package-basic-data/pages/basic-data/basic-data.js

@@ -738,6 +738,7 @@ Page({
   onLoad(options) {
     this.getDataKind()
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({

+ 2 - 2
package-basic-data/pages/basic-data/basic-data.wxml

@@ -1,6 +1,6 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<van-sticky scroll-top="0">
+<van-sticky scroll-top="0"  id="sticky">
   <dk-navbar titleFontColor="#000000" navbarTitle="基础资料" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}"/>
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['dataName','dataCode','remarks'])}}">
@@ -10,7 +10,7 @@
 <view style="display: flex;">
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
-    <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;">
+    <view style="height:calc({{windowHeight - stickyHeight - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight * 2 + 'rpx'}}">
       <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.kindName}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
     </view>
   </van-sidebar>

+ 1 - 6
package-basic-data/pages/product-attribute/product-attribute.js

@@ -498,6 +498,7 @@ Page({
   onLoad(options) {
     this.getDataKind()
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({
@@ -506,11 +507,5 @@ Page({
         })
       }
     })
-     //创建节点选择器
-     wx.createSelectorQuery().select('#sticky').boundingClientRect().exec(function (res) {
-      _this.setData({
-        stickyHeight: Number(res[0].height * 2)
-      })
-    }) 
   },
 })

+ 1 - 1
package-basic-data/pages/product-attribute/product-attribute.wxml

@@ -11,7 +11,7 @@
 <view style="display: flex;">
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class" >
-    <view style="height:calc({{windowHeight - stickyHeight/2 - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight + 'rpx'}}">
+    <view style="height:calc({{windowHeight - stickyHeight - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight * 2 + 'rpx'}}">
       <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.kindName}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
     </view>
   

+ 1 - 6
package-basic-data/pages/product-file/product-file.js

@@ -174,12 +174,7 @@ Page({
         })
       }
     })
-     //创建节点选择器
-     wx.createSelectorQuery().select('#sticky').boundingClientRect().exec(function (res) {
-      _this.setData({
-        stickyHeight: Number(res[0].height * 2)
-      })
-    }) 
+
   }
 
 })

+ 1 - 1
package-basic-data/pages/product-file/product-file.wxml

@@ -10,7 +10,7 @@
 <view style="display: flex;">
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
-    <view style="height:calc({{windowHeight - stickyHeight/2 - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight + 'rpx'}}">
+    <view style="height:calc({{windowHeight - stickyHeight - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight * 2 + 'rpx'}}">
       <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{sidebarList}}" />
     </view>
   </van-sidebar>

+ 1 - 1
package-inventory/pages/cost-check/cost-check.wxml

@@ -1,7 +1,7 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<van-sticky wx:if="{{!showSearch}}" scroll-top="0">
+<van-sticky wx:if="{{!showSearch}}" scroll-top="0" id="sticky">
   <!-- 查询条件 -->
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['inOrderNo','skuName','skuCode'])}}">
   </dk-dropdown-menu>

+ 1 - 7
package-inventory/pages/ivt-detail-report/ivt-detail-report.js

@@ -338,6 +338,7 @@ Page({
   onLoad() {
     this.getGoodsBrandNoPage()
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({
@@ -346,12 +347,5 @@ Page({
         })
       }
     })
-
-     //创建节点选择器
-     wx.createSelectorQuery().select('#sticky').boundingClientRect().exec(function (res) {
-      _this.setData({
-        stickyHeight: Number(res[0].height * 2)
-      })
-    })
   },
 })

+ 1 - 1
package-inventory/pages/ivt-detail-report/ivt-detail-report.wxml

@@ -47,7 +47,7 @@
 </view>
 
 <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" >
-  <view  class="{{controlFlags.choosewhFlag?'addsidebar left-class':'left-class'}}" style="height:calc({{windowHeight - stickyHeight/2 +'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight + 'rpx'}}">
+  <view  class="{{controlFlags.choosewhFlag?'addsidebar left-class':'left-class'}}" style="height:calc({{windowHeight - stickyHeight +'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight*2 + 'rpx'}}">
     <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{typeList}}" />
   </view>
 </van-sidebar>

+ 2 - 6
package-inventory/pages/ivt-warning-report/ivit-warning-report-setting/ivit-warning-report-setting.js

@@ -176,6 +176,7 @@ Page({
    */
   onLoad(){
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({
@@ -185,12 +186,7 @@ Page({
       }
     })
 
-      //创建节点选择器
-      wx.createSelectorQuery().select('#sticky').boundingClientRect().exec(function (res) {
-        _this.setData({
-          stickyHeight: Number(res[0].height * 2)
-        })
-      })
+   
   },
   /**
    * @desc : 修改上限下限触发

+ 2 - 2
package-inventory/pages/ivt-warning-report/ivit-warning-report-setting/ivit-warning-report-setting.wxml

@@ -11,8 +11,8 @@
 
 <view style="display: flex;">
   <!-- 左侧菜单列表 -->
-  <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class" style="--stickyHeight--:{{stickyHeight + 'rpx'}}">
-    <view style="height:calc({{windowHeight - stickyHeight/2 - 85+'px'}} );overflow: scroll;">
+  <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class" >
+    <view style="height:calc({{windowHeight - stickyHeight - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight * 2 + 'rpx'}}">
       <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{sidebarList}}" />
     </view>
   </van-sidebar>

+ 2 - 6
package-inventory/pages/ivt-warning-report/ivt-warning-report.js

@@ -290,6 +290,7 @@ Page({
   onLoad() {
     this.getGoodsBrandNoPage()
     let _this = this;
+    this.getStickyHeight()
     wx.getSystemInfo({
       success: function (res) {
         _this.setData({
@@ -299,12 +300,7 @@ Page({
       }
     })
 
-    //创建节点选择器
-    wx.createSelectorQuery().select('#sticky').boundingClientRect().exec(function (res) {
-      _this.setData({
-        stickyHeight: Number(res[0].height * 2)
-      })
-    })
+  
 
   },
 })

+ 1 - 1
package-inventory/pages/ivt-warning-report/ivt-warning-report.wxml

@@ -53,7 +53,7 @@
 </view>
 
 <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" >
-  <view  class="{{controlFlags.choosewhFlag?'addsidebar left-class':'left-class'}}" style="height:calc({{windowHeight - stickyHeight/2 - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight + 'rpx'}}">
+  <view  class="{{controlFlags.choosewhFlag?'addsidebar left-class':'left-class'}}" style="height:calc({{windowHeight - stickyHeight - 85+'px'}} );overflow: scroll;--stickyHeight--:{{stickyHeight * 2 + 'rpx'}}">
     <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.brandName}}" data-id="{{item.brandId}}" wx:for="{{typeList}}" />
   </view>
 </van-sidebar>