| | |
| | | var HSourceID1 = ""; //生产资源ID1 |
| | | var HSourceName1 = ""; //生产资源1 |
| | | var HSourceInterID = ""; //源单主内码 |
| | | var HProcExchInterID = ""; //流转卡id |
| | | var HSourceEntryID = ""; //源单子内码 |
| | | var HSourceBillNo = ""; //源单单号 |
| | | var HSourceBillType = ""; //源单类型 |
| | |
| | | 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>'; |
| | |
| | | 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 () { |
| | | |
| | |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "汇报")) { |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "斯莫尔汇报")) { |
| | | layer.alert("单据状态不满足汇报条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | //异常签到处理点击事件 |
| | | 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" |
| | |
| | | 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 "斯莫尔汇报": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、停工挂起状态 |
| | | break; |
| | | case "报检申请": |
| | | |
| | | // 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; |
| | | } |
| | | //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": 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; |
| | | } |
| | | </script> |
| | | </head> |
| | |
| | | <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-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> |