Browse Source

fix: 采购收货单打印显示问题

liujt 2 tuần trước cách đây
mục cha
commit
6716203ebc

+ 8 - 5
src/views/purchasingManage/purchaseOrder/invoice/components/print-template-ht.vue

@@ -93,7 +93,7 @@
             <td style="padding: 5px"> {{ item.measuringUnit }}</td>
             <td style="padding: 5px"> {{ item.receiveTotalCount }}</td>
             <td style="padding: 5px"> {{ showPrice ? item.singlePrice : ''}} </td>
-            <td style="padding: 5px"> {{ showPrice ? calculateTotalPrice(item) : ''}} </td>
+            <td style="padding: 5px"> {{ showPrice ? item.discountTotalPrice : ''}} </td>
             <td style="padding: 5px"> {{ item.batchNo }}</td>
             <td style="padding: 5px"> {{ item.remark }}</td>
           </tr>
@@ -105,13 +105,13 @@
                   >本页数量小计:{{ getAll(record, 'receiveTotalCount') }}</span
                 >
                 <span style="flex: 1"
-                  >本页金额小计:{{ showPrice ? getAll(record, 'totalPrice') : '' }}</span
+                  >本页金额小计:{{ showPrice ? getAll(record, 'discountTotalPrice') : '' }}</span
                 >
                 <span style="flex: 1"
                   >汇总数量:{{ getAll(record, 'receiveTotalCount') }}</span
                 >
                 <span style="flex: 1"
-                  >汇总金额:{{ showPrice ? getAll(record, 'totalPrice') : '' }}</span
+                  >汇总金额:{{ showPrice ? getAll(record, 'discountTotalPrice') : '' }}</span
                 >
               </div>
             </td>
@@ -289,7 +289,9 @@ export default {
           list.forEach((item) => {
             const singlePrice = parseFloat(item.singlePrice) || 0;
             const quantity = parseFloat(item.receiveTotalCount) || 0;
-            totalPriceNum += singlePrice * quantity;
+            // totalPriceNum += singlePrice * quantity;
+            totalPriceNum += item.discountTotalPrice;
+
           });
         }
         const totalCount = this.getAll(record, 'receiveTotalCount');
@@ -298,7 +300,8 @@ export default {
         const rows = list.map((item, index) => {
           const singlePrice = parseFloat(item.singlePrice) || 0;
           const quantity = parseFloat(item.receiveTotalCount) || 0;
-          const rowTotal = this.showPrice ? (singlePrice * quantity).toFixed(4).replace(/\.?0+$/, '') : '';
+          // const rowTotal = this.showPrice ? (singlePrice * quantity).toFixed(4).replace(/\.?0+$/, '') : '';
+          const rowTotal = this.showPrice ? item.discountTotalPrice : '';
           return `
           <tr height="24" style="height:24pt;">
             <td align="center" valign="middle" style="${td}">${index + 1}</td>