| | |
| | | |
| | | //èªå¨æå° |
| | | if (option.data.length > 0) { |
| | | get_BatchPrint(); |
| | | get_BatchPrint(HICMOInterID, HICMOEntryID); |
| | | } |
| | | } |
| | | else { |
| | |
| | | //æ¹éæå° |
| | | var time; |
| | | var num = 0; |
| | | function get_BatchPrint() { |
| | | function get_BatchPrint(HICMOInterID, HICMOEntryID) { |
| | | //æå°é´é |
| | | var HTime = $("#HTime").val(); |
| | | |
| | | time = setInterval(function () { |
| | | dy_PL(option.data); |
| | | dy_PL(HICMOInterID, HICMOEntryID, option.data); |
| | | }, HTime*1000); |
| | | } |
| | | |
| | | function dy_PL(rest) { |
| | | var HItemID = rest[num].HBarCodeID.toString(); |
| | | var sWhere = "select top 1 HBarCode æ¡ç ç¼å·,isnull(ms.HCusRelationNumber,'') SKU from Gy_BarCodeBill a with(nolock) left join Gy_Material m with(nolock) on a.HMaterID = m.HItemID left join Gy_MateNumRelation_Sec ms with(nolock) on m.HMASTERID = ms.HMaterID where a.HItemID = " + HItemID |
| | | function dy_PL(HICMOInterID, HICMOEntryID,rest) { |
| | | //var HItemID = rest[num].HBarCodeID.toString(); |
| | | var sWhere = "select top 1 a.HItemID,HBarCode æ¡ç ç¼å·,isnull(ms.HCusRelationNumber,'') SKU from Gy_BarCodeBill a with(nolock) left join Gy_Material m with(nolock) on a.HMaterID = m.HItemID left join Gy_MateNumRelation_Sec ms with(nolock) on m.HMASTERID = ms.HMaterID where a.HSourceInterID = " + HICMOInterID + " and a.HSourceEntryID = " + HICMOEntryID + " and a.HPrintQty = 0 order by a.HItemID asc"; |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | |
| | | num++; |
| | | } |
| | | |
| | | //var sql = "update a set HPrintQty = HPrintQty + 1 from Gy_BarCodeBill a with(nolock) where HItemID = " + HInterID ; |
| | | //$.ajax({ |
| | | // type: "GET", |
| | | // url: GetWEBURL() + "/Gy_SOPBillList/UpDelSQL", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | // async: false, |
| | | // data: { "sWhere": sql }, |
| | | // success: function (result) { |
| | | // if (result.data.code != 1) { |
| | | // layer.alert("æ´æ°æå°æ¥æå¼å¸¸ï¼" + result.data.Message); |
| | | // } |
| | | // } |
| | | //}) |
| | | var sql = "update a set HPrintQty = HPrintQty + 1 from Gy_BarCodeBill a with(nolock) where HItemID = " + data.data[0].HItemID; |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/UpDelSQL", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sql }, |
| | | success: function (result) { |
| | | //if (result.data.code != 1) { |
| | | // layer.alert("æ´æ°æå°æ¥æå¼å¸¸ï¼" + result.data.Message); |
| | | //} |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |