ソースを参照

fix(打印模板): 调整打印模板样式和日期显示格式

liujt 3 ヶ月 前
コミット
794e782c8d

+ 16 - 4
src/views/saleManage/saleOrder/invoice/components/print-template-jsyp.vue

@@ -12,6 +12,7 @@
         align-items: center;
         justify-content: center;
         flex-direction: column;
+        width: 100%;
       "
     >
       <div>
@@ -36,8 +37,8 @@
           margin-top: 10px;
         "
       >
-        <span style="width: 39%">制单日期:{{ formData.createTime }}</span>
-        <span style="width: 39%">发货日期:{{ outBound.createTime }}</span>
+        <span style="width: 39%">制单日期:{{ formData.createTime?.split(' ')[0] }}</span>
+        <span style="width: 39%">发货日期:{{ outBound.createTime?.split(' ')[0] }}</span>
         <span style="width: 22%"
           >出库单号:{{ formData.printNo || outBound.bizNo }}</span
         >
@@ -92,7 +93,7 @@
         border
         style="
           width: 100%;
-          table-layout: fixed;
+          table-layout: auto;
           word-break: break-all;
           word-wrap: break-word;
           font-size: 12px;
@@ -279,4 +280,15 @@
   };
 </script>
 
-<style lang="scss"></style>
+<style lang="scss">
+@media print {
+  @page {
+    margin: 0;
+  }
+  body {
+    margin: 0;
+    padding: 0;
+  }
+}
+
+</style>