<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>项目查询</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-sacle=1, maximum-scale=1" >

    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
    <link rel="stylesheet" href="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/style/formSelects-v4.css" media="all">
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/lib/font/iconfont.css" />
    <style>
        .xm-select-parent .xm-select {
            min-height: 32px;
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-form layui-card">
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                    <sfTags:pagePermission authFlag="XMGL_XMCX_XMCX_T_${partner}" html='<a href="${ctx}/customerEntry/totalList/${partner}"><li class="layui-this">项目查询</li></a>'/>
                <button class="layui-btn f-r mt-10 mr-15 pl-10 pr-10 " type="reset"  onclick="reset()" >
                    <i class="layui-icon fs-12">&#xe9aa;</i>
                    重置
                </button>
                <button class="layui-btn f-r mt-10 mr-15 pl-10 pr-10" id="searchBtn" lay-submit lay-filter="LAY-user-back-search"><i class="layui-icon fs-12">&#xe615;</i>查询</button>
            </ul>
        </div>
        <form class="layui-card-body layuiadmin-card-header-auto" id="searchForm">
            <div class="layui-form-item">
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">电站编码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="powerStationCode" id="powerStationCode" class="layui-input" >
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">业主姓名：</label>
                    <div class="layui-input-block">
                        <input type="text" name="tenantName" id="tenantName" class="layui-input">
                    </div>
                </div>
                <c:if test="${user.userType ne '6' && user.userType ne '7'}">
                    <div class="layui-col-lg2 layui-col-sm2" style="width: 33.3%">
                        <label class="layui-form-label">代理商名称：</label>
                        <div class="layui-input-block">
                            <select name="traderId" lay-search>
                                <option value="">请选择</option>
                                <c:forEach items="${traderList}" var="trader">
                                    <option value="${trader.columns.id}">${trader.columns.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                    </div>

                </c:if>

                <c:if test="${'2' ne ifTop}">
                    <div class="layui-col-lg2 layui-col-sm2" style="width: 33.3%">
                        <label class="layui-form-label">二级代理商：</label>
                        <div class="layui-input-block">
                            <select name="twoTrader" lay-search>
                                <option value="">请选择</option>
                                <option value="0">无</option>
                                <c:forEach items="${twoTrader}" var="trader">
                                    <option value="${trader.columns.id}">${trader.columns.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                    </div>
                </c:if>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">产品名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="projectName" class="layui-input" >
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">产品编码：</label>
                    <div class="layui-input-block" >
                        <select name="projectCode" id="projectId" lay-search>
                            <option value="">请选择</option>
                            <c:forEach items="${projectList}" var="project">
                                <option value="${project.columns.id}">${project.columns.code}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
<%--                <c:if test="${user.userType eq '4'}">--%>
<%--                    <div class="layui-col-lg2 layui-col-sm3">--%>
<%--                        <label class="layui-form-label">代理商名称：</label>--%>
<%--                        <div class="layui-input-block" >--%>
<%--                            <select name="traderId" id="traderId" lay-search>--%>
<%--                                <option value="">请选择</option>--%>
<%--                                <c:forEach items="${traderList}" var="trader">--%>
<%--                                    <option value="${trader.columns.id}">${trader.columns.name}</option>--%>
<%--                                </c:forEach>--%>
<%--                            </select>--%>
<%--                        </div>--%>
<%--                    </div>--%>
<%--                    <div class="layui-col-lg2 layui-col-sm3">--%>
<%--                        <label class="layui-form-label">代理商电话：</label>--%>
<%--                        <div class="layui-input-block">--%>
<%--                            <input type="text" name="traderMobile" id="traderMobile" class="layui-input" >--%>
<%--                        </div>--%>
<%--                    </div>--%>

<%--                <div class="layui-col-lg2 layui-col-sm3">--%>
<%--                    <label class="layui-form-label">验收人：</label>--%>
<%--                    <div class="layui-input-block" >--%>
<%--                        <select name="checkAcceptBy" id="checkAcceptBy" lay-search>--%>
<%--                            <option value="">请选择</option>--%>
<%--                            <c:forEach items="${empList}" var="emp">--%>
<%--                                <option value="${emp.columns.user_id}">${emp.columns.name}</option>--%>
<%--                            </c:forEach>--%>
<%--                        </select>--%>
<%--                    </div>--%>
<%--                </div>--%>
<%--                </c:if>--%>
                <div class="layui-col-lg2 layui-col-sm3" >
                    <label class="layui-form-label">项目阶段：</label>
                    <div class="layui-input-block" >
                        <select name="status" id="status" lay-filter="entryStatus">
                            <option value="">全部</option>
                            <option value="0" title="0">信息登记</option>
                            <option value="1"  title="1">设计审核</option>
                            <option value="4"  title="3">电站安装</option>
                            <option value="5,i,f"  title="4">电站验收</option>
                            <option value="6,10,e" title="5">电站并网</option>
                            <option value="7,BN" title="6">并网验收</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">电站状态：</label>
                    <div class="layui-input-block" >
                        <select name="stageStatus" id="stageStatus">
                            <option value="">全部</option>
                            <option value="0">暂存</option>
                            <option value="1">待预审</option>
                            <option value="2">预审中</option>
                            <option value="3">预审驳回</option>
                            <option value="4">待踏勘</option>
                            <option value="n">待设计</option>
                            <option value="5">设计自审</option>
                            <option value="6">自审驳回</option>
                            <option value="7">自审通过</option>
                            <option value="8">设计审核驳回</option>
<%--                            <option value="9">进件驳回</option>--%>
                            <option value="m">待派工</option>
                            <option value="k">待安装</option>
                            <option value="j">安装自审</option>
                            <option value="i">安装自审驳回</option>
                            <option value="l">安装验收</option>
                            <option value="g">验收驳回</option>
                            <option value="f">待并网</option>
                            <option value="e">并网验收驳回</option>
                            <option value="d">资方审核驳回</option>
                            <option value="c">待并网验收</option>
                            <option value="b">资方审核中</option>
                            <option value="a">已完成</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">联系方式：</label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile" id="mobile" class="layui-input" >
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">项目公司：</label>
                    <div class="layui-input-block ">
                        <input type="text" name="projectCompanyName" class="layui-input" value="">
                    </div>
                </div>
                <div class="layui-col-lg4 layui-col-sm4 layui-col-md4" style="margin-top: 5px" >
                    <label class="layui-form-label">安装地址：</label>
                    <div class="inline-block" style="width: 18%">
                        <select name="province" lay-search lay-filter="province"  id="province">
                            <option value="">省</option>
                            <c:forEach items="${province}" var="trader">
                                <option value="${trader.columns.ProvinceName}"  title="${trader.columns.ProvinceID}">${trader.columns.ProvinceName}</option>
                            </c:forEach>
                        </select>

                    </div>
                    <div class="inline-block" style="width: 18%;">
                        <select name="city" id="city" lay-filter="city"
                                lay-search>
                            <option value="">市</option>

                        </select>
                    </div>
                    <div class="inline-block" style="width: 18%">
                        <select name="area" id="area" lay-search>
                            <option value="">县/区</option>

                        </select>
                    </div>
                    <div class="inline-block" style="width: 20%">
                        <input type="text" name="address" class="layui-input">

                    </div>
                </div>
                <div class="layui-col-lg4 layui-col-sm6">
                    <label class="layui-form-label">进件时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="inComingTimeSta" class="layui-input" id="inComingTimeSta" placeholder="开始日期">
                        </div>
                        <div class="layui-col-xs2 text-c lh-30">
                            —
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="inComingTimeEnd" class="layui-input" id="inComingTimeEnd" placeholder="结束日期">
                        </div>
                    </div>
                </div>
                <div class="layui-col-lg4 layui-col-sm6">
                    <label class="layui-form-label">安装验收时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="fixAcceptTimeSta" class="layui-input" id="fixAcceptTimeSta" placeholder="开始日期">
                        </div>
                        <div class="layui-col-xs2 text-c lh-30">
                            —
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="fixAcceptTimeEnd" class="layui-input" id="fixAcceptTimeEnd" placeholder="结束日期">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-lg4 layui-col-sm6">
                    <label class="layui-form-label">并网验收时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="checkAcceptTimeMin" class="layui-input" id="acceptEndStartTime" placeholder="开始日期">
                        </div>
                        <div class="layui-col-xs2 text-c lh-30">
                            —
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="checkAcceptTimeMax" class="layui-input" id="acceptEndEndTime" placeholder="结束日期">
                        </div>
                    </div>
                </div>
                <div class="layui-col-lg4 layui-col-sm6">
                    <label class="layui-form-label">登记时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="createTimeMin" class="layui-input" id="createTimeSta" placeholder="开始日期">
                        </div>
                        <div class="layui-col-xs2 text-c lh-30">
                            —
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="createTimeMax" class="layui-input" id="createTimeEnd" placeholder="结束日期">
                        </div>
                    </div>
                </div>

                <%--<div class="layui-col-lg4 layui-col-sm6">
                    <label class="layui-form-label">投放通过时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="paymentFinishTimeSta" class="layui-input" id="paymentFinishTimeSta" placeholder="开始日期">
                        </div>
                        <div class="layui-col-xs2 text-c lh-30">
                            —
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" readonly name="paymentFinishTimeEnd" class="layui-input" id="paymentFinishTimeEnd" placeholder="结束日期">
                        </div>
                    </div>
                </div>--%>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">拆除状态：</label>
                    <div class="layui-input-block" >
                        <select name="removeSign" id="removeSign">
                            <option value="">全部</option>
                            <option value="0">未拆除</option>
                            <option value="1">已拆除</option>
                        </select>
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">业务员：</label>
                    <div class="layui-input-block">
                        <input type="text" name="creator" id="creator" class="layui-input" >
                    </div>
                </div>
                <div class="layui-col-lg2 layui-col-sm3">
                    <label class="layui-form-label">进件状态：</label>
                    <div class="layui-input-block" >
                        <select name="applyStatus" id="applyStatus">
                            <option value="">全部</option>
                            <option value="0">待预审</option>
                            <option value="1">预审中</option>
                            <option value="2">预审成功</option>
                            <option value="3">预审驳回</option>
                            <option value="4">待进件</option>
                            <option value="5">进件审核中</option>
                            <option value="6">进件审核成功</option>
                            <option value="7">进件审核驳回</option>
                            <c:if test="${'01' eq partner}">
                                <option value="8">合同待签约</option>
                                <option value="9">合同已签约</option>
                                <option value="10">合同审核中</option>
                                <option value="11">合同签约驳回</option>
                                <option value="12">合同已审核</option>
                            </c:if>
                            <c:if test="${'04' ne partner}">
                                <option value="13">待提交完工资料</option>
                                <option value="14">完工资料审核中</option>
                                <option value="15">完工资料审核通过</option>
                                <option value="16">完工资料审核驳回</option>
                            </c:if>
                            <option value="17">待提交并网资料</option>
                            <option value="18">并网资料待审核</option>
                            <option value="19">并网资料审核中</option>
                            <option value="20">并网资料审核通过</option>
                            <option value="21">并网资料审批拒绝</option>
                            <c:if test="${'01' eq partner}">
                                <option value="23">并网发电审核中</option>
                            </c:if>
                            <c:if test="${'04' eq partner}">
                                <option value="24">建档待补充资料</option>
                                <option value="31">待补充并网资料</option>
                            </c:if>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="layui-card">
        <div class="layui-card-body">
            <table class="layui-hide" lay-skin="row" id="test" lay-filter="test"></table>
            <script type="text/html" id="toolbarDemo">
                <div class="layui-btn-container">
                    <sfTags:pagePermission authFlag="XMGL_DZDACX_DELETE_B_${partner}" html='<button class="layui-btn layui-btn-sm" lay-event="deleteBtn" id="deleteBtn"><i class="layui-icon layui-icon-ok-circle"></i>删除</button>'/>
                    <c:if test="${partner eq '03'}">
                        <sfTags:pagePermission authFlag="XMGL_DZDACX_SWLSDZ_B_${partner}" html='<button class="layui-btn layui-btn-sm" lay-event="setHistoryEntry" id="setHistoryEntry"><i class="layui-icon layui-icon-ok-circle"></i>设为历史电站</button>'/>
                        <sfTags:pagePermission authFlag="XMGL_DZDACX_TSKHXX_B_${partner}" html='<button class="layui-btn layui-btn-sm" lay-event="inputKHBtn" id="inputKHBtn"><i class="layui-icon layui-icon-ok-circle"></i>推送客户信息</button>'/>
                        <sfTags:pagePermission authFlag="XMGL_DZDACX_TSDZXX_B_${partner}" html='<button class="layui-btn layui-btn-sm" lay-event="inputDZBtn" id="inputDZBtn"><i class="layui-icon layui-icon-ok-circle"></i>推送电站信息</button>'/>
                    </c:if>
                    <c:if test="${user.id eq '1' }">
                        <button class="layui-btn layui-btn-sm" lay-event="backAZBtn" id="backAZBtn"><i class="layui-icon layui-icon-ok-circle"></i>退回待安装</button>
                    </c:if>
                        <sfTags:pagePermission authFlag="BDGL_XDJL_BJCC_B" html='<button class="layui-btn layui-btn-sm" lay-event="remove" onclick="signOperate(1)"><i class="layui-icon  layui-icon-auz "></i>标记拆除</button>'/>
                        <sfTags:pagePermission authFlag="BDGL_XDJL_QXBJ_B" html='<button class="layui-btn layui-btn-sm" lay-event="cancelRemove" onclick="signOperate(0)"><i class="layui-icon  layui-icon-auz"></i>取消标记</button>'/>
                    <sfTags:pagePermission authFlag="XMGL_DZDACX_DC_B_${partner}" html='<button class="layui-btn layui-btn-sm" lay-event="export" id="exportBtn"><i class="layui-icon layui-icon-export"></i>导出列表</button>'/>
            </script>
        </div>
    </div>
</div>
<div class="hide pd-10" style="padding: 10px" id="backAzForEntryDiv">
    <div class="layui-col-lg12 layui-col-sm12 layui-form ">
        <label class="layui-form-label"><i class="mark">*</i>处理物料：</label>
        <div class="layui-input-block">
            <input type="radio" name="backAzStep" value="2" title="只退回库存">
            <input type="radio" name="backAzStep" value="3" title="物料退回库存且清除使用记录">
        </div>
    </div>
    <div class="layui-col-lg12 layui-col-sm12"></div>

    <div class="layui-col-lg12 layui-col-sm12">
        <label class="layui-form-label"><i class="mark">*</i>退回原因：</label>
        <div class="layui-input-block">
            <textarea name="backAzRmark" class="layui-textarea" >
            </textarea>
        </div>
    </div>
</div>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/lib/formSelects-v4.js"></script>
<script>
    var formSelects;
    var entrycount=0;
    layui.config({
        base: '${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'tableExt', 'jquery', 'layer','laypage','laydate','form','formSelects'], function(){
        //layui.use(['table','layer','laypage','laydate','form'], function(){
        $ = layui.$;
        tableExt = layui.tableExt;
        layer = layui.layer;
        laypage = layui.laypage;
        laydate = layui.laydate;
        form = layui.form;
        table = tableExt.getLayTable();
        formSelects = layui.formSelects;
        var type = "${user.userType}";

        var downloadReport = '${fns:checkPagePermission(request, "XMGL_XMCX_XMCX_XZYSBG_B")}';
      //  var downloadForm = '${fns:checkPagePermission(request, "XMGL_XMCX_XMCX_XZJFQSB_B")}';

        //开始日期
        var createEndStartTime = laydate.render({
            elem: '#createEndStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                createEndEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                createEndEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var createEndEndTime = laydate.render({
            elem: '#createEndEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*createEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });


        var matchTimeMin = laydate.render({
            elem: '#matchTimeMin'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                matchTimeMax.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                matchTimeMax.config.elem[0].focus();
            }
        });
        //结束日期
        var matchTimeMax = laydate.render({
            elem: '#matchTimeMax'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*installEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //开始日期
        var installEndStartTime = laydate.render({
            elem: '#installEndStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                installEndEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                installEndEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var installEndEndTime = laydate.render({
            elem: '#installEndEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*installEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //开始日期
        var mergeEndStartTime = laydate.render({
            elem: '#mergeEndStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                mergeEndEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                mergeEndEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var mergeEndEndTime = laydate.render({
            elem: '#mergeEndEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*mergeEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //开始日期
        var acceptEndStartTime = laydate.render({
            elem: '#acceptEndStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                acceptEndEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                acceptEndEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var acceptEndEndTime = laydate.render({
            elem: '#acceptEndEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
               /* acceptEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });


        //开始日期
        laydate.render({
            elem: '#createTimeSta'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                createTimeEnd.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                createTimeEnd.config.elem[0].focus();
            }
        });
        //结束日期
        var createTimeEnd = laydate.render({
            elem: '#createTimeEnd'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /* acceptEndStartTime.config.max = lay.extend({}, date, {
                     month: date.month - 1
                 });*/
            }
        });

        //开始日期
        var deliverEndStartTime = laydate.render({
            elem: '#deliverEndStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                deliverEndEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                deliverEndEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var deliverEndEndTime = laydate.render({
            elem: '#deliverEndEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
               /* deliverEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //开始日期
        var endStartTime = laydate.render({
            elem: '#endStartTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                endEndTime.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                endEndTime.config.elem[0].focus();
            }
        });
        //结束日期
        var endEndTime = laydate.render({
            elem: '#endEndTime'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
              /*  endStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });
        //进件时间 开始日期
        var inComingTimeSta = laydate.render({
            elem: '#inComingTimeSta'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                inComingTimeEnd.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                inComingTimeEnd.config.elem[0].focus();
            }
        });
        //进件时间 结束日期
        var inComingTimeEnd = laydate.render({
            elem: '#inComingTimeEnd'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*createEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //安装验收时间 开始日期
        var fixAcceptTimeSta = laydate.render({
            elem: '#fixAcceptTimeSta'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                fixAcceptTimeEnd.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                fixAcceptTimeEnd.config.elem[0].focus();
            }
        });
        //安装验收时间 结束日期
        var fixAcceptTimeEnd = laydate.render({
            elem: '#fixAcceptTimeEnd'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*createEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });

        //投放通过时间 开始日期
        var paymentFinishTimeSta = laydate.render({
            elem: '#paymentFinishTimeSta'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新结束日期的最小日期
                paymentFinishTimeEnd.config.min = lay.extend({}, date, {
                    month: date.month - 1
                });
                //自动弹出结束日期的选择器
                paymentFinishTimeEnd.config.elem[0].focus();
            }
        });
        //投放通过时间 结束日期
        var paymentFinishTimeEnd = laydate.render({
            elem: '#paymentFinishTimeEnd'
            /* ,type: 'datetime'*/
            ,done: function(value, date){
                //更新开始日期的最大日期
                /*createEndStartTime.config.max = lay.extend({}, date, {
                    month: date.month - 1
                });*/
            }
        });


        function  applyStatusStr(applyStatus){
            if(applyStatus == '0'){
                return "待预审";
            }else if(applyStatus == '1'){
                return "预审中";
            }else if(applyStatus == '2'){
                return "预审成功";
            }else if(applyStatus == '3'){
                return "预审驳回";
            }else if(applyStatus == '4'){
                return "待进件";
            }else if(applyStatus == '5'){
                return "进件审核中";
            }else if(applyStatus == '6'){
                return "进件审核成功";
            }else if(applyStatus == '7'){
                return "进件审核驳回";
            }else if(applyStatus == '8'){
                return "合同待签约";
            }else if(applyStatus == '9'){
                return "合同已签约";
            }else if(applyStatus == '10'){
                return "合同审核中";
            }else if(applyStatus == '11'){
                return "合同签约驳回";
            }else if(applyStatus == '12'){
                return "合同已审核";
            }else if(applyStatus == '13'){
                return "待提交完工资料";
            }else if(applyStatus == '14'){
                return "完工资料审核中";
            }else if(applyStatus == '15'){
                return "完工资料审核通过";
            }else if(applyStatus == '16'){
                return "完工资料审核驳回";
            }else if(applyStatus == '17'){
                return "待提交并网资料";
            }else if(applyStatus == '18'){
                return "并网资料待审核";
            }else if(applyStatus == '19'){
                return "并网资料审核中";
            }else if(applyStatus == '20'){
                return "并网资料审核通过";
            }else if(applyStatus == '21'){
                return "并网资料审批拒绝";
            }else if(applyStatus == '23'){
                return "并网发电审核中";
            }else if(applyStatus == '24'){
                return "建档待补充资料";
            }else if(applyStatus == '31'){
                return "待补充并网资料";
            }else {
                return "/";
            }
        }

        function getStatus(d) {
            var status =d.status;

            if (status == '0') {
                //预审状态 0.暂存 1.待预审 2.预审待审批 3.预审审批中 4.预审通过 5.预审拒绝
                if(d.credit=='1'){
                    return '待预审';
                }
                if(d.credit=='2'){
                    return '预审审批中';
                }
                if(d.credit=='3'){
                    return '预审审批中';
                }
                if(d.credit=='4'){
                    if(d.design_audit_flag == '3'){
                        return '自审驳回';
                    }
                    else if(d.design_audit_flag == 'a'){
                        return '待设计';
                    } else {
                        return '待踏勘';
                    }
                }
                if(d.credit=='5'){
                    return '预审拒绝';
                }
                return '暂存';
            }
            if (status == '1') {
                //设计审核状态：1.待踏勘 2.待自审 3.自审驳回 4.自审通过 5.设计审核驳回 6.设计审核通过/已完成 7.进件审核驳回
                if(d.design_audit_flag=='1'){
                    return '待踏勘';
                }else if(d.design_audit_flag=='2'){
                    return '待自审';
                }else if(d.design_audit_flag == 'a'){
                    return '待设计';
                }  else if(d.design_audit_flag=='3'){
                    return '自审驳回';
                } else if(d.design_audit_flag=='4'){
                    return '自审通过';
                } else if(d.design_audit_flag=='5'){
                    return '设计审核驳回';
                } else if(d.design_audit_flag=='6'){
                    return '设计审核通过';
                }else if(d.design_audit_flag=='7'){
                    return '进件审核驳回';
                }
                return '待审核';
            }
            if (status == '2') {
                return '审核驳回';
            }
            if (status == '3') {
                return '待下单';
            }
            if (status == '4') {
                if (d.install_flag == '1'){
                    return '待派工';
                }else if (d.install_flag == '2'){
                    return '待安装';
                }else if (d.install_flag == '3'){
                    return '自审驳回';
                }else if (d.install_flag == '4'){
                    return '安装完成';
                }

            }
            if(status == '5'){
                return '待安装验收';
            }
            if(status == 'f'){
                return '安装验收退回';
            }
            if(status == '6'){
                return '待并网';
            }
            if(status == '7'){
                if (d.merge_flag === '1') {
                    return '待并网验收';
                }
                if (d.merge_flag === '3') {
                    return '资方审核中';
                }
                return '待并网验收';
            }
            if(status == '8'){
                return '待交付';
            }
            if(status == '9'){
                return '待归档';
            }
            if(status == '10'){
                return '验收驳回';
            }
            if(status == '11'){
                return '归档驳回';
            }
            if(status == 'a'){
                return '已完成';
            }if(status == 'c'){
                return '待代理商确认';
            }
            // if(status == 'd'){
            //     return '待上传发票';
            // }
            if(status == 'e'){
                return '待签署合同';
            }
            if(status == 'w'){
                return '信息登记';
            }
            if(status == 'g'){
                return '设计审核';
            }
            if(status == 'AN'){
                return '待安装确认';
            }
            if(status == 'AT'){
                return '安装确认驳回';
            }
            if(status == 'BW'){
                return '待并网确认';
            }
            if(status == 'BN'){
                return '并网确认驳回';
            }
            if(status == 'h'){
                return '设计自审';
            }
            if(status == 'i'){
                return '安装自审';
            }
        }

        tableExt.render({
            elem: '#test'
            , title:'项目查询'
            , height: 'full-270'
            , toolbar: '#toolbarDemo'
            , defaultToolbar: false
            , limits : [ 20, 50, 100 ]
            , limit:20
            , page : true //开启分页
            , url: '${ctx}/customerEntry/ajaxForWaitOrder?apply=1&entryPage=all&partner='+'${partner}'
            , where: _serializeJson($("#searchForm"))
            , method:"post"
            , cols: [[
                {type: 'numbers',fixed:'left',title:'序号'}
                ,{field : 'id', minWidth : '4%',checkbox : true,align : 'center',fixed: 'left'}
                , {field: 'power_station_code', title: '电站编码',minWidth: 200, sort: false, align: 'center',fixed:'left',
                    exportable: true,
                    templet: function (d) {
                        var flag = d.flag;
                        var html="";
                        <c:if test="${user.userType ne '6' && user.userType ne '7'}">
                        if(isBlank(flag)){//
                            html ="<i class=\"icon iconfont\" style=\"color: #8D8D8D\" onclick=\"customerEntryFlag('"+d.id+"')\">&#xe6b0;</i>";
                        }else{
                            html ="<i class=\"icon iconfont \" style=\"color: "+d.flag_type+";\" onclick=\"customerEntryFlag('"+d.id+"')\">&#xe6b0;</i>";
                        }
                        </c:if>
                        return html + '<a href="#" class="layui-table-link" onclick="psDetail(\'' + d.id + '\')">' + d.power_station_code + '</a>';
                    }}
                , {field: 'tenant_name', title: '业主姓名', minWidth: 150, sort: false, align: 'center', fixed:'left', exportable: true}
                , {field: 'entryStratus', title: '电站状态', minWidth: 120, align: 'center', exportable: true,fixed:'left',
                    templet: function(d){
                        return getStatus(d);
                    },
                    expFormat: function(d){
                        return getStatus(d);
                    }}
                , {field: 'status', title: '项目阶段', minWidth: 120, align: 'center', exportable: true,
                    templet: function(d){
                        if (d.status == '0' ){
                            if(d.credit=='4'){
                                return '设计审核';
                            }else {
                                return "信息登记";
                            }
                        }else if (d.status == '1' || d.status == '2' || d.status == 'h'){
                            return "设计审核";
                        }else if (d.status == '4' ){
                            return "电站安装";
                        }else if (d.status == '5' || d.status == 'i' || d.status == 'f' ){
                            return "电站验收";
                        }else if (d.status == '6' || d.status == '10' || d.status == 'e' ){
                            return "电站并网";
                        }else if (d.status == '7' || d.status == 'BN' ){
                            return "并网验收";
                        }else if (d.status == 'a' ){
                            return "完工项目";
                        }else {
                            return "";
                        }
                    },
                    expFormat: function(d){
                        if (d.status == '0' ){
                            if(d.credit=='4'){
                                return '设计审核';
                            }else {
                                return "信息登记";
                            }
                        }else if (d.status == '1' || d.status == '2' || d.status == 'h'){
                            return "设计审核";
                        }else if (d.status == '4'  ){
                            return "电站安装";
                        }else if (d.status == '5' || d.status == 'i' || d.status == 'f' ){
                            return "电站验收";
                        }else if (d.status == '6' || d.status == '10' || d.status == 'e' ){
                            return "电站并网";
                        }else if (d.status == '7' || d.status == 'BN' ){
                            return "并网验收";
                        }else if (d.status == 'a' ){
                            return "完工项目";
                        }else {
                            return "";
                        }
                    }
                }
                , {field: 'apply_status', title: '进件状态', minWidth: 130, align: 'center', exportable: true
                    , templet:function(d){
                        return applyStatusStr(d.apply_status);
                    }
                    , expFormat: function(d){
                        return applyStatusStr(d.apply_status);
                    }
                }
                ,{field: 'remove_sign', title: '拆除状态', minWidth: 130, align: 'center', exportable: true, templet: function(d){
                        if(d.remove_sign === '0'){
                            return '未拆除';
                        }else if(d.remove_sign === '1'){
                            return '已拆除';
                        }
                    },expFormat:function(d){
                        if(d.remove_sign === '0'){
                            return '未拆除';
                        }else if(d.remove_sign === '1'){
                            return '已拆除';
                        }
                    }}
                ,{field: 'if_state_grid_status', title: '国网授权状态', minWidth: 130, align: 'center', exportable: true, templet: function(d){
                        if (isBlank(d.if_state_grid_status)) {
                            return '未导入';
                        }else if(d.if_state_grid_status === '0'){
                            return '未导入';
                        }else if(d.if_state_grid_status === '1'){
                            return '已导入';
                        }else if(d.if_state_grid_status === '2'){
                            return '已授权';
                        }
                    },expFormat:function(d){
                        if (isBlank(d.if_state_grid_status)) {
                            return '未导入';
                        }else if(d.if_state_grid_status === '0'){
                            return '未导入';
                        }else if(d.if_state_grid_status === '1'){
                            return '已导入';
                        }else if(d.if_state_grid_status === '2'){
                            return '已授权';
                        }
                    }}
                <c:if test="${partner eq '01'}">
                , {field: 'boxGroupType', title: '并网方式', minWidth: 180, sort: false, align: 'center', exportable: true
                   ,templet:function(d){
                      if('0'===d.boxGroupType){
                          return '单户并网';
                      }else if('1'===d.boxGroupType){
                          return '一户多站';
                      }else if('2'===d.boxGroupType){
                          return '整村汇流';
                      }else{
                          return '';
                      }
                    },expFormat:function(d){
                        if('0'===d.boxGroupType){
                            return '单户并网';
                        }else if('1'===d.boxGroupType){
                            return '一户多站';
                        }else if('2'===d.boxGroupType){
                            return '整村汇流';
                        }else{
                            return '';
                        }
                    }
                }
                , {field: 'boxGroupNumber', title: '汇流组编号', minWidth: 180, sort: false, align: 'center', exportable: true}
                , {field: 'boxGroupName', title: '汇流组名称', minWidth: 180, sort: false, align: 'center', exportable: true}
                , {field: 'serialNumber', title: '汇流组序号', minWidth: 180, sort: false, align: 'center', exportable: true}
                , {field: 'boxGroupTotalCount', title: '本组电站个数', minWidth: 180, sort: false, align: 'center', exportable: true}
                , {field: 'boxGroupAlreadyIntoCount', title: '已入电站个数', minWidth: 180, sort: false, align: 'center', exportable: true}
                </c:if>

                <c:if test="${partner eq '03'}">
                    ,{field: 'is_history', title: '历史电站标记', minWidth: 130, align: 'center', exportable: true, templet: function(d){
                            if(d.is_history === '0'){
                                return '否';
                            }else if(d.is_history === '1'){
                                return '是';
                            }
                        },expFormat:function(d){
                            if(d.is_history === '0'){
                                return '否';
                            }else if(d.is_history === '1'){
                                return '是';
                            }
                        }
                    }
                , {field: 'qr_code_url', title: '二维码',minWidth:'180', sort: false, align: 'center',templet:function(d) {
                        if (d.first_apply_status == '30' && d.is_history === '0' && !isBlank(d.inputPieceId)) {
                            return "<a href=\"#\" class=\"layui-table-link layui-icon  \" style='font-size:14px;' onclick=\"downloadUrl('" + d.id + "')\">下载</a>&nbsp;&nbsp;";
                        } else {
                            return "--";
                        }
                    }
                }
                </c:if>
                <c:if test="${user.userType ne '6' && user.userType ne '7'}">
                , {field: 'traderName', title: '代理商名称', minWidth: 280, sort: false, align: 'center', exportable: true}
                </c:if>
                <c:if test="${'2' ne ifTop}">
                , {field: 'createTraderName',title: '二级代理商',minWidth: '220',sort: false,align: 'center',exportable: true
                    ,templet: function (d) {
                        if(d.distributor_id==d.create_trader_id){
                            return "";
                        }else{
                            return d.createTraderName
                        }
                    },
                    expFormat: function (d) {
                        if(d.distributor_id==d.create_trader_id){
                            return "";
                        }else{
                            return d.createTraderName
                        }
                    }
                }
                </c:if>
                , {field: 'powerStationAmount', title: '电站金额', minWidth: 150, sort: false, align: 'center', exportable: true}
                , {field: 'insurance_type', title: '保险类型', minWidth: 150, sort: false, align: 'center', exportable: true
                    , templet: function (d) {
                        //0.财产 1.商业 2.交强 3.其他
                        if(d.insurance_type=='0'){
                            return "财产险";
                        } else if(d.insurance_type=='1'){
                            return "商业险";
                        } else if(d.insurance_type=='2'){
                            return "交强险";
                        } else if(d.insurance_type=='3'){
                            return "其他";
                        }else {
                            return "";
                        }
                    },expFormat:function (d){
                        //0.财产 1.商业 2.交强 3.其他
                        if(d.insurance_type=='0'){
                            return "财产险";
                        } else if(d.insurance_type=='1'){
                            return "商业险";
                        } else if(d.insurance_type=='2'){
                            return "交强险";
                        } else if(d.insurance_type=='3'){
                            return "其他";
                        }else {
                            return "";
                        }
                    }
                }
                , {field: 'insurance_number', title: '保险编号', minWidth: 150, sort: false, align: 'center', exportable: true}
                , {field: 'insurance_amount', title: '保险金额',minWidth: 300, sort: false, align: 'center',exportable:true,templet: function (d) {
                        if(isBlank(d.insurance_amount)){
                            return "--";
                        }else{
                            return d.insurance_amount
                        }
                    },
                    expFormat: function (d) {
                        if(isBlank(d.insurance_amount)){
                            return "--";
                        }else{
                            return d.insurance_amount
                        }
                    }
                }
                <c:if test="${partner eq '01'}">
                , {field: 'payment_status', title: '回款状态',minWidth: 130, sort: false, align: 'center',exportable:true
                    , templet:function(d){
                        if (d.payment_status == '0'){
                            return "--";
                        }else if( d.payment_status == '1'){
                            return "等待放款";
                        }else if( d.payment_status == '2'){
                            return "请款完成";
                        }else if( d.payment_status == '3'){
                            return "已放款";
                        }else {
                            return "--"
                        }
                    }
                    , expFormat: function(d){
                        if (d.payment_status == '0'){
                            return "--";
                        }else if( d.payment_status == '1'){
                            return "等待放款";
                        }else if( d.payment_status == '2'){
                            return "请款完成";
                        }else if( d.payment_status == '3'){
                            return "已放款";
                        }else {
                            return "--"
                        }
                    }
                }
                </c:if>
                , {field: 'partners_contract_number', title: '进件序号', minWidth: 150, sort: false, align: 'center', exportable: true}
                , {field: 'mobile', title: '联系方式', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'id_code', title: '身份证号', minWidth: 200, sort: false, align: 'center', exportable: true}
                , {field: 'address', title: '安装地址', minWidth: 300, sort: false, align: 'center', exportable: true}
                , {
                    field: 'province',
                    title: '电站名称',
                    minWidth: '300',
                    sort: false,
                    align: 'center',
                    exportable: true,
                    templet: function (d) {
                        if (d.status == 0 || d.status == 1 || d.status == 2 || d.status == 3 || d.status == 4) {
                            return d.province + '' + d.area + d.tenant_name + d.design_capacity / 1000 + "KW光伏电站";
                        } else {
                            return d.province + '' + d.area + d.tenant_name + d.actual_capacity / 1000 + "KW光伏电站";
                        }

                    },
                    expFormat: function (d) {
                        if (d.status == 0 || d.status == 1 || d.status == 2 || d.status == 3 || d.status == 4) {
                            return d.province + '' + d.area + d.tenant_name + d.design_capacity / 1000 + "KW光伏电站";
                        } else {
                            return d.province + '' + d.area + d.tenant_name + d.actual_capacity / 1000 + "KW光伏电站";
                        }
                    }
                }
                , {field: 'projectName', title: '产品名称',minWidth: 250, sort: false, align: 'center',exportable:true}
                , {field: 'projectCode', title: '产品编号',minWidth: 130, sort: false, align: 'center',exportable:true}
                , {field: 'filing_type', title: '备案方式',minWidth: 130, sort: false, align: 'center',exportable:true,
                    templet: function (d) {
                        if (d.filing_type == '1'){
                            return "农户备案";
                        }else if (d.filing_type == '2'){
                            return "项目公司备案";
                        }else {
                            return "";
                        }
                    },
                    expFormat: function (d) {
                        if (d.filing_type == '1'){
                            return "农户备案";
                        }else if (d.filing_type == '2'){
                            return "项目公司备案";
                        }else {
                            return "";
                        }
                    }
                }
                , {field: 'project_company_name',title: '项目公司',minWidth: '220',sort: false,align: 'center',exportable: true}
                , {field: 'roof_type', title: '屋顶类型', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'component_spec', title: '安装组件规格',minWidth: 150, sort: false, align: 'center',exportable:true,  templet:function(d){
                        if(isBlank(d.componentSpec)){
                            return d.component_spec;
                        }else {
                            return d.componentSpec;
                        }
                    },
                    expFormat: function (d) {
                        if (isBlank(d.componentSpec)) {
                            return d.component_spec;
                        } else {
                            return d.componentSpec;
                        }
                    }
                }
                , {field: 'component_num', title: '安装组件块数',minWidth: 150, sort: false, align: 'center',exportable:true}
                , {field: 'zjBrand', title: '安装组件品牌',minWidth: 150, sort: false, align: 'center',exportable:true}
                , {field: 'design_capacity', title: '预估安装容量（kW）',minWidth: 180, sort: false, align: 'center',exportable:true
                    ,templet: function (d) {
                        let num = d.design_capacity / 1000;
                        return num;
                    },
                    expFormat: function (d) {
                        let num = d.design_capacity / 1000;
                        return num;
                    }
                }
                , {field: 'capacity', title: '实际安装容量（kW）',minWidth: 180, sort: false, align: 'center',exportable:true
                    ,templet: function (d) {
                        let num = d.capacity / 1000;
                        return num;
                    },
                    expFormat: function (d) {
                        let num = d.capacity / 1000;
                        return num;
                    }
                }
                , {field: 'nbqSpec', title: '逆变器规格', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'nbqBrand', title: '逆变器品牌', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'nbqNum', title: '逆变器数量', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'bwxSpec', title: '并网箱规格', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'bwxNum', title: '并网箱数量', minWidth: 130, sort: false, align: 'center', exportable: true}
                , {field: 'engineer_name', title: '施工团队', minWidth: 150, align: 'center', exportable: true}
                , {
                    field: 'planName',
                    title: '方案名称',
                    minWidth: 100,
                    sort: false,
                    align: 'center',
                    exportable: true,
                    templet: function (d) {
                        if(d.scheme_type=='1'){
                            if (isBlank(d.scheme_id)) {
                                return '——';
                            }
                            return '<a href="#" class="layui-table-link" onclick="planDetail(\''+d.id+'\')">'+d.planName+'</a>';
                        }else{
                            if(isBlank(d.component_spec)){
                                return '——';
                            }
                            if (isBlank(d.planName)) {
                                return '<a href="#" class="layui-table-link" onclick="planDetail(\'' + d.id + '\')">查看方案</a>';
                            } else {
                                return '<a href="#" class="layui-table-link" onclick="planDetail(\'' + d.id + '\')">' + d.planName + '</a>';
                            }
                        }
                        //return '<a href="#" class="layui-table-link" onclick="planDetail(\''+d.id+'\')">' + d.planName + '</a>';
                    }
                }
                , {
                    field: 'contract',
                    title: '购售电合同',
                    minWidth: 100,
                    sort: false,
                    align: 'center',
                    exportable: false,
                    templet:function (d){
                        if (isBlank(d.contract)){
                            return '——';
                           }else {
                            var html = '<a class="layui-table-link"  href="${commonStaticImgPath}'+d.contract+'">查看</a>';
                            return html;
                        }
                    }
                }
<%--                <c:if test="${user.userType ne '6' && user.userType ne '7'}">--%>
<%--                , {--%>
<%--                    field: 'planName',--%>
<%--                    title: '验收报告',--%>
<%--                    minWidth: 100,--%>
<%--                    sort: false,--%>
<%--                    align: 'center',--%>
<%--                    // exportable: true,--%>
<%--                    templet: function (d) {--%>
<%--                        if (isBlank(d.receiving_report_id)) {--%>
<%--                            return '——';--%>
<%--                        } else if (downloadReport == '0' || '${user.userType}' === '6') {--%>
<%--                            return '<a href="#" class="layui-table-link" onclick="downloadReport(\''+d.id+'\')">查看</a>';--%>
<%--                        }--%>
<%--                        return '';--%>
<%--                    }--%>
<%--                }--%>
<%--                </c:if>--%>
                , {field: 'generator_no', title: '发电户号',minWidth: 150, sort: false, align: 'center',exportable:true}
                , {field: 'creator', title: '业务员',minWidth: 150, sort: false, align: 'center',exportable:true}
                , {field: 'create_time', title: '登记时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'pre_audit_time', title: '预审通过时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'in_coming_time', title: '进件时间',minWidth: 180, sort: false, align: 'center',exportable:true},
                <c:if test="${partner ne '03'}">
                    {field: 'org_files_time', title: '档案审核时间',minWidth: 180, sort: false, align: 'center',exportable:true},
                </c:if>
                {field: 'examine_time', title: '设计审核时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'install_audit_finish_time', title: '安装提交验收时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'install_accept_time', title: '安装验收时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'first_generation_time', title: '首日发电时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'merge_time', title: '提交并网验收时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'check_accept_time', title: '并网验收时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'wait_loan_time', title: '等待放款时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                , {field: 'payment_time', title: '回款时间',minWidth: 180, sort: false, align: 'center',exportable:true}
                // , {field: 'payment_finish_time', title: '投放通过时间',minWidth: 180, sort: false, align: 'center',exportable:true}
            ]]
            ,exportOpt:{                           //导出选项配置
                ele:'#exportBtn',                   //导出的Dom元素
                headerTitle: '项目查询',             //excel表格的标题
                pageData:false,                     //true:导出的数据为页面数据，false:最大导出maxAmount条数据
                maxAmount: 20000,                    //当pageData为false生效
                fileName: '项目查询',
                where: function (){                 //当pageData为false时生效，过滤的条件
                    return _serializeJson($("#searchForm"));
                }
            },done: function(res, curr, count){
                //得到数据总量
                entrycount = count;
                // $('span[data-oneself="oneselfFlag"]').parent().parent().parent().css('background-color', '#E2D5D2');
            }
        });

        form.on('select(province)', function (data) {
            var province = $(data.elem).find("option:selected").attr("title");
            provinceOrder(province);
        });
        form.on('select(city)', function (data) {
            var city = $(data.elem).find("option:selected").attr("title");
            cityOrder(city);

        });

        function provinceOrder(province) {
            $("#city").empty();
            $("#area").empty();
            if (isBlank(province)) {
                $("#city").append("<option value=''>市</option>");
                return "";
            }
            $.ajax({
                type: "POST",
                url: "${ctx}/main/redirect/getCitysByProId",
                data: {
                    province: province
                },
                success: function (result) {

                    if (result == "205") {
                        layer.msg("暂无数据!")
                        return
                    }
                    var html = " <option value=''>市</option>";
                    for (var i = 0; i < result.length; i++) {
                        var city = result[i];
                        html = html + '<option value="' + city.columns.CityName + '" title="' + city.columns.CityID + '">' + city.columns.CityName + '</option>';
                    }
                    $("#city").append(html);
                    form.render('select');
                }
            });

        }

        function cityOrder(city, arean) {
            $("#area").empty()
            if (isBlank(city)) {
                $("#area").append("<option value=''>区/县</option>");
                return "";
            }
            $.ajax({
                type: "POST",
                url: "${ctx}/main/redirect/getAreaByCityId",
                data: {
                    city: city
                },
                success: function (result) {
                    if (result == "205") {
                        layer.msg("暂无数据!")
                        return
                    }
                    var html = "<option value=''>区/县</option>";
                    for (var i = 0; i < result.length; i++) {
                        var area = result[i];
                        html = html + '<option value="' + area.columns.DistrictName + '" value="' + area.columns.DistrictId + '">' + area.columns.DistrictName + '</option>';
                    }
                    $("#area").append(html);
                    if (!isBlank(arean)) {
                        $("#area").val(arean)
                    }

                    form.render('select');
                }
            });

        }

        function transAttribute(productLineAttribute) {
            switch (productLineAttribute) {
                case '1':
                    return '纯租25年业务';
                case '2':
                    return '经营性租赁';
                case '3':
                    return '融资租赁';
                case '4':
                    return '光伏贷';
                case '5':
                    return '全款';
                case '6':
                    return '其他';
                default:
                    return '';
            }
        }

        table.on('toolbar(test)',function(obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            if (obj.event === 'importCode') {
                layer.open({
                    title: '导入已支付',
                    type: 2,
                    area: ['550px', '300px'],
                    content: '${ctx}/customerEntry/importPowerStationCodeForm'
                });
            }else if(obj.event === 'deleteBtn'){
                var data = checkStatus.data;
                console.log(data)
                if (data.length <1) {
                    layer.msg("请选择数据",{icon:5,anim:6});
                    return false;
                }
        var chename = "";
                var ids = [];
                for(var i=0; i<checkStatus.data.length; i++){
                    if(checkStatus.data[i].status=='8' || checkStatus.data[i].status=='9' ||checkStatus.data[i].status=='11'||checkStatus.data[i].status=='a'){
                        chename = "300";
                        break;
                    }
                    ids.push(checkStatus.data[i].id);
                }
                 if(chename =='300'){
                     layer.msg("选择的数据中有不可删除信息",{icon:5,anim:6});
                     return false;
                 }
                layer.confirm('确认要删除吗？', {
                    icon:3,
                    btn:['确定','取消'] //按钮
                }, function(){
                    $.ajax({
                        type: 'post',
                        url: '${ctx}/customerEntry/batchDeleteOrder',

                        contentType: 'application/json',
                        data: JSON.stringify(ids),
                        success: function(data){
                            if (data.code === '200') {
                                layer.msg('操作成功', {time: 1000});
                                searchOrder();
                            }else if(data.code === '501'){
                                layer.msg(data.errMsg, {time: 1000});
                            }else if(data.code === '400'){
                                layer.msg(data.errMsg, {time: 1000});
                            }else {
                                layer.msg('操作失败', {time: 1000});
                            }
                        }
                    })
                });

            }else if(obj.event ===  'setHistoryEntry'){//设为历史电站
                if (checkStatus.data.length < 1) {
                    layer.msg("请先选择数据", {icon: 5, anim: 6});
                    return;
                }
                var ids = [];
                var flag = "";
                for(var i=0; i<checkStatus.data.length; i++){
                    if(checkStatus.data[i].is_history=='1'){
                        flag = "300";
                        break;
                    }
                    ids.push(checkStatus.data[i].id);
                }
                if(flag =='300'){
                    layer.msg("选择的数据中已有历史电站",{icon:5,anim:6});
                    return false;
                }
                layer.confirm('确认要设为历史电站吗？', {
                    icon:3,
                    btn:['确定','取消'] //按钮
                }, function(){
                    $.ajax({
                        type: 'post',
                        url: '${ctx}/customerEntry/setHistoryEntry',
                        contentType: 'application/json',
                        data: JSON.stringify(ids),
                        success: function(data){
                            if (data.code === '200') {
                                layer.msg('操作成功', {time: 2000});
                                searchOrder();
                            }else {
                                layer.msg('操作失败，'+data.errMsg, {time: 2000});
                            }
                        }
                    })
                });

            }else  if (obj.event === 'inputKHBtn') {//推送客户信息
                if (checkStatus.data.length < 1) {
                    layer.msg("请先选择数据", {icon: 5, anim: 6});
                    return;
                }
                if (checkStatus.data.length > 1) {
                    layer.msg("只能选择数据一条数据", {icon: 5, anim: 6});
                    return;
                }
                let isHistory = checkStatus.data[0].is_history;
                let designAuditFlag = checkStatus.data[0].design_audit_flag;
                //历史电站才可操作
                if (isHistory != '1') {
                    layer.msg("历史电站才能推送客户信息", {icon: 5, anim: 6});
                    return;
                }
                //自审通过的电站才能推送客户信息
                if(designAuditFlag == "0" || designAuditFlag == "1" || designAuditFlag == "2" || designAuditFlag == "3"){
                    layer.msg("设计自审通过的历史电站才能推送客户信息", {icon: 5, anim: 6});
                    return;
                }
                var entryId =checkStatus.data[0].id;
                var index= layer.load(2, {shade: [0.5,'#fff'], content:''});
                $.ajax({
                    type:"POST",
                    url:"${ctx}/nhPowerStation/customerEntryPush",
                    data:{
                        entryId:entryId
                    },
                    success:function(res){
                        if(res.code=="200"){
                            layer.msg('推送成功！', {icon: 1, time: 1000}, function () {
                                layer.close(index);
                                searchOrder();
                            });
                        } else{
                            layer.msg(res.errMsg,{time:1000});
                            layer.close(index);
                        }
                    },
                    error:function (data) {
                        layer.close(index);
                    }
                }) ;
            }else if (obj.event === 'backAZBtn') {//退回待安装
                if (checkStatus.data.length < 1) {
                    layer.msg("请先选择数据", {icon: 5, anim: 6});
                    return;
                }
                if (checkStatus.data.length > 1) {
                    layer.msg("只能选择数据一条数据", {icon: 5, anim: 6});
                    return;
                }
                $("input[name='backAzStep']").prop("checked",false);
                form.render("radio");
                $('textarea[name="backAzRmark"]').val("");
                var id =checkStatus.data[0].id;
                layer.open({
                    type: 1,
                    area: ['800px', '600px'],
                    content: $("#backAzForEntryDiv"),
                    title: '退回安装',
                    btn: ['确认', '取消'],
                    btnAlign: 'c',
                    yes: function () {
                        var backAzRmark = $('textarea[name="backAzRmark"]').val();
                        var backAzStep = $("input[name='backAzStep']:checked").val();
                        if (isBlank(backAzStep)) {
                            layer.msg("请选择是否清除物料使用记录");
                        }else if(isBlank(backAzRmark)){
                            layer.msg("请输入退回原因");
                        } else {
                            var index= layer.load(2, {shade: [0.5,'#fff'], content:''});
                            $.ajax({
                                type: 'post',
                                url: '${ctx}/customerEntry/backAzForEntry',
                                data: {
                                    id: id,
                                    step: backAzStep,
                                    remarks:backAzRmark
                                },
                                success: function (result) {
                                    layer.close(index);
                                    if (result.code === '200') {
                                        layer.msg('操作成功！', {time: 1000}, function(){
                                            searchOrder();
                                        })
                                    } else {
                                        layer.msg('操作失败!'+result.errMsg)
                                    }
                                }
                            });
                        }
                    }
                })
            }else  if (obj.event === 'inputDZBtn') {//推送电站信息
                if (checkStatus.data.length < 1) {
                    layer.msg("请先选择数据", {icon: 5, anim: 6});
                    return;
                }
                if (checkStatus.data.length > 1) {
                    layer.msg("只能选择数据一条数据", {icon: 5, anim: 6});
                    return;
                }
                let isHistory = checkStatus.data[0].is_history;
                //历史电站才可操作
                if (isHistory != '1') {
                    layer.msg("历史电站才能推送电站信息", {icon: 5, anim: 6});
                    return;
                }
                var status =checkStatus.data[0].status;
                if (status != "a"){
                    layer.msg("已完成的历史电站才能推送电站信息", {icon: 5, anim: 6});
                    return;
                }
                var entryId =checkStatus.data[0].id;
                var index= layer.load(2, {shade: [0.5,'#fff'], content:''});
                $.ajax({
                    type:"POST",
                    url:"${ctx}/nhPowerStation/inputCustomerEntryInfo",
                    data:{
                        entryId:entryId
                    },
                    success:function(res){
                        if(res.code=="200"){
                            layer.msg('推送成功！', {icon: 1, time: 1000}, function () {
                                layer.close(index);
                                searchOrder();
                            });
                        } else{
                            layer.msg(res.errMsg,{time:1000});
                            layer.close(index);
                        }
                    },
                    error:function (data) {
                        layer.close(index);
                    }
                }) ;
            }else  if (obj.event === 'exportfittingBtn') {
                var ids ;
                for(var i=0; i<checkStatus.data.length; i++){
                    if(isBlank(ids)){
                        ids =checkStatus.data[i].id;
                    }else{
                        ids = ids +","+checkStatus.data[i].id;
                    }
                    entrycount= entrycount+1;
                }
                if(entrycount<1){
                    layer.msg('当前无数据导出', {time: 1000});
                    return ;
                }

                var status =  formSelects.value('status', 'valStr');
                let hideSubmitForm = document.createElement("form");
                hideSubmitForm.id = "tempForm1";
                hideSubmitForm.method = "post";
                hideSubmitForm.action = "${ctx}/excel/doExportUserExcel";
               // hideSubmitForm.target = "_blank";
                hideSubmitForm.appendChild(createHideInput("ids",isBlank(ids)?"":ids));
                hideSubmitForm.appendChild(createHideInput("status",isBlank(status)?"":status));
                hideSubmitForm.appendChild(createHideInput("projectId", isBlank($("#projectId").val())?"":$("#projectId").val()));
                hideSubmitForm.appendChild(createHideInput("powerStationCode", isBlank($("#powerStationCode").val())?"":$("#powerStationCode").val()));
                hideSubmitForm.appendChild(createHideInput("distributorId", isBlank($("#traderId").val())?"":$("#traderId").val()));
                hideSubmitForm.appendChild(createHideInput("traderMobile", isBlank($("#traderMobile").val())?"":$("#traderMobile").val()));
                hideSubmitForm.appendChild(createHideInput("tenantName", isBlank($("#tenantName").val())?"":$("#tenantName").val()));
                hideSubmitForm.appendChild(createHideInput("checkAcceptBy", isBlank($("#checkAcceptBy").val())?"":$("#checkAcceptBy").val()));
                hideSubmitForm.appendChild(createHideInput("tenantAddress", isBlank($("#tenantAddress").val())?"":$("#tenantAddress").val()));
                hideSubmitForm.appendChild(createHideInput("installWay", isBlank($("#installWay").val())?"":$("#installWay").val()));
                hideSubmitForm.appendChild(createHideInput("roofType", isBlank($("#roofType").val())?"":$("#roofType").val()));
                hideSubmitForm.appendChild(createHideInput("plan", isBlank($("#plan").val())?"":$("#plan").val()));
                hideSubmitForm.appendChild(createHideInput("remarks", isBlank($("#remarks").val())?"":$("#remarks").val()));
                hideSubmitForm.appendChild(createHideInput("deliverBy", isBlank($("#deliverBy").val())?"":$("#deliverBy").val()));
                hideSubmitForm.appendChild(createHideInput("createTimeMin", isBlank($("#createEndStartTime").val())?"":$("#createEndStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("createTimeMax", isBlank($("#createEndEndTime").val())?"":$("#createEndEndTime").val()));

                hideSubmitForm.appendChild(createHideInput("examineTimeMin", isBlank($("#matchTimeMin").val())?"":$("#matchTimeMin").val()));
                hideSubmitForm.appendChild(createHideInput("examineTimeMax", isBlank($("#matchTimeMax").val())?"":$("#matchTimeMax").val()));

                hideSubmitForm.appendChild(createHideInput("installEndStartTime", isBlank($("#installEndStartTime").val())?"":$("#installEndStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("installEndEndTime", isBlank($("#installEndEndTime").val())?"":$("#installEndEndTime").val()));
                hideSubmitForm.appendChild(createHideInput("mergeTimeMin",isBlank($("#mergeEndStartTime").val())?"": $("#mergeEndStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("mergeTimeMax", isBlank($("#mergeEndEndTime").val())?"":$("#mergeEndEndTime").val()));
                hideSubmitForm.appendChild(createHideInput("checkAcceptTimeMin", isBlank($("#acceptEndStartTime").val())?"":$("#acceptEndStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("checkAcceptTimeMax", isBlank($("#acceptEndEndTime").val())?"":$("#acceptEndEndTime").val()));
                hideSubmitForm.appendChild(createHideInput("deliverTimeMin", isBlank($("#deliverEndStartTime").val())?"":$("#deliverEndStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("deliverTimeMax", isBlank($("#deliverEndEndTime").val())?"":$("#deliverEndEndTime").val()));
                hideSubmitForm.appendChild(createHideInput("indocTimeMin", isBlank($("#endStartTime").val())?"":$("#endStartTime").val()));
                hideSubmitForm.appendChild(createHideInput("indocTimeMax", isBlank($("#endEndTime").val())?"":$("#endEndTime").val()));
                hideSubmitForm.appendChild(createHideInput("generatorNo", isBlank($("#generatorNo").val())?"":$("#generatorNo").val()));


                hideSubmitForm.appendChild(createHideInput("schemeType", isBlank($("#schemeType").val())?"":$("#schemeType").val()));
                hideSubmitForm.appendChild(createHideInput("applyChange", isBlank($("#applyChange").val())?"":$("#applyChange").val()));
                hideSubmitForm.appendChild(createHideInput("retrial", isBlank($("#retrial").val())?"":$("#retrial").val()));
                hideSubmitForm.appendChild(createHideInput("whetherToPay", isBlank($("#whetherToPay").val())?"":$("#whetherToPay").val()));

                hideSubmitForm.addEventListener('onsubmit', function(){
                    // this.openDownloadWindow(name);
                });
                document.body.appendChild(hideSubmitForm);
                hideSubmitForm.submit();
                document.body.removeChild(hideSubmitForm);

                //  window.open("${ctx}/excel/doExportUserExcel?status=3&"+$("#searchForm"))
            }else if(obj.event==='matching'){
                layer.open({
                    title: 'e签宝',
                    type: 2,
                    area: ['80%', '80%'],
                    content: '${ctx}/customerEntry/eSignPartner'
                });
            }

        });

        function  createHideInput(name, value){
            let hideInput = document.createElement("input");
            hideInput.type = "hidden";
            hideInput.name = name;
            hideInput.value = value;
            return hideInput;
        };
        //监听搜索
        form.on('submit(LAY-user-back-search)', function(data){
            var field = data.field;
            //执行重载
            tableExt.reload('test', {
                where: field,
                page:{
                    curr:1
                }
            });
        });

        form.on('select(entryStatus)', function (data) {
            var status = $(data.elem).find("option:selected").attr("title");
            $("#stageStatus").empty();

            var html = "<option value=''>全部</option>";
            if (status == '0') {
                html += '<option value="0">暂存</option>';
                html += '<option value="1">待预审</option>';
                html += '<option value="2">预审中</option>';
                html += '<option value="3">预审驳回</option>';
            } else if (status == '1') {
                html += '<option value="4">待踏勘</option>';
                html += '<option value="n">待设计</option>';
                html += '<option value="5">设计自审</option>';
                html += '<option value="6">自审驳回</option>';
                html += '<option value="7">自审通过</option>';
                html += '<option value="8">设计审核驳回</option>';
            } else if (status == '2') {
            } else if (status == '3') {
                html += '<option value="m">待派工</option>';
                html += '<option value="k">待安装</option>';
                html += '<option value="i">安装自审驳回</option>';
            } else if (status == '4') {
                html += '<option value="j">安装自审</option>';
                html += '<option value="l">安装验收</option>';
                html += '<option value="g">验收驳回</option>';
            }else if (status == '5') {
                html += '<option value="f">待并网</option>';
                html += '<option value="e">并网验收驳回</option>';
                html += '<option value="d">资方审核驳回</option>';
            }else if (status == '6') {
                html += '<option value="c">待并网验收</option>';
                html += '<option value="b">资方审核中</option>';
                html += '<option value="a">已完成</option>';
            }else{
                html += '<option value="0">暂存</option>';
                html += '<option value="1">待预审</option>';
                html += '<option value="2">预审中</option>';
                html += '<option value="3">预审驳回</option>';
                html += '<option value="4">待踏勘</option>';
                html += '<option value="n">待设计</option>';
                html += '<option value="5">设计自审</option>';
                html += '<option value="6">自审驳回</option>';
                html += '<option value="7">自审通过</option>';
                html += '<option value="8">设计审核驳回</option>';
                html += '<option value="m">待派工</option>';
                html += '<option value="k">待安装</option>';
                html += '<option value="i">安装自审驳回</option>';
                html += '<option value="g">验收驳回</option>';
                html += '<option value="j">安装自审</option>';
                html += '<option value="l">安装验收</option>';
                html += '<option value="f">待并网</option>';
                html += '<option value="e">并网验收驳回</option>';
                html += '<option value="d">资方审核驳回</option>';
                html += '<option value="c">待并网验收</option>';
                html += '<option value="b">资方审核中</option>';
                html += '<option value="a">已完成</option>';
            }
            $("#stageStatus").append(html);
            form.render('select');
        });

        document.addEventListener('keydown', function (event) {
            if (event.keyCode === 13) {
                //执行相关操作
                $("#searchBtn").click();
            }
        });
    })

    function customerEntryFlag(id) {
        layer.open({
            type: 2,
            content: "${ctx}/customerEntry/getFlagcustomerEntry?customerEntryId=" + id //这里content是一个DOM，注意：最好该元素要存放在body最外层，否则可能被其它的相对元素所影响
            , title: "标记项目"
            , area: ["300px", "260px"]
            , closeBtn: 0
            , shadeClose: true

        });
    }

    function downloadReport(id) {
        layer.open({
            type: 2,
            title: '验收报告',
            content: '${ctx}/customerEntry/downloadReport?opt=down&id=' + id,
            area: ['100%', '100%']
        });
    }

    function downloadAttach(attach) {
        attach = decodeURI(attach);
        attach = attach.replace(/\+/g, "%2B"); //
        window.location.href = '${commonStaticImgPath}' + attach;
    }

    function searchOrder() {
        layer.closeAll();
        //执行重载
        var wherobj = _serializeJson($("#searchForm"));
        tableExt.reload('test', {
            where: wherobj
        });
    }

    function deliver() {

    }

    //查看详情
    function psDetail(id) {
        layer.open({
            type: 2
            , title: '电站详情'
            , content: '${ctx}/customerEntry/entryDetail?entryId=' + id
            , area: ['100%', '100%']
            , yes: function(index, layero){

            }
        });
    }

    function planDetail(entryId){
        layer.open({
            type: 2,
            title: '查看',
            content: '${ctx}/planManage/viewMatchedPlan?entryId=' + entryId,
            area: ['80%','80%']
        });
    }

    function downloadUrl(id) {
        var index = layer.load(2, {shade: [0.5, '#fff'], content: ''});
        $.ajax({
            type: 'post',
            url: '${ctx}/customerEntry/getQrCodeUrl',
            data: {
                entryId: id
            },
            success: function (data) {
                if ('200' == data.code) {
                    let url = data.data.url;
                    window.open('${commonStaticImgPath}' + url);
                } else {
                    layer.msg(data.errMsg, {icon: 2});
                }
            },
            complete: function () {
                layer.close(index);
            }
        });
    }

    function downloadImg(attach) {
        var name = attach.substring(0, attach.lastIndexOf(".") - 1);
        var suffix = attach.substring(attach.lastIndexOf("."));
        window.open('${commonStaticImgPath}'+attach)
       // location.href = '${ctx}/technical/imgDownload?path=' + '${commonStaticImgPath}' + attach + "&fileGS=" + suffix + "&name=" + name;
    }

    function inDoc(id){

    }

    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }

    function reset(){
        layui.form.render();
        $("#searchForm").find("select").val("");
        $("#searchForm").find("input").val("");
    }

    function lookInputEntryStatus(id,type){
        layer.open({
            type: 2,
            title: '查看进件状态',
            content: '${ctx}/customerEntryExtra/lookInputEntryStatus?id='+id+'&type='+type,
            area : [ '650px', '450px' ],
            cancel:function(){
                table.reload('test'); //数据刷新
            }
        });
    }

    function signOperate(removeSign) {
        let ids = [];
        let checked = table.checkStatus('test').data;
        if(!checked || !checked.length) {
            layer.msg('请勾选数据！', {icon:2});
            return;
        }
        for (let i =0; i<checked.length;i++){
            ids.push(checked[i].id);
        }
        $.ajax({
            type: "POST",
            url: "${ctx}/customerEntry/removeSign2",
            data: {
                ids: ids.join(","),
                removeSign:removeSign
            },
            success: function (data) {
                if (data.code === "200") {
                    layer.msg("操作成功！", {icon: 1});
                    searchOrder();
                }else{
                    layer.msg(data.errMsg, {icon: 2});
                }
            }
        });
    }
</script>
</body>
</html>

