|  | @@ -11,6 +11,7 @@
 | 
	
		
			
				|  |  |      <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui-for-work.min.css"/>
 | 
	
		
			
				|  |  |      <script src="/static/jquery/jquery-2.1.1.min.js"></script>
 | 
	
		
			
				|  |  |      <script src="/static/weixin/js/jquery-weui.min.js"></script>
 | 
	
		
			
				|  |  | +    <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/city-picker.min.js"></script>
 | 
	
		
			
				|  |  |      <link rel="stylesheet" href="/static/weixin/css/jquery-weui.min.css"/>
 | 
	
		
			
				|  |  |      <link rel="stylesheet" href="${ctx}/static/weixin/example/example.css"/>
 | 
	
		
			
				|  |  |      <link rel="stylesheet" href="/static/wechat/wechat-btn.css"/>
 | 
	
	
		
			
				|  | @@ -22,136 +23,102 @@
 | 
	
		
			
				|  |  |      .model_top{
 | 
	
		
			
				|  |  |          margin-top: 0px;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    .model_heg{
 | 
	
		
			
				|  |  | +        line-height: 20%;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_fonz_pro{
 | 
	
		
			
				|  |  | +        font-size: 13px
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_fex_height{
 | 
	
		
			
				|  |  | +        height: 10%;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_fex_font-size{
 | 
	
		
			
				|  |  | +        text-align: center;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_fex_submit{
 | 
	
		
			
				|  |  | +        width:100%;
 | 
	
		
			
				|  |  | +        height:30px;
 | 
	
		
			
				|  |  | +        line-height: 30px;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list1{
 | 
	
		
			
				|  |  | +        height: 41px;width: 100%; border-radius:15px;border: 1px solid #dd514c
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list2{
 | 
	
		
			
				|  |  | +        float:left;width: 20%;height: 41px;border-radius:15px 0px 0px 15px;text-align: center
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list3{
 | 
	
		
			
				|  |  | +        text-align: center;width: 100%;height: 41px;font-size:80%" type="text" name="marterialName" onchange="materialNameUpdate()
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list4{
 | 
	
		
			
				|  |  | +        float:left;background-color: yellow;width: 65%;height: 41px
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list5{
 | 
	
		
			
				|  |  | +        height: 41px;width: 100%;border: 0;outline: none;font-size: 15px
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list6{
 | 
	
		
			
				|  |  | +        float:left;width: 14%;height: 41px;border-radius:0px 15px 15px 0px;text-align: center
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    .model_list7{
 | 
	
		
			
				|  |  | +        width: 50%;height:50%;margin-top:17%;margin-left:8%;text-align: center;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  </style>
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  |      $(function () {
 | 
	
		
			
				|  |  | -        // loadlistProject();
 | 
	
		
			
				|  |  | -        loadlist();
 | 
	
		
			
				|  |  | +        materialSolr('','','','',"/workMaterialCollect/total/list.do");
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | -    function loadlist() {
 | 
	
		
			
				|  |  | -        var html = "";
 | 
	
		
			
				|  |  | -        $.ajax({
 | 
	
		
			
				|  |  | -            type: "POST",
 | 
	
		
			
				|  |  | -            url: "/workMaterialCollect/total/list.do",
 | 
	
		
			
				|  |  | -            // data: { 'page': pages, 'size': sizes },
 | 
	
		
			
				|  |  | -            dataType: "json",
 | 
	
		
			
				|  |  | -            success: function (data) {
 | 
	
		
			
				|  |  | -                // alert(data);
 | 
	
		
			
				|  |  | -                if (data.length > 0) {
 | 
	
		
			
				|  |  | -                    html +='<div class="weui-flex" style="background-color: #f9f9f9">\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item model_fex">名称</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">型号</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">单位</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">含税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">除税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">分析</div>\n' +
 | 
	
		
			
				|  |  | -                        '       </div>';
 | 
	
		
			
				|  |  | -                    for (var i = 0; i < data.length; i++) {
 | 
	
		
			
				|  |  | -                        // alert(data[i].id)
 | 
	
		
			
				|  |  | -                        // alert(data[i].materialName);
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item model_fex'>"+data[i].materialName+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].specifications+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].unit+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>/</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].excludingTax+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'><a href='/workMaterialCollect/total/view?id="+data[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | -                            "</div>";
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item model_fex' style='font-size: 5px'>" +
 | 
	
		
			
				|  |  | -                                "来源:<span>"+data[i].projectName+"</span>项目;分类:<span>"+data[i].projectType+"</span>;工程时间<span>"+data[i].startDate+"/"+data[i].endDate+"</span>" +
 | 
	
		
			
				|  |  | -                                "</div>" +
 | 
	
		
			
				|  |  | -                            "</div>";
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    $("#toList").html(html);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  |      function loadlistProject() {
 | 
	
		
			
				|  |  | -        var html = "";
 | 
	
		
			
				|  |  | -        $.ajax({
 | 
	
		
			
				|  |  | -            type: "POST",
 | 
	
		
			
				|  |  | -            url: "/workMaterialCollect/total/project.list.do",
 | 
	
		
			
				|  |  | -            // data: { 'page': pages, 'size': sizes },
 | 
	
		
			
				|  |  | -            dataType: "json",
 | 
	
		
			
				|  |  | -            success: function (data) {
 | 
	
		
			
				|  |  | -                if (data.length > 0) {
 | 
	
		
			
				|  |  | -                    html +='<div class="weui-flex" style="background-color: ">\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">项目名称</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">地区</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">分类</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">工程时间</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">详情</div>\n' +
 | 
	
		
			
				|  |  | -                        '        </div>';
 | 
	
		
			
				|  |  | -                    for (var k = 0; k < data.length; k++) {
 | 
	
		
			
				|  |  | -                        for (var i = 0; i < data[k].workMaterialCollectTypes.length; i++) {
 | 
	
		
			
				|  |  | -                            // alert(data[i].id)
 | 
	
		
			
				|  |  | -                            // alert(data[i].materialName);
 | 
	
		
			
				|  |  | -                            html+= "<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item'>"+data[k].projectName+"</div>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item'>"+data[k].projectSite+"</div>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item'>"+data[k].workMaterialCollectTypes[i].projectType+"</div>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item'>/</div>" +
 | 
	
		
			
				|  |  | -                                "<div class='weui-flex__item'><a href='/workMaterialCollect/total/project.view?itemId="+data[k].id+"&projectTypeId="+data[k].workMaterialCollectTypes[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | -                                "</div>";
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    $("#toList").html(html);
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <body>
 | 
	
		
			
				|  |  | -<div style="padding: 2px">
 | 
	
		
			
				|  |  | +<div style="">
 | 
	
		
			
				|  |  |      <div class="weui-cells model_top">
 | 
	
		
			
				|  |  |          <div class="weui-cell">
 | 
	
		
			
				|  |  | -            <div class="weui-cell__hd" style="width:20%">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" name="marterialName" onchange="materialNameUpdate()" id='marterialName' value="材料"/>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="weui-cell__bd" style="width:100%">
 | 
	
		
			
				|  |  | -                <input id="projectName" name="projectName" type="text"  maxlength="64" class=" form-control  layui-input laydate-icon" value="" />
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="weui-cell__ft" style="width:20%">
 | 
	
		
			
				|  |  | -                <a href="javascript:;" onclick="solr()" class="">按钮</a>
 | 
	
		
			
				|  |  | +            <div class="model_list1">
 | 
	
		
			
				|  |  | +                <div class="model_list2">
 | 
	
		
			
				|  |  | +                    <input class="weui-input model_list3" onchange="materialNameUpdate()" id='marterialName' value="材料"/>
 | 
	
		
			
				|  |  | +                    <%--<img style="margin: auto;width: 100%;" src="/static/weixin/image/cj_xiala.png"/>--%>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="model_list4">
 | 
	
		
			
				|  |  | +                    <input id="projectName" placeholder="请输入查找条件" class="model_list5" name="projectName" type="text"  maxlength="64"  value="" />
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="model_list6">
 | 
	
		
			
				|  |  | +                    <img onclick="solr()" class="model_list7" src="/static/weixin/image/dj_sousuo.png"/>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | -    <%--<div class='weui-cells model_top'>--%>
 | 
	
		
			
				|  |  | -        <%--<div class="weui-flex" style="height: 30px;width: 100%">--%>
 | 
	
		
			
				|  |  | -            <%--<div class="weui-flex__item" style="height: 30px;width: 100%;background-color: blue">--%>
 | 
	
		
			
				|  |  | -                <%--<div style="width: 20%;background-color: red">--%>
 | 
	
		
			
				|  |  | -                <%--</div>--%>
 | 
	
		
			
				|  |  | -            <%--</div>--%>
 | 
	
		
			
				|  |  | -        <%--</div>--%>
 | 
	
		
			
				|  |  | -    <%--</div>--%>
 | 
	
		
			
				|  |  | -    <div class="weui-cells model_top"  id="matarial">
 | 
	
		
			
				|  |  | -        <div class="weui-flex">
 | 
	
		
			
				|  |  | -            <div class="weui-flex__item">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" readonly="readonly" onchange="projectTypeUpdate()"  name="" id='projectType' value="分类"/>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="weui-flex__item">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" name="specific1" id="" value="时间"/>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="weui-flex__item">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" name="projectSize" id='projectSize' value="地址"/>
 | 
	
		
			
				|  |  | +    <div class="weui-cells model_top" id="matarial">
 | 
	
		
			
				|  |  | +        <div class="weui-cell">
 | 
	
		
			
				|  |  | +            <div class="weui-flex">
 | 
	
		
			
				|  |  | +                <div class="weui-flex__item">
 | 
	
		
			
				|  |  | +                    <input class="weui-input" type="text" readonly="readonly" style="background-color: white;text-align: center" onchange="projectTypeUpdate()"  name="" id='projectType' placeholder="分类"/>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="weui-flex__item">
 | 
	
		
			
				|  |  | +                    <input  class="weui-input" type="text" style="background-color: white;text-align: center" readonly="readonly" id='datetime-picker' placeholder="时间" />
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="weui-flex__item">
 | 
	
		
			
				|  |  | +                    <input style="background-color: white;text-align: center" class="weui-input"  type="text" id='city-picker' placeholder="地址"/>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | -    <div class="weui-cells model_top" style="display: none"  id="project">
 | 
	
		
			
				|  |  | -        <div class="weui-flex">
 | 
	
		
			
				|  |  | -            <div class="weui-flex__item">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" name="specific1"  value="地区"/>
 | 
	
		
			
				|  |  | -            </div>
 | 
	
		
			
				|  |  | -            <div class="weui-flex__item">
 | 
	
		
			
				|  |  | -                <input class="weui-input" type="text" name="projectSize"  value="时间"/>
 | 
	
		
			
				|  |  | +    <div class="weui-cells model_top" style="display: none" id="project">
 | 
	
		
			
				|  |  | +        <div class="weui-cell">
 | 
	
		
			
				|  |  | +            <div class="weui-flex">
 | 
	
		
			
				|  |  | +                <div class="weui-flex__item">
 | 
	
		
			
				|  |  | +                    <input class="weui-input" type="text" style="background-color: white;text-align: center" id="projectArea" readonly="readonly" placeholder="地区"/>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="weui-flex__item">
 | 
	
		
			
				|  |  | +                    <input class="weui-input" type="text" style="background-color: white;text-align: center" id="projectTime" readonly="readonly"  placeholder="时间"/>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |      <div class='weui-cells model_top' id="toList">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | +    <div id="loadDiv" style="display: none;" class="weui-toast weui_loading_toast weui-toast--visible"><div class="weui_loading"><i class="weui-loading weui-icon_toast"></i></div><p class="weui-toast_content">请稍后...</p></div>
 | 
	
		
			
				|  |  |  </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  </body>
 | 
	
	
		
			
				|  | @@ -162,64 +129,76 @@
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      $("#projectType").select({
 | 
	
		
			
				|  |  |          title: "选择分类",
 | 
	
		
			
				|  |  | -        items: ["土建工程", "安装工程", "装饰工程", "绿化工程"]
 | 
	
		
			
				|  |  | +        items: ["分类","土建工程", "安装工程", "装饰工程", "绿化工程"]
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +    $("#city-picker").cityPicker({
 | 
	
		
			
				|  |  | +        title: "请选择地址",
 | 
	
		
			
				|  |  | +        onChange: function (picker, values, displayValues) {
 | 
	
		
			
				|  |  | +            $("#city-picker").val("");
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        onClose: function(picker) {
 | 
	
		
			
				|  |  | +            var s = $("#city-picker").val();
 | 
	
		
			
				|  |  | +            var index=s.lastIndexOf(' ');
 | 
	
		
			
				|  |  | +            var sub = s.substring(index+1,s.length);
 | 
	
		
			
				|  |  | +            $("#city-picker").val(sub);
 | 
	
		
			
				|  |  | +            $("#projectType").val("");
 | 
	
		
			
				|  |  | +            $("#datetime-picker").val("");
 | 
	
		
			
				|  |  | +            // if (projectType == "分类") {
 | 
	
		
			
				|  |  | +            //     projectType='';
 | 
	
		
			
				|  |  | +            // }
 | 
	
		
			
				|  |  | +            // var time = $("#datetime-picker").val();
 | 
	
		
			
				|  |  | +            // if (time == '时间'){
 | 
	
		
			
				|  |  | +            //     time  = '';
 | 
	
		
			
				|  |  | +            // }
 | 
	
		
			
				|  |  | +            materialSolr('','','',sub,"/workMaterialCollect/total/listOn.do");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    $("#datetime-picker").datetimePicker({
 | 
	
		
			
				|  |  | +        times: function() {
 | 
	
		
			
				|  |  | +            return [];
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        onClose: function(picker) {
 | 
	
		
			
				|  |  | +            var value = picker.value[0];
 | 
	
		
			
				|  |  | +            // alert(value);
 | 
	
		
			
				|  |  | +            $("#projectName").val("");
 | 
	
		
			
				|  |  | +            $("#projectType").val("");
 | 
	
		
			
				|  |  | +            $("#city-picker").val("");
 | 
	
		
			
				|  |  | +            // if (projectType == "分类") {
 | 
	
		
			
				|  |  | +            //     projectType='';
 | 
	
		
			
				|  |  | +            // }
 | 
	
		
			
				|  |  | +            // var projectSize = $("#city-picker").val();
 | 
	
		
			
				|  |  | +            // if (projectSize == '地区'){
 | 
	
		
			
				|  |  | +            //     projectSize = '';
 | 
	
		
			
				|  |  | +            // }
 | 
	
		
			
				|  |  | +            $("#datetime-picker").val(value);
 | 
	
		
			
				|  |  | +            materialSolr('','',value,'',"/workMaterialCollect/total/listOn.do");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      function projectTypeUpdate() {
 | 
	
		
			
				|  |  |          $("#projectName").val("");
 | 
	
		
			
				|  |  |          var projectType = $("#projectType").val();
 | 
	
		
			
				|  |  | +        if (projectType=="分类"){
 | 
	
		
			
				|  |  | +            projectType ='';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          var html = "";
 | 
	
		
			
				|  |  | -        $.ajax({
 | 
	
		
			
				|  |  | -            type: "POST",
 | 
	
		
			
				|  |  | -            url: "/workMaterialCollect/total/list.do",
 | 
	
		
			
				|  |  | -            data: { 'projectType': projectType},
 | 
	
		
			
				|  |  | -            dataType: "json",
 | 
	
		
			
				|  |  | -            success: function (data) {
 | 
	
		
			
				|  |  | -                // alert(data);
 | 
	
		
			
				|  |  | -                if (data.length > 0) {
 | 
	
		
			
				|  |  | -                    html +='<div class="weui-flex" style="background-color: #f9f9f9">\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item model_fex">名称</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">型号</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">单位</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">含税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">除税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">分析</div>\n' +
 | 
	
		
			
				|  |  | -                        '       </div>';
 | 
	
		
			
				|  |  | -                    for (var i = 0; i < data.length; i++) {
 | 
	
		
			
				|  |  | -                        // alert(data[i].id)
 | 
	
		
			
				|  |  | -                        // alert(data[i].materialName);
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item model_fex'>"+data[i].materialName+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].specifications+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].unit+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>/</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].excludingTax+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'><a href='/workMaterialCollect/total/view?id="+data[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | -                            "</div>";
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item model_fex' style='font-size: 5px'>" +
 | 
	
		
			
				|  |  | -                            "来源:<span>"+data[i].projectName+"</span>项目;分类:<span>"+data[i].projectType+"</span>;工程时间<span>"+data[i].startDate+"/"+data[i].endDate+"</span>" +
 | 
	
		
			
				|  |  | -                            "</div>" +
 | 
	
		
			
				|  |  | -                            "</div>";
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }else {
 | 
	
		
			
				|  |  | -                    html+='';
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                $("#toList").html(html);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +        $("#datetime-picker").val("");
 | 
	
		
			
				|  |  | +        $("#city-picker").val("");
 | 
	
		
			
				|  |  | +        materialSolr('',projectType,'','',"/workMaterialCollect/total/listOn.do")
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      
 | 
	
		
			
				|  |  |      function materialNameUpdate() {
 | 
	
		
			
				|  |  |          var materialNameUpdate = $("#marterialName").val();
 | 
	
		
			
				|  |  |          if (materialNameUpdate=='材料'){
 | 
	
		
			
				|  |  | +            clear();
 | 
	
		
			
				|  |  |              $("#matarial").attr("style","");
 | 
	
		
			
				|  |  |              $("#project").attr("style","display: none");
 | 
	
		
			
				|  |  | -            loadlist()
 | 
	
		
			
				|  |  | +            materialSolr('','','','',"/workMaterialCollect/total/list.do");
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  | +            clear();
 | 
	
		
			
				|  |  |              $("#matarial").attr("style","display: none");
 | 
	
		
			
				|  |  |              $("#project").attr("style","");
 | 
	
		
			
				|  |  | -            loadlistProject();
 | 
	
		
			
				|  |  | +            projectSolr('','','',"/workMaterialCollect/total/project.list.do")
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -229,65 +208,134 @@
 | 
	
		
			
				|  |  |              $("#matarial").attr("style","");
 | 
	
		
			
				|  |  |              $("#project").attr("style","display: none");
 | 
	
		
			
				|  |  |              var projectName = $("#projectName").val();
 | 
	
		
			
				|  |  | -            var projectType = $("#projectType").val();
 | 
	
		
			
				|  |  | -            if (projectType == "分类") {
 | 
	
		
			
				|  |  | -                projectType='';
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            var times = $("#time").val();
 | 
	
		
			
				|  |  | -            if (times == '时间'){
 | 
	
		
			
				|  |  | -                times = '';
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            var projectSize = $("#projectSize").val();
 | 
	
		
			
				|  |  | -            if (projectSize == '地区'){
 | 
	
		
			
				|  |  | -                projectSize = '';
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -            materialSolr(projectName,projectType,times,projectSize);
 | 
	
		
			
				|  |  | +            materialSolr(projectName,'','','',"/workMaterialCollect/total/listOn.do");
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  |              // $("#matarial").attr("style","display: none");
 | 
	
		
			
				|  |  |              // $("#project").attr("style","");
 | 
	
		
			
				|  |  |              // loadlistProject();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    function materialSolr(materialName,projectType,time,projectSize) {
 | 
	
		
			
				|  |  | +    function materialSolr(materialName,projectType,time,projectSize,url) {
 | 
	
		
			
				|  |  | +        $("#loadDiv").show();
 | 
	
		
			
				|  |  |          var html = "";
 | 
	
		
			
				|  |  | -        alert(materialName);
 | 
	
		
			
				|  |  |          $.ajax({
 | 
	
		
			
				|  |  |              type: "POST",
 | 
	
		
			
				|  |  | -            url: "/workMaterialCollect/total/list.do",
 | 
	
		
			
				|  |  | -            data: {'materialName':materialName,'projectType':projectType,'time':time,'projectSize':projectSize},
 | 
	
		
			
				|  |  | +            url: url,
 | 
	
		
			
				|  |  | +            data: {'materialName':materialName,'projectType':projectType,'time':time,'projectSite':projectSize},
 | 
	
		
			
				|  |  |              dataType: "json",
 | 
	
		
			
				|  |  |              success: function (data) {
 | 
	
		
			
				|  |  | +                $("#loadDiv").hide();
 | 
	
		
			
				|  |  |                  // alert(data);
 | 
	
		
			
				|  |  |                  if (data.length > 0) {
 | 
	
		
			
				|  |  | -                    html +='<div class="weui-flex" style="background-color: #f9f9f9">\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item model_fex">名称</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">型号</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">单位</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">含税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">除税价</div>\n' +
 | 
	
		
			
				|  |  | -                        '            <div class="weui-flex__item">分析</div>\n' +
 | 
	
		
			
				|  |  | -                        '       </div>';
 | 
	
		
			
				|  |  | +                    html +='<div class="weui-cell" style="background-color: #f9f9f9;"><div class="weui-flex" style="width: 100%">\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex model_fex_font-size">名称</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">型号</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">单位</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">含税价</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">除税价</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">分析</div>\n' +
 | 
	
		
			
				|  |  | +                        '       </div></div>';
 | 
	
		
			
				|  |  |                      for (var i = 0; i < data.length; i++) {
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item model_fex'>"+data[i].materialName+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].specifications+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].unit+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>/</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'>"+data[i].excludingTax+"</div>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item'><a href='/workMaterialCollect/total/view?id="+data[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | -                            "</div>";
 | 
	
		
			
				|  |  | -                        html+="<div class='weui-flex' style=''>" +
 | 
	
		
			
				|  |  | -                            "<div class='weui-flex__item model_fex' style='font-size: 5px'>" +
 | 
	
		
			
				|  |  | -                            "来源:<span>"+data[i].projectName+"</span>项目;分类:<span>"+data[i].projectType+"</span>;工程时间<span>"+data[i].startDate+"/"+data[i].endDate+"</span>" +
 | 
	
		
			
				|  |  | -                            "</div>" +
 | 
	
		
			
				|  |  | +                        html+="<div class=\"weui-cell\"><div class='weui-flex' style='width: 100%'>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex model_fex_font-size'>"+data[i].materialName+"</div>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex_font-size'>"+data[i].specifications+"</div>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex_font-size'>"+data[i].unit+"</div>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex_font-size'>/</div>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex_font-size'>"+data[i].excludingTax+"</div>" +
 | 
	
		
			
				|  |  | +                            "<div class='weui-flex__item model_fex_font-size'><a href='/workMaterialCollect/total/view?id="+data[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | +                            "</div></div>";
 | 
	
		
			
				|  |  | +                        html+="<div class=\"weui-cells__tips\" style='width: 100%'>" +
 | 
	
		
			
				|  |  | +                            "来源:<a href='/workMaterialCollect/total/item_op?id="+data[i].id+"'>"+data[i].projectName+"</a>项目;分类:<span>"+data[i].projectType+"</span>;工程时间:<span>"+judgeTime(data[i].startDate)+"/"+judgeTime(data[i].endDate)+"</span>" +
 | 
	
		
			
				|  |  |                              "</div>";
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }else {
 | 
	
		
			
				|  |  | -                    html+="";
 | 
	
		
			
				|  |  | +                    html+="<div class='weui-cells__tips model_fex_font-size'>无数据</div>";
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  $("#toList").html(html);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +    $("#projectArea").cityPicker({
 | 
	
		
			
				|  |  | +        title: "请选择地址",
 | 
	
		
			
				|  |  | +        onChange: function (picker, values, displayValues) {
 | 
	
		
			
				|  |  | +            $("#projectArea").val("");
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        onClose: function(picker) {
 | 
	
		
			
				|  |  | +            var s = $("#projectArea").val();
 | 
	
		
			
				|  |  | +            var index=s.lastIndexOf(' ');
 | 
	
		
			
				|  |  | +            var sub = s.substring(index+1,s.length);
 | 
	
		
			
				|  |  | +            $("#projectTime").val("");
 | 
	
		
			
				|  |  | +            $("#projectArea").val(sub);
 | 
	
		
			
				|  |  | +            projectSolr('',sub,'',"/workMaterialCollect/total/project.list.do");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    $("#projectTime").datetimePicker({
 | 
	
		
			
				|  |  | +        times: function() {
 | 
	
		
			
				|  |  | +            return [];
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        onClose: function(picker) {
 | 
	
		
			
				|  |  | +            var value = picker.value[0];
 | 
	
		
			
				|  |  | +            // alert(value);
 | 
	
		
			
				|  |  | +            $("#projectName").val("");
 | 
	
		
			
				|  |  | +            $("#projectTime").val(value);
 | 
	
		
			
				|  |  | +            $("#projectArea").val("");
 | 
	
		
			
				|  |  | +            projectSolr('','',value,"/workMaterialCollect/total/project.list.do");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +    function projectSolr(projectName,projectSize,time,url) {
 | 
	
		
			
				|  |  | +        $("#loadDiv").show();
 | 
	
		
			
				|  |  | +        var html = "";
 | 
	
		
			
				|  |  | +        $.ajax({
 | 
	
		
			
				|  |  | +            type: "POST",
 | 
	
		
			
				|  |  | +            url: url,
 | 
	
		
			
				|  |  | +            data: {'projectName': projectName,'projectSite':projectSize,'time':time},
 | 
	
		
			
				|  |  | +            dataType: "json",
 | 
	
		
			
				|  |  | +            success: function (data) {
 | 
	
		
			
				|  |  | +                $("#loadDiv").hide();
 | 
	
		
			
				|  |  | +                if (data.length > 0) {
 | 
	
		
			
				|  |  | +                    html +='<div class="weui-cell" style="background-color: #f9f9f9;"><div class="weui-flex" style=\'width: 100%\'>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">项目名称</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">地区</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">分类</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">工程时间</div>\n' +
 | 
	
		
			
				|  |  | +                        '            <div class="weui-flex__item model_fex_font-size">详情</div>\n' +
 | 
	
		
			
				|  |  | +                        '        </div></div>';
 | 
	
		
			
				|  |  | +                    for (var k = 0; k < data.length; k++) {
 | 
	
		
			
				|  |  | +                        for (var i = 0; i < data[k].workMaterialCollectTypes.length; i++) {
 | 
	
		
			
				|  |  | +                            // alert(data[i].id)
 | 
	
		
			
				|  |  | +                            // alert(data[i].materialName);
 | 
	
		
			
				|  |  | +                            html+= "<div class=\"weui-cell\"><div class='weui-flex' style='width: 100%'>" +
 | 
	
		
			
				|  |  | +                                "<div class='weui-flex__item model_fex_font-size'>"+data[k].projectName+"</div>" +
 | 
	
		
			
				|  |  | +                                "<div class='weui-flex__item model_fex_font-size'>"+data[k].projectSite+"</div>" +
 | 
	
		
			
				|  |  | +                                "<div class='weui-flex__item model_fex_font-size'>"+data[k].workMaterialCollectTypes[i].projectType+"</div>" +
 | 
	
		
			
				|  |  | +                                "<div class='weui-flex__item model_fex_font-size'>/</div>" +
 | 
	
		
			
				|  |  | +                                "<div class='weui-flex__item model_fex_font-size'><a href='/workMaterialCollect/total/project.view?itemId="+data[k].id+"&projectTypeId="+data[k].workMaterialCollectTypes[i].id+"'>查看</a></div>" +
 | 
	
		
			
				|  |  | +                                "</div></div>";
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }else {
 | 
	
		
			
				|  |  | +                    html+="<div class='weui-cells__tips model_fex_font-size'>无数据</div>";
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                $("#toList").html(html);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    function judgeTime(time) {
 | 
	
		
			
				|  |  | +        var data = time.substring(0,4);
 | 
	
		
			
				|  |  | +        return data;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    function clear() {
 | 
	
		
			
				|  |  | +        $("#projectName").val("");
 | 
	
		
			
				|  |  | +        $("#projectType").val("");
 | 
	
		
			
				|  |  | +        $("#city-picker").val("");
 | 
	
		
			
				|  |  | +        $("#datetime-picker").val("");
 | 
	
		
			
				|  |  | +        $("#projectName").val("");
 | 
	
		
			
				|  |  | +        $("#projectArea").val("");
 | 
	
		
			
				|  |  | +        $("#projectAreaTime").val("");
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  |  </html>
 |