金额格式设置

This commit is contained in:
2025-09-09 17:03:01 +08:00
parent 460472b29a
commit d92a540786
32 changed files with 633 additions and 318 deletions

View File

@ -25,7 +25,11 @@
</el-table-column>
<el-table-column prop="name" label="名称" align="center" />
<el-table-column prop="content" label="内容" align="center" />
<el-table-column prop="price" label="限价" align="center" />
<el-table-column prop="price" label="限价" align="center">
<template #default="scope">
{{ proxy.formatPrice(scope.row.price) }}
</template>
</el-table-column>
<el-table-column prop="bidd" align="center">
<template #header> <span style="color: red">*</span>招标文件 </template>
<template #default="scope">
@ -75,8 +79,8 @@
changeContractPrice(val, scope.row);
}
"
:precision="2"
:step="1"
:precision="4"
:min="0"
:controls="false"
:disabled="scope.row.bidStatus == 1"
v-hasPermi="['tender:biddingPlan:edit']"
@ -226,22 +230,27 @@
/>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ scope.row.unitPrice ? proxy.formatPrice(scope.row.unitPrice) : '' }}
</template>
</el-table-column>
<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) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice) ==
0
? ''
: (
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
proxy.formatPrice(
((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice) ==
0
? ''
: ((scope.row.quantity ? Number(scope.row.quantity) : 0) -
(scope.row.useQuantity ? Number(scope.row.useQuantity) : 0) -
(scope.row.selectNum ? Number(scope.row.selectNum) : 0)) *
Number(scope.row.unitPrice)
).toFixed(2)
Number(scope.row.unitPrice),
false
)
}}
</template>
</el-table-column>
@ -259,10 +268,14 @@
<el-table-column prop="name" label="工程或费用名称" />
<el-table-column prop="unit" label="单位" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="unitPrice" label="单价" align="center" />
<el-table-column prop="unitPrice" label="单价" align="center">
<template #default="scope">
{{ scope.row.unitPrice ? proxy.formatPrice(scope.row.unitPrice) : '' }}
</template>
</el-table-column>
<el-table-column prop="price" label="总价" align="center">
<template #default="scope">
{{ scope.row.price }}
{{ scope.row.price ? proxy.formatPrice(scope.row.price) : '' }}
</template>
</el-table-column>
</el-table>
@ -294,12 +307,14 @@
</template>
<script setup lang="ts">
import { getCurrentInstance, ComponentInternalInstance } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { getDicts } from '@/api/system/dict/data';
import { Plus } from '@element-plus/icons-vue';
import { FormInstance } from 'element-plus';
import winTheBid from './comm/winTheBid.vue';
import information from './comm/planPage.vue';
const { proxy } = getCurrentInstance();
import {
sheetList,