소스 검색

大件号显示优化

曹鹤洋 2 년 전
부모
커밋
3f27fab2cd
3개의 변경된 파일24개의 추가작업 그리고 18개의 파일을 삭제
  1. 1 0
      Application/Admin/View/Tag/small_v010.html
  2. 16 12
      static/basejs/tg_small_v010.js
  3. 7 6
      static/basejs/tg_small_v011.js

+ 1 - 0
Application/Admin/View/Tag/small_v010.html

@@ -52,6 +52,7 @@
     <div style="position:absolute;top: 300px;left: 47px">
         <img src="<%=pCode%>" > </td>
     </div>
+    <div style="position:absolute;top: 400px;left: 300px;width: 50px;text-align: center;"><span style="font-weight: 500;word-break:normal;font-size: 16px">大件号<%=l_flow%></span></div>
 </div>
 
 

+ 16 - 12
static/basejs/tg_small_v010.js

@@ -34,12 +34,12 @@ function CreateOneFormPage(html,qrcode,l_flow){
     // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","M");
     // LODOP.ADD_PRINT_BARCODE(330,70,'70mm','70mm',"QRCode",qrcode);
 
-    LODOP.ADD_PRINT_TEXT(400,310,65,80,"大件号"+l_flow);
-    LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
-    LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
-    LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
-    LODOP.SET_PRINT_STYLEA(0,"Bold",1);
-    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
+    // LODOP.ADD_PRINT_TEXT(400,310,65,80,"大件号"+l_flow);
+    // LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
+    // LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
+    // LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
+    // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+    // LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
 
 };
 
@@ -111,11 +111,14 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
             }else{
                 var sec_unit = '';
             }
+            var qrcode=data['largrlabel'][j][k]['code'];
+            var l_flow = qrcode.substr(53,6).replace(/\b(0+)/gi,"");
+
             var html = template(document.getElementById('tpl').innerHTML, {
                 product_name: data['largrlabel'][j][k]['matter_name'],
                 manufacture_date:dateFamite(data['largrlabel'][j][k]['manufacture_date']),
                 total:data['largrlabel'][j][k]['box_num'],
-                l_flow:data['largrlabel'][j][k]['l_flow'],
+                l_flow:l_flow,
                 bach_no:data['largrlabel'][j][k]['bach_num'] /*getBathINo(data['largrlabel'][j][k]['code_cp1'],data['largrlabel'][j][k]['bath_id'])*/,
                 spec: data['largrlabel'][j][k]['matter_size'],
                 ziliangpihao:data['largrlabel'][j][k]['code'],
@@ -129,8 +132,7 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
                 pCode:data['largrlabel'][j][k]['pCode'],
             });
             // sec_unit:data['largrlabel'][j][k]['sec_unit'],
-            var qrcode=data['largrlabel'][j][k]['code'];
-            var l_flow=qrcode.substr(53,6).replace(/\b(0+)/gi,"");
+
 
             /*if (data['num']>1 && status==1){
                 //打印多份
@@ -273,11 +275,14 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
                     }else{
                         var sec_unit = '';
                     }
+                    var qrcode = data['largrlabel'][j][k]['code'];
+                    var l_flow = qrcode.substr(53,6).replace(/\b(0+)/gi,"");
+
                     var html = template(document.getElementById('tpl').innerHTML, {
                         product_name: data['largrlabel'][j][k]['matter_name'],
                         manufacture_date:dateFamite(data['largrlabel'][j][k]['manufacture_date']),
                         total:data['largrlabel'][j][k]['box_num'],
-                        l_flow:data['largrlabel'][j][k]['l_flow'],
+                        l_flow:l_flow,
                         bach_no:data['largrlabel'][j][k]['bach_num'] /*getBathINo(data['largrlabel'][j][k]['code_cp1'],data['largrlabel'][j][k]['bath_id'])*/,
                         spec: data['largrlabel'][j][k]['matter_size'],
                         ziliangpihao:data['largrlabel'][j][k]['code'],
@@ -290,8 +295,7 @@ function small_v010_print(result,type,idList,reptQty,sign_type) {
                         proportion:proportion,
                         pCode:data['largrlabel'][j][k]['pCode'],
                     });
-                    var qrcode=data['largrlabel'][j][k]['code'];
-                    var l_flow=qrcode.substr(53,6).replace(/\b(0+)/gi,"");
+
 
                     for(i=0;i<data['num'];i++){
                         if (!flag){

+ 7 - 6
static/basejs/tg_small_v011.js

@@ -34,12 +34,12 @@ function CreateOneFormPage(html,qrcode,l_flow){
     // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","M");
     // LODOP.ADD_PRINT_BARCODE(330,70,'70mm','70mm',"QRCode",qrcode);
 
-    LODOP.ADD_PRINT_TEXT(400,310,65,80,"大件号"+l_flow);
-    LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
-    LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
-    LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
-    LODOP.SET_PRINT_STYLEA(0,"Bold",1);
-    LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
+    // LODOP.ADD_PRINT_TEXT(400,310,65,80,"大件号"+l_flow);
+    // LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
+    // LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
+    // LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
+    // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
+    // LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
 
 };
 
@@ -101,6 +101,7 @@ function small_v011_print(supplier_name,matter_name,product_code,sqrcd,print_cod
                 spec:'',
                 ziliangpihao:qrcode,
                 pici:riqi,
+                l_flow:1,
                 supplier_name: supplier_name,
                 numn: sqrcd,//配盘数
                 qcode: './static/qrcode/none.png',//为了表格撑开