修正ts类型

This commit is contained in:
Zy
2026-05-13 15:28:25 +08:00
parent 1b738c0f4d
commit a1750bc67b
114 changed files with 2346 additions and 613 deletions

View File

@@ -22,17 +22,17 @@
<div v-else-if="scope.row.chargeTypeName === '电费' || scope.row.chargeTypeName === '水费'">{{ scope.row.houseName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目">
<el-table-column align="center" label="收费项目" width="250">
<template #default="scope">
<div>{{ scope.row.chargeItemName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费周期">
<el-table-column align="center" label="收费周期" width="300">
<template #default="scope">
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="单价">
<el-table-column align="center" label="单价" width="150">
<template #default="scope">
<div>{{ scope.row.fixedPrice }}</div>
</template>
@@ -42,13 +42,13 @@
<div>{{ scope.row.formula }}</div>
</template>
</el-table-column> -->
<el-table-column align="center" label="缴费状态">
<el-table-column align="center" label="缴费状态" width="120">
<template #default="scope">
<dict-tag v-if="!inglelist.includes(scope.row.chargeItemName)" :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
<div v-else>--</div>
</template>
</el-table-column>
<el-table-column align="center" label="应缴金额">
<el-table-column align="center" label="应缴金额" width="120">
<template #default="scope">
<div v-if="!inglelist.includes(scope.row.chargeItemName)">{{ scope.row.money ?? '--' }}</div>
<div v-else>--</div>
@@ -67,7 +67,7 @@
</div>
<div>
<span>账单名称 </span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.join('、 ') }}</span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.map((item) => item.chargeItemName).join('、 ') }}</span>
</div>
<div>
<span>应收合计{{ from.allCost }}</span>
@@ -157,11 +157,8 @@ const getList = () => {
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: billlistType[]) => {
// TODO: 获取选中的id
ids.value = [];
ids.value = selection;
console.log(ids.value);
console.log(selection);
single.value = selection.length != 1;
multiple.value = !selection.length;
@@ -189,15 +186,20 @@ const from = ref({
});
const openDiage = () => {
if (!ids.value.length) {
ElMessage.warning('请至少选择一条账单进行收款');
return;
}
from.value = {
allCost: 0,
payStatus: '0',
billResidentId: ['202505电费', '202505水费'],
billResidentId: [],
payType: '0',
remark: ''
};
// 计算金额
console.log(ids.value);
ids.value.forEach((item) => {
from.value.billResidentId.push(item);
from.value.allCost += Number(item.money);
});
dialog.visible = true;