| | |
| | | end: function () { |
| | | |
| | | }, |
| | | }); |
| | | |
| | | /* window.open("../../../views/生产管理/作业指导书/Gy_SOPBill_Video.html?OperationType=5&HMaterID=" + HMaterID + "&HSourceNo=" + workcode + "&HSourceEntryID=" + HSourceEntryID);*/ |
| | | }); |
| | | } |
| | | |
| | | //SIP 作业指导书 |
| | | function SIP(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | var HTypes = "SIP"; |
| | | layer.open({ |
| | | type: 2, |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | title: '作业指导书', |
| | | closeBtn: 1, |
| | | shift: 2, |
| | | area: ['95%', '95%'], |
| | | maxmin: true, |
| | | content: '生产管理/作业指导书/Gy_SOPBill_Video.html?OperationType=5&HMaterID=' + HMaterID + '&HSourceNo=' + workcode + '&HSourceEntryID=' + HSourceEntryID + '&HProcID=' + HProcID + '&HTypes=' + HTypes, |
| | | end: function () { |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //汇报按钮点击事件 |
| | | function OpenReport(event, obj) { |
| | |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: '生产管理/上料防错单/Sc_Add_MaterToSourceBillList.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 OpenMESStopRestoreWorkBill() { |
| | | 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: '生产管理/报工台工序/停工恢复单/Sc_MESStopRestoreWorkBill.html?OperationType=2&linterid=&HSouceBillType=', |
| | | end: function () { |
| | | |
| | | }, |
| | |
| | | //单据状态验证 |
| | | 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 "斯莫尔汇报": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、停工挂起状态 |
| | | break; |
| | | case "报检申请": |
| | | var sWhere = ""; //后续在存储过程加控制 方法是 h_p_IpadIndexButton |
| | | //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 in('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; |
| | | //} |
| | | |
| | | // 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) { |
| | | |
| | | $.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; |
| | | |
| | | if (data.count > 0) { |
| | | flag = true; |
| | | } |
| | | else { |
| | | flag = false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | flag = false; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | else { |
| | | flag = false; |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | flag = false; |
| | | } |
| | | }); |
| | | return flag; |
| | | |
| | | return flag; |
| | | } |
| | | } |
| | | </script> |
| | | </head> |