杨乐
2022-02-10 5ce69179bf655ea4760c1fcc76b8d4b5e421f3de
WebTM/views/IpadStepIndex.html
@@ -376,7 +376,7 @@
            HICMOInterID = $("#df" + i + "").html();     //生产订单主内码
            HICMOEntryID = $("#ds" + i + "").html();     //生产订单子内码
            HProcID = $("#ps" + i + "").html();          //工序ID
            console.log(HProcID);
            if (workcode != "" && workcode != null) {
                $('.cns').removeClass('check1');  //删除不同父级clss样式相同的所有元素
@@ -715,6 +715,8 @@
                },
                success: function (dom, index) {
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    var data = [];
                    data.push({
                        "workcode": workcode,
@@ -725,11 +727,49 @@
                        "HMaker": sessionStorage["HUserName"],    //sessionStorage["HUserName"]
                        "Czybm": sessionStorage["Czybm"],
                        //"HEmpID": "0",    //sessionStorage["HEmpID"]
                        "HSourceBillType": HSourceBillType
                        "HSourceInterID": HSourceInterID,
                        "HSourceBillType": HSourceBillType,
                        "HProcID": HProcID
                    });
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //返工申请单按钮点击事件
        function OpenReturn(event, obj) {
            if (wktag == 0) {
                layer.alert("请选择工单列表", { icon: 5 });
                return false;
            }
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "返工")) {
                layer.alert("单据状态不满足返工条件!", { icon: 5 });
                return false;
            }
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '新增返工单',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '生产管理/报工台工序/返工/Sc_Add_MESReturnStepWorkBillList.html?OperationType=2&linterid=&HSouceBillType=',
                end: function () {
                },
                success: function (dom, index) {
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    var data = [];
                    data.push({
                        "HBillType": HBillType,
                        "HSourceInterID": HSourceInterID,
                        "HSourceEntryID": HSourceEntryID,
                        "HSourceBillNo": HSourceBillNo,
                        "HSourceBillType": HSourceBillType
                    });
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
@@ -750,7 +790,7 @@
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '生产管理/上料防错单/Sc_Add_MaterToSourceBillList.html?OperationType=2&linterid=&HSouceBillType=',
                content: '生产管理/报工台工序/防错/Sc_Add_MaterToSourceStepBillList.html?OperationType=2&linterid=&HSouceBillType=',
                end: function () {
                },
@@ -786,7 +826,7 @@
                , shade: 0.6
                , maxmin: false
                , anim: 0
                , content: ['生产管理/质量汇报单/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
                , content: ['生产管理/报工台工序/不良采集/Sc_QualityReportStepBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
                , resize: false
                , cancel: function () {
@@ -812,6 +852,7 @@
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '生产管理/异常反馈单/Sc_Add_MESExecptFeedBackBillList.html?OperationType=2&linterid=&HSouceBillType=',
                end: function () {
@@ -843,7 +884,7 @@
        //单据状态验证
        function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) {
            var flag = false;
            var sWhere = "";
            var sWhere = ""; //任务单状态(0待生产,1生产中,2挂起,3已完工)
            switch (btn) {
                case "开工":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //是否有不为开工开工状态、停工状态
@@ -859,6 +900,9 @@
                    break;
                case "报检申请":
                    break;
                case "返工":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //是否有不为开工、停工挂起状态
                    break;
                default:
            }
@@ -981,7 +1025,7 @@
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-sm12 layui-col-md3" onclick="">
                            <div class="layui-col-sm12 layui-col-md3" onclick="OpenReturn(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-return imgicon"></span>
                                    <span class="imgtitle">返工申请</span>