| | |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/PageTitle.js"></script> |
| | | <script src="../../../layuiadmin/grwebapp.js"></script> |
| | | <style type="text/css"> |
| | | .layui-form-item .layui-inline { |
| | | margin-right: 0; |
| | |
| | | <div class="layui-card-header"> |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>æå°</button> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_Print" disabled>æå°</button> |
| | | <button type="button" id="batchPrint-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>æ¹éæå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" style="margin-left:50px !important;">éåº</button> |
| | | </div> |
| | | </div> |
| | |
| | | }); |
| | | |
| | | //æå° |
| | | form.on('submit(get_Print)', function () { |
| | | get_Print(); |
| | | }) |
| | | |
| | | //æ¹éæå° |
| | | form.on('submit(get_BatchPrint)', function () { |
| | | get_BatchPrint(); |
| | | }) |
| | | |
| | | |
| | | //éåºæé® |
| | | form.on('submit(Exit)', function () { |
| | | if (params[1] != null) { |
| | |
| | | , { type: 'numbers', title: 'åºå·', width: 100, totalRow: true } |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HICMOBillNo', title: 'ç产订åå
ç ', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | |
| | | |
| | | //åå§è¡¨æ ¼æ°æ® |
| | | var rowdata = [{ |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "ç©æä»£ç ": "" |
| | | "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HWorkShopID": 0, "HMaterID": 0, "ç©æä»£ç ": "" |
| | | , "ç©æåç§°": "", "è§æ ¼åå·": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0 |
| | | , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0 |
| | | , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HBatchManager": "", "HGroupNumber": "" |
| | |
| | | rowdata.push( |
| | | { |
| | | "HICMOInterID": subdata[i].HICMOInterID, "HICMOEntryID": subdata[i].HICMOEntryID, "HICMOBillNo": subdata[i].HICMOBillNo |
| | | , "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç , "ç©æåç§°": subdata[i].ç©æåç§° |
| | | , "HWorkShopID": subdata[i].HWorkShopID, "HMaterID": subdata[i].HMaterID, "ç©æä»£ç ": subdata[i].ç©æä»£ç |
| | | , "ç©æåç§°": subdata[i].ç©æåç§° |
| | | , "è§æ ¼åå·": subdata[i].è§æ ¼åå·, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty |
| | | , "HUsableQty": subdata[i].HUsableQty, "HProQty": subdata[i].HProQty, "HRoutingInterID": subdata[i].HRoutingInterID |
| | | , "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty, "HDate": formatDate(subdata[i].HDate) |
| | |
| | | , { field: 'HICMOInterID', title: 'ç产订åå
ç ', width: 100, hide: true }//ç产订åå
ç |
| | | , { field: 'HICMOEntryID', title: 'ç产订ååå
ç ', width: 100, hide: true }//ç产订ååå
ç |
| | | , { field: 'HICMOBillNo', title: 'ç产订å', width: 120 }//ç产订åå· |
| | | , { field: 'HWorkShopID', title: 'ç产车é´å
ç ', width: 100, hide: true }//ç产车é´å
ç |
| | | , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { icon: 1 }); |
| | | $('#print-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æå°æé®å¯ç¨ |
| | | $('#batchPrint-btn').removeClass("layui-btn-disabled").attr("disabled", false);//æ¹éæå°æé®å¯ç¨ |
| | | layer.close(index); |
| | | } |
| | | else { |
| | |
| | | } |
| | | |
| | | //æå° |
| | | function get_BatchPrint() { |
| | | function get_Print() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length >= 1) { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ¹éæå° |
| | | var time; |
| | | var num = 0; |
| | | function get_BatchPrint() { |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | |
| | | if (checkStatus.data.length > 0) { |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("ç¡®è®¤è¦æ¹éæå°å?", { title: "确认" }, function (index) { |
| | | time = setInterval(function () { |
| | | dy_PL(data); |
| | | }, 1000); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©æ°æ®æå°ï¼'); |
| | | } |
| | | } |
| | | |
| | | function dy_PL(rest) { |
| | | var HInterID = rest[num].HInterID.toString(); |
| | | var sWhere = "select cast( b.æµæ°´å· as float) æµæ°´å·,ç产订åå·,a.ç产æ°é,a.æµè½¬å¡æ°é,a.产å代ç ,a.åæ®å·,case when ISNULL(a.çäº§è§æ ¼,'')='' then a.产åè§æ ¼ else a.çäº§è§æ ¼ end 产åè§æ ¼,a.产ååç§°,a.æ¥æ,a.åæ®å·,b.å·¥åºä»£ç ,b.å·¥åºåç§°,a.æ¹å·,b.å·¥èºå·¥ä½ä¸å¿,b.å·¥èºå·¥èºåæ°,a.ç产车é´,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)" |
| | | |
| | | $.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) { |
| | | var dataPrint = []; |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | data.data[i]["æµæ°´å·"] = data.data[i]["æµæ°´å·"].toFixed(1); |
| | | dataPrint.push(data.data[i]) |
| | | } |
| | | |
| | | var Customer = { |
| | | "Table": dataPrint |
| | | } |
| | | |
| | | var args = { |
| | | type: "print",//æå°æ¨¡å¼ |
| | | //type: "preview",//é¢è§æ¨¡å¼ |
| | | showOptionDlg: false, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../../grf/æµè½¬å¡JSON.grf"), |
| | | data: Customer |
| | | }; |
| | | |
| | | console.log(data.data[0].åæ®å·); |
| | | //var args = { |
| | | // report: urlAddRandomNo("../../grf/cs10.grf"), |
| | | // data: Customer |
| | | //}; |
| | | webapp_ws_ajax_run(args); |
| | | |
| | | if (rest.length <= num + 1) { |
| | | num = 0; |
| | | clearInterval(time); |
| | | } else { |
| | | num++; |
| | | } |
| | | |
| | | } else { |
| | | layer.msg("æ¥æ æ°æ®!"); |
| | | } |
| | | |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | }, |
| | | error: function (err) { |
| | | layer.msg("é误:" + err, { icon: 5 }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | //è¡¨æ ¼è¡å
äºä»¶å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |