Przeglądaj źródła

feat: 完善销售发货单打印模板,增加字段标签和备注信息

yusheng 9 miesięcy temu
rodzic
commit
78bb8f52b5

+ 51 - 31
src/views/saleManage/saleOrder/invoice/components/print-template-jr.vue

@@ -13,6 +13,9 @@
           width: 100%;
         "
       >
+        <div style="font-size: 20px; font-weight: 800; margin: 0 auto">{{
+          groupName
+        }}</div>
         <div
           style="
             width: 100%;
@@ -22,11 +25,11 @@
           "
         >
           <span style="width: 40%">
-            <span style="width: 100px; display: inline-block"></span>
+            <span style="width: 100px; display: inline-block">购货单位:</span>
             {{ formData.contactName }}
           </span>
           <span>
-            <span style="width: 100px; display: inline-block"></span>
+            <span style="width: 100px; display: inline-block">单据编码:</span>
             {{ formData.docNo }} {{ page.length + '/' + (index + 1) }}
           </span>
         </div>
@@ -39,47 +42,52 @@
           "
         >
           <span style="width: 45%">
-            <span style="width: 170px; display: inline-block"></span>
+            <span style="width: 170px; display: inline-block"
+              >生产厂家/上市许可持有人:</span
+            >
             湖南聚仁中药饮片有限公司
           </span>
           <span style="width: 25%">
-            <span style="width: 80px; display: inline-block"></span>
+            <span style="width: 80px; display: inline-block">发货仓库:</span>
             {{ formData?.productList[0]?.warehouseName }}
           </span>
           <span style="width: 17%">
-            <span style="width: 80px; display: inline-block"></span>
+            <span style="width: 80px; display: inline-block">发货日期:</span>
             {{ formData.createTime.split(' ')[0] }}
           </span>
           <span>
-            <span style="width: 130px; display: inline-block"></span>
+            <span style=" display: inline-block">总计金额:</span>
             ¥{{ formData.totalPrice }}
           </span>
         </div>
         <table
           cellspacing="0"
+          border
           style="
             width: 100%;
             /* height: 240px; */
             table-layout: fixed;
             word-break: break-all;
-            word-wrap: break-word;margin-left: 10px;font-size: 12px;
+            word-wrap: break-word;
+            margin-left: 10px;
+            font-size: 12px;
           "
         >
           <tbody>
             <tr align="center" style="height: 28px">
-              <td style="width: 8%"> </td>
-              <td style="width: 8%"> </td>
-              <td style="width: 6%"> </td>
-              <td style="width:8%"> </td>
-              <td style="width: 4%"> </td>
-              <td style="width: 5.5%"> </td>
-              <td style="width: 6%"> </td>
-              <td style="width: 7%"> </td>
-              <td style="width: 8%"> </td>
-              <td style="width: 8%"> </td>
-              <td style="width: 8%"> </td>
-              <td> </td>
-              <!-- <td> </td> -->
+              <td style="width: 8%"> 商品编码</td>
+              <td style="width: 8%"> 品名</td>
+              <td style="width: 6%">规格 </td>
+              <td style="width: 8%"> 产地</td>
+              <td style="width: 4%"> 单位</td>
+              <td style="width: 5.5%">数量 </td>
+              <td style="width: 6%"> 单价</td>
+              <td style="width: 7%">金额 </td>
+              <td style="width: 8%"> 批号</td>
+              <td style="width: 8%"> 生产日期</td>
+              <td style="width: 8%"> 质保期至</td>
+              <td> 贮藏</td>
+              <td>备注 </td>
             </tr>
             <tr
               align="center"
@@ -105,7 +113,7 @@
               <td> {{ val.batchNo }}</td>
               <td> </td>
               <td> {{ val.guaranteePeriodDeadline }}</td>
-              <!-- <td> </td> -->
+              <td> </td>
               <td> {{ val.remark }}</td>
             </tr>
             <tr align="center" style="height: 30px">
@@ -136,24 +144,36 @@
           "
         >
           <div style="flex: 1">
-            <div>{{ formData.createUserName }}</div>
+            <div>开票员:{{ formData.createUserName }}</div>
           </div>
           <div style="flex: 1">
-            <div>{{ formData.saleOrderList[0]?.partbLinkName }}</div>
+            <div>业务员:{{ formData.saleOrderList[0]?.partbLinkName }}</div>
           </div>
           <div style="flex: 1">
-            <div></div>
+            <div>发货员:</div>
           </div>
           <div style="flex: 1">
-            <div></div>
+            <div>收货方:</div>
           </div>
           <div style="flex: 1">
-            <div></div>
+            <div>质量状况:</div>
           </div>
           <div style="flex: 1">
-            <div></div>
+            <div>提货方式:</div>
           </div>
         </div>
+        <div
+          style="
+            width: 100%;
+            font-size: 12px;
+            display: flex;
+            justify-content: space-between;
+            margin-top: 3x;
+          "
+        >
+          备注:品售出后非质量问题,超过一个月恕不退货。公司地址:长沙经济技术开发区星沙产业基地(长龙街道)红枫路9号
+          电话:0731-86178188 销售单位(未盖章无效)
+        </div>
       </div>
     </div>
 
@@ -329,21 +349,21 @@
         printWindow.document.write(`<style>
 
     body { font-family: "Courier New"; font-size: 9pt; }  
-    table { width:260mm; border-collapse: collapse; }  
+    table { width:310mm; border-collapse: collapse; }  
 @media print {
   table{
-    border:none
+    // border:none
   }
   .print {
     page-break-before: always !important;
     page-break-inside: avoid !important;
   }
   @page {
-     size: 260mm 110mm;
+     size: 310mm 110mm;
     margin: 10mm 10mm 10mm 10mm; /* 去除页边距 */
   }
   body {
-    width: 260mm;
+    width: 310mm;
     height:110mm;
     padding: 0;
     margin: 0;

+ 7 - 4
src/views/saleManage/saleOrder/invoice/index.vue

@@ -79,10 +79,11 @@
                   >货物签收单</el-dropdown-item
                 >
 
-                <!-- <el-dropdown-item
+                <el-dropdown-item
+                  v-if="$hasPermission('eom:print-invoice7')"
                   @click.native="handlePrint('printTemplateJrRef')"
                   >发货单</el-dropdown-item
-                > -->
+                >
               </el-dropdown-menu>
             </el-dropdown>
             <exportButton
@@ -286,7 +287,6 @@
   import exportButton from '@/components/upload/exportButton.vue';
   import { downLoadTemplate } from '@/api/system/file/index.js';
 
-
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -509,7 +509,10 @@
         });
       },
       exportFile(row) {
-          downLoadTemplate(`/eom/saleordersendrecord/export/${row.id}`,'货物签收单')
+        downLoadTemplate(
+          `/eom/saleordersendrecord/export/${row.id}`,
+          '货物签收单'
+        );
       },
       //创建退货单
       creatReturnGoods(type, row) {