yangle
2023-09-04 9214c6c87d04427b2d51cf225d0d914e737998ff
乔一报表
2个文件已修改
4个文件已添加
2403 ■■■■■ 已修改文件
WebTM/WebTM.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/index_QiaoYi.html 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Kf_BrushingOutReport.html 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Kf_ColorBlankLustringOutReport.html 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Kf_DryFinalizeOutReport.html 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Kf_SizingFinalizeOutReport.html 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -273,6 +273,7 @@
    <Content Include="views\计划管理\工艺路线\Gy_RoutingBillListQuery.html" />
    <Content Include="views\计划管理\工艺路线\Gy_RoutingBillList_His.html" />
    <Content Include="views\计划管理\工艺路线\Gy_RoutingBillSubList.html" />
    <Content Include="views\车间管理\报表分析\Kf_BrushingOutReport.html" />
    <Content Include="views\车间管理\产线组装追溯\Cj_AssemblyTraceability.html" />
    <Content Include="views\车间管理\产线组装追溯\Cj_AssemblyTraceabilityList.html" />
    <Content Include="views\车间管理\工序出站汇报单\Cj_StationOutBillSubList.html" />
@@ -288,9 +289,12 @@
    <Content Include="views\车间管理\工序流转卡\WW_EntrustWorkOrderBillEdit.html" />
    <Content Include="views\车间管理\工序流转卡\WW_EntrustWorkOrderBillList.html" />
    <Content Include="views\车间管理\工序进站接收单\Cj_StationInBillSubList.html" />
    <Content Include="views\车间管理\报表分析\Kf_ColorBlankLustringOutReport.html" />
    <Content Include="views\车间管理\报表分析\Kf_DryFinalizeOutReport.html" />
    <Content Include="views\车间管理\报表分析\Kf_ProdProcessEntryReport_DyeColor.html" />
    <Content Include="views\车间管理\报表分析\Kf_ProdProcessSumReport_DyeColor.html" />
    <Content Include="views\车间管理\报表分析\Kf_ProdProcessSumReport_DyeColor_third.html" />
    <Content Include="views\车间管理\报表分析\Kf_SizingFinalizeOutReport.html" />
    <Content Include="views\车间管理\报表分析\SC_DayRkReport.html" />
    <Content Include="views\车间管理\报表分析\Sc_ICOMProBarCodeReport.html" />
    <Content Include="views\车间管理\报表分析\sc_ICOMReport.html" />
WebTM/views/index_QiaoYi.html
@@ -447,11 +447,15 @@
                                        <!--<dd><a lay-href="车间管理/工序流转卡/WindowPrint.html">测试打印</a></dd>-->
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeBill.html">工序流转卡</a></dd>
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeBillList.html">工序流转卡维护</a></dd>
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeBillSubList.html">工序子流转卡维护</a></dd>
                                        <dd><a lay-href="车间管理/工序流转卡/MES_SampleRecordBillList.html">试样记录单列表</a></dd>
                                        <dd><a lay-href="车间管理/工序流转卡/MES_ColorRecordBillList.html">对色记录单列表</a></dd>
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeArrangement.html">工序流转卡排缸</a></dd>
                                        <!-- <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessExchangeIssueBillList.html">工序流转卡(下达)</a></dd> -->
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcExchWorkBackBillList.html">工序返工申请列表</a></dd>
                                        <!--<dd><a lay-href="车间管理/工序流转卡/Sc_ProcExchWorkBackBillEdit.html">工序返工申请</a></dd>-->
                                        <!--  <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessSendWorkList.html">工序派工列表</a></dd>
                                          <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessSendWorkEdit.html">工序派工</a></dd> -->
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcessSendWorkEdit.html">工序派工</a></dd> -->
                                        <!--<dd><a lay-href="车间管理/工序流转卡/Sc_ProcExchWorkBackBillEdit.html">工序返工申请单编辑</a></dd>-->
                                        <dd><a lay-href="车间管理/工序流转卡/Sc_ProcExchRecordBackBillList.html">工序返工记录单</a></dd>
                                        <!--<dd><a lay-href="车间管理/工序流转卡/Sc_ProcExchRecordBackBillEdit.html">工序返工记录单编辑</a></dd>-->
@@ -498,41 +502,80 @@
                                            <dd><a lay-href="生产管理/生产装箱单/QK_PackedBillList.html">已装箱单据列表</a></dd>
                                        </dl>
                                    </dd> -->
                                     <dd>
                                        <a>报表分析</a>
                                        <dl class="layui-nav-child append" id="append">
                                            <!--<dd><a lay-href="">车间在制品分析n</a></dd>
    <dd><a lay-href="">流转卡全程跟踪n</a></dd>
    <dd><a lay-href="车间管理/报表分析/Sc_StationInBillList.html">标准工时报表</a></dd>
    <dd><a lay-href="车间管理/报表分析/ProductionPlanReportList.html">投产计划报表</a></dd>
    <dd><a lay-href="车间管理/报表分析/Mes_OrderProcFlowAllReport.html">车间工序全程跟踪报表</a></dd>
    <dd><a lay-href="车间管理/报表分析/Mes_WIPProcReport.html">工序在制品报表(纵向)</a></dd>
    <dd><a lay-href="车间管理/报表分析/DefectiveDetailedYieldReport.html">不良明细良率报表</a></dd>
    <dd><a lay-href="车间管理/报表分析/Sc_StationOutSumReport.html">车间生产汇报统计表</a></dd>-->
                                            <dd><a lay-href="车间管理/报表分析/sc_ICOMReport.html">(按生产订单)客户订单报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/sc_ICOMRKReport.html">生产入库报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/SC_DayRkReport.html">生产日记</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/Kf_MaterOutSumReport_Cloth.html">白坯发布汇总报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/Kf_MaterOutEntryReport_Cloth.html">白坯发布明细报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessSumReport_DyeColor.html">染厂汇总报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessEntryReport_DyeColor.html">染厂明细报表</a></dd>
                                            <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessSumReport_DyeColor_third.html">染厂产量报表</a></dd>
                                        </dl>
                                    </dd>
                                    <!-- <dd>
                                        <a>叫料管理</a>
                                        <dl class="layui-nav-child append" id="append">
                                            <dd><a lay-href="生产管理/生产叫料平台/JIT_ComplementGoodBillMain.html">生产叫料平台(按订单叫料)</a></dd>
                                            <dd><a lay-href="生产管理/生产叫料平台/JIT_ComplementGoodBillMain_ZXBZ.html">生产叫料平台(最小包装叫料)</a></dd>
                                            <dd><a lay-href="车间管理/叫料管理/Jl_CallGoodsBillMain.html">叫料单列表</a></dd>
                                            <dd><a lay-href="生产管理/拣料配送单/JIT_ComplementGoodsList.html">拣料配送单列表</a></dd>
                                            <dd><a lay-href="生产管理/退料申请单/JIT_CallGoodsBackRequestBillList.html">退料申请单列表</a></dd>
                                            <dd><a lay-href="车间管理/叫料管理/叫料退料单/Jl_CallGoodsBillBackMain.html">叫料退料单列表</a></dd>
                                            <dd><a lay-href="车间管理/车间收料/JIT_SendGoodsBillList.html">车间收料列表</a></dd>
                                            <dd><a lay-href="车间管理/叫料管理/拣料配送单/Jl_ComplementGoodsBillMain.html">拣料配送单列表(-)</a></dd>-->
                                    <!--   <dd><a lay-href="车间管理/叫料管理/生产日计划单/Sc_WorkBillAutoSortBillMain.html">生产日计划单列表</a></dd>
                                        </dl>
                                    </dd> -->
                                <dd>
                                    <a>报表分析</a>
                                    <dl class="layui-nav-child append" id="append">
                                        <dd>
                                            <a>计划</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                                <dd><a lay-href="车间管理/报表分析/sc_ICOMReport.html">(按生产订单)客户订单报表</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/sc_ICOMRKReport.html">生产入库报表</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/SC_DayRkReport.html">生产日记</a></dd>
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>白坯发布</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                                <dd><a lay-href="车间管理/报表分析/Kf_MaterOutSumReport_Cloth.html">白坯发布汇总报表</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_MaterOutEntryReport_Cloth.html">白坯发布明细报表</a></dd>
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>染厂</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                                <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessSumReport_DyeColor.html">染厂汇总报表</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessEntryReport_DyeColor.html">染厂明细报表</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_ProdProcessSumReport_DyeColor_third.html">染厂产量报表</a></dd>
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>后整一号</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>后整二号</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>后整三号</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                                <dd><a lay-href="车间管理/报表分析/Kf_DryFinalizeOutReport.html">烘干定型出站</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_SizingFinalizeOutReport.html">上浆定型出站</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_BrushingOutReport.html">刷毛出站</a></dd>
                                                <dd><a lay-href="车间管理/报表分析/Kf_ColorBlankLustringOutReport.html">色坯烫光出站</a></dd>
                                            </dl>
                                        </dd>
                                        <dd>
                                            <a>特整</a>
                                            <dl class="layui-nav-child append" id="append" style="margin: 0 0 0 13px;">
                                            </dl>
                                        </dd>
                                        <!--<dd><a lay-href="">车间在制品分析n</a></dd>
                                        <dd><a lay-href="">流转卡全程跟踪n</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/Sc_StationInBillList.html">标准工时报表</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/ProductionPlanReportList.html">投产计划报表</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/Mes_OrderProcFlowAllReport.html">车间工序全程跟踪报表</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/Mes_WIPProcReport.html">工序在制品报表(纵向)</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/DefectiveDetailedYieldReport.html">不良明细良率报表</a></dd>
                                        <dd><a lay-href="车间管理/报表分析/Sc_StationOutSumReport.html">车间生产汇报统计表</a></dd>-->
                                    </dl>
                                </dd>
                                <!-- <dd>
                                <a>叫料管理</a>
                                <dl class="layui-nav-child append" id="append">
                                    <dd><a lay-href="生产管理/生产叫料平台/JIT_ComplementGoodBillMain.html">生产叫料平台(按订单叫料)</a></dd>
                                    <dd><a lay-href="生产管理/生产叫料平台/JIT_ComplementGoodBillMain_ZXBZ.html">生产叫料平台(最小包装叫料)</a></dd>
                                    <dd><a lay-href="车间管理/叫料管理/Jl_CallGoodsBillMain.html">叫料单列表</a></dd>
                                    <dd><a lay-href="生产管理/拣料配送单/JIT_ComplementGoodsList.html">拣料配送单列表</a></dd>
                                    <dd><a lay-href="生产管理/退料申请单/JIT_CallGoodsBackRequestBillList.html">退料申请单列表</a></dd>
                                    <dd><a lay-href="车间管理/叫料管理/叫料退料单/Jl_CallGoodsBillBackMain.html">叫料退料单列表</a></dd>
                                    <dd><a lay-href="车间管理/车间收料/JIT_SendGoodsBillList.html">车间收料列表</a></dd>
                                    <dd><a lay-href="车间管理/叫料管理/拣料配送单/Jl_ComplementGoodsBillMain.html">拣料配送单列表(-)</a></dd>-->
                                <!--   <dd><a lay-href="车间管理/叫料管理/生产日计划单/Sc_WorkBillAutoSortBillMain.html">生产日计划单列表</a></dd>
                                    </dl>
                                </dd> -->
                            </dl>
                        </li>
                        <!-- è´¨é‡ç®¡ç† -->
@@ -939,7 +982,7 @@
                                    <a>公用资料</a>
                                    <dl class="layui-nav-child">
                                        <dd><a lay-href="基础资料/公用基础资料/Gy_Material.html">物料列表</a></dd>
                                         <dd><a lay-href="基础资料/公用基础资料/Gy_MaterType.html">物料分类列表</a></dd>
                                        <dd><a lay-href="基础资料/公用基础资料/Gy_MaterType.html">物料分类列表</a></dd>
                                        <dd><a lay-href="基础资料/公用基础资料/Gy_Warehouse.html">仓库列表</a></dd>
                                        <!-- <dd><a lay-href="基础资料/公用基础资料/Gy_WorkStationList.html">工位列表</a></dd> -->
                                        <!-- <dd><a lay-href="基础资料/公用基础资料/Gy_StockPlace_List.html">仓位列表</a></dd> -->
@@ -1154,7 +1197,7 @@
                window.location.href = 'index_Mobile_QiaoYi.html'
            }
           /* $("#LAY_app_flexible").click();*/
            /* $("#LAY_app_flexible").click();*/
        });
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_BrushingOutReport.html
New file
@@ -0,0 +1,570 @@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block" style="margin-left: 120px;width: 184px;">
                                        <select name="HState" lay-verify="HState" id="HState">
                                            <option value="0" selected="selected">全部</option>
                                            <option value="1">未开工</option>
                                            <option value="3">已入库</option>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-form layui-inline" style="position:relative;top:10px;">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HBeginDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">-</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HEndDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">-</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-inline">
                                    <label class="layui-form-label">合计米数</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="SumHMaterOutQty" id="SumHMaterOutQty" disabled="disabled">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <div style="padding-left: 10px;">
                                        <input type="checkbox" name="checkWRuku" id="checkWRuku" lay-skin="primary" lay-filter="checkWRuku" title="未下推及已入库">
                                    </div>
                                </div>-->
                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:10px;">
                                        <!--其他条件-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品代码</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品名称</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductName" id="HProductName">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">规格型号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductModel" id="HProductModel">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top:5px">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
                                                <option value="0" selected="selected"></option>
                                                <option value="=">=</option>
                                                <option value=">=">>=</option>
                                                <option value=">">></option>
                                                <option value="<="><=</option>
                                                <option value="<"><</option>
                                                <option value="<>"><></option>
                                                <option value="7">包含</option>
                                                <option value="8">左包含</option>
                                                <option value="9">右包含</option>
                                                <option value="10">不包含</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var HModName = "Kf_BrushingOutReport";
            //#endregion
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //#region åˆå§‹åŒ–界面
            set_ClearBill();
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //退出
                    case 'btn-exit': Pub_Close(2);
                        break;
                    //隐藏列设置
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //行监听事件-单击
            table.on('row(mainTable)', function (obj) {
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
            //初始化界面
            function set_ClearBill() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                ////初始化时间
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 10), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //加载数据到网格
                get_FastQuery();
                DisPlay_HideColumn();
                //ColFilter();
            }
            //列明显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
                $("#ColName").append(Organization);
                form.render('select');
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/ProdProcessSumReport/Kf_BrushingOutReport',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, "") > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else if (data[i].ColName == '白坯发布') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                    }
                                }
                            }
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , totalRow: true
                                , height: 'full-70'
                                , cols: [col]
                                , data: data1.data
                            };
                            table.render(option);
                            //计算合计公斤数
                            var sumHMaterOutQty = 0;
                            for (var i = 0; i < data1.data.length; i++) {
                                sumHMaterOutQty += data1.data[i]["出站合格数量"];
                            }
                            $("#SumHMaterOutQty").val(sumHMaterOutQty);
                            layer.close(wait);
                        }
                        else {
                            $("#SumHMaterOutQty").val("");
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        $("#SumHMaterOutQty").val("");
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //快速过滤
            function get_FastQuery() {
                var HBeginDate = $("#HBeginDate").val();//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate == '') {
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                } else {
                    HBeginDate = $("#HBeginDate").val() + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                }
                if (HEndDate == '') {
                    HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                } else {
                    HEndDate = $("#HEndDate").val() + ":00:00";//结束日期
                }
                var HMaterNumber = $("#HMaterNumber").val();//物料代码
                var HBillNo = $("#HBillNo").val();          //单据号
                var HProductName = $("#HProductName").val();//产品名称
                var HProductModel = $("#HProductModel").val();//产品规格
                //任意字段条件过滤 æ¡ä»¶æå–
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
                //拼接任一字段过滤查询条件
                var com = "";
                if (ColName != 0 && Comparator != 0) {
                    switch (Comparator) {
                        case "7":
                            com = "like '%" + ColContent + "%'";
                            break;
                        case "8":
                            com = "like '%" + ColContent + "'";
                            break;
                        case "9":
                            com = "like '" + ColContent + "%'";
                            break;
                        case "10":
                            com = "not like '%" + ColContent + "%'";
                            break;
                        default:
                            com = "" + Comparator + " '" + ColContent + "'";
                            break;
                    }
                    com = " and (" + ColName + " " + com + ")";
                }
                if (HBeginDate != "" && HEndDate != "") {
                    sWhere += " and æ—¥æœŸ between '" + HBeginDate + "' and '" + HEndDate + "'";
                }
                if (HMaterNumber != "") {
                    sWhere += " and äº§å“ä»£ç  = '" + HMaterNumber + "' and äº§å“åç§°='" + HProductName + "' and è§„格型号='" + HProductModel+"'";
                }
                if (HBillNo != "") {
                    sWhere += " and å·¥åºæµè½¬å¡å· = '" + HBillNo + "'";
                }
                if (com != "") {
                    sWhere += com;
                }
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                $("#HMaterNumber").val("");
                $("#HBillNo").val("");
                $("#HProductName").val("");
                $("#HProductModel").val("");
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                //form.render()
                ColFilter();
                sWhere = "";
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
                ColFilter();
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
        });
    </script>
</body>
</html>
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_ColorBlankLustringOutReport.html
New file
@@ -0,0 +1,570 @@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block" style="margin-left: 120px;width: 184px;">
                                        <select name="HState" lay-verify="HState" id="HState">
                                            <option value="0" selected="selected">全部</option>
                                            <option value="1">未开工</option>
                                            <option value="3">已入库</option>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-form layui-inline" style="position:relative;top:10px;">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HBeginDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">-</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HEndDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">-</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-inline">
                                    <label class="layui-form-label">合计米数</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="SumHMaterOutQty" id="SumHMaterOutQty" disabled="disabled">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <div style="padding-left: 10px;">
                                        <input type="checkbox" name="checkWRuku" id="checkWRuku" lay-skin="primary" lay-filter="checkWRuku" title="未下推及已入库">
                                    </div>
                                </div>-->
                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:10px;">
                                        <!--其他条件-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品代码</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品名称</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductName" id="HProductName">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">规格型号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductModel" id="HProductModel">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top:5px">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
                                                <option value="0" selected="selected"></option>
                                                <option value="=">=</option>
                                                <option value=">=">>=</option>
                                                <option value=">">></option>
                                                <option value="<="><=</option>
                                                <option value="<"><</option>
                                                <option value="<>"><></option>
                                                <option value="7">包含</option>
                                                <option value="8">左包含</option>
                                                <option value="9">右包含</option>
                                                <option value="10">不包含</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var HModName = "Kf_ColorBlankLustringOutReport";
            //#endregion
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //#region åˆå§‹åŒ–界面
            set_ClearBill();
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //退出
                    case 'btn-exit': Pub_Close(2);
                        break;
                    //隐藏列设置
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //行监听事件-单击
            table.on('row(mainTable)', function (obj) {
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
            //初始化界面
            function set_ClearBill() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                ////初始化时间
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 10), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //加载数据到网格
                get_FastQuery();
                DisPlay_HideColumn();
                //ColFilter();
            }
            //列明显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
                $("#ColName").append(Organization);
                form.render('select');
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/ProdProcessSumReport/Kf_ColorBlankLustringOutReport',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, "") > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else if (data[i].ColName == '白坯发布') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                    }
                                }
                            }
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , totalRow: true
                                , height: 'full-70'
                                , cols: [col]
                                , data: data1.data
                            };
                            table.render(option);
                            //计算合计公斤数
                            var sumHMaterOutQty = 0;
                            for (var i = 0; i < data1.data.length; i++) {
                                sumHMaterOutQty += data1.data[i]["出站合格数量"];
                            }
                            $("#SumHMaterOutQty").val(sumHMaterOutQty);
                            layer.close(wait);
                        }
                        else {
                            $("#SumHMaterOutQty").val("");
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        $("#SumHMaterOutQty").val("");
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //快速过滤
            function get_FastQuery() {
                var HBeginDate = $("#HBeginDate").val();//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate == '') {
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                } else {
                    HBeginDate = $("#HBeginDate").val() + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                }
                if (HEndDate == '') {
                    HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                } else {
                    HEndDate = $("#HEndDate").val() + ":00:00";//结束日期
                }
                var HMaterNumber = $("#HMaterNumber").val();//物料代码
                var HBillNo = $("#HBillNo").val();          //单据号
                var HProductName = $("#HProductName").val();//产品名称
                var HProductModel = $("#HProductModel").val();//产品规格
                //任意字段条件过滤 æ¡ä»¶æå–
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
                //拼接任一字段过滤查询条件
                var com = "";
                if (ColName != 0 && Comparator != 0) {
                    switch (Comparator) {
                        case "7":
                            com = "like '%" + ColContent + "%'";
                            break;
                        case "8":
                            com = "like '%" + ColContent + "'";
                            break;
                        case "9":
                            com = "like '" + ColContent + "%'";
                            break;
                        case "10":
                            com = "not like '%" + ColContent + "%'";
                            break;
                        default:
                            com = "" + Comparator + " '" + ColContent + "'";
                            break;
                    }
                    com = " and (" + ColName + " " + com + ")";
                }
                if (HBeginDate != "" && HEndDate != "") {
                    sWhere += " and æ—¥æœŸ between '" + HBeginDate + "' and '" + HEndDate + "'";
                }
                if (HMaterNumber != "") {
                    sWhere += " and äº§å“ä»£ç  = '" + HMaterNumber + "' and äº§å“åç§°='" + HProductName + "' and è§„格型号='" + HProductModel+"'";
                }
                if (HBillNo != "") {
                    sWhere += " and å·¥åºæµè½¬å¡å· = '" + HBillNo + "'";
                }
                if (com != "") {
                    sWhere += com;
                }
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                $("#HMaterNumber").val("");
                $("#HBillNo").val("");
                $("#HProductName").val("");
                $("#HProductModel").val("");
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                //form.render()
                ColFilter();
                sWhere = "";
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
                ColFilter();
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
        });
    </script>
</body>
</html>
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_DryFinalizeOutReport.html
New file
@@ -0,0 +1,570 @@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block" style="margin-left: 120px;width: 184px;">
                                        <select name="HState" lay-verify="HState" id="HState">
                                            <option value="0" selected="selected">全部</option>
                                            <option value="1">未开工</option>
                                            <option value="3">已入库</option>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-form layui-inline" style="position:relative;top:10px;">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HBeginDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">-</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HEndDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">-</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-inline">
                                    <label class="layui-form-label">合计米数</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="SumHMaterOutQty" id="SumHMaterOutQty" disabled="disabled">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <div style="padding-left: 10px;">
                                        <input type="checkbox" name="checkWRuku" id="checkWRuku" lay-skin="primary" lay-filter="checkWRuku" title="未下推及已入库">
                                    </div>
                                </div>-->
                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:10px;">
                                        <!--其他条件-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品代码</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品名称</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductName" id="HProductName">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">规格型号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductModel" id="HProductModel">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top:5px">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
                                                <option value="0" selected="selected"></option>
                                                <option value="=">=</option>
                                                <option value=">=">>=</option>
                                                <option value=">">></option>
                                                <option value="<="><=</option>
                                                <option value="<"><</option>
                                                <option value="<>"><></option>
                                                <option value="7">包含</option>
                                                <option value="8">左包含</option>
                                                <option value="9">右包含</option>
                                                <option value="10">不包含</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var HModName = "Kf_DryFinalizeOutReport";
            //#endregion
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //#region åˆå§‹åŒ–界面
            set_ClearBill();
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //退出
                    case 'btn-exit': Pub_Close(2);
                        break;
                    //隐藏列设置
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //行监听事件-单击
            table.on('row(mainTable)', function (obj) {
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
            //初始化界面
            function set_ClearBill() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                ////初始化时间
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 10), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //加载数据到网格
                get_FastQuery();
                DisPlay_HideColumn();
                //ColFilter();
            }
            //列明显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
                $("#ColName").append(Organization);
                form.render('select');
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/ProdProcessSumReport/Kf_DryFinalizeOutReport',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, "") > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else if (data[i].ColName == '白坯发布') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                    }
                                }
                            }
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , totalRow: true
                                , height: 'full-70'
                                , cols: [col]
                                , data: data1.data
                            };
                            table.render(option);
                            //计算合计公斤数
                            var sumHMaterOutQty = 0;
                            for (var i = 0; i < data1.data.length; i++) {
                                sumHMaterOutQty += data1.data[i]["出站合格数量"];
                            }
                            $("#SumHMaterOutQty").val(sumHMaterOutQty);
                            layer.close(wait);
                        }
                        else {
                            $("#SumHMaterOutQty").val("");
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        $("#SumHMaterOutQty").val("");
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //快速过滤
            function get_FastQuery() {
                var HBeginDate = $("#HBeginDate").val();//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate == '') {
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                } else {
                    HBeginDate = $("#HBeginDate").val() + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                }
                if (HEndDate == '') {
                    HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                } else {
                    HEndDate = $("#HEndDate").val() + ":00:00";//结束日期
                }
                var HMaterNumber = $("#HMaterNumber").val();//物料代码
                var HBillNo = $("#HBillNo").val();          //单据号
                var HProductName = $("#HProductName").val();//产品名称
                var HProductModel = $("#HProductModel").val();//产品规格
                //任意字段条件过滤 æ¡ä»¶æå–
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
                //拼接任一字段过滤查询条件
                var com = "";
                if (ColName != 0 && Comparator != 0) {
                    switch (Comparator) {
                        case "7":
                            com = "like '%" + ColContent + "%'";
                            break;
                        case "8":
                            com = "like '%" + ColContent + "'";
                            break;
                        case "9":
                            com = "like '" + ColContent + "%'";
                            break;
                        case "10":
                            com = "not like '%" + ColContent + "%'";
                            break;
                        default:
                            com = "" + Comparator + " '" + ColContent + "'";
                            break;
                    }
                    com = " and (" + ColName + " " + com + ")";
                }
                if (HBeginDate != "" && HEndDate != "") {
                    sWhere += " and æ—¥æœŸ between '" + HBeginDate + "' and '" + HEndDate + "'";
                }
                if (HMaterNumber != "") {
                    sWhere += " and äº§å“ä»£ç  = '" + HMaterNumber + "' and äº§å“åç§°='" + HProductName + "' and è§„格型号='" + HProductModel+"'";
                }
                if (HBillNo != "") {
                    sWhere += " and å·¥åºæµè½¬å¡å· = '" + HBillNo + "'";
                }
                if (com != "") {
                    sWhere += com;
                }
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                $("#HMaterNumber").val("");
                $("#HBillNo").val("");
                $("#HProductName").val("");
                $("#HProductModel").val("");
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                //form.render()
                ColFilter();
                sWhere = "";
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
                ColFilter();
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
        });
    </script>
</body>
</html>
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Kf_SizingFinalizeOutReport.html
New file
@@ -0,0 +1,570 @@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block" style="margin-left: 120px;width: 184px;">
                                        <select name="HState" lay-verify="HState" id="HState">
                                            <option value="0" selected="selected">全部</option>
                                            <option value="1">未开工</option>
                                            <option value="3">已入库</option>
                                        </select>
                                    </div>
                                </div>-->
                                <div class="layui-form layui-inline" style="position:relative;top:10px;">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HBeginDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item  layui-inline">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">-</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" id="HEndDate" placeholder="yyyy-MM-dd HH:mm:ss">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">-</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-inline">
                                    <label class="layui-form-label">合计米数</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="SumHMaterOutQty" id="SumHMaterOutQty" disabled="disabled">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <div style="padding-left: 10px;">
                                        <input type="checkbox" name="checkWRuku" id="checkWRuku" lay-skin="primary" lay-filter="checkWRuku" title="未下推及已入库">
                                    </div>
                                </div>-->
                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:10px;">
                                        <!--其他条件-->
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品代码</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">单据号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">产品名称</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductName" id="HProductName">
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label" style="width: 85px;">规格型号</label>
                                            <div class="layui-input-block" style="margin-left: 120px;">
                                                <input type="text" class="layui-input" name="HProductModel" id="HProductModel">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top:5px">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
                                                <option value="0" selected="selected"></option>
                                                <option value="=">=</option>
                                                <option value=">=">>=</option>
                                                <option value=">">></option>
                                                <option value="<="><=</option>
                                                <option value="<"><</option>
                                                <option value="<>"><></option>
                                                <option value="7">包含</option>
                                                <option value="8">左包含</option>
                                                <option value="9">右包含</option>
                                                <option value="10">不包含</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬å…±å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var HModName = "Kf_SizingFinalizeOutReport";
            //#endregion
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //#region åˆå§‹åŒ–界面
            set_ClearBill();
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //退出
                    case 'btn-exit': Pub_Close(2);
                        break;
                    //隐藏列设置
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });
            //行监听事件-单击
            table.on('row(mainTable)', function (obj) {
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
            //初始化界面
            function set_ClearBill() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                ////初始化时间
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 10), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                //加载数据到网格
                get_FastQuery();
                DisPlay_HideColumn();
                //ColFilter();
            }
            //列明显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
                $("#ColName").append(Organization);
                form.render('select');
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/ProdProcessSumReport/Kf_SizingFinalizeOutReport',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, "") > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else if (data[i].ColName == '白坯发布') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true });
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true });
                                    }
                                }
                            }
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , totalRow: true
                                , height: 'full-70'
                                , cols: [col]
                                , data: data1.data
                            };
                            table.render(option);
                            //计算合计公斤数
                            var sumHMaterOutQty = 0;
                            for (var i = 0; i < data1.data.length; i++) {
                                sumHMaterOutQty += data1.data[i]["出站合格数量"];
                            }
                            $("#SumHMaterOutQty").val(sumHMaterOutQty);
                            layer.close(wait);
                        }
                        else {
                            $("#SumHMaterOutQty").val("");
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        $("#SumHMaterOutQty").val("");
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //快速过滤
            function get_FastQuery() {
                var HBeginDate = $("#HBeginDate").val();//下达日期 å¼€å§‹æ—¥æœŸ
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate == '') {
                    HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                } else {
                    HBeginDate = $("#HBeginDate").val() + ":00:00";//下达日期 å¼€å§‹æ—¥æœŸ
                }
                if (HEndDate == '') {
                    HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh") + ":00:00";//结束日期
                } else {
                    HEndDate = $("#HEndDate").val() + ":00:00";//结束日期
                }
                var HMaterNumber = $("#HMaterNumber").val();//物料代码
                var HBillNo = $("#HBillNo").val();          //单据号
                var HProductName = $("#HProductName").val();//产品名称
                var HProductModel = $("#HProductModel").val();//产品规格
                //任意字段条件过滤 æ¡ä»¶æå–
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
                //拼接任一字段过滤查询条件
                var com = "";
                if (ColName != 0 && Comparator != 0) {
                    switch (Comparator) {
                        case "7":
                            com = "like '%" + ColContent + "%'";
                            break;
                        case "8":
                            com = "like '%" + ColContent + "'";
                            break;
                        case "9":
                            com = "like '" + ColContent + "%'";
                            break;
                        case "10":
                            com = "not like '%" + ColContent + "%'";
                            break;
                        default:
                            com = "" + Comparator + " '" + ColContent + "'";
                            break;
                    }
                    com = " and (" + ColName + " " + com + ")";
                }
                if (HBeginDate != "" && HEndDate != "") {
                    sWhere += " and æ—¥æœŸ between '" + HBeginDate + "' and '" + HEndDate + "'";
                }
                if (HMaterNumber != "") {
                    sWhere += " and äº§å“ä»£ç  = '" + HMaterNumber + "' and äº§å“åç§°='" + HProductName + "' and è§„格型号='" + HProductModel+"'";
                }
                if (HBillNo != "") {
                    sWhere += " and å·¥åºæµè½¬å¡å· = '" + HBillNo + "'";
                }
                if (com != "") {
                    sWhere += com;
                }
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                //初始化时间
                var HBeginDate = Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 1).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                var HEndDate = Format(new Date(new Date()).setHours(8, 0, 0, 0), "yyyy-MM-dd hh");
                laydate.render({
                    elem: '#HBeginDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HBeginDate
                });
                laydate.render({
                    elem: '#HEndDate',
                    type: 'datetime',
                    fullPanel: true
                    , format: 'yyyy-MM-dd HH'
                    , value: HEndDate
                });
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//结束日期
                $("#HMaterNumber").val("");
                $("#HBillNo").val("");
                $("#HProductName").val("");
                $("#HProductModel").val("");
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                //form.render()
                ColFilter();
                sWhere = "";
            }
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";
                for (var i = 1; i < option.cols[0].length; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //显示列数据
            function DisPlay_HideColumn() {
                ColFilter();
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
        });
    </script>
</body>
</html>