chenhaozhe
2025-05-21 e50265de5ae4e5e4c8b8852e777216adab7c4ce4
WebTM/views/ÖÊÁ¿¹ÜÀí/ÖÊÁ¿±¨±í/QC_ErrManagerLedgerReport_SourceOfTheProblem.html
@@ -41,12 +41,38 @@
                                            <!--动态渲染年份-->
                                        </select>
                                    </div>
                                </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">月份:</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 85px;">
                                        <select name="HMonth" id="HMonth" lay-verify="HMonth">
                                            <!--动态渲染月份-->
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">是否量产</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                        <select name="HBatchWork" id="HBatchWork" lay-verify="HBatchWork">
                                            <option value="">请选择</option>
                                            <option value="1">量产</option>
                                            <option value="0">非量产</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">项目号</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                        <select name="HProject" id="HProject" class=" ForFilteringSchemes" lay-verify="HProject">
                                            <!--动态渲染组织-->
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">事业部</label>
                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                        <select name="HDivisionName" id="HDivisionName" class=" ForFilteringSchemes" lay-verify="HDivisionName">
                                            <!--动态渲染组织-->
                                        </select>
                                    </div>
                                </div>
@@ -76,6 +102,7 @@
                        </div>
                        <script type="text/html" id="toolbarDemo">
                            <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="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                            </div>
@@ -107,6 +134,7 @@
            //查询条件
            var sWhere = "";
            var option = [];
            var ins;                //用于导出excel
            var HModName = "QC_ErrManagerLedgerReport_SourceOfTheProblem";
            var HSourceOfTheProblem = []; //异常问题来源
            //#endregion
@@ -360,6 +388,9 @@
                    case 'HideColumn':
                        get_HideColumn();
                        break;
                    //导出按钮
                    case 'btn_Export': btn_Export();
                        break;
                };
            });
            //重置按钮
@@ -378,7 +409,9 @@
            //初始化界面
            function set_ClearBill() {
                Year();
                Month();
                Month();
                Get_HProject(); //获取项目号
                GetGy_Division();//获取事业部
                //初始化表格
                set_InitGrid();
                //加载数据到网格
@@ -428,15 +461,13 @@
            }
            //加载网格
            function get_Display(DateYear) {
                var HYear = $("#HYear").val();
                var HMonth = $("#HMonth").val();
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                $.ajax({
                    url: GetWEBURL() + '/QC_CustomerAppealReport/QC_ErrManagerLedgerReport_SourceOfTheProblem',
                    type: "GET",
                    async: false,
                    data: { "HYear": HYear, "HMonth": HMonth, "user": sessionStorage["HUserName"] },
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        var col = [];
                        if (data1.count == 1) {
@@ -478,6 +509,7 @@
                            option.data = data1.data;
                            table.render(option);
                            ins = table.render(option);
                            layer.close(wait);
                        } else {
                            layer.close(wait);
@@ -492,7 +524,19 @@
            //快速过滤
            function get_FastQuery() {
                get_Display(sWhere);
                var HYear = $("#HYear").val();
                var HMonth = $("#HMonth").val();
                var HProject = $("#HProject").val();//项目号
                var HBatchWork = $("#HBatchWork").val();//是否量产
                var HDivisionName = $("#HDivisionName").val();//事业部
                sWhere = {
                    HYear: HYear
                    , HMonth: HMonth
                    , HProject: HProject
                    , HBatchWork: HBatchWork
                    , HDivisionName: HDivisionName
                }
                get_Display(JSON.stringify(sWhere));
                //调用接口后清空sWhere缓存
                sWhere = "";
                set_Graphics();
@@ -503,13 +547,73 @@
                var yyyy = new Date().getFullYear();
                $("#HYear").val(yyyy);
                var mm = new Date().getMonth() + 1;
                $("#HMonth").val(mm)
                $("#HMonth").val(mm);
                $("#HProject").val("");
                $("#HBatchWork").val("");
                $("#HDivisionName").val("");
                form.render('select');
                sWhere = "";
                get_FastQuery();
            }
            //#region èŽ·å–é¡¹ç›®å·
            function Get_HProject() {
                //获取项目号
                var HProjectList = '<option value="" style="color:red;" selected></option>';
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Gy_Material/Get_HProject",
                    async: false,
                    data: { "HOrgID": sessionStorage["OrganizationID"] },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                HProjectList += '<option  style="color:blue;"  value="' + data[i].HName + '" >' + data[i].HName + '</option>';
                            }
                            $("#HProject").append(HProjectList);
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //#endregion
            //#region èŽ·å–äº‹ä¸šéƒ¨
            function GetGy_Division() {
                //获取事业部
                var HDivisionList = '<option value="" style="color:red;" selected></option>';
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Gy_Material/Get_Gy_Division",
                    async: false,
                    data: { "HOrgID": sessionStorage["OrganizationID"] },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
                            for (var i = 0; i < data.length; i++) {
                                HDivisionList += '<option  style="color:blue;"  value="' + data[i].HName + '" >' + data[i].HName + '</option>';
                            }
                            $("#HDivisionName").append(HDivisionList);
                            form.render('select');
                        }
                        layer.closeAll("loading");
                    }
                })
            }
            //#endregion
            //#region å¯¼å‡ºExecel
            function btn_Export() {
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";