1
pzy
2024-10-04 65bea89f42d114b838ba3594065c2215ce87c387
1
4个文件已修改
422 ■■■■■ 已修改文件
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill_BatchSplit.html 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBillList.html
@@ -201,6 +201,11 @@
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>发起审批</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>查看审批进度</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>多级审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>多级反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>驳回</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>反关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-ProcPriceRequestBills" id="btn-ProcPriceRequestBills"><i class="layui-icon layui-icon-delete"></i>多行下推(定额申请单)</button>
@@ -243,6 +248,7 @@
            var size = 50;
            var ins;                        //用于导出excel
            var HModName = "Gy_RoutingBillList";
            var HBillType = 3301;
            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
            //获取参数
            function getUrlVars() {
@@ -287,6 +293,21 @@
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //发起审批
                    case 'set_startCheckBill': set_startCheckBill();
                        break;
                    //查看审批进度
                    case 'get_CheckFlowInfo': get_CheckFlowInfo();
                        break;
                    //多级审核
                    case 'set_CheckBill_Flow': set_CheckBill_Flow(0);
                        break;
                    //多级反审核
                    case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1);
                        break;
                    //驳回
                    case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
                        break;
                    //多行下推
                    case 'btn-ProcPriceRequestBills': set_ProcPriceRequestBills();
@@ -626,6 +647,7 @@
                //sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " ";
                if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
                    sWhere += " and HMaterID = " + HMaterID;
                    sWhere += " and å®¡æ ¸äºº != ''";
                }
                if (HProID != 0 && HProID != "undefined" && HProID != null) {
                    sWhere += " and HMainProcID = " + HProID;
@@ -1165,6 +1187,149 @@
            }
            //#region å‘起审批
            function set_startCheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_Routing/StartCheckFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                    //修改为功后刷新界面
                    $("#btnSearch").trigger('click');
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region æŸ¥çœ‹å®¡æ‰¹è¿›åº¦
            function get_CheckFlowInfo() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['70%', '70%']
                        , title: '单据审批进度'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../系统管理/多级审批/审批进度/Xt_CheckFlowProgressList.html?linterid=' + hID + '&HSouceBillType=' + HBillType
                        , resize: false,
                        end: function () {
                            ////修改为功后刷新界面
                            //if (get_needClose_Bar == 0) {
                            //    $("#btnSearch").trigger('click');
                            //} else if (get_needClose_Bar == 1) {
                            //    $("#get_needClose").trigger('click');
                            //}
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据查看!');
                }
            }
            //#endregion
            //#region å¤šçº§ åå®¡æ ¸/审核数据
            function set_CheckBill_Flow(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_Routing/AuditFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region é©³å›ž
            function set_RejectCheck_Flow(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_Routing/RejectCheckFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                });
                                //修改为功后刷新界面
                                $("#btnSearch").trigger('click');
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //关闭  [1 å…³é—­ã€2 åå…³é—­]
            function set_CloseBill(num) {
                var checkStatus = table.checkStatus('mainTable')
@@ -1228,7 +1393,7 @@
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                    colName += option.cols[0][i]["field"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
@@ -1263,6 +1428,7 @@
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    async:"false",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
@@ -1299,6 +1465,10 @@
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //统计列
                                if (dataCols[6] == 1) {
                                    option.cols[0][i + 1]["totalRow"] = true;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
@@ -1310,6 +1480,10 @@
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                                //设置表格title属性显示别名
                                if (dataCols[4] != null && dataCols[4] != "") {
                                    option.cols[0][i + 1]["title"] = dataCols[4];
                                }
                            }
@@ -1364,7 +1538,7 @@
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                    }
                }
                $("#ColName").empty();
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBill.html
@@ -1190,6 +1190,89 @@
                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
                                    break;
                                case "P20":
                                    form.val("formData", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                        "HICMOInterID": data.hicmointerid,
                                        "HICMOBillNo": data.任务单号,
                                        "HMaterID": data.HMaterID,
                                        "HMaterName": data.产品,
                                        "HMaterNumber": data.产品代码,
                                        "HMaterModel": data.规格型号,
                                        "HPieceQty": data.流转卡数量,
                                        "HPlanQty": data.流转卡数量,
                                        "lngBillKey": data.hmainid,
                                        "HProcExchBillNo": data.单据号,
                                        "HProcExchHinteID": data.hmainid,
                                        "HProcPlanEntryID": data.hsubid,
                                        "HICMOQty": data.任务单数量,
                                        "HOrderProcNO": data.订单跟踪号,
                                        "HPRDOrgID": data.组织
                                    });
                                    //$("#HBarCode").attr("readonly", "readonly");//条形码只读
                                    //$("#HBarCode").css("background-color", "#efefef4d");
                                    HProcExchBillNoFlag = true;
                                    var HProcExchHinteID = $('#HProcExchHinteID').val();
                                    var HInterID = data.hmainid;
                                    //自动匹配流水号
                                    $.ajax({
                                        url: GetWEBURL() + "/Sc_StationInBill/autoGetProcNo",
                                        type: "GET",
                                        data: { "HUserID": sessionStorage["Czybm"], "HInterID": HInterID, "BillType": "Out" },
                                        success: function (data1) {
                                            if (data1.count == 1) {
                                                var data = data1.data[0];
                                                form.val("formData", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                                    "lngBillSubKey": data.hsubid,
                                                    "HProcName": data.工序,
                                                    "HProcID": data.工序ID,
                                                    "HProcNo": data.流水号,
                                                    "HCenterName": data.工作中心,
                                                    "HCenterID": data.HCenterID,
                                                    "NoOutboundHqty": (data.流转卡数量 - data.出站报废关联数量 - data.出站关联数量)
                                                });
                                                if (data.首道工序 == "是") {
                                                    FirstEndHProcNo = 1;
                                                } else if (data.末道工序 == "是") {
                                                    FirstEndHProcNo = 2;
                                                }
                                                $("#HProcNo").attr("readonly", "readonly");
                                                $("#HProcNo").css("background-color", "#efefef4d");
                                            }
                                        }
                                    })
                                    option = {
                                        elem: '#mainTable',
                                        url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList",
                                        //, cellMinWidth: 80
                                        toolbar: '#toolbarDemo'
                                        , where: { HProcExchHinteID: HProcExchHinteID }
                                        , cols: [[
                                            { type: 'numbers', title: '序号', totalRow: true }
                                            , { field: 'HOrderProcNO', title: '订单跟踪号', edit: 'text' }
                                            , { field: 'hbillno', title: '流转卡号', hide: true }
                                            , { field: 'HICMOBillNo', title: '生产订单号', edit: 'text' }
                                            , { field: '产品代码', title: '产品代码' }
                                            , { field: '产品名称', title: '产品名称', edit: 'text' }
                                            , { field: '流转卡数量', title: '流转卡数量' }
                                            , { field: '流水号', title: '流水号', edit: 'text' }
                                            , { field: '工序名称', title: '工序名称' }
                                            , { field: '工作中心', title: '工作中心' }
                                            , { field: '是否委外', title: '是否委外', edit: 'text' }
                                            , { field: '供应商', title: '供应商' }
                                            , { field: '计划数量', title: '计划数量' }
                                            , { field: '进站数量', title: '进站数量', edit: 'text' }
                                            , { field: '出站数量', title: '出站数量' }
                                        ]]
                                        , height: 500
                                    }
                                    table.render(option)
                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
                                    break;
                            }
                            //layer.close(index);
                            //set_InitGrid();
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBillList.html
@@ -266,6 +266,10 @@
            var HModName3 = "Sc_StationOutBillSub_SN";
            var HModName4 = "Sc_StationOutBillSub_Emp";
            var titleData = ["HMaterID", "HUnitID", "HSourceID", "hmainid", "HProcExchInterID", "HProcID", "HunitID", "HEmpID", "HGroupID", "HProcExchEntryID", "HSubID", "HICMOInterID", "选择", "查询日期", "成本对象", "成本对象名称", "HBillStatus", "HBillType", "HPRDORGID"];//不需要显示的字段 å¯æ‰©å±•
            var params = get_UrlVars();
            var sProcExchBillNo = params[params[0]] == null ? "undefined" : params[params[0]];    //流转卡号(工序流转卡下查用到)
            var OperationType = params[params[1]] == null ? 1 : params[params[1]];  //1为直接列表模块打开  2为从其他模块跳转打开列表
            var ViewName = params[params[2]] == null ? "h_v_MES_StationOutBillList" : params[params[2]];    //所调用的视图
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
@@ -289,7 +293,6 @@
            //工序流转卡下查标记
            var lookDownBar = 0;              //(0:下查操作;1:直接查看)
            var params = get_UrlVars();       //获取参数
            //初始化表格
@@ -1602,8 +1605,8 @@
            //快速过滤
            function get_FastQuery() {
                //判断是否为下查操作,若是则变更查询单号和时间过滤条件
                if (typeof (params[params[0]]) != "undefined" && lookDownBar == 0) {
                    $("#HProcExchBillNo").val(params[params[0]]);
                if (sProcExchBillNo != "undefined" && lookDownBar == 0) {
                    $("#HProcExchBillNo").val(sProcExchBillNo);
                    $("#HBeginDate").val("1990-01-01");
                    $("#HEndDate").val("2200-12-30");
                    lookDownBar = 1;
@@ -1772,26 +1775,14 @@
                var ajaxLoad = layer.load();    
                var wait = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" },
                    //success: function (data1) {
                    //    if (data1.count == 0) {
                    //        option.data = [];
                    //        layer.alert(data1.Message, { icon: 5 });
                    //    } else {
                    //        option.data = data1.data;
                    //    }
                    //    table.render(option);
                    //    btnIs();
                    //    if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                    //        ColFilter();
                    //    }
                    //    layer.close(wait);
                    //}, error: function () {
                    //    layer.close(wait);
                    //    layer.alert("接口请求失败!", { icon: 5 });
                    //}
                    url: GetWEBURL() + '/Cj_StationOutBillController/GetSc_StationOutBillList_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "sWhere": sWhere, "HMaker": sessionStorage["HUserName"], "HBillSubType": "3791", "OperationType": OperationType, "ViewName": ViewName },
                    //url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
                    //type: "GET",
                    //data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" },
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
@@ -1799,6 +1790,11 @@
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                                //获取不需要显示的列(H开头的列不显示)
                                var patrn = new RegExp(/^h/i);
                                if (patrn.test(data1.list[key].ColmCols)) {
                                    titleData[key] = data1.list[key].ColmCols;
                                }
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计' });
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBill_BatchSplit.html
@@ -16,6 +16,7 @@
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PageTitle.js"></script>
    <script src="../../../layuiadmin/grwebapp.js"></script>
    <style type="text/css">
        .layui-form-item .layui-inline {
            margin-right: 0;
@@ -51,7 +52,8 @@
                    <div class="layui-card-header">
                        <div class="layui-btn-group">
                            <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                            <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>打印</button>
                            <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_Print" disabled>打印</button>
                            <button type="button" id="batchPrint-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>批量打印</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" style="margin-left:50px !important;">退出</button>
                        </div>
                    </div>
@@ -239,10 +241,15 @@
            });
            //打印
            form.on('submit(get_Print)', function () {
                get_Print();
            })
            //批量打印
            form.on('submit(get_BatchPrint)', function () {
                get_BatchPrint();
            })
            //退出按钮
            form.on('submit(Exit)', function () {
                if (params[1] != null) {
@@ -267,7 +274,8 @@
                        , { type: 'numbers', title: '序号', width: 100, totalRow: true }
                        , { field: 'HICMOInterID', title: '生产订单内码', width: 100, hide: true }//生产订单内码
                        , { field: 'HICMOEntryID', title: '生产订单子内码', width: 100, hide: true }//生产订单子内码
                        , { field: 'HICMOBillNo', title: '生产订单', width: 120 }//生产订单号
                        , { field: 'HICMOBillNo', title: '生产订单内码', width: 120 }//生产订单号
                        , { field: 'HWorkShopID', title: '生产车间', width: 100, hide: true }//生产车间内码
                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 150 }
                        , { field: '物料名称', title: '物料名称', width: 150 }
@@ -275,6 +283,7 @@
                        , { field: 'HQty', title: '订单总数', width: 110 }
                        , { field: 'HFinishQty', title: '已生成流转卡数', width: 130 }
                        , { field: 'HUsableQty', title: '剩余可用数量', width: 130 }
                        , { field: 'HLotcardQty', title: '单张流转卡数', width: 130 }
                        , { field: 'HProQty', title: '流转卡数量', width: 110, edit: 'text' }
                        , { field: 'HBatchNo', title: '批号', width: 110, edit: 'text' }
                        , { field: 'HGroupNumber', title: '班组', width: 110, edit: 'text' }
@@ -291,8 +300,8 @@
                //初始表格数据
                var rowdata = [{
                    "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "物料代码": ""
                    , "物料名称": "", "规格型号": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0
                    "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HWorkShopID": 0, "HMaterID": 0, "物料代码": ""
                    , "物料名称": "", "规格型号": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0, "HLotcardQty": 0
                    , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0
                    , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HBatchManager": "", "HGroupNumber": ""
                }];
@@ -332,11 +341,13 @@
                                rowdata.push(
                                    {
                                        "HICMOInterID": subdata[i].HICMOInterID, "HICMOEntryID": subdata[i].HICMOEntryID, "HICMOBillNo": subdata[i].HICMOBillNo
                                        , "HMaterID": subdata[i].HMaterID, "物料代码": subdata[i].物料代码, "物料名称": subdata[i].物料名称
                                        , "HWorkShopID": subdata[i].HWorkShopID, "HMaterID": subdata[i].HMaterID, "物料代码": subdata[i].物料代码
                                        , "物料名称": subdata[i].物料名称
                                        , "规格型号": subdata[i].规格型号, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty
                                        , "HUsableQty": subdata[i].HUsableQty, "HProQty": subdata[i].HProQty, "HRoutingInterID": subdata[i].HRoutingInterID
                                        , "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty, "HDate": formatDate(subdata[i].HDate)
                                        , "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": "", "HBatchManager": subdata[i].是否启用批次, "HGroupNumber": ""
                                        , "HUsableQty": subdata[i].HUsableQty, "HLotcardQty": subdata[i].HLotcardQty, "HProQty": subdata[i].HProQty
                                        , "HRoutingInterID": subdata[i].HRoutingInterID, "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty
                                        , "HDate": formatDate(subdata[i].HDate), "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": subdata[i].HBatchNo
                                        , "HBatchManager": subdata[i].是否启用批次, "HGroupNumber": ""
                                    }
                                )
                            }
@@ -352,6 +363,7 @@
                                    , { field: 'HICMOInterID', title: '生产订单内码', width: 100, hide: true }//生产订单内码
                                    , { field: 'HICMOEntryID', title: '生产订单子内码', width: 100, hide: true }//生产订单子内码
                                    , { field: 'HICMOBillNo', title: '生产订单', width: 120 }//生产订单号
                                    , { field: 'HWorkShopID', title: '生产车间内码', width: 100, hide: true }//生产车间内码
                                    , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                                    , { field: '物料代码', title: '物料代码', width: 150 }
                                    , { field: '物料名称', title: '物料名称', width: 150 }
@@ -359,6 +371,7 @@
                                    , { field: 'HQty', title: '订单总数', width: 110 }
                                    , { field: 'HFinishQty', title: '已生成流转卡数', width: 130 }
                                    , { field: 'HUsableQty', title: '剩余可用数量', width: 130 }
                                    , { field: 'HLotcardQty', title: '单张流转卡数', width: 130 }
                                    , { field: 'HProQty', title: '流转卡数量', width: 110, edit: 'text' }
                                    , { field: 'HBatchNo', title: '批号', width: 110, edit: 'text' }
                                    , { field: 'HGroupNumber', title: '班组', width: 110, edit: 'text' }
@@ -439,6 +452,7 @@
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { icon: 1 });
                            $('#print-btn').removeClass("layui-btn-disabled").attr("disabled", false);//打印按钮启用
                            $('#batchPrint-btn').removeClass("layui-btn-disabled").attr("disabled", false);//批量打印按钮启用
                            layer.close(index);
                        }
                        else {
@@ -471,7 +485,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../计划管理/工艺路线/Gy_RoutingBillList.html", "yes"]
                                , content: ['../../计划管理/工艺路线/Gy_RoutingBillList.html?HMaterID=' + obj.data.HMaterID + '&HProID=' + 0, 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -499,7 +513,7 @@
            }
            //打印
            function get_BatchPrint() {
            function get_Print() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length >= 1) {
@@ -525,6 +539,91 @@
                }
            }
            //批量打印
            var time;
            var num = 0;
            function get_BatchPrint() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length > 0) {
                    //逻辑删除方法
                    layer.confirm("确认要批量打印吗?", { title: "确认" }, function (index) {
                        time = setInterval(function () {
                            dy_PL(data);
                        }, 1000);
                        //关闭当前frame
                        layer.close(index);
                    })
                }
                else {
                    layer.msg('请选择数据打印!');
                }
            }
            function dy_PL(rest) {
                var HInterID = rest[num].HInterID.toString();
                var sWhere = "select cast( b.流水号 as float) æµæ°´å·,生产订单号,a.生产数量,a.流转卡数量,a.产品代码,a.单据号,case when ISNULL(a.生产规格,'')='' then a.产品规格 else a.生产规格 end äº§å“è§„æ ¼,a.产品名称,a.日期,a.单据号,b.工序代码,b.工序名称,a.批号,b.工艺工作中心,b.工艺工艺参数,a.生产车间,b.工段名称,b.生产订单数量 from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid   where b.hmainid in(" + HInterID + ") and b.工序代码 != '9999' order by cast(b.流水号 as int)"
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //方法所在页面和方法名
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            if (data.data.length != 0) {
                                var dataPrint = [];
                                for (var i = 0; i < data.data.length; i++) {
                                    data.data[i]["流水号"] = data.data[i]["流水号"].toFixed(1);
                                    dataPrint.push(data.data[i])
                                }
                                var Customer = {
                                    "Table": dataPrint
                                }
                                var args = {
                                    type: "print",//打印模式
                                    //type: "preview",//预览模式
                                    showOptionDlg: false, //如果不显示打印对话框而直接打印,将此行注释去掉即可
                                    report: urlAddRandomNo("../../grf/流转卡JSON.grf"),
                                    data: Customer
                                };
                                console.log(data.data[0].单据号);
                                //var args = {
                                //    report: urlAddRandomNo("../../grf/cs10.grf"),
                                //    data: Customer
                                //};
                                webapp_ws_ajax_run(args);
                                if (rest.length <= num + 1) {
                                    num = 0;
                                    clearInterval(time);
                                } else {
                                    num++;
                                }
                            } else {
                                layer.msg("查无数据!");
                            }
                        }
                        else {
                            layer.msg(data.Message, { icon: 5 });
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        layer.msg("错误:" + err, { icon: 5 });
                    }
                })
            }
            //表格行内事件删除
            function set_GridDelete(obj) {
                var data = obj.data;