pzy
2024-09-05 63ba619e1a67b46156c22a45edb1e38d6d1663c3
WebTM/views/IpadIndex.html
@@ -1071,7 +1071,7 @@
                layer.alert("请选择工单列表", { icon: 5 });
                return false;
            }
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "汇报")) {
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "斯莫尔汇报")) {
                layer.alert("单据状态不满足汇报条件!", { icon: 5 });
                return false;
            }
@@ -1330,26 +1330,23 @@
        function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) {
            var flag = false;
            var sWhere = "";
            sWhere = {
                HSourceID: HSourceID1
                , HICMOBillNo: workcode
                , HInterID: HSourceInterID
                , type: btn
            }
            //switch (btn) {
            //    case "开工":
            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //是否有不为开工开工状态、停工状态
            //        break;
            //    case "完工":
            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //是否有不为开工、完工状态
            //        break;
            //    case "停工":
            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //是否有不为停工挂起状态
            //        break;
            //    case "汇报":
            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //是否有不为开工、停工挂起状态
            //        break;
            //    case "报检申请":
            switch (btn) {
                case "开工":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //是否有不为开工开工状态、停工状态
                    break;
                case "完工":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //是否有不为开工、完工状态
                    break;
                case "停工":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //是否有不为停工挂起状态
                    break;
                case "汇报":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //是否有不为开工、停工挂起状态
                    break;
                case "斯莫尔汇报":
                    sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //是否有不为开工、停工挂起状态
                    break;
                case "报检申请":
            //        break;
            //    default: