zzr99
2022-06-27 18c97e7f0b430faacfeee3abebf3d9fb17e382ef
WebTM/views/Éú²ú¹ÜÀí/Éú²ú×°Ïäµ¥/QK_PackedBillList.html
@@ -49,9 +49,15 @@
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">日期</label>
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HDate" style="width:190px;">
                                        <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">
@@ -172,7 +178,8 @@
           //#region å½“前页面加载所有方法
           // åˆå§‹åŒ–界面
           function set_ClearBill() {
               $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));
               $("#HBeginDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));
               $("#HEndDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));
               //初始化表格(主表)
                set_InitGrid();
                //初始化表格(子表)
@@ -250,9 +257,10 @@
            //查询
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                var HDate = $("#HDate").val();//结束日期
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),制单日期, 23) >= '" + HDate + "'";
                var HBeginDate = $("#HBeginDate").val();//结束日期
                if (HBeginDate) {
                    sWhere +=  " and HDeptID=113546 and åˆ¶å•人='" + sessionStorage["HUserName"] + " and CONVERT(varchar(100),制单日期, 23) >= '" + HBeginDate + "'";
                }
                //进入页面显示的缓存列表
                $.ajax({
@@ -277,12 +285,12 @@
            //快速过滤
            function get_FastQuery() {
                var HBarCode = $("#HBarCode").val();//单据号
                var HMaterName = $("#HMaterName").val();
                var HSourceBillNo = $("#HSourceBillNo").val();
                var HMakerName = $("#HMakerName").val();
                var HDate = $("#HDate").val();//结束制单时间
                var HBeginDate = $("#HBeginDate").val();//开始制单时间
                var HEndDate = $("#HEndDate").val();//开始制单时间
                if (HBarCode) {
                    sWhere += " and HBarCode like '%" + HBarCode + "%'";
                }
@@ -295,8 +303,11 @@
                if (HMakerName) {
                    sWhere += " and åˆ¶å•人 like '%" + HMakerName + "%'";
                }
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),制单日期, 23) >= '" + HDate + "'";
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),制单日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),制单日期, 23) <= '" + HEndDate + "'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
@@ -308,7 +319,8 @@
                $("#HMaterName").val("");//单据号
                $("#HSourceBillNo").val("");//销售订单号
                $("#HMakerName").val("");//制单人
                $("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//时间
                $("#HBeginDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//时间
                $("#HEndDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//时间
                sWhere = "";
                get_Display(sWhere);
            }