Browse Source

对账单,对账单报表:替换小计合计

lxf 1 year ago
parent
commit
c21e2d75ed

+ 12 - 12
src/views/shengde/group/finance/reconciliation/print.vue

@@ -87,8 +87,8 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <span>{{ subtotal(item) }}</span>
-              <!-- <span>{{ item.subtotalAmount }}</span> -->
+              <!-- <span>{{ subtotal(item) }}</span> -->
+              <span>{{ item.subtotalAmount }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
               <span v-if="item.aftermarketQuantity && Number(item.aftermarketQuantity) !== 0">{{ item.aftermarketQuantity }}</span>
@@ -97,8 +97,8 @@
               <span v-if="item.aftermarketAmount && Number(item.aftermarketAmount) !== 0">-{{ item.aftermarketAmount }}</span>
             </td>
             <td style="border-right: 0" v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <span>{{ getAllCost(item) }}</span>
-              <!-- <span>{{ item.amount }}</span> -->
+              <!-- <span>{{ getAllCost(item) }}</span> -->
+              <span>{{ item.amount }}</span>
             </td>
           </tr>
         </tbody>
@@ -224,14 +224,14 @@ export default {
       let allMoney = 0
       if (this.tableList && this.tableList.length > 0) {
         this.tableList.map((item) => {
-          allMoney = parseFloat(Number(allMoney) + Number(item.skuPrice) * Number(item.quantity) - Number(item.aftermarketAmount)).toFixed(2)
-          // if (item.bomDetails && item.bomDetails.length > 0) {
-          //   item.bomDetails.map((itemBom) => {
-          //     if (itemBom.amount) {
-          //       allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
-          //     }
-          //   })
-          // }
+          // allMoney = parseFloat(Number(allMoney) + Number(item.skuPrice) * Number(item.quantity) - Number(item.aftermarketAmount)).toFixed(2)
+          if (item.bomDetails && item.bomDetails.length > 0) {
+            item.bomDetails.map((itemBom) => {
+              if (itemBom.amount) {
+                allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
+              }
+            })
+          }
         })
       }
       return allMoney

+ 12 - 12
src/views/shengde/group/finance/summary/print.vue

@@ -85,8 +85,8 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <span>{{ subtotal(item) }}</span>
-              <!-- <span>{{ item.subtotalAmount }}</span> -->
+              <!-- <span>{{ subtotal(item) }}</span> -->
+              <span>{{ item.subtotalAmount }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
               <span v-if="item.aftermarketQuantity && Number(item.aftermarketQuantity) !== 0">{{ item.aftermarketQuantity }}</span>
@@ -95,8 +95,8 @@
               <span v-if="item.aftermarketAmount && Number(item.aftermarketAmount) !== 0">-{{ item.aftermarketAmount }}</span>
             </td>
             <td style="border-right: 0" v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <span>{{ getAllCost(item) }}</span>
-              <!-- <span>{{ item.amount }}</span> -->
+              <!-- <span>{{ getAllCost(item) }}</span> -->
+              <span>{{ item.amount }}</span>
             </td>
           </tr>
         </tbody>
@@ -223,14 +223,14 @@ export default {
       let allMoney = 0
       if (this.tableList && this.tableList.length > 0) {
         this.tableList.map((item) => {
-          allMoney = parseFloat(Number(allMoney) + Number(item.skuPrice) * Number(item.quantity) - Number(item.aftermarketAmount)).toFixed(2)
-          // if (item.bomDetails && item.bomDetails.length > 0) {
-          //   item.bomDetails.map((itemBom) => {
-          //     if (itemBom.amount) {
-          //       allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
-          //     }
-          //   })
-          // }
+          // allMoney = parseFloat(Number(allMoney) + Number(item.skuPrice) * Number(item.quantity) - Number(item.aftermarketAmount)).toFixed(2)
+          if (item.bomDetails && item.bomDetails.length > 0) {
+            item.bomDetails.map((itemBom) => {
+              if (itemBom.amount) {
+                allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
+              }
+            })
+          }
         })
       }
       return allMoney