廖井涛
2025-06-18 8d3a4d727437463d71bdbebabfb3ee4fe0052da2
切割明细报表修改数据功能
2个文件已修改
296 ■■■■■ 已修改文件
河北望美项目/MES_11/src/main/webapp/WEB-INF/views/mes/data/reportform_manage.jsp 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
河北望美项目/MES_11/src/main/webapp/WEB-INF/views/mes/view/ReportForm.jsp 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ºÓ±±ÍûÃÀÏîÄ¿/MES_11/src/main/webapp/WEB-INF/views/mes/data/reportform_manage.jsp
@@ -205,6 +205,31 @@
            }
            strSQL += " group by operator";
        }
        if(gongyi.equals("修改原片使用")){
            System.out.println(11);
            String width = request.getParameter("width");
            String height = request.getParameter("height");
            String thickness = request.getParameter("thickness");
            String colour = request.getParameter("colour");
            String batch = request.getParameter("batch");
            int quantity = Integer.parseInt(request.getParameter("quantity"));
            int groups = Integer.parseInt(request.getParameter("line"));
            String teams = request.getParameter("teams");
            String reportingTime = request.getParameter("reportingTime");
            String type="手动新增";
            if(batch==""){
                strSQL = "insert into gmms_cutmanage(width,height,thickness,color,batch_id,pieces,groups,dengluname,BgTime,engineering_id)"+
                        "values ("+width+","+height+","+thickness+",'"+colour+"',"+null+","+quantity+","+groups+",'"+teams+"','"+reportingTime+"','"+type+"')";
            }else{
                strSQL = "insert into gmms_cutmanage(width,height,thickness,color,batch_id,pieces,groups,dengluname,BgTime,engineering_id)"+
                        "values ("+width+","+height+","+thickness+",'"+colour+"','"+batch+"',"+quantity+","+groups+",'"+teams+"','"+reportingTime+"','"+type+"')";
            }
            System.out.println(strSQL);
        }
        //2023-09-19 æ–°å¢ž ç»“束
        //System.out.println("报表SQL:" + strSQL);
        sn.createSql(strSQL);
ºÓ±±ÍûÃÀÏîÄ¿/MES_11/src/main/webapp/WEB-INF/views/mes/view/ReportForm.jsp
@@ -147,6 +147,135 @@
                    
                </div>
                <div class="box-body no-padding" id="glass-data" style="overflow-y:scroll"></div>
        <!-- ä¿®æ”¹åŽŸä½¿ç”¨ -->
        <div class="modal fade" id="UNum-info" tabindex="-1" role="dialog"
            aria-labelledby="myModalLabel" aria-hidden="true">
            <form class="form-horizontal" role="form">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                aria-hidden="true">&times;</button>
                            <h3 class="modal-title" id="UNum_AlertTitle">修改原使用:</h3>
                        </div>
                        <div class="modal-body" style="text-align: left;">
                            <div class="form-group">
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">宽: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="width">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">高: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="height">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">厚: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="thickness">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">颜色: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="colour">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">批次: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="batch">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">数量: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="quantity">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">线路: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="line">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">班组: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="text" class="form-control" style="font-size: 18px"
                                        id="teams">
                                </div>
                                <h4>
                                    <label class="col-lg-4 control-label no-padding-right"
                                        style="font-weight: bolder;">报工时间: </label>
                                </h4>
                                <div class="col-lg-6 input-group">
                                    <input type="date" class="form-control" style="font-size: 18px"
                                        id="reportingTime">
                                </div>
                                <h4 style="text-align: center">
                                    <label class="control-label no-padding-right"
                                        style="font-weight: bolder; color: red;" id="aMsg"> </label>
                                </h4>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary btn-lg"
                                data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-danger btn-lg"
                                id="DEL_button" onclick="UNum_Submit()">确认</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
            </section>
        </div>
@@ -570,6 +699,11 @@
                name : "报工时间",
                binding : 10,
                filter : {}
            }, {
                name : "操作",
                binding : 11,
                type : "element",
                filter : {}
            } ]
        };
        
@@ -634,6 +768,11 @@
                name : "报工时间",
                binding : 9,
                filter : {}
            }, {
                name : "操作",
                binding : 10,
                type : "element",
                filter : {}
            }]
        };
        
@@ -687,6 +826,7 @@
                dataType:'json',
                url:rf_url,
                success:function(data){
                    if($("#pc_isShow").is(':checked')){
                        var cDB = createTable(document.getElementById("glass-data"), cuteOpt);
                        var d = data;
@@ -695,11 +835,41 @@
                        if(d!=null && d.length>0){
                            total_num = d.length;
                            for(i=0;i<d.length;i++){
                                var s = "";
                                d[i][0] = i+1;
                                zSl+=d[i][6];
                                //zMj+=d[i][1]*d[i][2]*d[i][6];
                                d[i][7]= keepTwoDecimalFull((d[i][1]*d[i][2]*d[i][6]) / 1000000);
                                zMj+=parseFloat(keepTwoDecimalFull((d[i][1]*d[i][2]*d[i][6]) / 1000000));
                                if(!$("#fz_isShow").is(':checked')){
                                    s += "<button class='btn btn-large btn-warning' onclick='updateType("
                                        + d[i][1]
                                        + ","
                                        + d[i][2]
                                        + ","
                                        + d[i][3]
                                        + ",\""
                                        + d[i][4]
                                        + "\",\""
                                        + d[i][5]
                                        + "\","
                                        + zSl
                                        + ","
                                        + d[i][8]
                                        + ",\""
                                        + d[i][9]
                                        + "\",\""
                                        + d[i][10]
                                        + "\")'>修改</button>";
                                    var a = d[i];
                                    a.push(s);
                                }else{
                                    var a = d[i];
                                    a.push(s);
                                }
                            }
                            $("#rRow").text(d.length);
@@ -721,12 +891,42 @@
                        if(d!=null && d.length>0){
                            total_num = d.length;
                            for(i=0;i<d.length;i++){
                                var s = "";
                                d[i][0] = i+1;
                                zSl+=d[i][5];
                                //zMj+=d[i][1]*d[i][2]*d[i][5];
                                d[i][6]= keepTwoDecimalFull((d[i][1]*d[i][2]*d[i][5]) / 1000000);
                                zMj+=parseFloat(keepTwoDecimalFull((d[i][1]*d[i][2]*d[i][5]) / 1000000));
                                if(!$("#fz_isShow").is(':checked')){
                                    s += "<button class='btn btn-large btn-warning' onclick='updateType("
                                        + d[i][1]
                                        + ","
                                        + d[i][2]
                                        + ","
                                        + d[i][3]
                                        + ",\""
                                        + d[i][4]
                                        + "\","
                                        + "\"\""
                                        + ","
                                        + zSl
                                        + ","
                                        + d[i][7]
                                        + ",\""
                                        + d[i][8]
                                        + "\",\""
                                        + d[i][9]
                                        + "\")'>修改</button>";
                                    var a = d[i];
                                    a.push(s);
                                }else{
                                    var a = d[i];
                                    a.push(s);
                                }
                            }
                            $("#rRow").text(d.length);
                            $("#rSL").text(zSl);
@@ -835,5 +1035,76 @@
pageShow();
</script>
<script>
function updateType(width, height, thickness, colour,batch,quantity,line,teams,reportingTime) {
    document.getElementById("width").value=width;
    document.getElementById("height").value=height;
    document.getElementById("thickness").value=thickness;
    document.getElementById("colour").value=colour;
    document.getElementById("batch").value=batch;
    document.getElementById("quantity").value=quantity;
    document.getElementById("line").value=line;
    document.getElementById("teams").value=teams;
    document.getElementById("reportingTime").value=reportingTime;
    $('#UNum-info').modal('toggle');
}
function UNum_Submit(){
    var width = $('#width').val();
    var height = $('#height').val();
    var thickness = $('#thickness').val();
    var colour = $('#colour').val();
    var batch = $('#batch').val();
    var quantity = $('#quantity').val();
    var line = $('#line').val();
    var teams = $('#teams').val();
    var reportingTime = $('#reportingTime').val();
    if(width!=""&&height!=""&&thickness!=""&&colour!=""&&quantity!=""&&line!=""&&teams!=""&&reportingTime!=""){
        if(isNaN(quantity)){
            $("#aMsg").html("请输入数量!");
        }else{
            $("#aMsg").html("");
             $.ajax({
                type:'post',
                url:rf_url,
                dataType:'text',
                data:{
                    gongyi:"修改原片使用",
                    width:width,
                    height:height,
                    thickness:thickness,
                    colour:colour,
                    batch:batch,
                    quantity:quantity,
                    line:line,
                    teams:teams,
                    reportingTime:reportingTime,
                },success:function(data){
                    var d= data.trim();
                    if(d = 1){
                        $('#UNum-info').modal('hide');
                        ChaXun();
                    }
                },error:function(data){
                    $("#aMsg").html("修改失败,失败原因:"+data);
                }
            });
        }
    }else{
        $("#aMsg").html("输入不能为空!");
    }
}
</script>
</body>
</html>