生产日记导入
产量汇报单 查询修改
jit 完善
出站单注释多余工序HProcID字段
客户订单报表 修改状态 备注 不刷新
5个文件已修改
403 ■■■■■ 已修改文件
WebTM/views/生产管理/报工台工序/产量汇报/Sc_ProductReportStepBillList_Web.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatForm.html 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/SC_DayRkReport.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/sc_ICOMReport.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_ProductReportStepBillList_Web.html
@@ -492,9 +492,9 @@
                if (Source) {
                    sWhere += " and ç”Ÿäº§èµ„源 like '%" + Dept + "%'";
                }
                if (HOrgID) {
                    sWhere += " and HOrgID = '" + HOrgID + "'";
                }
                //if (HOrgID) {
                //    sWhere += " and HOrgID = '" + HOrgID + "'";
                //}
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¼Æ»®Æ½Ì¨/JIT_DayPlanPlatForm.html
@@ -430,21 +430,20 @@
            if (HWorkShopID == 0) {
                return layer.msg("生产车间不能为空!");
            } else {
                layer.open({
                var index = layer.open({
                    type: 1, // page å±‚类型
                    area: ['500px', '300px'],
                    title: 'Hello layer',
                    area: ['20%', '20%'],
                    shade: 0.6, // é®ç½©é€æ˜Žåº¦
                    shadeClose: true, // ç‚¹å‡»é®ç½©åŒºåŸŸï¼Œå…³é—­å¼¹å±‚
                    maxmin: true, // å…è®¸å…¨å±æœ€å°åŒ–
                    shadeClose: false, // ç‚¹å‡»é®ç½©åŒºåŸŸï¼Œä¸å…³é—­å¼¹å±‚
                    maxmin: false, // ä¸å…è®¸å…¨å±æœ€å°åŒ–
                    anim: 0, // 0-6 çš„动画形式,-1 ä¸å¼€å¯
                    content: '<div style="padding: 32px;">一个普通的页面层,传入了自定义的 HTML</div>'
                    content: '<div style="padding: 12px;">正在运算,请耐心等待!!!</div>'
                });
                setTimeout(get_btnProPC(HWorkShopID), 3000);
                layer.closeAll();
                setTimeout(function () {
                    get_btnProPC(HWorkShopID);
                    layer.close(index);
                }, 1000)
            }
        })
        //行内事件
@@ -706,6 +705,28 @@
                , cellMinWidth: 90
                , cols: [columns]
                , limit: Number.MAX_VALUE//默认显示全部
                , done: function (res, page, count) {
                    var that = this.elem.next();
                    res.data.forEach(function (item, index) {
                        var NumCount = item.FBASEQTY;//获取总库存数量
                        for (var i = 0; i < Days; i++) {
                            var dateNowTime = Format(new Date($("#HBEGINDATE").val()).setDate(new Date($("#HBEGINDATE").val()).getDate() + i), 'yyyy-MM-dd');
                            if (item[dateNowTime] != null) {
                                if (NumCount > parseFloat(item[dateNowTime])) {
                                    NumCount -= parseFloat(item[dateNowTime]);
                                } else {
                                    var num = 6;//即时库存与日期挨着  ä»Žå³æ—¶åº“存开始算
                                    tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
                                    rq = tr.children()[num + 1 + i];
                                    rq.style.color = '#f66161';//然后变色
                                    rq = tr.children()[num];
                                    rq.style.color = '#f66161';//然后变色
                                }
                            }
                        }
                    });
                    $('.layui-table-cell').css({ 'height': 'auto' });
                }
            };
        }
@@ -1162,6 +1183,9 @@
            var data = table.cache["mainTable"];
            var HICOMNum = [];
            for (var i = 0; i < data.length; i++) {
                if (isNaN(data[i]["HICMOInterID"])) {
                    return layer.msg("请先进行保存!!")
                }
                HICOMNum.push(data[i]["HICMOInterID"] + ";" + data[i]["HICMOEntryID"]);
            }
            $('#HProgressBar').html(`
@@ -1267,12 +1291,14 @@
            var HDelData = 0;
            JDTLen = (100 / option.data.length).toFixed(2);
            var HJDLen = 0;
            var ajaxLoad = layer.load();
            //如果锁定计划,则不需要再排程
            //查询本车间是否有锁定计划的数据
            var HinterID_S = [];
            for (var i = 0; i < option.data.length; i++) {
                if (option.data[i]["小时产能"] == "0") {
                    return layer.msg("请先点击准备按钮,确保小时产能不为0!!!")
                }
                HinterID_S.push(option.data[i]["hmainid"]);
            }
            $.ajax({
@@ -1301,7 +1327,7 @@
                data: { "sWhere": sql },
                success: function (data1) {
                    if (data1.count == 1) {
                        HDelData = 1;
                    } else {
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
@@ -1310,17 +1336,35 @@
                }
            });
            get_FastQuery(2);
            get_HFData(0, 0);
            if (HDelData == 1) {
            //初始化表格数据
            for (var i = 0; i < option.data.length; i++) {
                for (var j = (22 + HPlanDay); j < 53; j++) {
                    if (option.data[i][option.cols[0][j].field] != null) {
                        option.data[i][option.cols[0][j].field] = "";
                    }
                }
            }
            //get_FastQuery(2);
                //按任务单优先级 å¾ªçޝ
                for (var i = 0; i < option.data.length; i++) {
                //获取锁定的排产数量
                var SDSum = 0;
                if (HPlanDay > 0) {
                    for (var j = 22; j < (22 + HPlanDay); j++) {
                        SDSum += TableData[i][option.cols[0][j].field];
                    }
                }
                    //找到本任务单 å¯ç”¨ç”Ÿäº§èµ„源
                    lMainID = option.data[i]["HICMOInterID"];
                    sICMOBillNo = option.data[i]["生产订单号"];
                    dEndDate = Format(option.data[i]["最迟完工日期"], 'yyyy/MM/dd');
                    sProdTimes = option.data[i]["生产周期"];
                    sPlanQty = option.data[i]["计划数量"];
                sPlanQty = option.data[i]["订单可排数量"];
                    lHGroupID = option.data[i]["HGroupID"];
                    sGroupName = option.data[i]["HGroupName"];
                    lMaterID = option.data[i]["HMaterID"];
@@ -1329,6 +1373,9 @@
                    sMaterModel = option.data[i]["规格型号"];
                    sWorkQty = option.data[i]["小时产能"];
                    sYX = option.data[i]["优先级"];
                if (SDSum > 0) {
                    sPlanQty = sPlanQty - SDSum;
                }
                    //剩余需求工时
                    iLeftQty = sPlanQty;
                    if (sWorkQty <= 0) {
@@ -1364,7 +1411,7 @@
                    else //没有资源则 è‡ªåŠ¨æ‰¾åˆ°èµ„æº
                    {
                        //查询生产资源的剩余工时进行排程。
                        var sql = "exec h_p_Sc_ICMOGetWorkSource2 " + lMaterID + ",'" + dEndDate + "'," + sProdTimes;
                    var sql = "exec h_p_Sc_ICMOGetWorkSource " + lMaterID + ",'" + dEndDate + "'," + sProdTimes;
                        $.ajax({
                            url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
                            type: "GET",
@@ -1384,6 +1431,7 @@
                  
                    if (ds == null || ds.length == 0) //没有可以排的资源
                    {
                    get_HFData(1, i);
                        //跳到下一单  æœ¬å•红色显示
                        $("tr[data-index='" + i + "']").attr({ "style": "background:red;color:black;" });
                        continue;
@@ -1425,159 +1473,150 @@
                                    });
                                    if (dsSub == null || dsSub.length == 0) {
                                    get_HFData(1, i);
                                        continue;//如果没有剩余则 æ‰§è¡Œä¸‹ä¸€ä¸ªç”Ÿäº§è®¢å•
                                    }
                                    if (dsSub != null)//不加班排程
                                    {
                                        iRow = i + 1;
                                        //将数据排到网格中
                                        //grdMain.RowCount = grdMain.RowCount + 1;  //  grdmain æ–°å¢žä¸€è¡Œ
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOBillNoCol].Value = sICMOBillNo;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOInterIDCol].Value = lMainID;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecLeftQtyCol].Value = iLeftQty;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupIDCol].Value = lHGroupID;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupNameCol].Value = sGroupName;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterIDCol].Value = lMaterID;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNameCol].Value = sMaterName;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNumberCol].Value = sMaterNumber;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterModelCol].Value = sMaterModel;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanEndDateCol].Value = dEndDate;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanQtyCol].Value = sPlanQty;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceIDCol].Value = lSourceID;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNameCol].Value = sSourceName;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNumberCol].Value = sSourceNumber;
                                        //grdMain.Rows[grdMain.RowCount - 1].Cells[HSecYXCol].Value = sYX;
                                        //Sc_ICMOSortBillFun.SetInfoToGrid(grdMain, dsSub, null, grdMain.RowCount - 1, ref iLeftQty, sWorkQty, false, oClsGridValues);
                                        SetInfoToGrid(option, dsSub, null, (iRow - 1), iLeftQty, sWorkQty, false, HPlanDay);
                                    set_AddNew1(option.data[i]);
                                    }
                                    bFind = true;
                                }
                            }
                        }
                        if (!bFind) {
                            for (var j = 0; j < ds.length; j++) {
                                //判断资源最大剩余工时,是否大于 ç”Ÿäº§å‘¨æœŸ
                                if (parseFloat(ds[j]["最大剩余工时"]) > sLeftProdTimes) {
                                    if (iLeftQty > 0) {
                                        //在本资源上生产
                                        grdMain.RowCount = grdMain.RowCount + 1;
                                        //获取该生产资源的剩余工时进行排程。
                                        lSourceID = ds[j]["HitemID"];
                                        sSourceName = ds[j]["资源名称"];
                                        sSourceNumber = ds[j]["资源代码"];
                                        option.data[i]["HSourceID"] = lSourceID;
                                        option.data[i]["生产资源"] = sSourceName;
                                        option.data[i]["生产资源代码"] = sSourceNumber;
                                        var sql = "exec h_p_Sc_ICMOGetWorkSourceTime " + lSourceID;
                                        $.ajax({
                                            url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
                                            type: "GET",
                                            async: false,
                                            data: { "sWhere": sql },
                                            success: function (data1) {
                                                if (data1.count == 1) {
                                                    dsSub = data1.data
                                                } else {
                                                    layer.alert(data1.code + data1.Message, { icon: 5 });
                            get_HFData(1, i);
                                                }
                                            }, error: function () {
                                                layer.alert("接口请求失败!", { icon: 5 });
                                            }
                                        });
                    //if (!bFind) {
                    //    for (var j = 0; j < ds.length; j++) {
                    //        //判断资源最大剩余工时,是否大于 ç”Ÿäº§å‘¨æœŸ
                    //        if (parseFloat(ds[j]["最大剩余工时"]) > sLeftProdTimes) {
                    //            if (iLeftQty > 0) {
                                        if (dsSub == null || dsSub.length == 0) {
                                            continue;
                                        }
                                        //if (dsSub != null)//加班排程
                                        //{
                                        //    //将数据排到网格中
                                        //    grdMain.RowCount = grdMain.RowCount + 1;  //  grdmain æ–°å¢žä¸€è¡Œ
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOBillNoCol].Value = sICMOBillNo;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOInterIDCol].Value = lMainID;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecLeftQtyCol].Value = iLeftQty;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupIDCol].Value = lHGroupID;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupNameCol].Value = sGroupName;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterIDCol].Value = lMaterID;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNameCol].Value = sMaterName;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNumberCol].Value = sMaterNumber;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterModelCol].Value = sMaterModel;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanEndDateCol].Value = dEndDate;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanQtyCol].Value = sPlanQty;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceIDCol].Value = lSourceID;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNameCol].Value = sSourceName;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNumberCol].Value = sSourceNumber;
                                        //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecYXCol].Value = sYX;
                                        //    Sc_ICMOSortBillFun.SetInfoToGrid(grdMain, dsSub, null, grdMain.RowCount - 1, ref iLeftQty, sWorkQty, true, oClsGridValues);
                    //                //在本资源上生产
                    //                grdMain.RowCount = grdMain.RowCount + 1;
                    //                //获取该生产资源的剩余工时进行排程。
                    //                lSourceID = ds[j]["HitemID"];
                    //                sSourceName = ds[j]["资源名称"];
                    //                sSourceNumber = ds[j]["资源代码"];
                    //                option.data[i]["HSourceID"] = lSourceID;
                    //                option.data[i]["生产资源"] = sSourceName;
                    //                option.data[i]["生产资源代码"] = sSourceNumber;
                    //                var sql = "exec h_p_Sc_ICMOGetWorkSourceTime " + lSourceID;
                    //                $.ajax({
                    //                    url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
                    //                    type: "GET",
                    //                    async: false,
                    //                    data: { "sWhere": sql },
                    //                    success: function (data1) {
                    //                        if (data1.count == 1) {
                    //                            dsSub = data1.data
                    //                        } else {
                    //                            layer.alert(data1.code + data1.Message, { icon: 5 });
                                        //}
                                    }
                                    bFind = true;
                                }
                            }
                        }
                        if (!bFind) {
                            //如果没有找到合适资源则,直接排最后一个剩余最大的资源。
                            //获取该生产资源的剩余工时进行排程。
                            lSourceID = ds[ds.length - 1]["HitemID"];
                            sSourceName = ds[ds.length - 1]["资源名称"];
                            sSourceNumber = ds[ds.length - 1]["资源代码"];
                            option.data[i]["HSourceID"] = lSourceID;
                            option.data[i]["生产资源"] = sSourceName;
                            option.data[i]["生产资源代码"] = sSourceNumber;
                            //获取该生产资源的剩余工时进行排程。
                            var sql = "exec h_p_Sc_ICMOGetWorkSourceTime " + lSourceID;
                            $.ajax({
                                url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
                                type: "GET",
                                async: false,
                                data: { "sWhere": sql },
                                success: function (data1) {
                                    if (data1.count == 1) {
                                        dsSub = data1.data
                                    } else {
                                        layer.alert(data1.code + data1.Message, { icon: 5 });
                                    }
                                }, error: function () {
                                    layer.alert("接口请求失败!", { icon: 5 });
                                }
                            });
                            if (dsSub == null || dsSub.length == 0) {
                                continue;
                            }
                            //if (dsSub != null)//加班排程
                            //{
                            //    //将数据排到网格中
                            //    grdMain.RowCount = grdMain.RowCount + 1;  //  grdmain æ–°å¢žä¸€è¡Œ
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOBillNoCol].Value = sICMOBillNo;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOInterIDCol].Value = lMainID;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecLeftQtyCol].Value = iLeftQty;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupIDCol].Value = lHGroupID;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupNameCol].Value = sGroupName;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterIDCol].Value = lMaterID;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNameCol].Value = sMaterName;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNumberCol].Value = sMaterNumber;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterModelCol].Value = sMaterModel;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanEndDateCol].Value = dEndDate;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanQtyCol].Value = sPlanQty;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceIDCol].Value = lSourceID;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNameCol].Value = sSourceName;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNumberCol].Value = sSourceNumber;
                            //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecYXCol].Value = sYX;
                            //    Sc_ICMOSortBillFun.SetInfoToGrid(grdMain, dsSub, null, grdMain.RowCount - 1, ref iLeftQty, sWorkQty, true, oClsGridValues);
                    //                    }, error: function () {
                    //                        layer.alert("接口请求失败!", { icon: 5 });
                            //}
                        }
                    //                });
                    //                if (dsSub == null || dsSub.length == 0) {
                    //                    continue;
                    //                }
                    //                //if (dsSub != null)//加班排程
                    //                //{
                    //                //    //将数据排到网格中
                    //                //    grdMain.RowCount = grdMain.RowCount + 1;  //  grdmain æ–°å¢žä¸€è¡Œ
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOBillNoCol].Value = sICMOBillNo;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOInterIDCol].Value = lMainID;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecLeftQtyCol].Value = iLeftQty;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupIDCol].Value = lHGroupID;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupNameCol].Value = sGroupName;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterIDCol].Value = lMaterID;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNameCol].Value = sMaterName;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNumberCol].Value = sMaterNumber;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterModelCol].Value = sMaterModel;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanEndDateCol].Value = dEndDate;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanQtyCol].Value = sPlanQty;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceIDCol].Value = lSourceID;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNameCol].Value = sSourceName;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNumberCol].Value = sSourceNumber;
                    //                //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecYXCol].Value = sYX;
                    //                //    Sc_ICMOSortBillFun.SetInfoToGrid(grdMain, dsSub, null, grdMain.RowCount - 1, ref iLeftQty, sWorkQty, true, oClsGridValues);
                    //                //}
                    //            }
                    //            bFind = true;
                    //        }
                    //    }
                    //}
                    //if (!bFind) {
                    //    //如果没有找到合适资源则,直接排最后一个剩余最大的资源。
                    //    //获取该生产资源的剩余工时进行排程。
                    //    lSourceID = ds[ds.length - 1]["HitemID"];
                    //    sSourceName = ds[ds.length - 1]["资源名称"];
                    //    sSourceNumber = ds[ds.length - 1]["资源代码"];
                    //    option.data[i]["HSourceID"] = lSourceID;
                    //    option.data[i]["生产资源"] = sSourceName;
                    //    option.data[i]["生产资源代码"] = sSourceNumber;
                    //    //获取该生产资源的剩余工时进行排程。
                    //    var sql = "exec h_p_Sc_ICMOGetWorkSourceTime " + lSourceID;
                    //    $.ajax({
                    //        url: GetWEBURL() + '/Gy_SOPBillList/WindowPrintList',
                    //        type: "GET",
                    //        async: false,
                    //        data: { "sWhere": sql },
                    //        success: function (data1) {
                    //            if (data1.count == 1) {
                    //                dsSub = data1.data
                    //            } else {
                    //                layer.alert(data1.code + data1.Message, { icon: 5 });
                    //            }
                    //        }, error: function () {
                    //            layer.alert("接口请求失败!", { icon: 5 });
                    //        }
                    //    });
                    //    if (dsSub == null || dsSub.length == 0) {
                    //        continue;
                    //    }
                    //    //if (dsSub != null)//加班排程
                    //    //{
                    //    //    //将数据排到网格中
                    //    //    grdMain.RowCount = grdMain.RowCount + 1;  //  grdmain æ–°å¢žä¸€è¡Œ
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOBillNoCol].Value = sICMOBillNo;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecICMOInterIDCol].Value = lMainID;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecLeftQtyCol].Value = iLeftQty;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupIDCol].Value = lHGroupID;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecGroupNameCol].Value = sGroupName;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterIDCol].Value = lMaterID;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNameCol].Value = sMaterName;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterNumberCol].Value = sMaterNumber;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecMaterModelCol].Value = sMaterModel;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanEndDateCol].Value = dEndDate;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecPlanQtyCol].Value = sPlanQty;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceIDCol].Value = lSourceID;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNameCol].Value = sSourceName;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecSourceNumberCol].Value = sSourceNumber;
                    //    //    grdMain.Rows[grdMain.RowCount - 1].Cells[HSecYXCol].Value = sYX;
                    //    //    Sc_ICMOSortBillFun.SetInfoToGrid(grdMain, dsSub, null, grdMain.RowCount - 1, ref iLeftQty, sWorkQty, true, oClsGridValues);
                    //    //}
                    //}
                    }
                }
                table.render(option);
                set_AddNew();
            } else {
                layer.msg("数据清空失败!")
            }
            layer.close(ajaxLoad);
        var TableData = [];
        function get_HFData(num,nums) {
            if (num == 0) {
                TableData = option.data;
            } else {
                option.data[nums] = TableData[nums];
            }
        }
        //将数据排程到网格
@@ -1684,7 +1723,7 @@
            else {
                for (var i = 0; i < ds.length; i++) {
                    //找到对应的列
                    for (var j = 22; j < grd.cols[0].length; j++) {
                    for (var j = 22; j < 53; j++) {
                        if (sLeftQty > 0) {
                            if (ds[i]["日期"] == grd.cols[0][j].field) {
                                //如果时间被 ä¸Šé“余量占用 åˆ™ è·³è¿‡
@@ -1743,23 +1782,25 @@
                                    }
                                    else {
                                        if (sLeftQty > parseFloat(sWorkQty * ds[i]["剩余工时"])) {
                                            grd.data[iRow][grd.cols[0][j + HPlanDay].field] = parseFloat(sWorkQty * ds[i]["剩余工时"]);
                                            grd.data[iRow][grd.cols[0][j].field] = parseFloat(sWorkQty * ds[i]["剩余工时"]);
                                            sLeftQty = sLeftQty - (parseFloat(sWorkQty * ds[i]["剩余工时"]));
                                            //oSub = new ClsGridValues();
                                            //oSub.iRow = iRow;
                                            //oSub.iCol = j;
                                            option.data[iRow]["HLeftTimes"] = ds[i]["最大剩余工时"];
                                            //option.data[iRow]["HLeftTimes"] = ds[i]["最大剩余工时"];
                                            //option.data[iRow]["HUseTimes"] = ds[i]["剩余工时"];
                                            break;
                                            //oSub.HLeftTimes = ds[i]["剩余工时"];
                                            //oClsGridValues.Add(oSub);
                                        }
                                        else {
                                            grd.data[iRow][grd.cols[0][j + HPlanDay].field] = sLeftQty;
                                            grd.data[iRow][grd.cols[0][j].field] = sLeftQty;
                                            //option.data[iRow]["HUseTimes"] = parseFloat(sLeftQty / sWorkQty);
                                            sLeftQty = 0;
                                            //oSub = new ClsGridValues();
                                            //oSub.iRow = iRow;
                                            //oSub.iCol = j;
                                            option.data[iRow]["HLeftTimes"] = ds[i]["最大剩余工时"];
                                            //option.data[iRow]["HLeftTimes"] = ds[i]["最大剩余工时"];
                                            break;
                                            //oSub.HLeftTimes = ds[i]["剩余工时"];
                                            //oClsGridValues.Add(oSub);
@@ -1770,6 +1811,7 @@
                        }
                    }
                }
            }
        }
@@ -1936,6 +1978,9 @@
            var num = [];
            for (var i = 0; i < table.cache["mainTable"].length; i++) {
                if (table.cache["mainTable"][i] != "") {
                    if (parseFloat(table.cache["mainTable"][i]["订单可排数量"]) < parseFloat(table.cache["mainTable"][i]["日计划数量总量"]) + parseFloat(table.cache["mainTable"][i]["今日之前日计划数量"])) {
                        return layer.msg("第" + (i + 1) + "行排产数量超出订单数量!");
                    }
                    table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
                    num.push(table.cache["mainTable"][i])
                }
@@ -1975,6 +2020,36 @@
            });
        }
        function set_AddNew1(num) {
            //var sMainStr = JSON.stringify(data.field);
            var sSubStr = "["+JSON.stringify(num)+"]";
            var sMainSub = sSubStr + ";" + sessionStorage["HUserName"];
            var index = layer.load();
            $.ajax({
                type: "POST",
                url: GetWEBURL() + "/JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBill_btnSave",
                async: false,
                data: { "sMainSub": sMainSub },
                dataType: "json",
                success: function (data) {
                    if (data.count == 1) {
                        layer.msg("保存成功");
                        layer.close(index);
                    }
                    else {
                        layer.close(index);
                        layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                },
                error: function (err) {
                    layer.close(index);
                    layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                }
            });
        }
        //行内快捷键
        function set_GridCellCheck(obj) {
            $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBill.html
@@ -177,7 +177,7 @@
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="SerialNum-BT" id="SerialNum-BT" style="width: 40px; padding: 0 10px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                                <input type="hidden" value="0" name="HProcID" id="HProcID">
                                                <!--<input type="hidden" value="0" name="HProcID" id="HProcID">-->
                                            </div>
                                        </div>
                                        <!--<div class="layui-col-xs4 layui-inline">
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/SC_DayRkReport.html
@@ -97,8 +97,8 @@
                        <table class="" id="mainTable1" lay-filter="mainTable1"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <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>
                                <!--<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>
                        </script>
                    </form>
@@ -243,7 +243,7 @@
                            }
                            option = {
                                elem: '#mainTable'
                                //, toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , height: 500
@@ -314,7 +314,7 @@
                            }
                            option = {
                                elem: '#mainTable1'
                                //, toolbar: '#toolbarDemo'
                                , toolbar: '#toolbarDemo'
                                , cellMinWidth: 120
                                , limit: Number.MAX_VALUE // æ•°æ®è¡¨æ ¼é»˜è®¤å…¨éƒ¨æ˜¾ç¤º
                                , height: 500
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/sc_ICOMReport.html
@@ -397,7 +397,7 @@
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.msg(data1.Message);
                            get_FastQuery();
                            //get_FastQuery();
                        } else {
                            layer.msg(data1.Message);
                        }
@@ -427,7 +427,7 @@
                            data: { "sMainSub": sMainSub },
                            success: function (data1) {
                                if (data1.count == 1) {
                                    get_FastQuery();
                                    //get_FastQuery();
                                    layer.close(index);
                                    layer.msg(data1.Message);
                                } else {