| | |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/grwebapp.js"></script> |
| | | <style type="text/css"> |
| | | |
| | | /*begin æ¤æ ·å¼ç¨äºæ¶é¤è¡å
ç´ ä¸å¸å±å®½åº¦ä¸å¤çé®é¢*/ |
| | |
| | | <div class="layui-input-block"> |
| | | <!--<button type="button" class="layui-btn" id="ToolPrint" lay-submit="" lay-filter="ToolPrint">é¢è§æå°</button>--> |
| | | <button type="button" class="layui-btn" id="ToolCreate" lay-submit="" lay-filter="ToolCreate">çæ</button> |
| | | <button type="button" class="layui-btn" id="PausePrint" lay-submit="" lay-filter="PausePrint">æåæå°</button> |
| | | <button type="button" class="layui-btn" id="ContinuePrint" lay-submit="" lay-filter="ContinuePrint">ç»§ç»æå°</button> |
| | | <button type="button" class="layui-btn" id="ToolExit" lay-submit="" lay-filter="ToolExit">éåº</button> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item"> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç产订å</label> |
| | | <div class="layui-input-inline"> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æå°é´é(ç§)</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HTime" id="HTime" autocomplete="off" value="3"> |
| | | |
| | | <input class="layui-input" name="HTime" id="HTime" autocomplete="off" value="3" onfocus="this.select();"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ¡ç ç¼å·</label> |
| | | <div class="layui-input-inline" style="width:600px;"> |
| | | <input class="layui-input" name="HBarCode" id="HBarCode" autocomplete="off" style="float:left;width:410px;" onfocus="this.select();" placeholder="请è¾å
¥åä¸ªè¡¥ææ¡ç ç¼å·ï¼ä¸æ¯ææ¹éè¡¥æ"> |
| | | <button type="button" class="layui-btn" id="PrintBarCode" lay-submit="" lay-filter="PrintBarCode" style="float:left;">è¡¥ææ¡ç </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var sWhere = ""; |
| | | var HModName = "Cj_SachetBarCodePrint"; |
| | | var titleData = [];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var HWhetherToPrint = true; //æ¯å¦æå° |
| | | |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //æ¡ç çæ |
| | | form.on('submit(ToolCreate)', function (data) { |
| | | if (Number($("#HTime").val()) < Number(3)) { |
| | | layer.msg("æå°é´éä¸å
许å°äº3ç§ï¼") |
| | | return; |
| | | } |
| | | |
| | | $('#ToolCreate').addClass("layui-btn-disabled").attr("disabled", true);//çææé®ç¦ç¨ |
| | | SaveBarCodeCreate(); |
| | | }) |
| | | |
| | | }) |
| | | |
| | | //æåæå° |
| | | form.on('submit(PausePrint)', function (data) { |
| | | layer.confirm("æ¯å¦ç¡®è®¤æåæå°?", { |
| | | btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index) { |
| | | layer.close(index); |
| | | HWhetherToPrint = false; |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | //ç»§ç»æå° |
| | | form.on('submit(ContinuePrint)', function (data) { |
| | | if (Number($("#HTime").val()) < Number(3)) { |
| | | layer.msg("æå°é´éä¸å
许å°äº3ç§ï¼") |
| | | return; |
| | | } |
| | | |
| | | layer.confirm("æ¯å¦ç»§ç»æå°?", { |
| | | btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index) { |
| | | layer.close(index); |
| | | HWhetherToPrint = true; |
| | | |
| | | var HICMOInterID = $("#HICMOInterID").val(); |
| | | var HICMOEntryID = $("#HICMOEntryID").val(); |
| | | //è°ç¨æå°æ¹æ³ |
| | | get_BatchPrint(HICMOInterID, HICMOEntryID); |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | //è¡¥ææ¡ç |
| | | form.on('submit(PrintBarCode)', function (data) { |
| | | PrintBarCode(); |
| | | }) |
| | | |
| | | //æ¡ç ç¼å·åè½¦æ¹æ³ |
| | | $('#HBarCode').on('keydown', function (event) { |
| | | if (event.keyCode == 13) { |
| | | PrintBarCode(); |
| | | } |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(ToolExit)', function (data) { |
| | | if (linterid == undefined) { |
| | |
| | | |
| | | //èªå¨æå° |
| | | 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 HInterID = rest[num].HBarCodeID.toString(); |
| | | var sWhere = "select cast( b.æµæ°´å· as float) æµæ°´å·,ç产订åå·,a.éå®è®¢åå·,a.ç产æ°é,a.æµè½¬å¡æ°é,a.产å代ç ,a.åæ®å·,case when ISNULL(a.çäº§è§æ ¼,'')='' then a.产åè§æ ¼ else a.çäº§è§æ ¼ end 产åè§æ ¼,a.产ååç§°,a.æ¥æ,a.åæ®å·,b.å·¥åºä»£ç ,b.å·¥åºåç§°,a.æ¹å·,b.å·¥èºå·¥ä½ä¸å¿,b.å·¥èºå·¥èºåæ°,a.ç产车é´,b.工段åç§°,b.çäº§è®¢åæ°é from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid where b.hmainid in(" + HInterID + ") and b.å·¥åºä»£ç != '9999' order by cast(b.æµæ°´å· as int)" |
| | | 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", |
| | |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | if (data.data[0].SKU == "") { |
| | | layer.msg("ç©æSKUæªç»´æ¤ï¼è¯·è系管çå确认ï¼"); |
| | | return; |
| | | } |
| | | |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | dataPrint.push(data.data[i]) |
| | |
| | | type: "print",//æå°æ¨¡å¼ |
| | | //type: "preview",//é¢è§æ¨¡å¼ |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/æµè½¬å¡JSON.grf"), |
| | | report: urlAddRandomNo("../../grf/é¦åæ ç¾JSON3.grf"), |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log(data.data[0].åæ®å·); |
| | | console.log("æå°é¦åæ¡ç ï¼" + data.data[0].æ¡ç ç¼å·); |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | if (rest.length <= num + 1) { |
| | | if (rest.length <= num + 1 || HWhetherToPrint == false) { |
| | | num = 0; |
| | | clearInterval(time); |
| | | } else { |
| | | 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); |
| | | //} |
| | | } |
| | | }) |
| | | |
| | | //è¿ç«è®°å½ä¿å |
| | | txtHBarCodeSN_KeyDown(data.data[0].æ¡ç ç¼å·); |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | |
| | | |
| | | } |
| | | |
| | | //è¡¥ææ¡ç |
| | | function PrintBarCode() { |
| | | var HBarCode = $("#HBarCode").val(); |
| | | |
| | | 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.HBarCode = '" + HBarCode + "'"; |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: false, |
| | | data: { "sWhere": sWhere }, |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | if (data.data.length != 0) { |
| | | if (data.data[0].SKU == "") { |
| | | layer.msg("ç©æSKUæªç»´æ¤ï¼è¯·è系管çå确认ï¼"); |
| | | return; |
| | | } |
| | | |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | dataPrint.push(data.data[i]) |
| | | } |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | |
| | | var args = { |
| | | type: "print",//æå°æ¨¡å¼ |
| | | //type: "preview",//é¢è§æ¨¡å¼ |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/é¦åæ ç¾JSON3.grf"), |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log("æå°é¦åæ¡ç ï¼" + data.data[0].æ¡ç ç¼å·); |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | 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("æ¥æ æ°æ®!"); |
| | | } |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | /** |
| | | * é¦åä¿¡æ¯è¿ç« |
| | | * @param HBarCode |
| | | */ |
| | | //ééç å车æ¥è¯¢ |
| | | function txtHBarCodeSN_KeyDown(HBarCode) { |
| | | |
| | | var data = { |
| | | "field": { |
| | | "HProcID": "183340", "HBatchNo": "", |
| | | "HGroupID": "119", "HSourceID": 0, |
| | | "HPRDOrgID": sessionStorage["OrganizationID"], |
| | | "HEmpID": 0, "HDeptID": 0 |
| | | } |
| | | }; |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = HBarCode; |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"]; |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Cj_SingleStation/AddStationOutBillList", |
| | | async: false, |
| | | data: { "sMainSub": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | |
| | | } |
| | | else { |
| | | layer.msg(data1.Message, { icon: 5, btn: ["确认"], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "åºç°é误" }); |
| | | } |
| | | |
| | | }, |
| | | error: function (err) { |
| | | layer.msg(get_MessageError("é误:" + err, sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]确认', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]温馨æç¤º", sessionStorage["HTranSlate"]) }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(sSubStr) { |
| | | var Result = true; |