yangle
2024-09-24 370e2aa3aa67f99b2ccfe495d2cd1450f79c8a0d
WebTM/views/IpadIndex.html
@@ -45,6 +45,7 @@
        var HManagerName = "";      //负责人
        var HGroupName = "";      //班组
        var HProcID = 0;      //工序
        var HSBName = "";   //设备名称
        //注意:选项卡 依赖 element 模块,否则无法进行功能性操作
        layui.config({
@@ -81,8 +82,10 @@
                dataType: "json",//数据类型可以为 text xml json  script  jsonp
                success: function (data) {
                    var LoadData = data.data.h_p_JIT_GetSourceInfoByUser;
                    if (LoadData.length > 0)// 说明验证成功了,
                    {
                        HSBName = LoadData[0].HSourceName;
                        for (var i = 1; i <= LoadData.length + 1; i++) {
                            if (i <= LoadData.length) {
                                var html1 = '';
@@ -185,7 +188,7 @@
                        var LoadData1 = data.data.h_p_JIT_GetWorkBillListInfoBySource;
                        var LoadData2 = data.data.h_p_JIT_GetWorkBillListInfoBySource1;
                        var LoadData3 = data.data.h_p_JIT_GetWorkBillListInfoBySource2; //时间点产量
                        var LoadData4 = data.data.h_p_JIT_GetWorkBillListInfoBySource3; //不良分析
                        var LoadData4 = data.data.h_p_JIT_GetWorkBillListInfoBySource3; //不良分析
                        if (LoadData1.length > 0)  //工单列表数据
                        {
@@ -246,6 +249,7 @@
                        }
                        if (LoadData2.length > 0)  //当前状态数据
                        {
                            HSBName = LoadData2[0].HSourceName;
                            for (var i = 0; i < LoadData2.length; i++) {
                                var html1 = '';
                                html1 += '<div class="layui-col-sm12 layui-col-md12">';
@@ -991,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%']
@@ -1063,6 +1071,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', //加上边框
@@ -1106,6 +1118,208 @@
            });
        }
        //设备启动点检按钮点击事件
        function BeginDotCheck(event, obj) {
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '新增设备启动点检单',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '车间管理/启动点检单/Sc_WorkBeginDotCheckBill.html?OperationType=4&linterid=&HSouceBillType=',
                end: function () {
                },
                success: function (dom, index) {
                    var data = [];
                    data.push({
                        "HMaterID": HMaterID,
                        "HProcID": HProcID,
                        "HSourceID": HSourceID1,
                        "SCOrder": HSourceBillNo
                    });
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //异常按钮点击事件
        function Abnormal (event, obj) {
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '异常反馈类型',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '生产管理/异常反馈单/Sc_MESExecptFeedBackBillType.html',
                end: function () {
                },
                success: function (dom, index) {
                    var data = [];
                    data.push({
                        "HICMOBillNo": HICMOBillNo,//工单号
                        "HSourceName": HSBName, //设备
                        "HSourceBillNo": HSourceBillNo //工序流转卡
                    });
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //防错验证清单按钮点击事件
        function PreventErrMouldCheck(event, obj) {
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '新增防错验证',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '车间管理/防错验证/Qc_PreventErrMouldCheckBill.html?OperationType=4&linterid=&HSouceBillType=',
                end: function () {
                },
                success: function (dom, index) {
                    var data = [];
                    data.push({
                        "HMaterID": HMaterID,
                        "HProcID": HProcID,
                        "SCOrder": HSourceBillNo
                    });
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //检验取样按钮点击事件
        function TakeSample(event, obj) {
            if (wktag == 0) {
                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: '质量管理/检验取样还样单/QC_Add_TakeSampleCheckBill.html?OperationType=2&linterid=&HSouceBillType=',
                end: function () {
                },
                success: function (dom, index) {
                    var data = [];
                    data.push({
                        "HBillType": HBillType,
                        "HSourceInterID": HSourceInterID,
                        "HSourceEntryID": HSourceEntryID,
                        "HSourceBillNo": HSourceBillNo,
                        "HSourceBillType": HSourceBillType
                    });
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //工艺参数点检点击事件
        function TechParam(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: '设备管理/设备工艺参数订单点检表/SB_EquipICMOTechParamBillEdit.html?OperationType=4&linterid=&HEntryID=',
                end: function () {
                },
                success: function (dom, index) {
                    var data = [];
                    data.push({
                        "HBillType": HBillType,
                        "HSourceInterID": HSourceInterID,
                        "HSourceEntryID": HSourceEntryID,
                        "HSourceBillNo": HSourceBillNo,
                        "HSourceBillType": HSourceBillType
                    });
                    //通过索引获取到当前iframe弹出层
                    var iframe = window['layui-layer-iframe' + index];
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //异常签到处理点击事件
        function SingErrMsg(event, obj) {
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '新增异常签到处理单',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '生产管理/异常反馈单/OA_ErrMsgBackSignBill_BrushCard.html?OperationType=2',
                end: function () {
                }
            });
        }
        //异常验收点击事件
        function ErrMsgBackCheck(event, obj) {
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                title: '新增异常反馈验收单',
                closeBtn: 1,
                shift: 2,
                area: ['100%', '100%'],
                maxmin: true,
                content: '质量管理/异常反馈/OA_ErrMsgBackSelfQuery_BGT.html?OperationType=2',
                end: function () {
                }
            });
        }
        //退出
        function Esc(event, obj) {
            parent.location.href = "index.html"
@@ -1129,34 +1343,38 @@
                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:
                    //        break;
                    //    default:
                    //}
                    $.ajax({
                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
                        type: "GET",
                        data: { "sWhere": JSON.stringify(sWhere) },
                        dataType: "json",//数据类型可以为 text xml json  script  jsonp
                        async: false,
                        success: function (data) {
                            if (data.count > 0) {
                                flag = true;
                            }
                            else {
                                flag = false;
                            }
                        },
                        error: function (err) {
                            flag = false;
                        }
                    });
                    return flag;
            }
            $.ajax({
                url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
                type: "GET",
                data: { "sWhere": sWhere },
                dataType: "json",//数据类型可以为 text xml json  script  jsonp
                async: false,
                success: function (data) {
                    if (data.count > 0) {
                        flag = true;
                    }
                    else {
                        flag = false;
                    }
                },
                error: function (err) {
                    flag = false;
                }
            });
            return flag;
        }
    </script>
</head>
@@ -1291,7 +1509,7 @@
                            <div class="layui-col-sm12 layui-col-md4" onclick="OpenMaterToSource(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-engine imgicon"></span>
                                    <span class="imgtitle">上料防呆</span>
                                    <span class="imgtitle">上料防错</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="BadGather(event,this)">
@@ -1308,10 +1526,10 @@
                                    <span class="imgtitle">停工</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4">
                                <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%)">
                            <div class="layui-col-sm12 layui-col-md4" onclick="Abnormal(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-unlink imgicon"></span>
                                    <span class="imgtitle">异常</span>
                                    <span class="imgtitle">异常申请</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="Esc(event,this)">
@@ -1334,7 +1552,48 @@
                                    <span class="imgtitle">当前工单(汇报)</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="BeginDotCheck(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-search imgicon"></span>
                                    <span class="imgtitle">设备启动点检</span>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-sm12 layui-col-md4" onclick="PreventErrMouldCheck(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-engine imgicon"></span>
                                    <span class="imgtitle">防错验证</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="TakeSample(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-form imgicon"></span>
                                    <span class="imgtitle">检验取样</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="TechParam(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-tabs imgicon"></span>
                                    <span class="imgtitle">工艺参数点检</span>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-sm12 layui-col-md4" onclick="SingErrMsg(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-layer imgicon"></span>
                                    <span class="imgtitle">异常签到处理</span>
                                </div>
                            </div>
                            <div class="layui-col-sm12 layui-col-md4" onclick="ErrMsgBackCheck(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-layer imgicon"></span>
                                    <span class="imgtitle">异常验收</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>