|  | @@ -19,7 +19,9 @@
 | 
												
													
														
															|  |      .model_fex{
 |  |      .model_fex{
 | 
												
													
														
															|  |       width: 12%;
 |  |       width: 12%;
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  | -
 |  | 
 | 
												
													
														
															|  | 
 |  | +    .model_top{
 | 
												
													
														
															|  | 
 |  | +        margin-top: 0px;
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  |  </style>
 |  |  </style>
 | 
												
													
														
															|  |  <script>
 |  |  <script>
 | 
												
													
														
															|  |      $(function () {
 |  |      $(function () {
 | 
												
											
												
													
														
															|  | @@ -61,7 +63,7 @@
 | 
												
													
														
															|  |                                  "</div>" +
 |  |                                  "</div>" +
 | 
												
													
														
															|  |                              "</div>";
 |  |                              "</div>";
 | 
												
													
														
															|  |                      }
 |  |                      }
 | 
												
													
														
															|  | -                    $("#toList").append(html);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    $("#toList").html(html);
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
											
												
													
														
															|  | @@ -86,18 +88,16 @@
 | 
												
													
														
															|  |                          for (var i = 0; i < data[k].workMaterialCollectTypes.length; i++) {
 |  |                          for (var i = 0; i < data[k].workMaterialCollectTypes.length; i++) {
 | 
												
													
														
															|  |                              // alert(data[i].id)
 |  |                              // alert(data[i].id)
 | 
												
													
														
															|  |                              // alert(data[i].materialName);
 |  |                              // alert(data[i].materialName);
 | 
												
													
														
															|  | -                            html+=" <div class='weui-cell'>" +
 |  | 
 | 
												
													
														
															|  | -                                "<div class='weui-flex' style=''>" +
 |  | 
 | 
												
													
														
															|  | 
 |  | +                            html+= "<div class='weui-flex' style=''>" +
 | 
												
													
														
															|  |                                  "<div class='weui-flex__item'>"+data[k].projectName+"</div>" +
 |  |                                  "<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].projectSite+"</div>" +
 | 
												
													
														
															|  |                                  "<div class='weui-flex__item'>"+data[k].workMaterialCollectTypes[i].projectType+"</div>" +
 |  |                                  "<div class='weui-flex__item'>"+data[k].workMaterialCollectTypes[i].projectType+"</div>" +
 | 
												
													
														
															|  |                                  "<div class='weui-flex__item'>/</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 class='weui-flex__item'><a href='/workMaterialCollect/total/project.view?itemId="+data[k].id+"&projectTypeId="+data[k].workMaterialCollectTypes[i].id+"'>查看</a></div>" +
 | 
												
													
														
															|  | -                                "</div>" +
 |  | 
 | 
												
													
														
															|  |                                  "</div>";
 |  |                                  "</div>";
 | 
												
													
														
															|  |                          }
 |  |                          }
 | 
												
													
														
															|  |                      }
 |  |                      }
 | 
												
													
														
															|  | -                    $("#toList").append(html);
 |  | 
 | 
												
													
														
															|  | 
 |  | +                    $("#toList").html(html);
 | 
												
													
														
															|  |                  }
 |  |                  }
 | 
												
													
														
															|  |              }
 |  |              }
 | 
												
													
														
															|  |          });
 |  |          });
 | 
												
											
												
													
														
															|  | @@ -105,30 +105,189 @@
 | 
												
													
														
															|  |  </script>
 |  |  </script>
 | 
												
													
														
															|  |  <body>
 |  |  <body>
 | 
												
													
														
															|  |  <div style="padding: 2px">
 |  |  <div style="padding: 2px">
 | 
												
													
														
															|  | -    <div class="weui-flex">
 |  | 
 | 
												
													
														
															|  | -        <div class="weui-flex__item">测试布局</div>
 |  | 
 | 
												
													
														
															|  | -        <div class="weui-flex__item">测试布局</div>
 |  | 
 | 
												
													
														
															|  | 
 |  | +    <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>
 | 
												
													
														
															|  | 
 |  | +        </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>
 | 
												
													
														
															|  | 
 |  | +        </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>
 | 
												
													
														
															|  | 
 |  | +        </div>
 | 
												
													
														
															|  |      </div>
 |  |      </div>
 | 
												
													
														
															|  | -    <div class='weui-cells' id="toList">
 |  | 
 | 
												
													
														
															|  | 
 |  | +    <div class='weui-cells model_top' id="toList">
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |      </div>
 |  |      </div>
 | 
												
													
														
															|  |  </div>
 |  |  </div>
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  </body>
 |  |  </body>
 | 
												
													
														
															|  |  <script type="text/javascript">
 |  |  <script type="text/javascript">
 | 
												
													
														
															|  | -    $("#in").select({
 |  | 
 | 
												
													
														
															|  | -        title: "选择类型",
 |  | 
 | 
												
													
														
															|  | -        multi: true,
 |  | 
 | 
												
													
														
															|  | -        items: [
 |  | 
 | 
												
													
														
															|  | -            {
 |  | 
 | 
												
													
														
															|  | -                title: "项目",
 |  | 
 | 
												
													
														
															|  | -                value: 1
 |  | 
 | 
												
													
														
															|  | -            },
 |  | 
 | 
												
													
														
															|  | -            {
 |  | 
 | 
												
													
														
															|  | -                title: "材料",
 |  | 
 | 
												
													
														
															|  | -                value: 2
 |  | 
 | 
												
													
														
															|  | -            },
 |  | 
 | 
												
													
														
															|  | -        ]
 |  | 
 | 
												
													
														
															|  | 
 |  | +    $("#marterialName").select({
 | 
												
													
														
															|  | 
 |  | +        title: "选择",
 | 
												
													
														
															|  | 
 |  | +        items: ["材料","项目"]
 | 
												
													
														
															|  |      });
 |  |      });
 | 
												
													
														
															|  | 
 |  | +    $("#projectType").select({
 | 
												
													
														
															|  | 
 |  | +        title: "选择分类",
 | 
												
													
														
															|  | 
 |  | +        items: ["土建工程", "安装工程", "装饰工程", "绿化工程"]
 | 
												
													
														
															|  | 
 |  | +    });
 | 
												
													
														
															|  | 
 |  | +    
 | 
												
													
														
															|  | 
 |  | +    function projectTypeUpdate() {
 | 
												
													
														
															|  | 
 |  | +        $("#projectName").val("");
 | 
												
													
														
															|  | 
 |  | +        var projectType = $("#projectType").val();
 | 
												
													
														
															|  | 
 |  | +        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);
 | 
												
													
														
															|  | 
 |  | +            }
 | 
												
													
														
															|  | 
 |  | +        });
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +    
 | 
												
													
														
															|  | 
 |  | +    function materialNameUpdate() {
 | 
												
													
														
															|  | 
 |  | +        var materialNameUpdate = $("#marterialName").val();
 | 
												
													
														
															|  | 
 |  | +        if (materialNameUpdate=='材料'){
 | 
												
													
														
															|  | 
 |  | +            $("#matarial").attr("style","");
 | 
												
													
														
															|  | 
 |  | +            $("#project").attr("style","display: none");
 | 
												
													
														
															|  | 
 |  | +            loadlist()
 | 
												
													
														
															|  | 
 |  | +        }else {
 | 
												
													
														
															|  | 
 |  | +            $("#matarial").attr("style","display: none");
 | 
												
													
														
															|  | 
 |  | +            $("#project").attr("style","");
 | 
												
													
														
															|  | 
 |  | +            loadlistProject();
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +    function solr() {
 | 
												
													
														
															|  | 
 |  | +        var materialNameUpdate = $("#marterialName").val();
 | 
												
													
														
															|  | 
 |  | +        if (materialNameUpdate=='材料'){
 | 
												
													
														
															|  | 
 |  | +            $("#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);
 | 
												
													
														
															|  | 
 |  | +        }else {
 | 
												
													
														
															|  | 
 |  | +            // $("#matarial").attr("style","display: none");
 | 
												
													
														
															|  | 
 |  | +            // $("#project").attr("style","");
 | 
												
													
														
															|  | 
 |  | +            // loadlistProject();
 | 
												
													
														
															|  | 
 |  | +        }
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  | 
 |  | +    function materialSolr(materialName,projectType,time,projectSize) {
 | 
												
													
														
															|  | 
 |  | +        var html = "";
 | 
												
													
														
															|  | 
 |  | +        alert(materialName);
 | 
												
													
														
															|  | 
 |  | +        $.ajax({
 | 
												
													
														
															|  | 
 |  | +            type: "POST",
 | 
												
													
														
															|  | 
 |  | +            url: "/workMaterialCollect/total/list.do",
 | 
												
													
														
															|  | 
 |  | +            data: {'materialName':materialName,'projectType':projectType,'time':time,'projectSize':projectSize},
 | 
												
													
														
															|  | 
 |  | +            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++) {
 | 
												
													
														
															|  | 
 |  | +                        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);
 | 
												
													
														
															|  | 
 |  | +            }
 | 
												
													
														
															|  | 
 |  | +        });
 | 
												
													
														
															|  | 
 |  | +    }
 | 
												
													
														
															|  |  </script>
 |  |  </script>
 | 
												
													
														
															|  |  </html>
 |  |  </html>
 |