Bladeren bron

@zengqiao@列表搜索样式调整

zengqiao 4 jaren geleden
bovenliggende
commit
1db9d4fa60
2 gewijzigde bestanden met toevoegingen van 17 en 9 verwijderingen
  1. 14 6
      2019/bj-zqzt/biz/js/construction-sheet-list.js
  2. 3 3
      2019/bj-zqzt/construction-sheet-list.html

+ 14 - 6
2019/bj-zqzt/biz/js/construction-sheet-list.js

@ -36,19 +36,27 @@ require(['jquery', 'ipuUI'], function ($, ipuUI) {
36 36
      });
37 37
    });
38 38
39
    // 全部中的条件搜索事件
40
    $(".common-select-search-btn").click(function () {
41
      search();
42
    });
43
44 39
    // 监测输入框按下事件
45 40
    $(".common-search-input").keyup(function (e) {
46
      var currKey = e.keyCode || e.which || e.charCode;
41
      let currKey = e.keyCode || e.which || e.charCode;
42
      if ($(this).val() != "") {
43
        // 如果输入框值不为空,clean按钮显示
44
        $(".search-input-clean").show();
45
      } else {
46
        // 如果输入框为空,clean按钮隐藏
47
        $(".search-input-clean").hide();
48
      }
47 49
      if (currKey == 13) {// 按下回车进行查询
48 50
        search();
49 51
      }
50 52
    });
51 53
54
    // 输入框清除按钮点击事件
55
    $(".search-input-clean").click(function () {
56
      $(".search-input-clean").hide();
57
      $(".common-search-input").val("").focus();
58
    });
59
52 60
    // 选项点击事件跳转至详情页
53 61
    $(".construction-list-area").on("click", ".agreement-sheet-item", function () {
54 62
      location.href = "construction-sheet-details.html"

+ 3 - 3
2019/bj-zqzt/construction-sheet-list.html

@ -33,10 +33,10 @@
33 33
          <div class="sort-type" data-type="CUST_NAME">客户名称</div>
34 34
          <div class="unfold-status"></div>
35 35
        </div>
36
        <div class="ipu-flex-grow-1">
37
          <input type="text" class="common-search-input common-select-search-input" placeholder="输入关键字进行查询"/>
36
        <div class="ipu-flex-grow-1" style="position: relative">
37
          <input type="text" class="common-search-input common-select-search-input" placeholder="输入关键字进行查询" style="padding:.07rem .36rem"/>
38
          <div class="search-input-clean" style="display:none;top:.09rem;right: .08rem;left:auto;"></div>
38 39
        </div>
39
        <button class="ipu-btn common-btn common-select-search-btn">搜索</button>
40 40
      </div>
41 41
      <div class="customer-list-head ipu-flex ipu-flex-justify-space ipu-flex-align-center">
42 42
        <div class="business-count">共<span>0</span>个客户</div>