修改物料总金额展示

master
jinna 10 months ago
parent cc6f3c2464
commit b371fe7893
  1. 10
      src/views/components/workOrderDetail.vue

@ -210,7 +210,7 @@
<template slot="append" v-if="tableData.length != 0"> <template slot="append" v-if="tableData.length != 0">
<tr> <tr>
<td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td> <td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td>
<td>{{ Math.trunc(tableData.reduce((acc, obj) => acc + ((Number(obj.price) * obj.number) || 0), 0) * 100) <td>{{ Math.trunc(tableData.reduce((acc, obj) => acc + ((Number(obj.price)) || 0), 0) * 100)
/ 100 }} </td> / 100 }} </td>
</tr> </tr>
</template> </template>
@ -234,7 +234,7 @@
<template slot="append" v-if="(dataType == 4 && (repairForm.status == 402 && dialogType == 'view') )"> <template slot="append" v-if="(dataType == 4 && (repairForm.status == 402 && dialogType == 'view') )">
<tr> <tr>
<td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td> <td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td>
<td>{{ Math.trunc(tableData.reduce((acc, obj) => acc + ((Number(obj.price) * obj.number) || 0), 0) * 100) <td>{{ Math.trunc(tableData.reduce((acc, obj) => acc + ((Number(obj.price) ) || 0), 0) * 100)
/ 100 }} </td> / 100 }} </td>
</tr> </tr>
</template> </template>
@ -661,7 +661,8 @@ export default {
price: item.materialPrice, price: item.materialPrice,
inventoryId: item.inventoryId, inventoryId: item.inventoryId,
productId: '', productId: '',
productList: [] productList: [],
unifiedQuotation: Number(item.materialPrice) / Number(item.materialCount)
}) })
}) })
this.getDeviceList(res.data.data.reportUnit) this.getDeviceList(res.data.data.reportUnit)
@ -798,10 +799,11 @@ export default {
}, },
// //
changeNumber(val, row) { changeNumber(val, row) {
console.log('row--------------->',row)
console.log('val--------------->',val)
if (row.unifiedQuotation) { if (row.unifiedQuotation) {
// row.price = (row.unifiedQuotation * val).toFixed(2) // row.price = (row.unifiedQuotation * val).toFixed(2)
row.price = Math.trunc(row.unifiedQuotation * val * 100) / 100 row.price = Math.trunc(row.unifiedQuotation * val * 100) / 100
} else {
} }
}, },
// //

Loading…
Cancel
Save