This commit is contained in:
ljx
2025-08-28 18:20:24 +08:00
parent 2b25709c14
commit c0338033b4
5 changed files with 215 additions and 239 deletions

View File

@ -118,7 +118,8 @@
<el-table-column prop="name" label="工程或费用名称" />
<el-table-column prop="unit" label="单位" />
<!-- <el-table-column prop="quantity" label="数量" /> -->
<el-table-column prop="selectNum" label="选择数量" align="center">
<el-table-column prop="quantity" label="计划量" align="center" />
<el-table-column prop="selectNum" label="设计量" align="center">
<template #default="scope">
<el-input-number
:model-value="scope.row.selectNum"
@ -132,16 +133,36 @@
:step="1"
:controls="false"
:max="Math.floor(scope.row.quantity)"
v-if="scope.row.quantity && scope.row.quantity != 0"
v-if="scope.row.quantity && scope.row.quantity != 0 && scope.row.unitPrice"
/>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<!-- <el-table-column prop="price" label="总价" align="center">
<el-table-column prop="useQuantity" label="剩余量" align="center">
<template #default="scope">
{{ scope.row.price }}
{{
(scope.row.quantity ? Number(scope.row.quantity) : 0) - (scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) == 0
? ''
: (scope.row.quantity ? Number(scope.row.quantity) : 0) - (scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)
}}
</template>
</el-table-column> -->
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{
((scope.row.quantity ? Number(scope.row.quantity) : 0) - (scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)) *
Number(scope.row.unitPrice) ==
0
? ''
: (
((scope.row.quantity ? Number(scope.row.quantity) : 0) - (scope.row.useQuantity ? Number(scope.row.useQuantity) : 0)) *
Number(scope.row.unitPrice)
).toFixed(2)
}}
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>