瀏覽代碼

【调整】打印模板

howie 2 年之前
父節點
當前提交
2a6ee95673
共有 2 個文件被更改,包括 72 次插入62 次删除
  1. 4 3
      src/mixin/print.js
  2. 68 59
      src/utils/panel.js

+ 4 - 3
src/mixin/print.js

@@ -283,7 +283,6 @@ export default {
       this.clonelData.push(JSON.parse(JSON.stringify(data)));
       // 需要计算长度和数据裁切
       let invoicePickBeans = data.invoicePickBeans;
-
       // 获取length向上取整
       let len = Math.ceil(invoicePickBeans.length / 5);
       for (let index = 0; index < len; index++) {
@@ -298,8 +297,7 @@ export default {
 
             //添加表格数据
             table.push({
-              salesId: tempData.salesOrderId,
-              invoiceId: tempData.invoiceId,
+
               id: tempData.id,
               createTime: tempData.id
                 ? this.dateToDayFilter(data.createTime)
@@ -315,10 +313,13 @@ export default {
             });
           }
         }
+        console.log(this.clonelData);
         // 添加print输出数据
         this.outputData.push({
           pageNumber: `${len}-${index + 1}`,
           printNum:printNum + 1,
+          salesId: this.clonelData[0].invoicePickBeans[0].salesOrderId,
+          invoiceId: this.clonelData[0].invoicePickBeans[0].invoiceId,
           type: data.type,
           tiTui: data.type === 2 ? `退货人` : `提货人`,
           takerPhone: data.takerPhone || "",

+ 68 - 59
src/utils/panel.js

@@ -24,7 +24,7 @@ export default {
         "top": 50,
         "height": 13,
         "width": 328,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "经销商编码",
         "fontFamily": '黑体',
         "field": "customerNumber",
@@ -38,7 +38,7 @@ export default {
         "top": 50,
         "height": 13,
         "width": 328,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "打印次数",
         "fontFamily": '黑体',
         "field": "printNum",
@@ -51,7 +51,7 @@ export default {
         "top": 50,
         "height": 13,
         "width": 328,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "打印日期",
         "fontFamily": '黑体',
         "field": "nowDate",
@@ -67,7 +67,7 @@ export default {
         "top": 70,
         "height": 13,
         "width": 328,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "经销商",
         "fontFamily": '黑体',
         "field": "customerName",
@@ -80,7 +80,7 @@ export default {
         "top": 70,
         "height": 13,
         "width": 328,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "仓库",
         "fontFamily": '黑体',
         "field": "correspondName",
@@ -89,92 +89,101 @@ export default {
         "textAlign": "left"
       }, "printElementType": { "title": "", "type": "text" }
     },
-    {
+
+    , {
       "options": {
         "left": 40,
         "top": 90,
         "height": 13,
+        "width": 328,
+        "fontSize": 11,
+        "title": "出库单号",
+        "fontFamily": '黑体',
+        "field": "salesId",
+        "color": "#000",
+        "textAlign": "left"
+      }, "printElementType": { "title": "", "type": "text" }
+    },
+    {
+      "options": {
+        "left": 348,
+        "top": 90,
+        "height": 13,
+        "width": 328,
+        "fontSize": 11,
+        "title": "发货单号",
+        "fontFamily": '黑体',
+        "field": "invoiceId",
+        "color": "#000",
+        "textAlign": "left"
+      }, "printElementType": { "title": "", "type": "text" }
+    },
+    {
+      "options": {
+        "left": 40,
+        "top": 110,
+        "height": 13,
         "width": 633,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "备注",
         "fontFamily": '黑体',
         "field": "headerRemark",
         "testData": "",
         "color": "#000",
         "textAlign": "left"
-      }, "printElementType": { "title": "", "type": "text" }
+      }, "printElementType": { "title": "", "type": "text" ,"fontSize": 8,}
     },
     {
       "options": {
         "left": 23,
-        "top": 105,
-        "height": 400,
+        "top": 125,
+        "height": 410,
         "width": 633,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "field": "table",
         "fontFamily": '黑体',
         "lineHeight": 16,
         "tableFooterRepeat": "",
         "columns": [[
-          {
-            "title": "出库单号",
-            "field": "salesId",
-            "width": 40,
-            "align": "left",
-            "colspan": 1,
-            "rowspan": 1,
-            "fontSize": 12.5,
-
-          }, {
-            "title": "发货单号",
-            "field": "invoiceId",
-            "width": 47,
+         {
+            "title": "订单号",
+            "field": "enginOrderType",
+            "width": 60,
             "align": "left",
             "colspan": 1,
             "rowspan": 1,
-            "fontSize": 12.5,
-
+            "fontSize": 11,
 
-          }
-          , {
+          } , {
             "title": "发货日期",
             "field": "createTime",
-            "width": 25,
+            "width": 50,
             "align": "left",
             "colspan": 1,
             "rowspan": 1,
-            "fontSize": 12.5,
+            "fontSize": 11,
 
 
           }
-          , {
-            "title": "订单号",
-            "field": "enginOrderType",
-            "width": 40,
-            "align": "left",
-            "colspan": 1,
-            "rowspan": 1,
-            "fontSize": 12.5,
 
-          }
           , {
             "title": "存货名称",
             "field": "materialName",
-            "width": 40,
+            "width": 100,
             "align": "left",
             "colspan": 1,
             "rowspan": 1,
-            "fontSize": 12.5,
+            "fontSize": 11,
 
 
           }, {
             "title": "规格型号",
             "field": "specification",
-            "width": 120,
+            "width": 140,
             "align": "left",
             "colspan": 1,
             "rowspan": 1,
-            "fontSize": 12.5,
+            "fontSize": 11,
 
 
           }
@@ -185,7 +194,7 @@ export default {
             "align": "center",
             "colspan": 1,
             "rowspan": 1,
-            "fontSize": 12.5,
+            "fontSize": 11,
             "tableSummary": "sum"
 
           }
@@ -196,7 +205,7 @@ export default {
           //   "align": "center",
           //   "colspan": 1,
           //   "rowspan": 1,
-          //   "fontSize": 12.5,
+          //   "fontSize": 11,
           // }
 
           ,
@@ -208,7 +217,7 @@ export default {
             "align": "left",
             "colspan": 2,
             "rowspan": 1,
-            "fontSize": 12.5,
+            "fontSize": 11,
           }]]
       }, "printElementType": {
         "title": "表格", "type": "table",
@@ -231,10 +240,10 @@ export default {
       , {
       "options": {
         "left": 40,
-        "top": 380,
+        "top": 390,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "",
         "fontFamily": '黑体',
         "field": "takerName",
@@ -247,10 +256,10 @@ export default {
       "options": {
 
         "left": 40,
-        "top": 400,
+        "top": 410,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "打单",
         "fontFamily": '黑体',
         "field": "createBy",
@@ -262,10 +271,10 @@ export default {
     {
       "options": {
         "left": 238,
-        "top": 400,
+        "top": 410,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "车辆",
         "fontFamily": '黑体',
         "field": "pickCar",
@@ -277,10 +286,10 @@ export default {
     {
       "options": {
         "left": 238,
-        "top": 380,
+        "top": 390,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "联系方式",
         "fontFamily": '黑体',
         "field": "takerPhone",
@@ -292,10 +301,10 @@ export default {
     {
       "options": {
         "left": 463,
-        "top": 380,
+        "top": 390,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "提单",
         "fontFamily": '黑体',
         "field": "takerDa",
@@ -307,10 +316,10 @@ export default {
     {
       "options": {
         "left": 463,
-        "top": 400,
+        "top": 410,
         "height": 13,
         "width": 218,
-        "fontSize": 12.5,
+        "fontSize": 11,
         "title": "仓库",
         "fontFamily": '黑体',
         "field": "correspondNames",
@@ -322,7 +331,7 @@ export default {
     {
       "options": {
         "left": 650,
-        "top": 400,
+        "top": 410,
         "height": 13,
         "width": 218,
         "fontSize": 16,