wtt
2025-04-29 570872d8ad64e8330399819cda7cb7643bf49cfb
三升排产要料报表添加导出列设置功能
2个文件已修改
90 ■■■■■ 已修改文件
WebTM/views/生产管理/三升排产/JIT_DayPlanPlatForm.html 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/日计划报表/ReportWorkDemandPlanBillList.html 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/ÈýÉýÅŲú/JIT_DayPlanPlatForm.html
@@ -36,6 +36,7 @@
                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnLockOrder" id="btnLockOrder">锁定工单</button>
                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnUnlockOrder" id="btnUnlockOrder">解锁工单</button>
                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnCompleteSetAnalysis" id="btnCompleteSetAnalysis">齐套分析</button>
                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnYLYS" id="btnYLYS">要料运算</button>
                            <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnTLYS" id="btnTLYS">提料运算</button>
                            <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btn_Calculate" id="btn_Calculate">欠料运算</button>-->
                            <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnRoutEdit" id="btnRoutEdit">工艺路线</button>-->
@@ -725,7 +726,16 @@
                })
            }
        })
        //要料运算
        form.on('submit(btnYLYS)', function (data) {
            layer.confirm('你确定要执行操作吗,请先确保排产数据已保存?', {
                btn: ['确定', '取消'] //按钮
                , btn1: function (index, layero) {
                    get_btnYLYS();
                    layer.close(index);
                }
            })
        })
        //提料运算
        form.on('submit(btnTLYS)', function (data) {
            if (set_ModCheck("Sc_WorkBillSortBill_tlys") == true) {
@@ -2364,7 +2374,33 @@
                }
            });
        }
        //要料运算
        function get_btnYLYS() {
            sWhere = {
                HProdORGID: $("#HProdORGID").val()
                , HWorkShopID: $("#HWorkShopID").val()
            }
            sWhere = JSON.stringify(sWhere);
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/JIT_DayPlanPlatFormBill/JIT_YLYS',
                type: "GET",
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.count == 1) {
                        get_FastQuery(2);
                        layer.msg(data1.Message);
                        layer.close(ajaxLoad);
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
        }
        //提料运算
        function get_btnTLYS() {
            if ($("#HWorkShopID").val() == 0) {
@@ -4133,7 +4169,6 @@
                            , limit: 200
                            , cellMinWidth: 90
                        }
                        table.render(option2);
                        //刷新表格数据
                        DisPlay_HideColumn_ICMO();
@@ -4382,6 +4417,7 @@
            $.ajax({
                url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                type: "GET",
                async: false,
                data: { "HModName": HModName + "Main", "user": sessionStorage["HUserName"] },
                success: function (data1) {
                    if (data1.data.length != 0) {
@@ -4452,9 +4488,9 @@
                                option2.cols[0][i + 1]["fixed"] = "left";
                            }
                        }
                        table.render(option2);
                        /*table.render(option2);*/
                    } else {
                        table.render(option2);
                        /*table.render(option2);*/
                    }
                }, error: function () {
                    layer.alert("接口请求失败!", { icon: 5 });
WebTM/views/Éú²ú¹ÜÀí/Èռƻ®±¨±í/ReportWorkDemandPlanBillList.html
@@ -12,6 +12,7 @@
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/soulTable.slim.js"></script>
    <script src="../../../layuiadmin/SetColumn.js"></script>
</head>
<body>
    <div class="layui-fluid">
@@ -159,6 +160,12 @@
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideColumn"><i class="layui-icon layui-icon-form"></i>隐藏列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导出</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
@@ -190,6 +197,8 @@
            , soulTable = layui.soulTable
        var sWhere = "";
        var option = [];
        var HModName = "ReportWorkDemandPlanBill";
        var ins = [];
        //#endregion
        //#region è¿›å…¥é¡µé¢å³åŠ è½½
@@ -200,6 +209,20 @@
        //#endregion
        //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
        //头工具栏事件
        table.on('toolbar(mainTable)', function (obj) {
            switch (obj.event) {
                //隐藏列设置
                case 'HideColumn':
                    get_HideColumnNoPageForPlan(HModName, option, get_FastQuery);
                    break;
                //导出excel
                case 'get_export':
                    get_Export();
                    break;
            };
        });
        //#region äº§å“ç¼–码
        form.on('submit(btnHMATERIALID)', function (data) {
@@ -291,7 +314,7 @@
                    j = 0;
                }
            }
            columns.push({ field: '', title: '计划明细_合计' });
            columns.push({ field: '计划明细_合计', title: '计划明细_合计' });
            option = {
                elem: '#mainTable'
@@ -333,6 +356,21 @@
            })
        }
        function get_Export() {
            var data = option.data;
            data.forEach((item) => {
                for (let itemobj in item) {
                    if (item[itemobj] == null) {
                        item[itemobj] = "";
                    }
                    if (item[itemobj].length > 0) {  // å‡è®¾å­—段名为field
                        item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');  // å°†æ¢è¡Œç¬¦æ›¿æ¢ä¸ºç©ºå­—符串
                    }
                }
            });
            table.exportFile(ins.config.id, data, "xls");
        }
        //#region æŸ¥è¯¢
        function get_Display(sWhere) {
            var ajaxLoad = layer.load();
@@ -343,7 +381,9 @@
                success: function (result) {
                    if (result.count == 1) {
                        option.data = result.data;
                        table.render(option);
                        //列设置
                        DisPlay_HideColumnForPlan(HModName, sessionStorage["HUserName"], option);
                        ins = table.render(option);
                        layer.close(ajaxLoad);
                        //layer.alert("查询成功", { icon: 1 });
                    } else {