| | |
| | | var HSourceID1 = ""; //生产资源ID1 |
| | | var HSourceName1 = ""; //生产资源1 |
| | | var HSourceInterID = ""; //源单主内码 |
| | | var HProcExchInterID = ""; //流转卡id |
| | | var HSourceEntryID = ""; //源单子内码 |
| | | var HSourceBillNo = ""; //源单单号 |
| | | var HSourceBillType = ""; //源单类型 |
| | |
| | | var HManagerName = ""; //负责人 |
| | | var HGroupName = ""; //班组 |
| | | var HProcID = 0; //工序 |
| | | var HSBName = ""; //设备名称 |
| | | |
| | | //注意:选项卡 依赖 element 模块,否则无法进行功能性操作 |
| | | layui.config({ |
| | |
| | | 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 = ''; |
| | |
| | | html1 += '<h1><span>生产班组:</span><span id="HGroupName' + i + '">' + LoadData[i - 1].GroupName + '</span></h1>'; |
| | | //html1 += '<h1><span>当前工单:</span><span id="po' + i + '">' + (LoadData[i - 1].HSourceBillNo == null ? '' : LoadData[i - 1].HSourceBillNo) + '</span></h1>'; |
| | | //html1 += '<h1><span>产品名称:</span><span id="ptn' + i + '">' + (LoadData[i - 1].HName == null ? '' : LoadData[i - 1].HName) + '</span></h1>'; |
| | | //html1 += '<h1><span>产品规格:</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>'; |
| | | //html1 += '<h1><span>产品规格:</span><span id="pts' + i + '">' + (LoadData[i - 1].HModel == null ? '' : LoadData[i - 1].HModel) + '</span></h1>'; |
| | | html1 += '<h1><span>负责人:</span><span id="us' + i + '">' + LoadData[i - 1].HEmpName + '</span></h1>'; |
| | | switch (LoadData[i - 1].HStatus) { |
| | | case "空闲": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border6"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "开机": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border4"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "停机": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border3"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "生产": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border2"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "维修进行中": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border5"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "维修结束": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | case "维修终止": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border1"></span><span>' + LoadData[i - 1].HStatus + '</span></h1>'; |
| | | break; |
| | | default: |
| | | } |
| | | html1 += '<h1 hidden> <span id="HGroupID' + i + '">' + LoadData[i - 1].HGroupID + '</span></h1>'; |
| | | html1 += '<h1 hidden> <span id="HManagerID' + i + '">' + LoadData[i - 1].HManagerID + '</span></h1>'; |
| | | html1 += '</dd>'; |
| | |
| | | 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) //工单列表数据 |
| | | { |
| | | |
| | |
| | | html1 += '<h1 style="display:none;"><span>单据类型:</span><span id="ty' + (i + 1) + '">' + LoadData1[i].HBillType + '</span></h1>'; |
| | | //HSourceInterID实际取值:Sc_ICMOBillStatus_Tmp HInterID(单据主ID) |
| | | html1 += '<h1 style="display:none;"><span>源单主内码:</span><span id="sm' + (i + 1) + '">' + LoadData1[i].HSourceInterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>流转卡主ID:</span><span id="lzk' + (i + 1) + '">' + LoadData1[i].HProcExchInterID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>源单子内码:</span><span id="sb' + (i + 1) + '">' + LoadData1[i].HSourceEntryID + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>源单单号:</span><span id="sw' + (i + 1) + '">' + LoadData1[i].HSourceBillNo + '</span></h1>'; |
| | | html1 += '<h1 style="display:none;"><span>源单类型:</span><span id="st' + (i + 1) + '">' + LoadData1[i].HSourceBillType + '</span></h1>'; |
| | |
| | | break; |
| | | case "完工": |
| | | html1 += '<h1><span>当前状态:</span><span class="gj_icon color_border4"></span><span>' + LoadData1[i].HICMOStatus + '</span><span style="margin-left:5px;">领料状态:</span><span>' + LoadData1[i].领料状态 + '</span></h1>'; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | html1 += '<span class="prs">生产进度:</span>'; |
| | | html1 += '<div class="layui-progress layui-progress-big" lay-showPercent="yes">'; |
| | |
| | | } |
| | | 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">'; |
| | |
| | | html1 += '<h1><span>当前订单:</span><span>' + LoadData2[i].HSourceBillNo + '</span><div style="margin-left:25px;float:right"><span >巡检次数:</span><span>' + LoadData2[i].巡检次数 + '</span></div></h1>'; |
| | | html1 += '<h1><span>物料名称:</span><span>' + LoadData2[i].HMaterName + '</span><div style="margin-left:25px;float:right"><span >过程检次数:</span><span>' + LoadData2[i].过程检次数 + '</span></div></h1>'; |
| | | html1 += '<h1><span>计划数量:</span><span>' + LoadData2[i].HPlanQty + '</span><div style="margin-left:25px;float:right"><span >当日点检时间:</span><span>' + LoadData2[i].当日点检时间 + '</span></div></h1>'; |
| | | html1 += '<h1><span>已汇报数量:</span><span>' + LoadData2[i].HRelationQty + '</span><div style="margin-left:25px;float:right"><span >最后保养时间:</span><span>' + LoadData2[i].最后保养时间 + '</span></div></h1>'; |
| | | html1 += '<h1><span>已汇报数量:</span><span>' + LoadData2[i].HRelationQty + '</span><div style="margin-left:25px;float:right"><span >最后保养时间:</span><span>' + LoadData2[i].最后保养时间 + '</span></div></h1>'; |
| | | if (LoadData2[i].HRelationQty == 0 || LoadData2[i].HRelationQty == null) { |
| | | html1 += '<h1><span>进度:</span><span>0%</span><div style="margin-left:25px;float:right"><span >点检完成情况:</span><span>' + LoadData2[i].当日点检完成情况 + '</span></div></h1>'; |
| | | } |
| | | else { |
| | | html1 += '<h1><span>进度:</span><span>' + ((LoadData2[i].HRelationQty / LoadData2[i].HPlanQty) * 100).toFixed(2) + '%</span><div style="margin-left:25px;float:right"><span >点检完成情况:</span><span>' + LoadData2[i].当日点检完成情况 + '</span></div></h1>'; |
| | | } |
| | | if (LoadData2[i].安灯未验收数量 == 0 || LoadData2[i].安灯未验收数量 == null) { |
| | | html1 += '<h1><span>异常反馈未验收:</span><span class="gj_icon color_border4"></span><span>' + LoadData2[i].安灯未验收数量 + '</span></h1>'; |
| | | } |
| | | else { |
| | | html1 += '<h1><span>异常反馈未验收:</span><span class="gj_icon color_border5"></span><span>' + LoadData2[i].安灯未验收数量 + '</span></h1>'; |
| | | } |
| | | html1 += '<h1><span>本单运行时间:</span><span>' + getSeconds(LoadData2[i].HSumTimes) + '</span></h1>'; |
| | | html1 += '<h1><span>本资源运行时间:</span><span>' + getSeconds(LoadData2[i].HSourceWorkTime) + '</span></h1>'; |
| | |
| | | return false; |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | return false; |
| | | |
| | |
| | | workcode = $("#wk" + i + "").html(); //通过样式ID获取html内容(工单号) |
| | | HBillType = $("#ty" + i + "").html(); //通过样式ID获取html内容(单据类型) |
| | | HSourceInterID = $("#sm" + i + "").html(); //通过样式ID获取html内容(源单主内码) |
| | | HProcExchInterID = $("#lzk" + i + "").html(); //流转卡ID |
| | | HSourceEntryID = $("#sb" + i + "").html(); //通过样式ID获取html内容(源单子内吗) |
| | | HSourceBillNo = $("#sw" + i + "").html(); //通过样式ID获取html内容(源单单号) |
| | | HSourceBillType = $("#st" + i + "").html(); //通过样式ID获取html内容(源单类型) |
| | |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes'] |
| | | , content: ['质量管理/首件检验单/QC_Add_Edit_FirstPieceCheckBill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID + '&HSourceEntryID=' + HSourceEntryID+'', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | } |
| | |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['质量管理/工序检验单/QC_ProcessCheckBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID, 'yes'] |
| | | , content: ['质量管理/巡检记录单/QC_Add_Edit_PatrolProcCheckOtherill.html?OperationType=2&linterid=' + HProcExchInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HICMOEntryID+ '&HSourceEntryID=' + HSourceEntryID+'', 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | |
| | | function BadGather() { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "不良采集")) { |
| | | layer.alert("单据状态不满足不良采集条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | layer.open({ |
| | |
| | | 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({ |
| | |
| | | }); |
| | | } |
| | | |
| | | //异常按钮点击事件 |
| | | 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({ |
| | |
| | | }); |
| | | } |
| | | |
| | | //检验取样按钮点击事件 |
| | | 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" |
| | |
| | | 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> |
| | |
| | | <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%);display:none;"> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenProcess(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">巡检</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm12 layui-col-md4" onclick="OpenProcess(event,this)"> |
| | | <div class="cnt bottomright"> |
| | | <div class="layui-col-sm12 layui-col-md4"> |
| | | <div class="cnt bottomright" style="pointer-events:none; background-color:rgb(0 0 0 / 10%);display:none;"> |
| | | <span class="layui-icon layui-icon-search imgicon"></span> |
| | | <span class="imgtitle">过程检验</span> |
| | | <span class="imgtitle">末检</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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)"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row layui-col-space10"> |
| | | <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> |
| | | <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> |