|
@@ -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('点击保存')
|