同步6/16

This commit is contained in:
Zy
2026-06-01 18:12:58 +08:00
parent 38274ab612
commit 50e7b14fd6
183 changed files with 8956 additions and 4803 deletions

View File

@@ -10,16 +10,19 @@
<el-button type="primary" @click="openDiage">收款</el-button>
<!-- <el-button>添加临时收费</el-button> -->
<!-- <el-button>预存</el-button> -->
<!-- <el-button>打印</el-button> -->
<el-button @click="emit('Back')">返回</el-button>
</div>
<div class="tablebox">
<el-table :data="tabledata" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="房屋/车位">
<el-table-column align="center" label="收费名称">
<template #default="scope">
<div v-if="scope.row.chargeTypeName === '车费'">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.chargeTypeName === '电费' || scope.row.chargeTypeName === '水费'">{{ scope.row.houseName }}</div>
<!-- <div v-if="scope.row.chargeTypeName === '车费'">{{ scope.row.parkingName }}</div>
<div v-else-if="scope.row.chargeTypeName === chargeTypeName.Electricity || scope.row.chargeTypeName === chargeTypeName.Water">
{{ scope.row.houseName }}
</div>
<div v-else>--</div> -->
<div>{{ scope.row.detailsName }}</div>
</template>
</el-table-column>
<el-table-column align="center" label="收费项目" width="250">
@@ -29,7 +32,7 @@
</el-table-column>
<el-table-column align="center" label="收费周期" width="300">
<template #default="scope">
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
</template>
</el-table-column>
<el-table-column align="center" label="单价" width="150">
@@ -37,11 +40,6 @@
<div>{{ scope.row.fixedPrice }}</div>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="数量">
<template #default="scope">
<div>{{ scope.row.formula }}</div>
</template>
</el-table-column> -->
<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>
@@ -50,8 +48,7 @@
</el-table-column>
<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>
<div>{{ scope.row.amount ?? '--' }}</div>
</template>
</el-table-column>
</el-table>
@@ -65,9 +62,13 @@
<div>
<span>缴费人{{ villageinfo.villageName ?? '---' }}-{{ props.query.houseName }}</span>
</div>
<div>
<span>账单名称 </span>
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.map((item) => item.chargeItemName).join('、 ') }}</span>
<div class="flex">
<span>收费名称 </span>
<div>
<div v-for="(item, index) in from.billResidentId" :key="index" style="text-wrap: wrap; margin-bottom: 5px">
<span style="text-decoration: underline">{{ item.detailsName }} ;</span>
</div>
</div>
</div>
<div>
<span>应收合计{{ from.allCost }}</span>
@@ -78,7 +79,7 @@
</div>
<el-form ref="formRef" :model="from" label-width="100px">
<el-form-item label="费用合计" prop="allCost">
<el-input v-model="from.allCost">
<el-input v-model="from.allCost" disabled>
<template #suffix>
<span></span>
</template>
@@ -108,16 +109,20 @@
<script setup lang="ts">
import { ref } from 'vue';
import { billlistType, billQuery } from '@/api/system/SdbCashier';
import { billlistType, billQuery, billEdit } from '@/api/system/SdbCashier';
import { moneyAdd } from '@/utils/money';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_pay_method, com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_method', 'com_pay_status'));
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
const villageinfo = JSON.parse(localStorage.getItem('villageInfo') || '{}');
// 隐藏收费金额的 类型列表
const inglelist = ['电费', '水费'];
enum chargeTypeName {
'Water' = '水费',
'Electricity' = '电费'
}
type querytype = {
residentId: string;
residentName: string;
@@ -190,6 +195,7 @@ const openDiage = () => {
ElMessage.warning('请至少选择一条账单进行收款');
return;
}
from.value = {
allCost: 0,
payStatus: '0',
@@ -197,10 +203,9 @@ const openDiage = () => {
payType: '0',
remark: ''
};
console.log(ids.value);
ids.value.forEach((item) => {
from.value.billResidentId.push(item);
from.value.allCost += Number(item.money);
from.value.allCost = moneyAdd(from.value.allCost, item.amount);
});
dialog.visible = true;
};
@@ -210,19 +215,23 @@ const closepay = () => {
};
const submitForm = () => {
buttonLoading.value = true;
if (from.value.payStatus === '0') {
setTimeout(() => {
buttonLoading.value = false;
closepay();
}, 1000);
} else {
}
const obj = {
'detailsId': from.value.billResidentId.map((item) => item.detailsId),
'payType': from.value.payType,
'payStatus': from.value.payStatus
};
billEdit(obj).then(() => {
ElMessage.success('缴费成功');
buttonLoading.value = false;
getList();
closepay();
});
};
</script>
<style scoped lang="scss">
.cashierbox {
font-size: 0.8rem;
font-size: 16px;
.el-button {
width: 100px;
height: 35px;