浏览代码

对账单,对账单报表: 订单对账单的小计和总计替换

lxf 1 年之前
父节点
当前提交
8d5bbb71c2
共有 2 个文件被更改,包括 82 次插入78 次删除
  1. 41 39
      src/views/shengde/group/finance/reconciliation/print.vue
  2. 41 39
      src/views/shengde/group/finance/summary/print.vue

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

@@ -87,7 +87,7 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <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>
@@ -96,7 +96,7 @@
               <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>
             </td>
           </tr>
         </tbody>
@@ -227,47 +227,49 @@ 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) => {
-          //     let money = 0
-          //     if (itemBom.dataResource === 1) {
-          //       if (item.productPrice) {
-          //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
-          //       }
-          //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
-          //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
-          //       }
-          //       if (item.deliverGoodsPrice) {
-          //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
-          //       }
-          //       if (item.expressPrice) {
-          //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
-          //       }
-          //       if (item.expensePrice) {
-          //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
-          //       }
-          //     } else {
-          //       if (itemBom.price) {
-          //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
-          //       }
-          //     }
-          //     if (itemBom.bomColorQuantity) {
-          //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).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)
+              }
+              //     if (itemBom.dataResource === 1) {
+              //       if (item.productPrice) {
+              //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
+              //       }
+              //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
+              //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
+              //       }
+              //       if (item.deliverGoodsPrice) {
+              //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
+              //       }
+              //       if (item.expressPrice) {
+              //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
+              //       }
+              //       if (item.expensePrice) {
+              //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
+              //       }
+              //     } else {
+              //       if (itemBom.price) {
+              //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
+              //       }
+              //     }
+              //     if (itemBom.bomColorQuantity) {
+              //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).toFixed(2)
+              //     }
+            })
+          }
         })
       }
       return allMoney
     },
-    subtotal(item) {
-      let num = 0
-      if (item.quantity && item.skuPrice) {
-        num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
-      }
-      return num
-    },
+    // subtotal(item) {
+    //   let num = 0
+    //   if (item.quantity && item.skuPrice) {
+    //     num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
+    //   }
+    //   return num
+    // },
   },
 }
 </script>

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

@@ -85,7 +85,7 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
-              <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>
@@ -94,7 +94,7 @@
               <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>
             </td>
           </tr>
         </tbody>
@@ -226,47 +226,49 @@ 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) => {
-          //     let money = 0
-          //     if (itemBom.dataResource === 1) {
-          //       if (item.productPrice) {
-          //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
-          //       }
-          //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
-          //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
-          //       }
-          //       if (item.deliverGoodsPrice) {
-          //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
-          //       }
-          //       if (item.expressPrice) {
-          //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
-          //       }
-          //       if (item.expensePrice) {
-          //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
-          //       }
-          //     } else {
-          //       if (itemBom.price) {
-          //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
-          //       }
-          //     }
-          //     if (itemBom.bomColorQuantity) {
-          //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).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)
+              }
+              //     if (itemBom.dataResource === 1) {
+              //       if (item.productPrice) {
+              //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
+              //       }
+              //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
+              //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
+              //       }
+              //       if (item.deliverGoodsPrice) {
+              //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
+              //       }
+              //       if (item.expressPrice) {
+              //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
+              //       }
+              //       if (item.expensePrice) {
+              //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
+              //       }
+              //     } else {
+              //       if (itemBom.price) {
+              //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
+              //       }
+              //     }
+              //     if (itemBom.bomColorQuantity) {
+              //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).toFixed(2)
+              //     }
+            })
+          }
         })
       }
       return allMoney
     },
-    subtotal(item) {
-      let num = 0
-      if (item.quantity && item.skuPrice) {
-        num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
-      }
-      return num
-    },
+    // subtotal(item) {
+    //   let num = 0
+    //   if (item.quantity && item.skuPrice) {
+    //     num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
+    //   }
+    //   return num
+    // },
   },
 }
 </script>