|
|
|
|
@ -668,7 +668,7 @@ export default { |
|
|
|
|
this.getDeviceList(res.data.data.reportUnit) |
|
|
|
|
this.repairForm.approveResult = res.data.data.approveResult != -1 ? res.data.data.approveResult : '' |
|
|
|
|
// this.totalPrice = res.data.data.totalPrice == -1 ? res.data.data.materials.reduce((sum, item) => sum + item.materialPrice, 0) : res.data.data.totalPrice |
|
|
|
|
this.totalPrice = res.data.data.materials.length != 0 ? Math.trunc(res.data.data.materials.reduce((acc, obj) => acc + ((Number(obj.materialPrice) * obj.materialCount) || 0), 0) * 100) |
|
|
|
|
this.totalPrice = res.data.data.materials.length != 0 ? Math.trunc(res.data.data.materials.reduce((acc, obj) => acc + ((Number(obj.materialPrice)) || 0), 0) * 100) |
|
|
|
|
/ 100 : 0 |
|
|
|
|
this.discount = res.data.data.status == 402 ? '' : res.data.data.discount == -1 ? '' : res.data.data.discount |
|
|
|
|
this.discountPrice = res.data.data.status == 402 ? '' : res.data.data.discountPrice == -1 ? '' : res.data.data.discountPrice |
|
|
|
|
|