chenhaozhe
2025-05-21 94853e46b9d4911fb4cf00389f00a4b820db5d3c
WebTM/views/ÖÊÁ¿¹ÜÀí/ÖÊÁ¿±¨±í/QC_RegistrationForTestingReport.html
@@ -102,6 +102,7 @@
                        </div>
                        <script type="text/html" id="toolbarDemo1">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                            </div>
                        </script>
@@ -131,8 +132,9 @@
            , soulTable = layui.soulTable
        var sWhere = "";
        var option = [];
        var ins;                //用于导出excel
        var HModName = "QC_RegistrationForTestingReport";
        var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID"];//子表不需要显示的字段 å¯æ‰©å±•
        var titleData = ["HInterID", "HEntryID", "HBadReasonID", "HSourceInterID", "HSourceEntryID", "HInterIDLKY","HInterIDSZB"];//子表不需要显示的字段 å¯æ‰©å±•
        //#endregion
@@ -152,6 +154,9 @@
            switch (obj.event) {
                //列设置
                case 'set_HideColumn': get_HideColumn();
                    break;
                //导出按钮
                case 'btn_Export': btn_Export();
                    break;
            };
        });
@@ -273,10 +278,17 @@
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                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: '检验单单号', templet: function (d) {
                                            return '<span style="color: blue;">' + d.检验单单号 + '</span>'
                                        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 if (data[i].name == '轮廓仪') {//添加超链接
                                    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;'
                                    });
                                }
@@ -318,15 +330,10 @@
                            option.data = data1.data
                        }
                        table.render(option);
                        ins = table.render(option);
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                        //    ColFilter();
                        //}
                        layer.close(ajaxLoad);
                    } else {
@@ -431,9 +438,64 @@
        table.on('tool(mainTable)', function (obj) {
            var data = obj.data;
            if (obj.event == '检验单单号') {
                const HBillNo = data.检验单单号.substring(0, 2);
                var linterid = data.HInterID;
            if (obj.event == '三坐标') {
                const HBillNo = data.三坐标.substring(0, 2);
                var linterid = data.HInterIDSZB;
                if (HBillNo == "SJ") {
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '查看首件检验单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../首件检验单/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
                        , resize: false,
                        end: function () {
                        }
                        , cancel: function () {
                        }
                    })
                }
                else if (HBillNo == "XJ") {
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '查看巡检记录单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../巡检记录单/QC_Add_Edit_PatrolProcCheckOtherill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
                        , resize: false,
                        end: function () {
                        }
                        , cancel: function () {
                        }
                    })
                }
                else if (HBillNo == "GX") {
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '查看末检检验单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../工序检验单/QC_ProcessCheckBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0'
                        , resize: false,
                        end: function () {
                        }
                        , cancel: function () {
                        }
                    })
                }
            }
            if (obj.event == '轮廓仪') {
                const HBillNo = data.轮廓仪.substring(0, 2);
                var linterid = data.HInterIDLKY;
                if (HBillNo == "SJ") {
                    layer.open({
                        type: 2
@@ -488,7 +550,11 @@
            }
        });
    
        //#region å¯¼å‡ºExecel
        function btn_Export() {
            table.exportFile(ins.config.id, option.data, "xls");
        }
        //#endregion
        //隐藏列设置
        function get_HideColumn() {