瀏覽代碼

开单项没选择时,不跳到医嘱

zhangxc 6 年之前
父節點
當前提交
e627b67e63
共有 2 個文件被更改,包括 13 次插入7 次删除
  1. 9 5
      src/components/PushItems/index.jsx
  2. 4 2
      src/components/PushItems/index.less

+ 9 - 5
src/components/PushItems/index.jsx

@@ -46,11 +46,15 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    const Height = $(".src-components-BodyContainer-2SgEx").height();
-    const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
-    const winHeight = window.innerHeight;
-    const scrollTop = Height;
-    document.documentElement.scrollTop = 10000;
+    if(checkedAssay.length > 0 || checkedCheck.length > 0) {
+      console.log('checkedCheck',checkedAssay, checkedCheck)
+      const Height = $(".src-components-BodyContainer-2SgEx").height();
+      const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
+      const winHeight = window.innerHeight;
+      const scrollTop = Height;
+      document.documentElement.scrollTop = 10000;
+    }
+    
   }
 
   changeAssay(item) {

+ 4 - 2
src/components/PushItems/index.less

@@ -108,15 +108,16 @@
       div{
         float: right;
         width: 50px;
-        height: 26px;
         border: 1px solid #3B9ED0;
         text-align: center;
-        line-height: 26px;
         padding:0px;
         border-radius: 4px;
         margin-top: -3px;
         cursor: pointer;
         font-weight: normal;
+        height: 28px;
+        line-height: 28px;
+        font-size: 12px;
       }
     }
     div{
@@ -339,6 +340,7 @@
 }
 .billing {
   color: #3B9ED0;
+  
 }
 .disTips {
   padding: 10px 20px 0;