yusheng 11 mesi fa
parent
commit
a8abbfef68

BIN
src/assets/bslogo.png


+ 224 - 0
src/views/saleManage/saleOrder/invoice/components/print-template-bs.vue

@@ -0,0 +1,224 @@
+<template>
+  <ele-modal
+    title="出库单"
+    :visible.sync="QRvisible"
+    v-if="QRvisible"
+    width="90%"
+  >
+    <div
+      id="printSection"
+      style="
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        flex-direction: column;
+      "
+    >
+      <div
+        style="
+          position: relative;
+          width: 100%;
+          height: 100px;
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+        "
+      >
+        <img
+          v-if="groupName.includes('宝盛')"
+          style="width: 80px; height: 80px; position: absolute; left: 20px"
+          src="@/assets/bslogo.png"
+          alt=""
+        />
+        <div
+          style="
+            font-size: 20px;
+            font-weight: 800;
+            text-align: center;
+            width: 100%;
+          "
+          >{{ groupName || '长沙宝盛汽车配件有限公司' }}</div
+        >
+        <div
+          style="
+            font-size: 18px;
+            font-weight: 800;
+            text-align: center;
+            width: 100%;
+          "
+          >送货单</div
+        >
+      </div>
+      <div
+        style="
+          width: 100%;
+          font-size: 12px;
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 10px;
+        "
+      >
+        <span style="width: 40%">客户名称:{{ formData.contactName }}</span>
+        <span style="width: 40%"
+          >发货单号:{{ formData.printNo || formData.docNo }}</span
+        >
+      </div>
+      <div
+        style="
+          width: 100%;
+          font-size: 12px;
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 10px;
+        "
+      >
+        <span style="width: 40%">发货日期:{{ formData.createTime }}</span>
+        <span style="width: 40%"
+          >联系人:{{ formData.linkName }}
+
+          联系电话:{{ formData.linkPhone }}
+        </span>
+      </div>
+      <table
+        cellspacing="0"
+        border
+        style="
+          width: 100%;
+          table-layout: fixed;
+          word-break: break-all;
+          word-wrap: break-word;
+          font-size: 12px;
+        "
+      >
+        <tbody>
+          <tr align="center">
+            <td style="padding: 5px"> 序号 </td>
+            <td style="padding: 5px"> 型号 </td>
+            <td style="padding: 5px"> 零件名 </td>
+            <td style="padding: 5px"> 单位</td>
+            <td style="padding: 5px"> 送货数量</td>
+            <td style="padding: 5px"> 验收数量</td>
+            <td style="padding: 5px"> 备注</td>
+            <td style="padding: 5px"> 订单号</td>
+            <td style="padding: 5px"> 加工工艺</td>
+          </tr>
+
+          <tr align="center" v-for="(item, index) in formData.productList">
+            <td style="padding: 5px"> {{ index + 1 }} </td>
+            <td style="padding: 5px">
+              {{ item.modelType }}
+            </td>
+            <td style="padding: 5px"> {{ item.productName }} </td>
+            <td style="padding: 5px"> {{ item.measuringUnit }}</td>
+            <td style="padding: 5px"> {{ item.totalCount }}</td>
+            <td style="padding: 5px"> {{ item.totalCount }}</td>
+            <td style="padding: 5px"> </td>
+            <td style="padding: 5px">{{ item.orderNo }} </td>
+            <td style="padding: 5px"> </td>
+          </tr>
+        </tbody>
+      </table>
+      <div
+        style="
+          width: 100%;
+          font-size: 12px;
+          display: flex;
+          justify-content: space-between;
+          margin-top: 10px;
+        "
+      >
+        <div style="flex: 1">
+          <div>发货人:</div>
+        </div>
+        <div style="flex: 1">
+          <div>送货人:</div>
+        </div>
+        <div style="flex: 1"> 收货人: </div>
+      </div>
+    </div>
+
+    <div slot="footer">
+      <el-button @click="print">打印预览</el-button>
+      <el-button @click="close">关闭</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
+  import { getInfoBySourceBizNoAll } from '@/api/wms';
+  import { mapGetters } from 'vuex';
+  export default {
+    name: 'print',
+    computed: {
+      ...mapGetters(['user'])
+    },
+    props: {
+      groupName: ''
+    },
+    data() {
+      return {
+        checked: '',
+        QRvisible: false,
+        isPrintPrice: false,
+        formData: {},
+        outBound: {}
+      };
+    },
+
+    methods: {
+      async open(id) {
+        this.formData = await getSendSaleOrderrecordDetailSplit(id);
+        this.QRvisible = true;
+        // let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
+        // this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
+        // this.outBound['outInDetailRecordRequestList'] = [];
+
+        // dataArray.forEach((item) => {
+        //   item.outInDetailList.forEach((val) => {
+        //     val['orderNo'] = item.orderNo;
+        //     if (val.outInDetailRecordRequestList.length) {
+        //       val.outInDetailRecordRequestList.forEach((j) => {
+        //         j['categoryName'] = val.categoryName;
+        //         j['categoryModel'] = val.categoryModel;
+        //         j['specification'] = val.specification;
+        //         j['categoryCode'] = val.categoryCode;
+        //         j['orderNo'] = item.orderNo;
+
+        //       });
+        //       this.outBound['outInDetailRecordRequestList'].push(
+        //         ...val.outInDetailRecordRequestList
+        //       );
+        //     } else {
+        //       this.outBound['outInDetailRecordRequestList'].push(val);
+        //     }
+        //   });
+        // });
+        //包装维度
+      },
+      close() {
+        this.QRvisible = false;
+      },
+
+      print() {
+        const printSection = document.getElementById('printSection');
+        // 创建打印任务
+        const printWindow = window.open('', '_blank');
+        printWindow.document.open();
+        printWindow.document.write('<html><head><title>打印预览</title>');
+        printWindow.document.write(
+          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        );
+        printWindow.document.write('</head><body>');
+        printWindow.document.write(printSection.innerHTML);
+        printWindow.document.write('</body></html>');
+        printWindow.document.close();
+        printWindow.onload = function () {
+          printWindow.print();
+        };
+      }
+    }
+  };
+</script>
+
+<style lang="scss"></style>

+ 131 - 126
src/views/saleManage/saleOrder/invoice/components/print-template-by.vue

@@ -38,10 +38,13 @@
                   style="width: 80px; height: 80px"
                   src="@/assets/logo.jpg"
                   alt=""
+                  v-if="groupName.includes('宝悦')"
                 />
                 <div>
-                  <div style="font-size: 14px">湖南宝悦新型建材有限公司</div>
-                  <div style="font-size: 10px"
+                  <div style="font-size: 14px">{{
+                    groupName || '湖南宝悦新型建材有限公司'
+                  }}</div>
+                  <div style="font-size: 10px" v-if="groupName.includes('宝悦')"
                     >HUNAN BAO YUE BULIDING MATERAIL</div
                   >
                 </div>
@@ -91,9 +94,9 @@
       >
         <tbody>
           <tr align="center">
-            <td style="padding: 1px;width: 120px" > 产品编码 </td>
-            <td style="padding: 1px;"> 产品名称 </td>
-            <td style="padding: 1px;width: 130px;"> 规格 </td>
+            <td style="padding: 1px; width: 120px"> 产品编码 </td>
+            <td style="padding: 1px"> 产品名称 </td>
+            <td style="padding: 1px; width: 130px"> 规格 </td>
             <!-- <td style="padding: 1px"> 型号 </td> -->
             <td style="padding: 1px"> 单位 </td>
             <td style="padding: 1px"> 数量 </td>
@@ -112,9 +115,7 @@
             <td style="padding: 1px">{{ item.measuringUnit }}</td>
             <td style="padding: 1px">{{ item.totalCount }}</td>
             <td style="padding: 1px">{{ item.blockCount }}</td>
-            <td style="padding: 1px">{{
-              item.extField.packagingStrength
-            }}</td>
+            <td style="padding: 1px">{{ item.extField.packagingStrength }}</td>
             <td style="padding: 1px">{{ item.extField.packagingDensity }}</td>
             <td style="padding: 1px" v-if="isPrintPrice">{{
               item.discountSinglePrice
@@ -221,135 +222,139 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
-import JsBarcode from 'jsbarcode';
-import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
-export default {
-  name: 'print',
-  computed: {
-    ...mapGetters(['user'])
-  },
-  props: {},
-  data() {
-    return {
-      checked: '',
-      QRvisible: false,
-      isPrintPrice: false,
-      codeList: [],
-      formData: {},
-      carName:""
-    };
-  },
+  import { mapGetters } from 'vuex';
+  import JsBarcode from 'jsbarcode';
+  import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
+  export default {
+    name: 'print',
+    computed: {
+      ...mapGetters(['user'])
+    },
+    props: {
+      groupName: ''
+    },
+    data() {
+      return {
+        checked: '',
+        QRvisible: false,
+        isPrintPrice: false,
+        codeList: [],
+        formData: {},
+        carName: ''
+      };
+    },
 
-  methods: {
-    open(id, isPrintPrice) {
-      this.isPrintPrice = isPrintPrice;
-      getSendSaleOrderrecordDetailSplit(id).then((data) => {
-        if (JSON.stringify(data) != '{}') {
-          this.formData = data;
-          this.formData['carName']=data.carList.map(item=>item.name).toString()
-          this.formData.projectName = data.saleOrderList?.[0]?.projectName;
-          this.formData.driverNames = data.logisticTrakListNoteVOList
-            .map((item) => item.driverName)
-            .join(','); // 承运人
-          this.codeList = data.productList;
-          this.formData.markerName = this.user.info.name;
-        }
-        this.QRvisible = true;
-        this.$nextTick(() => {
-          JsBarcode('#print', data.docNo, {
-            format: 'CODE39', //选择要使用的条形码类型
-            width: 0.8, //设置条之间的宽度
-            height: 50, //高度
-            displayValue: false, //是否在条形码下方显示文字
-            text: '', //覆盖显示的文本
-            fontOptions: 'bold italic', //使文字加粗体或变斜体
-            font: 'fantasy', //设置文本的字体
-            textAlign: 'right', //设置文本的水平对齐方式
-            textPosition: 'top', //设置文本的垂直位置
-            textMargin: 1, //设置条形码和文本之间的间距
-            fontSize: 15, //设置文本的大小
-            background: '#fff', //设置条形码的背景
-            lineColor: '#000', //设置条和文本的颜色。
-            margin: 2 //设置条形码周围的空白边距
+    methods: {
+      open(id, isPrintPrice) {
+        this.isPrintPrice = isPrintPrice;
+        getSendSaleOrderrecordDetailSplit(id).then((data) => {
+          if (JSON.stringify(data) != '{}') {
+            this.formData = data;
+            this.formData['carName'] = data.carList
+              .map((item) => item.name)
+              .toString();
+            this.formData.projectName = data.saleOrderList?.[0]?.projectName;
+            this.formData.driverNames = data.logisticTrakListNoteVOList
+              .map((item) => item.driverName)
+              .join(','); // 承运人
+            this.codeList = data.productList;
+            this.formData.markerName = this.user.info.name;
+          }
+          this.QRvisible = true;
+          this.$nextTick(() => {
+            JsBarcode('#print', data.docNo, {
+              format: 'CODE39', //选择要使用的条形码类型
+              width: 0.8, //设置条之间的宽度
+              height: 50, //高度
+              displayValue: false, //是否在条形码下方显示文字
+              text: '', //覆盖显示的文本
+              fontOptions: 'bold italic', //使文字加粗体或变斜体
+              font: 'fantasy', //设置文本的字体
+              textAlign: 'right', //设置文本的水平对齐方式
+              textPosition: 'top', //设置文本的垂直位置
+              textMargin: 1, //设置条形码和文本之间的间距
+              fontSize: 15, //设置文本的大小
+              background: '#fff', //设置条形码的背景
+              lineColor: '#000', //设置条和文本的颜色。
+              margin: 2 //设置条形码周围的空白边距
+            });
           });
         });
-      });
-    },
-    close() {
-      this.QRvisible = false;
-    },
-    //获取当前日期函数
-    getNowFormatDate() {
-      let date = new Date(),
-        obj = {
-          year: date.getFullYear(), //获取完整的年份(4位)
-          month: date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
-          strDate: date.getDate(), // 获取当前日(1-31)
-          week: '星期' + '日一二三四五六'.charAt(date.getDay()), //获取当前星期几(0 ~ 6,0代表星期天)
-          hour: date.getHours(), //获取当前小时(0 ~ 23)
-          minute: date.getMinutes(), //获取当前分钟(0 ~ 59)
-          second: date.getSeconds() //获取当前秒数(0 ~ 59)
+      },
+      close() {
+        this.QRvisible = false;
+      },
+      //获取当前日期函数
+      getNowFormatDate() {
+        let date = new Date(),
+          obj = {
+            year: date.getFullYear(), //获取完整的年份(4位)
+            month: date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+            strDate: date.getDate(), // 获取当前日(1-31)
+            week: '星期' + '日一二三四五六'.charAt(date.getDay()), //获取当前星期几(0 ~ 6,0代表星期天)
+            hour: date.getHours(), //获取当前小时(0 ~ 23)
+            minute: date.getMinutes(), //获取当前分钟(0 ~ 59)
+            second: date.getSeconds() //获取当前秒数(0 ~ 59)
+          };
+        Object.keys(obj).forEach((key) => {
+          if (obj[key] < 10) obj[key] = `0${obj[key]}`;
+        });
+        // return `${obj.year}年${obj.month}月${obj.strDate}日 ${obj.hour}:${obj.minute}:${obj.second}`;
+        return `${obj.year}-${obj.month}-${obj.strDate}`;
+      },
+      print() {
+        const printSection = document.getElementById('printSection');
+        // 创建打印任务
+        const printWindow = window.open('', '_blank');
+        printWindow.document.open();
+        printWindow.document.write('<html><head><title>打印预览</title>');
+        printWindow.document.write(
+          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        );
+        printWindow.document.write('</head><body>');
+        printWindow.document.write(printSection.innerHTML);
+        printWindow.document.write('</body></html>');
+        printWindow.document.close();
+        printWindow.onload = function () {
+          printWindow.print();
         };
-      Object.keys(obj).forEach((key) => {
-        if (obj[key] < 10) obj[key] = `0${obj[key]}`;
-      });
-      // return `${obj.year}年${obj.month}月${obj.strDate}日 ${obj.hour}:${obj.minute}:${obj.second}`;
-      return `${obj.year}-${obj.month}-${obj.strDate}`;
-    },
-    print() {
-      const printSection = document.getElementById('printSection');
-      // 创建打印任务
-      const printWindow = window.open('', '_blank');
-      printWindow.document.open();
-      printWindow.document.write('<html><head><title>打印预览</title>');
-      printWindow.document.write(
-        '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
-      );
-      printWindow.document.write('</head><body>');
-      printWindow.document.write(printSection.innerHTML);
-      printWindow.document.write('</body></html>');
-      printWindow.document.close();
-      printWindow.onload = function () {
-        printWindow.print();
-      };
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss">
-#printSection {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  flex-direction: column;
-  .table_box {
-    width: 70%;
-    table-layout: fixed;
-    word-break: break-all;
-    word-wrap: break-word;
-  }
-  th,
-  td {
-    padding: 20px;
-    position: relative;
-  }
-  .barCode {
-    position: absolute;
-    right: 10px;
-    top: 50%;
-    transform: translateY(-50%);
-  }
-  .person {
-    width: 70%;
+  #printSection {
     display: flex;
     align-items: center;
     justify-content: center;
-    margin-bottom: 10px;
-    > div {
-      flex: 1;
+    flex-direction: column;
+    .table_box {
+      width: 70%;
+      table-layout: fixed;
+      word-break: break-all;
+      word-wrap: break-word;
+    }
+    th,
+    td {
+      padding: 20px;
+      position: relative;
+    }
+    .barCode {
+      position: absolute;
+      right: 10px;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+    .person {
+      width: 70%;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin-bottom: 10px;
+      > div {
+        flex: 1;
+      }
     }
   }
-}
 </style>

+ 30 - 22
src/views/saleManage/saleOrder/invoice/components/print-template-js.vue

@@ -24,7 +24,7 @@
             width: 400px;
             margin: 0 auto;
           "
-          >{{this.groupName||'嘉实(湖南)医院科技有限公司'}}出库单</div
+          >{{ groupName || '嘉实(湖南)医院科技有限公司' }}出库单</div
         >
         <div style="text-align: center"
           >(文件编号:JS/SPM-GY-005-01(A/O))</div
@@ -40,7 +40,9 @@
         "
       >
         <span style="width: 70%">客户地址:{{ formData.receiveAddress }}</span>
-        <span style="width: 30%">NO.:{{ formData.printNo||formData.docNo }}</span>
+        <span style="width: 30%"
+          >NO.:{{ formData.printNo || formData.docNo }}</span
+        >
       </div>
       <table
         cellspacing="0"
@@ -66,17 +68,22 @@
             <td style="padding: 5px"> 备注</td>
           </tr>
 
-          <tr align="center" v-for="(item, index) in outBound.outInDetailRecordRequestList">
+          <tr
+            align="center"
+            v-for="(item, index) in outBound.outInDetailRecordRequestList"
+          >
             <td style="padding: 5px"> {{ index + 1 }} </td>
             <td style="padding: 5px"> {{ item.categoryName }} </td>
             <td style="padding: 5px">
               {{ item.specification }}/{{ item.categoryModel }}
             </td>
-            <td style="padding: 5px"> >{{this.groupName||'嘉实(湖南)医院科技有限公司'}}</td>
+            <td style="padding: 5px">
+              {{groupName || '嘉实(湖南)医院科技有限公司' }}</td
+            >
             <td style="padding: 5px"> {{ item.measureQuantity }}</td>
             <td style="padding: 5px"> {{ item.measureUnit }}</td>
             <td style="padding: 5px"> {{ item.batchNo }}</td>
-            <td style="padding: 5px"> {{item.serialNumber}}</td>
+            <td style="padding: 5px"> {{ item.serialNumber }}</td>
             <td style="padding: 5px"> {{ item.engrave }}</td>
           </tr>
           <tr>
@@ -102,7 +109,7 @@
         </div>
         <div style="flex: 1">
           <div>审核人/日期:{{ outBound.createTime }}</div>
-          <div>{{ outBound.extInfo?.createUserName  }}</div>
+          <div>{{ outBound.extInfo?.createUserName }}</div>
         </div>
         <div style="flex: 1">
           收货人:{{ formData.linkName }} {{ formData.linkPhone }}
@@ -127,7 +134,7 @@
       ...mapGetters(['user'])
     },
     props: {
-      groupName:''
+      groupName: ''
     },
     data() {
       return {
@@ -135,32 +142,33 @@
         QRvisible: false,
         isPrintPrice: false,
         formData: {},
-        outBound:{}
+        outBound: {}
       };
     },
 
     methods: {
-
-
       async open(id) {
         this.formData = await getSendSaleOrderrecordDetailSplit(id);
         this.QRvisible = true;
-        let dataArray = await getInfoBySourceBizNoAll(
-          this.formData.docNo
-        );
+        let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
         this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
-        this.outBound['outInDetailRecordRequestList']=[]
+        this.outBound['outInDetailRecordRequestList'] = [];
 
         dataArray.forEach((item) => {
           item.outInDetailList.forEach((val) => {
-            val.outInDetailRecordRequestList.forEach(j=>{
-              j['categoryName']=val.categoryName
-              j['categoryModel']=val.categoryModel
-              j['specification']=val.specification
-              j['categoryCode']=val.categoryCode
-              
-            })
-            this.outBound['outInDetailRecordRequestList'].push(...val.outInDetailRecordRequestList)
+            if (val.outInDetailRecordRequestList.length) {
+              val.outInDetailRecordRequestList.forEach((j) => {
+                j['categoryName'] = val.categoryName;
+                j['categoryModel'] = val.categoryModel;
+                j['specification'] = val.specification;
+                j['categoryCode'] = val.categoryCode;
+              });
+              this.outBound['outInDetailRecordRequestList'].push(
+                ...val.outInDetailRecordRequestList
+              );
+            } else {
+              this.outBound['outInDetailRecordRequestList'].push(val)
+            }
           });
         });
         //包装维度

+ 35 - 24
src/views/saleManage/saleOrder/invoice/components/print-template-jsyp.vue

@@ -23,7 +23,7 @@
             width: 400px;
             margin: 0 auto;
           "
-          >{{this.groupName||'嘉实(湖南)医院科技有限公司'}}产品出库单</div
+          >{{ this.groupName || '嘉实(湖南)医院科技有限公司' }}产品出库单</div
         >
       </div>
       <div
@@ -38,7 +38,9 @@
       >
         <span style="width: 39%">制单日期:{{ formData.createTime }}</span>
         <span style="width: 39%">发货日期:{{ outBound.createTime }}</span>
-        <span style="width: 22%">出库单号:{{formData.printNo||outBound.bizNo }}</span>
+        <span style="width: 22%"
+          >出库单号:{{ formData.printNo || outBound.bizNo }}</span
+        >
       </div>
       <div
         style="
@@ -50,7 +52,9 @@
         "
       >
         <span style="width: 39%"
-          >上市许可持有人:{{this.groupName||'嘉实(湖南)医院科技有限公司'}}</span
+          >上市许可持有人:{{
+            this.groupName || '嘉实(湖南)医院科技有限公司'
+          }}</span
         >
         <span style="width: 39%"
           >地址:长沙高新开发区汇智中路179号金导园C区8栋</span
@@ -66,9 +70,7 @@
           margin-bottom: 10px;
         "
       >
-        <span style="width: 39%"
-          >受托生产企业:</span
-        >
+        <span style="width: 39%">受托生产企业:</span>
         <span style="width: 39%">地址:</span>
         <span style="width: 22%"></span>
       </div>
@@ -191,7 +193,7 @@
       ...mapGetters(['user'])
     },
     props: {
-      groupName:''
+      groupName: ''
     },
     data() {
       return {
@@ -206,41 +208,50 @@
     methods: {
       async open(id) {
         this.formData = await getSendSaleOrderrecordDetailSplit(id);
-          this.QRvisible = true;
-          let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
-          this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
-          this.outBound['outInDetailRecordRequestList'] = [];
+        this.QRvisible = true;
+        let dataArray = await getInfoBySourceBizNoAll(this.formData.docNo);
+        this.outBound = JSON.parse(JSON.stringify(dataArray[0]));
+        this.outBound['outInDetailRecordRequestList'] = [];
 
-          dataArray.forEach((item) => {
-            item.outInDetailList.forEach((val) => {
+        dataArray.forEach((item) => {
+          item.outInDetailList.forEach((val) => {
+            if (val.outInDetailRecordRequestList.length) {
               val.outInDetailRecordRequestList.forEach((j) => {
-                let data=this.formData.productList.find(product=>product.productCode==val.categoryCode)
+                let data = this.formData.productList.find(
+                  (product) => product.productCode == val.categoryCode
+                );
                 j['categoryName'] = val.categoryName;
                 j['categoryModel'] = val.categoryModel;
                 j['specification'] = val.specification;
                 j['categoryCode'] = val.categoryCode;
                 j['packingSpecification'] = val.extField?.packingSpecification;
                 j['approvalNumber'] = val.extField?.approvalNumber;
-                if(data){
+                if (data) {
                   j['singlePrice'] = data.singlePrice;
-                  j['totalPrice'] = j.measureQuantity*data.singlePrice;
-                  j['remark'] =data.remark;
-                  j['guaranteePeriodText'] = data.guaranteePeriod?(data.guaranteePeriod+(data.guaranteePeriodUnitName||'')):''
+                  j['totalPrice'] = j.measureQuantity * data.singlePrice;
+                  j['remark'] = data.remark;
+                  j['guaranteePeriodText'] = data.guaranteePeriod
+                    ? data.guaranteePeriod +
+                      (data.guaranteePeriodUnitName || '')
+                    : '';
                 }
               });
               this.outBound['outInDetailRecordRequestList'].push(
                 ...val.outInDetailRecordRequestList
               );
-            });
+            } else {
+              this.outBound['outInDetailRecordRequestList'].push(val);
+            }
           });
+        });
       },
       getTotal(key) {
-        let val=0
-        this.outBound?.outInDetailRecordRequestList.forEach(item=>{
-          if(Number(item[key])){
-            val+=Number(item[key])
+        let val = 0;
+        this.outBound?.outInDetailRecordRequestList?.forEach((item) => {
+          if (Number(item[key])) {
+            val += Number(item[key]);
           }
-        })
+        });
         return val;
       },
       close() {

+ 11 - 2
src/views/saleManage/saleOrder/invoice/index.vue

@@ -64,6 +64,10 @@
                   @click.native="handlePrint('printTemplateWlRef')"
                   >送货单模板一</el-dropdown-item
                 >
+                <el-dropdown-item
+                  @click.native="handlePrint('printTemplateBSRef')"
+                  >送货单模板二</el-dropdown-item
+                >
               </el-dropdown-menu>
             </el-dropdown>
           </template>
@@ -193,7 +197,10 @@
       ref="printTemplateWlRef"
       :groupName="groupName"
     ></printTemplateWl>
-
+    <printTemplateBs
+      ref="printTemplateBSRef"
+      :groupName="groupName"
+    ></printTemplateBs>
     <process-submit-dialog
       :isNotNeedProcess="false"
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
@@ -223,6 +230,7 @@
   import printTemplateJs from '@/views/saleManage/saleOrder/invoice/components/print-template-js.vue';
   import printTemplateJsYp from '@/views/saleManage/saleOrder/invoice/components/print-template-jsyp.vue';
   import printTemplateWl from '@/views/saleManage/saleOrder/invoice/components/print-template-wl.vue';
+  import printTemplateBs from '@/views/saleManage/saleOrder/invoice/components/print-template-bs.vue';
   import {
     deleteSendInformation,
     getSendTableList,
@@ -247,7 +255,8 @@
       addInvoiceConfirm,
       printTemplateJs,
       printTemplateJsYp,
-      printTemplateWl
+      printTemplateWl,
+      printTemplateBs
     },
 
     //客户管理数据