YL
2021-09-08 d4066580b24114d16ef00b496821a9c963e9366d
WebTM/views/É豸¹ÜÀí/Sb_EquipDotCheckPlanBillList.html
@@ -37,7 +37,7 @@
                                            <option value="ZHSJ">上架归还单</option>
                                        </select>
                                    </div>
                                </div>-->
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
@@ -49,32 +49,31 @@
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                    </div>
                                </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-colla-content">
                                <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>-->
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">开始时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">结束时间</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                        </div>
                                    </div>
                                </div>-->
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
@@ -117,7 +116,6 @@
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var index = layer.load(0);
            var option = [];
@@ -126,7 +124,7 @@
            //初始化页面加载
            set_ClearBill();
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
@@ -215,14 +213,14 @@
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: 'hmainid', hide: true }
                        , { field: '日期', title: '日期', width: 160 ,templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: '单据类型', title: '单据类型', width: 160, hide: true }
                        , { field: '设备代码', title: '设备代码', width: 200 }
                        , { field: '设备名称', title: '设备名称', width: 200, hide: true }
                        , { field: '表头备注', title: '表头备注', width: 200, hide: true }
                        , { field: '开始日期', title: '开始日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '结束日期', title: '结束日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '开始日期', title: '开始日期', width: 200 }
                        , { field: '结束日期', title: '结束日期', width: 200 }
                        , { field: '周期单位', title: '周期单位', width: 200 }
                        , { field: '点检周期', title: '点检周期', width: 200 }
                        , { field: '摘要', title: '摘要', width: 200 }
@@ -238,16 +236,16 @@
                        , { field: '行关闭人', title: '行关闭人', width: 115, hide: true }
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200, hide: true }
                        , { field: '制单人', title: '制单人', width: 115 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '审核人', title: '审核人', width: 200 }
                        , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 200 }
                        , { field: '修改日期', title: '修改日期', width: 115, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true }
                        , { field: '修改人', title: '修改人', width: 200, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true }
                        , { field: '关闭人', title: '关闭人', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '作废人', title: '作废人', width: 200 }
                        , { field: '作废日期', title: '作废日期', width: 115, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '作废人', title: '作废人', width: 200, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
@@ -256,36 +254,23 @@
                    ]]
                };
            }
            //重置过滤条件
            function set_ClearQuery() {
                //$("#HBillType").val("");//单据类型
                $("#HBillNo").val("");//单据号
                $("#HSourceBillNo").val("");//源单号
                $("#HCreateBy").val("");//制单人
                $("#BenginHCreateDate").val("");//开始制单时间
                $("#EndHCreateDate").val("");//结束制单时间
                sWhere = "";
                $("#btnSearch").click();
                $("#HNumber").val("");
                $("#HName").val("");
            }
            //快速过滤
            function get_FastQuery(table, option) {
               //var HBillType = $("#HBillType").val();//单据类型
                var HBillNo = $("#HBillNo").val();//单据号
                var HCreateBy = $("#HCreateBy").val();//制单人
                var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HCreateBy) {
                    sWhere += " and åˆ¶å•人 like '%" + HCreateBy + "%'";
                }
                if (BenginHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + BenginHCreateDate + "'";
                }
                if (EndHCreateDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + EndHCreateDate + "'";
                }
                //var HNumber = $("#HNumber").val();
                //var HName = $("#HName").val();
                //if (HNumber) {
                //    sWhere += " and èŒå‘˜ä»£ç  like '%" + HNumber + "%'";
                //}
                //if (HName) {
                //    sWhere += " and èŒå‘˜åç§° like '%" + HName + "%'";
                //}
                var index = layer.load(0);
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -299,7 +284,7 @@
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html??OperationType=1&linterid=&HSouceBillType=',
                    content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html',
                    end: function () {
                        //刷新页面,
                        location.reload();
@@ -314,7 +299,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    var hID = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
@@ -323,7 +308,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                        , content: '../设备管理/Sb_EquipDotCheckPlanBillEdit.html?hID=' + hID
                        , resize: false,
                        end: function () {
                            //刷新页面,
@@ -375,6 +360,7 @@
                    layer.msg('请选择一行数据删除!');
                }
            }
            //#endregion
        });