| | |
| | | function fetchListData(HSourceID) { |
| | | if (HSourceID != "0" && HSourceID != null && HSourceID!="") { |
| | | $('.ctop').removeClass('check'); //å é¤ä¸åç¶çº§clssæ ·å¼ç¸åçææå
ç´ |
| | | HSourceID1 = HSourceID; |
| | | //æ§è¡èå¨äºä»¶ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList", |
| | |
| | | //è°ç¨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 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | |
| | | 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> |