1
pzy
2024-08-11 db08b0f3239df006eadea02d004451ab6a90eb5f
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Gy_BarCodeBill_OutList.html
@@ -29,7 +29,7 @@
                                        <span>更多</span>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">日期间隔</label>
                                    <div class="layui-input-block">
                                        <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
@@ -47,7 +47,7 @@
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                </div>-->
                               
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch" style="margin-left:10px">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
@@ -242,41 +242,41 @@
            });
            //日期间隔下拉列表监听
            form.on('select(HInitTimeCycle)', function (data) {
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                if (HInitTimeCycle != -1) {
                    $('#HBeginDate').prop('disabled', true);
                    $('#HEndDate').prop('disabled', true);
            //form.on('select(HInitTimeCycle)', function (data) {
            //    var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
            //    //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
            //    if (HInitTimeCycle != -1) {
            //        $('#HBeginDate').prop('disabled', true);
            //        $('#HEndDate').prop('disabled', true);
                    $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                    $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
            //        $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
            //        $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                    //执行查询方法
                    get_FastQuery();
                } else {
                    $('#HBeginDate').prop('disabled', false);
                    $('#HEndDate').prop('disabled', false);
                }
            });
            //        //执行查询方法
            //        get_FastQuery();
            //    } else {
            //        $('#HBeginDate').prop('disabled', false);
            //        $('#HEndDate').prop('disabled', false);
            //    }
            //});
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化日期间隔、开始日期、结束日期
                setSelect_HInitTimeCycle();
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                if (HInitTimeCycle != -1) {
                    $('#HBeginDate').prop('disabled', true);
                    $('#HEndDate').prop('disabled', true);
                } else {
                    $('#HBeginDate').prop('disabled', false);
                    $('#HEndDate').prop('disabled', false);
                }
                ////初始化日期间隔、开始日期、结束日期
                //setSelect_HInitTimeCycle();
                ////若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                //var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                //if (HInitTimeCycle != -1) {
                //    $('#HBeginDate').prop('disabled', true);
                //    $('#HEndDate').prop('disabled', true);
                //} else {
                //    $('#HBeginDate').prop('disabled', false);
                //    $('#HEndDate').prop('disabled', false);
                //}
                //根据日期间隔设置开始时间与结束时间
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                ////根据日期间隔设置开始时间与结束时间
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化表格
             
                set_InitGrid();
@@ -396,7 +396,10 @@
                                else if ($.inArray(data[i].name, totalArray) > -1) { //计算列  
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
                                } else if (data[i].name == '单据号') {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号' });
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
                                        }, style: 'cursor: pointer;' });
                                } else {
                                    switch (data[i].Type) {
                                        //int
@@ -452,8 +455,8 @@
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery() {
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                //var HBeginDate = $("#HBeginDate").val();//开始日期
                //var HEndDate = $("#HEndDate").val();//结束日期
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
@@ -527,12 +530,12 @@
                    }
                    sWhere += " and " + ColName2 + " " + com2;
                }
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                //if (HBeginDate) {
                //    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                //}
                //if (HEndDate) {
                //    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                //}
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
@@ -561,8 +564,8 @@
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶æ–¹æ³•
            function set_ClearQuery() {
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //开始日期
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //结束日期
                //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //开始日期
                //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));  //结束日期
                $("#btnSearch").click();
                $("#ColContent").val("");
                $("#ColName").val("0");
@@ -823,21 +826,21 @@
                form.render('select');
            }
            //#region åˆå§‹æ—¥æœŸé—´éš” ä¸‹æ‹‰åˆ—表
            function setSelect_HInitTimeCycle() {
                var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
                var titleList = ["今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"];
            //function setSelect_HInitTimeCycle() {
            //    var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
            //    var titleList = ["今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"];
                var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >任意间隔</option>';
                for (var i = 0; i < valueList.length; i++) {
                    HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
                }
            //    var HInitTimeCycle_ArrayList = '<option  value="-1" selected="selected" >任意间隔</option>';
            //    for (var i = 0; i < valueList.length; i++) {
            //        HInitTimeCycle_ArrayList += '<option  style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
            //    }
                $("#HInitTimeCycle").empty();
                $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
                form.render('select');
            //    $("#HInitTimeCycle").empty();
            //    $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
            //    form.render('select');
                $("#HInitTimeCycle").val("29");
            }
            //    $("#HInitTimeCycle").val("29");
            //}
            //获取参数
            function getUrlVars() {