1
yxj
2024-08-26 ba1068ace2141a07c3b8af169a93012b29d2ea4a
WebTM/views/IpadIndex.html
@@ -995,6 +995,10 @@
                layer.alert("请选择工单列表", { icon: 5 });
                return false;
            }
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "不良采集")) {
                layer.alert("单据状态不满足不良采集条件!", { icon: 5 });
                return false;
            }
            layer.open({
                type: 2
                , area: ['100%', '100%']
@@ -1065,6 +1069,10 @@
        function CodingReport(event, obj) {
            if (wktag == 0) {
                layer.alert("请选择工单列表", { icon: 5 });
                return false;
            }
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "汇报")) {
                layer.alert("单据状态不满足汇报条件!", { icon: 5 });
                return false;
            }
            layer.open({
@@ -1244,6 +1252,10 @@
                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', //加上边框
@@ -1284,29 +1296,35 @@
        function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) {
            var flag = false;
            var sWhere = "";
            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 "报检申请":
                    break;
                default:
            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 "报检申请":
            //        break;
            //    default:
            //}
            $.ajax({
                url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
                type: "GET",
                data: { "sWhere": sWhere },
                data: { "sWhere": JSON.stringify(sWhere) },
                dataType: "json",//数据类型可以为 text xml json  script  jsonp
                async: false,
                success: function (data) {