wtt
2025-11-10 5a41caded26a3b4a5aeb9cbcd83ba4fcf60fd3ee
WebTM/views/É豸¹ÜÀí/É豸±¨±í/Sb_EquipMentCollectionTechParam.html
@@ -42,14 +42,14 @@
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HDate" 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 ForFilteringSchemes" id="HEndDate" style="width:190px;">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HDate1" style="width:190px;">
                                    </div>
                                </div>
@@ -204,7 +204,7 @@
            //#endregion
            //不需要显示的字段 å¯æ‰©å±•
            var titleData = ["HItemID", "工艺参数"];
            var titleData = ["HItemID", "工艺参数", "工序", "同步标记"];
            //#endregion
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
@@ -328,17 +328,17 @@
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                if (HInitTimeCycle != -1) {
                    $('#HBeginDate').prop('disabled', true);
                    $('#HEndDate').prop('disabled', true);
                    $('#HDate').prop('disabled', true);
                    $('#HDate1').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"));
                    $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                    $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
                    //执行查询方法
                    get_FastQuery();
                } else {
                    $('#HBeginDate').prop('disabled', false);
                    $('#HEndDate').prop('disabled', false);
                    $('#HDate').prop('disabled', false);
                    $('#HDate1').prop('disabled', false);
                }
            });
@@ -349,21 +349,21 @@
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                if (HInitTimeCycle != -1) {
                    $('#HBeginDate').prop('disabled', true);
                    $('#HEndDate').prop('disabled', true);
                    $('#HDate').prop('disabled', true);
                    $('#HDate1').prop('disabled', true);
                } else {
                    $('#HBeginDate').prop('disabled', false);
                    $('#HEndDate').prop('disabled', false);
                    $('#HDate').prop('disabled', false);
                    $('#HDate1').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"));
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化表格
                set_InitGrid();
                //直接执行列表筛选 åŠ è½½æ•°æ®åˆ°ç½‘æ ¼
                get_FastQuery(table, option, 1);
                //查询当前登录用户有没有在当前模块设置默认过滤方案
                get_DefaultModule();
              /*  get_DefaultModule();*/
            }
            //初始化表格
@@ -431,22 +431,18 @@
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            var totalArray = ["数量"];
                            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', totalRowText: '合计'});
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                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 == '单据号') {
                                else if (data[i].name == '单据号') {
                                    col.push({
                                        field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '单据号', event: '单据号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.单据号 + '</span>'
@@ -521,40 +517,13 @@
                    }
                });
            }
            //获取列宽
            function getColumnsWidth() {
                var result = [];
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                //获取列宽
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/list',
                    async: false,
                    type: "Get",
                    dataType: "json",
                    data: { "colNum": colNum, "Name": Name },
                    success: function (data1) {
                        if (data1.code == 1) {
                            result = data1.data;
                        }
                        else if (data1.code == -1) {
                        }
                        else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                return result;
            }
            //快速过滤
            function get_FastQuery(table, option,number) {
                var HSourceCode = $("#HSourceCode").val();//设备编码
                var HTechParamName = $("#HTechParamName").val();//结束日期
                var HTechParamName = $("#HTechParamName").val();//设备编码
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                //任意字段过滤
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
@@ -637,10 +606,16 @@
                if (HTechParamName) {
                    sWhere += " and å·¥è‰ºå‚数名称 like '%" + HTechParamName + "%'";
                }
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
                if (HDate1) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HDate1 + "'";
                }
                sWhere += addSWhereByOpenType();
                //添加查询条件,根据当前登录用户关联职员返回数据
                //sWhere += " and HUserID =" + sessionStorage["Czybm"]
                sWhere += "     order by  æ—¥æœŸ  desc";
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
@@ -650,7 +625,8 @@
            //重置过滤条件
            function set_ClearQuery() {
                $("#HSourceCode").val("");
                $("#HTechParamName ").val("");
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //开始日期
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));  //结束日期
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
@@ -705,7 +681,7 @@
                $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
                form.render('select');
                $("#HInitTimeCycle").val("29");
                $("#HInitTimeCycle").val("4");
            }
            //#endregion
@@ -763,18 +739,18 @@
                            var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
                            //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
                            if (HInitTimeCycle != -1) {
                                $('#HBeginDate').prop('disabled', true);
                                $('#HEndDate').prop('disabled', true);
                                $('#HDate').prop('disabled', true);
                                $('#HDate1').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"));
                                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
                                //执行查询方法
                                get_FastQuery();
                            } else {
                                $('#HBeginDate').prop('disabled', false);
                                $('#HEndDate').prop('disabled', false);
                                $('#HDate').prop('disabled', false);
                                $('#HDate1').prop('disabled', false);
                            }
                            //执行查询方法