Browse Source

测试同步打发票

lvhao 6 months ago
parent
commit
b2a0c2f515

+ 2 - 2
core/CoreApp/controllers/Systemprint.php

@@ -995,8 +995,8 @@ class Systemprint extends Start_Controller {
 							$fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 							$fullorder['printnumber'] = $fullorder['printnumber'] +1;//不能删
 							if($this->$fullorder_name->save(array('waybill'=>$Hwaybill,'libraryconfirm'=>2,'librarynot'=>'','printtime'=>$time,'printnumber'=>$fullorder['printnumber'],'print'=>3,'oldwaybill'=>$oldwaybill,'oldprinttime'=>$oldprinttime),$va[$n]))
 							if($this->$fullorder_name->save(array('waybill'=>$Hwaybill,'libraryconfirm'=>2,'librarynot'=>'','printtime'=>$time,'printnumber'=>$fullorder['printnumber'],'print'=>3,'oldwaybill'=>$oldwaybill,'oldprinttime'=>$oldprinttime),$va[$n]))
 				   		 	{
 				   		 	{
-								$type = 1;
-								$text = array('yd'=>base_url().'data/pdf/'.$bctime.'/y-'.$Hwaybill.'.pdf','mode'=>95);
+								$type = 7;
+								$text = array('yd'=>base_url().'data/pdf/'.$bctime.'/y-'.$Hwaybill.'.pdf','mode'=>95,'fp'=>base_url().'data/pdf/'.$bctime.'/f-'.$Hwaybill.'.pdf');
 							}
 							}
 						}
 						}
 					}
 					}

+ 4 - 0
template/erp/js/print.js

@@ -106,6 +106,10 @@ function ajax(num, list, tf) {
                 }
                 }
 				 else if (c.rows['type'] == 5) {
 				 else if (c.rows['type'] == 5) {
                     wprinter.pdf2fhd(c.rows);
                     wprinter.pdf2fhd(c.rows);
+                }else if (c.rows['type'] == 7) {
+                    //同时两台打印机 一台打印快递单   一台打打印发票
+                    wprinter.pdffhd(c.rows);
+                    wprinter.fppdf(c.rows);
                 }
                 }
 
 
                 if (c.rows['n'] > -1) {
                 if (c.rows['n'] > -1) {

+ 6 - 6
template/erp/systemprint.html

@@ -60,9 +60,9 @@
 快递面单:<select name="printer" class="select" style="width:220px;">
 快递面单:<select name="printer" class="select" style="width:220px;">
 <option value="">选择打印机</option>
 <option value="">选择打印机</option>
 </select>
 </select>
-<!-- 发票:<select name="fp_printer" class="select" style="width:220px;">
+发票:<select name="fp_printer" class="select" style="width:220px;">
     <option value="">选择打印机</option>
     <option value="">选择打印机</option>
-    </select> -->
+    </select>
 </div>
 </div>
 <a href="javascript:void(0);" class="printing">打 印</a>
 <a href="javascript:void(0);" class="printing">打 印</a>
 <a href="javascript:void(0);" class="exceldy">导出Excel</a>
 <a href="javascript:void(0);" class="exceldy">导出Excel</a>
@@ -121,10 +121,10 @@ $(this).find('td:eq(10)').css("font-size","12px");
 window.onload = function() { 
 window.onload = function() { 
     if(typeof $("select[name='printer']").length < 1) return;
     if(typeof $("select[name='printer']").length < 1) return;
     setTimeout(function(){ wprinter.printer()},1000);
     setTimeout(function(){ wprinter.printer()},1000);
-    // setTimeout(function(){
-    //     let h = $("select[name='printer']").html()
-    //     $("select[name='fp_printer']").html(h)
-    // },1100)
+    setTimeout(function(){
+        let h = $("select[name='printer']").html()
+        $("select[name='fp_printer']").html(h)
+    },1100)
 };
 };
 
 
 </script>
 </script>