yangle
2023-11-03 739ae40378b41b89597542b0fcfb6f54072a3f73
计划平台优化
3个文件已修改
141 ■■■■■ 已修改文件
WebTM/views/生产管理/日计划报表/MaterialShorAnalysisReport.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/齐套分析/JIT_CompleteDetailList.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/Èռƻ®±¨±í/MaterialShorAnalysisReport.html
@@ -156,11 +156,11 @@
        function set_InitGrid() {
            var columns = [];
            columns.push({ type: 'checkbox', fixed: 'left' });
            columns.push({ field: 'HOrgName', title: '采购组织', sort: true});
            columns.push({ field: 'FNUMBER', title: '物料编码', sort: true});
            columns.push({ field: 'HMaterName', title: '物料名称', sort: true});
            columns.push({ field: 'HMaterModel', title: '物料规格', sort: true});
            columns.push({ field: '在途数量', title: '在途数量' });
            columns.push({ field: 'CountHQty', title: '合计', sort: true});
            columns.push({ field: 'FBASEQTY', title: '即时库存数量', sort: true});
            //获取两个月期之间的相差
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¼Æ»®Æ½Ì¨/JIT_DayPlanPlatForm.html
@@ -225,7 +225,6 @@
            , soulTable = layui.soulTable
            , element = layui.element;
        var sWhere = "";
        var option = [];
        var HModName = "JIT_DayPlanPlatForm";
@@ -607,166 +606,137 @@
            columns.push({ field: '今日之前日计划数量', title: '今日之前日计划数量', width: 150, sort: true });//0
            columns.push({ field: '计划开始日期', title: '预计开工日期', width: 150, templet: "<div>{{d.计划开始日期 ==null ?'':layui.util.toDateString(d.计划开始日期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ field: '计划结束日期', title: '计划结束日期', width: 150, event: "HPlanEndDate", sort: true });
            columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true, sort: true });
            columns.push({ field: '生产车间', title: '生产车间', width: 150, sort: true });
            columns.push({ field: '订单可排数量', title: '订单可排数量', width: 150});
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150, edit: 'text' });
            columns.push({ field: '昨日数量', title: '昨日数量'});
            columns.push({ field: '生产车间', title: '生产车间', width: 150});
            columns.push({ field: '生产资源', title: '生产资源', width: 150, edit: 'text', event: "HSourceID", sort: true });
            columns.push({ field: '生产资源', title: '生产资源', width: 150, edit: 'text', event: "HSourceID" });
            columns.push({
                field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 1 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 1 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 2 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 2 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 3 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 3 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 4 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 4 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 5 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 5 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 6 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 6 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 7 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 7 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 8 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 8 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 9 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 9 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 10 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 10 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                }  })//0
            columns.push({
                field: Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 11 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 11 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 12 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 12 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 13 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 13 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 14 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 14 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 15 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 15 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 16 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 16 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 17 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 17 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 18 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 18 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 19 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 19 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 20 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 20 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 21 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 21 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 22 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 22 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                }  })//0
            columns.push({
                field: Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 23 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 23 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 24 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 24 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 25 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 25 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 26 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 26 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 27 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 27 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 28 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 28 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 29 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 29 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                } })//0
            columns.push({
                field: Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 30 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 30 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd')]);
                }
            })//0
                }  })//0
            columns.push({ field: 'T31', title: 'T31', width: 70 });//0
            columns.push({ field: '订单类型', title: '订单类型', width: 150, sort: true });
@@ -787,15 +757,17 @@
            columns.push({ field: 'hmainid', title: '日计划工单主码', width: 150, sort: true });
            columns.push({ field: '电压/功率/底板', title: '电压/功率/底板', width: 150, sort: true });
            columns.push({ field: '计量单位', title: '计量单位', width: 150, sort: true });
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150, sort: true });//0
            columns.push({ field: '订单可排数量', title: '订单可排数量', width: 150, sort: true });
            columns.push({ field: '未入库数量', title: '未入库数量', width: 150, sort: true });//0
            columns.push({ field: 'HICMOInterID', title: 'HICMOInterID', width: 150, hide: true, sort: true });
            columns.push({ field: 'HGroupID', title: 'HGroupID', width: 150, hide: true, sort: true });
            columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide: true, sort: true });
            columns.push({ field: '生产资源代码', title: '生产资源代码', width: 150, hide: true, sort: true });
            columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true, sort: true });
            columns.push({ field: 'HMaterID', title: 'HMaterID', hide: true, sort: true });
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150 });//0
            columns.push({ field: '未入库数量', title: '未入库数量', width: 150 });//0
            columns.push({ field: 'HICMOInterID', title: 'HICMOInterID', width: 150, hide:true });
            columns.push({ field: 'HGroupID', title: 'HGroupID', width: 150, hide:true });
            columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide:true });
            columns.push({ field: '生产资源代码', title: '生产资源代码', width: 150, hide: true });
            columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
            columns.push({ field: 'HMaterID', title: 'HMaterID', hide: true });
            columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
            columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true });
            columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true });
            columns.push({ fixed: 'right', title: '操作', toolbar: '#barDemo' });
            option = {
@@ -806,9 +778,6 @@
                , cellMinWidth: 90
                , cols: [columns]
                , limit: Number.MAX_VALUE//默认显示全部
                , done: function (res, curr, count) {
                    soulTable.render(this);
                }
                //, done: function (res, page, count) {
                //    var that = this.elem.next();
                //    res.data.forEach(function (item, index) {
@@ -1824,9 +1793,12 @@
                                        //}
                                    }
                                    else {
                                        if (sLeftQty > parseFloat(sWorkQty * ds[i]["最大剩余工时"])) {
                                            grd.data[iRow][grd.cols[0][j + HPlanDay].field] = parseFloat(sWorkQty * ds[i]["最大剩余工时"]);
                                            sLeftQty = sLeftQty - (parseFloat(sWorkQty * ds[i]["最大剩余工时"]));
                                        var dayWorkQty = sWorkQty * ds[i]["剩余工时"];
                                        var Numzu = dayWorkQty.split('.');
                                        dayWorkQty = Numzu[0] + 1;
                                        if (sLeftQty > dayWorkQty) {
                                            grd.data[iRow][grd.cols[0][j].field] = dayWorkQty;
                                            sLeftQty = sLeftQty - dayWorkQty;
                                            //oSub = new ClsGridValues();
                                            //oSub.iRow = iRow;
                                            //oSub.iCol = j;
@@ -1924,7 +1896,6 @@
                                        } else {
                                            dayWorkQty = parseInt(Numzu[0]);
                                        }
                                        if (sLeftQty > dayWorkQty) {
                                            grd.data[iRow][grd.cols[0][j].field] = dayWorkQty;
                                            sLeftQty = sLeftQty - dayWorkQty;
@@ -1938,7 +1909,7 @@
                                            //oClsGridValues.Add(oSub);
                                        }
                                        else {
                                            grd.data[iRow][grd.cols[0][j + HPlanDay].field] = Math.round(sLeftQty * 10) / 10;
                                            grd.data[iRow][grd.cols[0][j].field] =  Math.round(sLeftQty * 10) / 10;
                                            //option.data[iRow]["HUseTimes"] = parseFloat(sLeftQty / sWorkQty);
                                            sLeftQty = 0;
                                            //oSub = new ClsGridValues();
WebTM/views/Éú²ú¹ÜÀí/ÆëÌ×·ÖÎö/JIT_CompleteDetailList.html
@@ -241,6 +241,8 @@
                    , { field: '齐套状态', title: '齐套状态', sort: true }
                    , { field: '齐套数量', title: '齐套数量', sort: true }
                    , { field: '缺料数量', title: '缺料数量', sort: true }
                    , { field: '采购在途', title: '采购在途' }
                    , { field: '生产未入库', title: '生产未入库' }
                    , { field: '领料占用数量', title: '领料占用数量', sort: true }
                    , { field: '可用数量', title: '可用数量', sort: true }
                    , { field: '占用数量', title: '占用数量', sort: true }