| | |
| | | printCheck = function(){ |
| | | var data = view.get("#dataGridMain.currentEntity"); |
| | | if(!data) return; |
| | | if("OUT" == data.get("type")){ |
| | | $alert("出库数据不支持打印!"); |
| | | return; |
| | | } |
| | | |
| | | if("DEL" == data.get("recordStatus")){ |
| | | $alert("删除的数据不支持打印!"); |
| | | return; |
| | | } |
| | | if("ERROR" == data.get("recordStatus")){ |
| | | $alert("异常终止的数据不支持打印!"); |
| | | $alert("异常处理的信息不支持打印!"); |
| | | return; |
| | | } |
| | | view.get("#ajaxPrintCheck").set("parameter",data).execute(function(result){ |
| | |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * 批量打印,多选 |
| | | */ |
| | | printBatchCheck = function(){ |
| | | var datas = view.get("#dataGridMain").get("selection"); |
| | | if(datas){ |
| | | if(datas.length <= 0){ |
| | | $alert("尚未选择数据!"); |
| | | return; |
| | | } |
| | | var LODOP = CLODOP; |
| | | LODOP.PRINT_INIT("称重单"); |
| | | LODOP.SET_PRINT_PAGESIZE(1,2100,1400, "A4"); |
| | | datas.each(function(data){ |
| | | //console.log(data); |
| | | if("DEL" == data.get("recordStatus")){ |
| | | $notify("删除的数据不支持打印!"); |
| | | return true; |
| | | } |
| | | if("ERROR" == data.get("recordStatus")){ |
| | | $notify("异常终止的数据不支持打印!"); |
| | | return true; |
| | | } |
| | | view.get("#ajaxPrintCheck").set("parameter",data).execute(function(result){ |
| | | LODOP.NewPage(); |
| | | LODOP.ADD_PRINT_HTM(0, 0, "100%","100%", result); |
| | | }); |
| | | }); |
| | | $notify("开始调用打印机程序!"); |
| | | LODOP.PREVIEW(); |
| | | }else{ |
| | | $alert("请勾选数据!"); |
| | | } |
| | | }; |
| | | |
| | | //打印称重单 |
| | | //打印过磅单 |
| | | printWeight = function(){ |
| | | var data = view.get("#dataGridMain.currentEntity"); |
| | | if(!data) return; |
| | | |
| | | if("DEL" == data.get("recordStatus")){ |
| | | $alert("删除的数据不支持打印!"); |
| | | return; |
| | | } |
| | | if("ERROR" == data.get("recordStatus")){ |
| | | $alert("异常终止的数据不支持打印!"); |
| | | $alert("异常处理的信息不支持打印!"); |
| | | return; |
| | | } |
| | | if("RECORD" != data.get("progress")){ |
| | |
| | | printShipWeight = function(){ |
| | | var data = view.get("#dataGridMain.currentEntity"); |
| | | if(!data) return; |
| | | |
| | | if("DEL" == data.get("recordStatus")){ |
| | | $alert("删除的数据不支持打印!"); |
| | | return; |
| | | } |
| | | if("ERROR" == data.get("recordStatus")){ |
| | | $alert("异常终止的数据不支持打印!"); |
| | | return; |
| | | } |
| | |
| | | $notify("开始调用打印机程序!"); |
| | | LODOP.PREVIEW(); |
| | | }; |
| | | |
| | | /** |
| | | * 批量打印,多选 |
| | | */ |
| | | printBatchWeight = function(){ |
| | | var datas = view.get("#dataGridMain").get("selection"); |
| | | if(datas){ |
| | | if(datas.length <= 0){ |
| | | $alert("尚未选择数据!"); |
| | | return; |
| | | } |
| | | var LODOP = CLODOP; |
| | | LODOP.PRINT_INIT("称重单"); |
| | | var companyId = datas[0].get("companyId"); |
| | | if(companyId && companyId == "5016"){ |
| | | //大湾区定制 |
| | | LODOP.SET_PRINT_PAGESIZE(1,1050,1400, ""); |
| | | }else { |
| | | LODOP.SET_PRINT_PAGESIZE(1,2100,1400, "A4"); |
| | | } |
| | | |
| | | datas.each(function(data){ |
| | | //console.log(data); |
| | | if("DEL" == data.get("recordStatus")){ |
| | | $notify("删除的数据不支持打印!"); |
| | | return true; |
| | | } |
| | | if("ERROR" == data.get("recordStatus")){ |
| | | $notify("异常终止的数据不支持打印!"); |
| | | return true; |
| | | } |
| | | if("RECORD" != data.get("progress")){ |
| | | $notify("流程未完成不支持打印!"); |
| | | return true; |
| | | } |
| | | view.get("#ajaxPrint").set("parameter",data).execute(function(result){ |
| | | //console.log(result); |
| | | LODOP.NewPage(); |
| | | LODOP.ADD_PRINT_HTM(0, 0, "100%","100%", result); |
| | | }); |
| | | }); |
| | | $notify("开始调用打印机程序!"); |
| | | LODOP.PREVIEW(); |
| | | }else{ |
| | | $alert("请勾选数据!"); |
| | | } |
| | | }; |
| | | |
| | | |
| | | //打印结算单 |
| | | printPay = function(){ |