| | |
| | | var HBadQty = []; //ä¸è¯æ°é |
| | | var HBadReason = []; //ä¸è¯åå |
| | | var HEmpName = ""; //æä½å |
| | | var HManagerID = 0; |
| | | var HManagerName = ""; //è´è´£äºº |
| | | var HGroupID = 0; //çç»ID |
| | | var HGroupName = ""; //çç» |
| | | var HProcID = 0; //å·¥åº |
| | | var HSBName = ""; //设å¤åç§° |
| | |
| | | } else { |
| | | OperationType = params[params[0]];//æä½ç±»å |
| | | linterid = params[params[1]];//æºåid |
| | | HGroupID = params[params[2]];//çç»ID |
| | | } |
| | | fetchButtonsData(); |
| | | fetchListData(linterid); |
| | | }); |
| | | var HManagerID = 0; |
| | | var HGroupID = 0; |
| | | |
| | | //å è½½å½åç¨æ·æé® |
| | | function fetchButtonsData() { |
| | |
| | | function fetchListData(HSourceID) { |
| | | if (HSourceID != "0" && HSourceID != null && HSourceID!="") { |
| | | $('.ctop').removeClass('check'); //å é¤ä¸åç¶çº§clssæ ·å¼ç¸åçææå
ç´ |
| | | HSourceID1 = HSourceID; |
| | | //æ§è¡èå¨äºä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList", |
| | |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | "HSourceBillType": HSourceBillType, |
| | | "HGroupID": HGroupID |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | //å¿«æ·å¼å·¥ |
| | | function OpenFastWork(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "å¿«æ·å¼å·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å¼å·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | var indexOpen = layer.open({ |
| | | type: 1 |
| | | , title: "确认å¼å·¥å?" |
| | | , closeBtn: false |
| | | , area: '300px;' |
| | | , shade: 0.8 |
| | | , id: 'LAY_layuipro' //设å®ä¸ä¸ªidï¼é²æ¢éå¤å¼¹åº |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btnAlign: 'c' |
| | | , moveType: 1 //ææ½æ¨¡å¼ï¼0æè
1 |
| | | , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">设å¤ç¼å·:' + HSourceName1 + '<br>å·¥åå·:' + workcode + '<br>产ååç§°:' + HMaterName + '<br></div>' |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æ°å¢å¼å·¥å |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESBeginWorkBill/FastBeginWorkBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | layer.close(indexOpen); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«æ·å®å·¥ |
| | | function OpenFastEnd(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "å¿«æ·å®å·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³å®å·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | var indexOpen = layer.open({ |
| | | type: 1 |
| | | , title: "确认å®å·¥å?" |
| | | , closeBtn: false |
| | | , area: '300px;' |
| | | , shade: 0.8 |
| | | , id: 'LAY_layuipro' //设å®ä¸ä¸ªidï¼é²æ¢éå¤å¼¹åº |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btnAlign: 'c' |
| | | , moveType: 1 //ææ½æ¨¡å¼ï¼0æè
1 |
| | | , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">设å¤ç¼å·:' + HSourceName1 + '<br>å·¥åå·:' + workcode + '<br>产ååç§°:' + HMaterName + '<br></div>' |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æ°å¢å¼å·¥å |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESEndWorkBill/FastEndWorkBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | layer.close(indexOpen); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å¿«æ·åå·¥ |
| | | function OpenFastStop(event, obj) { |
| | | if (wktag == 0) { |
| | | layer.alert("è¯·éæ©å·¥åå表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "å¿«æ·åå·¥")) { |
| | | layer.alert("åæ®ç¶æä¸æ»¡è¶³åå·¥æ¡ä»¶!", { icon: 5 }); |
| | | return false; |
| | | } |
| | | var indexOpen = layer.open({ |
| | | type: 1 |
| | | , title: "确认åå·¥å?" |
| | | , closeBtn: false |
| | | , area: '300px;' |
| | | , shade: 0.8 |
| | | , id: 'LAY_layuipro' //设å®ä¸ä¸ªidï¼é²æ¢éå¤å¼¹åº |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btnAlign: 'c' |
| | | , moveType: 1 //ææ½æ¨¡å¼ï¼0æè
1 |
| | | , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">设å¤ç¼å·:' + HSourceName1 + '<br>å·¥åå·:' + workcode + '<br>产ååç§°:' + HMaterName + '<br></div>' |
| | | , btn1: function (index, layero, e) { |
| | | |
| | | //æ°å¢å¼å·¥å |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Sc_MESStopWorkBill/FastStopWorkBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | layer.close(indexOpen); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | "HSourceBillType": HSourceBillType, |
| | | "HGroupID": HGroupID |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | "HSourceBillType": HSourceBillType, |
| | | "HGroupID": HGroupID |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType |
| | | "HSourceBillType": HSourceBillType, |
| | | "HGroupID": HGroupID |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | |
| | | , shade: 0.6 |
| | | , maxmin: false |
| | | , anim: 0 |
| | | , content: ['ç产管ç/è´¨éæ±æ¥å/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , content: ['../../ç产管ç/æ¥å·¥å¹³å°_PDA/è´¨éæ±æ¥/Sc_QualityReportBill_PDA.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | |
| | | } |
| | | , end: function () { |
| | | |
| | | } |
| | | ,success: function (dom, index) { |
| | | var data = []; |
| | | data.push({ |
| | | "HBillType": HBillType, |
| | | "HSourceInterID": HSourceInterID, |
| | | "HSourceEntryID": HSourceEntryID, |
| | | "HSourceBillNo": HSourceBillNo, |
| | | "HSourceBillType": HSourceBillType, |
| | | "HGroupID": HGroupID |
| | | }); |
| | | |
| | | //éè¿ç´¢å¼è·åå°å½åiframeå¼¹åºå± |
| | | var iframe = window['layui-layer-iframe' + index]; |
| | | //è°ç¨iframeå¼¹åºå±å
çæ¹æ³ |
| | | iframe.edit(data); |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | shift: 2, |
| | | area: ['100%', '100%'], |
| | | maxmin: true, |
| | | content: 'ç产管ç/å¼å¸¸åé¦å/Sc_MESExecptFeedBackBillType.html', |
| | | content: '../../ç产管ç/å¼å¸¸åé¦å/Sc_MESExecptFeedBackBillType.html', |
| | | end: function () { |
| | | |
| | | }, |
| | |
| | | }); |
| | | |
| | | return flag; |
| | | case "å¿«æ·å¼å·¥": |
| | | sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID,"type":"å¼å·¥"} |
| | | $.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; |
| | | case "å¿«æ·åå·¥": |
| | | sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "åå·¥" } |
| | | $.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; |
| | | case "å¿«æ·å®å·¥": |
| | | sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "å®å·¥" } |
| | | $.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> |