Browse Source

短出计算

jbb 2 years ago
parent
commit
ada0d69c0d
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/views/reportForms/cost-allocation-table.vue

+ 16 - 0
src/views/reportForms/cost-allocation-table.vue

@@ -334,6 +334,7 @@ export default {
              this.loading = false
             this.detailsPlanNum = res.result //所有详情
             this.accidentListData = res.result.syCostAllocationAccidentList //事故单
+            // this.accidentCalculation(this.accidentListData)
             var accidentNum = 0
             this.accidentListData.map(item =>{
               item.id = accidentNum + 1
@@ -356,6 +357,7 @@ export default {
             this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
             this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
             this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
+            this.calculation(oneData.syCostAllocationShipdetail)
             //合计中辅料相关金额
             var s = 0,
             v =0
@@ -397,6 +399,20 @@ export default {
       })
     },
 
+    //计算
+    calculation(val){
+      var  average = 0
+       val.map(item=>{
+         average += item.exportUnitPrice
+       })
+       this.detailsPlanNum.shortvalue = this.detailsPlanNum.shortseveral*average
+    },
+    // accidentCalculation(val){
+    //   val.map(item=>{
+    //     debugger
+    //   })
+    // },
+
     // 页面 保存
     save() {
       console.log('点击保存')