10/21
1. 删除多余报表
This commit is contained in:
@@ -3,34 +3,22 @@
|
||||
<PageHeader></PageHeader>
|
||||
<div class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form ref="queryFormRef" :inline="true" :model="queryParams" @submit.prevent="handleQuery">
|
||||
<el-form ref="queryFormRef" :inline="true" :model="queryParams" label-width="auto" @submit.prevent="handleQuery">
|
||||
<div>
|
||||
<el-form-item label="小区" prop="villageId">
|
||||
<el-select v-model="queryParams.villageId" placeholder="请选择小区" @change="handleChangeVillage">
|
||||
<el-option v-for="(item, index) in villageList" :key="index" :label="item.villageName" :value="item.villageId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="楼栋" prop="buildingId">
|
||||
<el-form-item label="区域" prop="buildingId">
|
||||
<el-select
|
||||
v-model="queryParams.buildingId"
|
||||
clearable
|
||||
placeholder="请选择楼栋"
|
||||
placeholder="请选择区域"
|
||||
@change="handleChangeBuilding"
|
||||
@clear="handleClearBuildingId"
|
||||
>
|
||||
<el-option v-for="(item, index) in buildingList" :key="index" :label="item.buildingName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单元" prop="unitNoId">
|
||||
<el-select v-model="queryParams.unitNoId" clearable placeholder="请选择单元" @change="handleChangeUnit" @clear="handleClearUnit">
|
||||
<el-option v-for="(item, index) in unitList" :key="index" :label="item.unitNoName" :value="item.unitNoId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="房号" prop="houseId">
|
||||
<el-select v-model="queryParams.houseId" clearable placeholder="请选择房号" @clear="handleClear('houseId')">
|
||||
<el-option-group v-for="group in houseList" :key="group.floorNo" :label="String(group.floorNo) + ' 楼'">
|
||||
<el-option v-for="item in group.houses" :key="item.houseId" :label="item.houseNo" :value="item.houseId" />
|
||||
</el-option-group>
|
||||
<el-option v-for="item in houseList" :key="item.houseId" :label="item.houseNo" :value="item.houseId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -66,11 +54,6 @@
|
||||
@clear="handleClearChargePeriod('end')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋分类" prop="houseUseTypeId">
|
||||
<el-select v-model="queryParams.houseUseTypeId" clearable @clear="handleClear('houseUseTypeId')">
|
||||
<el-option v-for="item in houseUseTypeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.payTimeBegin"
|
||||
@@ -92,12 +75,12 @@
|
||||
@clear="handleClear('payTimeEnd')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业主姓名" prop="residentName">
|
||||
<el-form-item label="承租方姓名" prop="residentName">
|
||||
<el-input
|
||||
v-model.trim="queryParams.residentName"
|
||||
clearable
|
||||
maxlength="30"
|
||||
placeholder="请选择业主姓名"
|
||||
placeholder="请选择承租方姓名"
|
||||
@clear="handleClear('residentName')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
@@ -134,9 +117,9 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<el-table v-loading="loading" :data="tableData" border @selection-change="handleSelectionChange">
|
||||
<el-table-column align="center" fixed="left" type="selection" width="55" />
|
||||
<el-table-column align="center" fixed="left" label="房屋/车位/车辆" prop="unitNo" width="120">
|
||||
<el-table-column align="center" fixed="left" label="房屋" prop="unitNo" width="120">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleRoute(scope.row)">{{ scope.row.unitNo }}</el-button>
|
||||
{{ scope.row.unitNo }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="left" label="收费项目" prop="billCode" width="120">
|
||||
@@ -144,7 +127,7 @@
|
||||
{{ scope.row.chargeItemName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收费周期" prop="periodDisplay" width="280">
|
||||
<el-table-column align="center" label="收费周期" prop="periodDisplay" width="200">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.periodDisplay }}</span>
|
||||
</template>
|
||||
@@ -176,12 +159,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="剩余应缴金额" prop="needPayAmount" width="140" />
|
||||
<el-table-column align="center" label="优惠金额" prop="singleDiscountAmount" width="100" />
|
||||
<!-- <el-table-column align="center" label="优惠金额" prop="singleDiscountAmount" width="100" />-->
|
||||
<el-table-column align="center" label="实缴金额" prop="actualAccount" width="100" />
|
||||
<el-table-column align="center" label="缴费人" prop="residentName" width="120" />
|
||||
<el-table-column align="center" label="缴费时间" prop="payTime" />
|
||||
<el-table-column align="center" label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="150">
|
||||
<el-table-column align="center" label="承租方姓名" prop="residentName" width="120" />
|
||||
<el-table-column align="center" label="缴费时间" min-width="180" prop="payTime" />
|
||||
<el-table-column align="center" label="备注" min-width="250" prop="remark" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span style="text-align: left">{{ scope.row.remark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button v-if="scope.row.payStatus !== PayStatus.PAID" link type="primary" @click="handleIncome(scope.row)">收款</el-button>
|
||||
<el-button v-if="scope.row.payStatus === PayStatus.PAID" link type="success" @click="printPIaoJuByOnly(scope.row)">打印票据</el-button>
|
||||
@@ -192,7 +179,8 @@
|
||||
<div class="footerBox">
|
||||
<div class="totalBox">
|
||||
<span>合计:</span>
|
||||
<span>应收:{{ totalAll.totalAccount }}元(原金额:{{ totalAll.originalAmount }}元, 优惠:{{ totalAll.totalDiscountAmount }}元)</span>
|
||||
<!-- <span>应收:{{ totalAll.totalAccount }}元(原金额:{{ totalAll.originalAmount }}元, 优惠:{{ totalAll.totalDiscountAmount }}元)</span>-->
|
||||
<span>应收:{{ totalAll.totalAccount }}元</span>
|
||||
<span style="padding: 0 5px">已收:{{ totalAll.TotalPaymentAmount }}元</span>
|
||||
<span style="padding: 0 5px">未收:{{ totalAll.TotalUnPaymentAmount }}元</span>
|
||||
</div>
|
||||
@@ -297,17 +285,17 @@
|
||||
<el-form-item label="缴纳状态" prop="payStatus">
|
||||
<el-radio-group v-model="inComeFrom.payStatus">
|
||||
<el-radio label="已缴纳" value="1"></el-radio>
|
||||
<el-radio label="部分缴纳" value="3"></el-radio>
|
||||
<!-- <el-radio label="部分缴纳" value="3"></el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="inComeFrom.payStatus !== PayStatus.PENDING" label="优惠方式" prop="discountMethod">
|
||||
<el-select v-model="inComeFrom.discountMethod" placeholder="请选择" style="width: 400px" @change="handleChangeDisCountMethod">
|
||||
<el-option :value="0" label="不优惠"></el-option>
|
||||
<el-option :value="2" label="金额"></el-option>
|
||||
<el-option :value="1" label="比例"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="inComeFrom.payStatus !== PayStatus.PENDING" label="优惠方式" prop="discountMethod">-->
|
||||
<!-- <el-select v-model="inComeFrom.discountMethod" placeholder="请选择" style="width: 400px" @change="handleChangeDisCountMethod">-->
|
||||
<!-- <el-option :value="0" label="不优惠"></el-option>-->
|
||||
<!-- <el-option :value="2" label="金额"></el-option>-->
|
||||
<!-- <el-option :value="1" label="比例"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<div v-if="inComeFrom.discountMethod !== 0">
|
||||
<div v-if="inComeFrom.discountMethod === 2">
|
||||
<el-form-item label="单笔优惠金额" prop="discount">
|
||||
@@ -402,7 +390,7 @@
|
||||
<th>账单时间</th>
|
||||
<th style="min-width: 50px">面积</th>
|
||||
<th style="min-width: 50px">应收金额</th>
|
||||
<th style="min-width: 50px">优免金额</th>
|
||||
<!-- <th style="min-width: 50px">优免金额</th>-->
|
||||
<th style="min-width: 50px">实收金额</th>
|
||||
<th>收款方式</th>
|
||||
<th style="min-width: 100px">备注</th>
|
||||
@@ -415,7 +403,7 @@
|
||||
<td>{{ item.detailsTime }}</td>
|
||||
<td>{{ item.useCount }}</td>
|
||||
<td>{{ item.account }}</td>
|
||||
<td>{{ item.singleDiscountAmount }}</td>
|
||||
<!-- <td>{{ item.singleDiscountAmount }}</td>-->
|
||||
<td>{{ item.actualAccount }}</td>
|
||||
<td>{{ item.payType }}</td>
|
||||
<td style="text-wrap: wrap; white-space: wrap">{{ item.remark }}</td>
|
||||
@@ -426,14 +414,14 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{ print_form.totalAccount }}</td>
|
||||
<td>{{ print_form.totalDiscountAmount }}</td>
|
||||
<!-- <td>{{ print_form.totalDiscountAmount }}</td>-->
|
||||
<td>{{ print_form.totalActualAccount }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付明细</td>
|
||||
<td colspan="8" style="text-align: left; padding: 0 10px">
|
||||
<td colspan="7" style="text-align: left; padding: 0 10px">
|
||||
<span v-for="(item, index) in print_form.payTypeSummary" :key="index"
|
||||
>{{ item.payType }}: {{ item.payAmount }} ; </span
|
||||
>
|
||||
@@ -466,7 +454,7 @@ import { billDelete, billEdit, billlistType, billPrint, BillPrintType, billQuery
|
||||
import { listChargeItem } from '@/api/system/SdbChargeItem';
|
||||
import { ref } from 'vue';
|
||||
import { add, div, eq, eqMoney, gtMoney, minMoney, moneyAdd, mul, sub, sum, toBig } from '@/utils/money';
|
||||
import { BuildingUnitlist, BuildingVo, FloorsType } from '@/api/system/house/type';
|
||||
import { BuildingVo, HouseListVO } from '@/api/system/house/type';
|
||||
import { ChargeItemVO } from '@/api/system/SdbChargeItem/type';
|
||||
import { communitylist_rows_type } from '@/api/system/community/type';
|
||||
import { debounce } from '@/utils';
|
||||
@@ -523,8 +511,6 @@ const queryParams = ref({
|
||||
villageId: villageId,
|
||||
// 楼栋id
|
||||
buildingId: undefined,
|
||||
// 单元id
|
||||
unitNoId: undefined,
|
||||
// 房屋id
|
||||
houseId: undefined,
|
||||
// 房屋类型id
|
||||
@@ -550,8 +536,7 @@ type ExcludeType = keyof Omit<typeof queryParams.value, 'villageId' | 'pageSize'
|
||||
|
||||
const villageList = ref<communitylist_rows_type[]>([]); // 小区列表
|
||||
const buildingList = ref<BuildingVo[]>([]); // 楼栋列表
|
||||
const unitList = ref<BuildingUnitlist[]>([]); // 单元列表
|
||||
const houseList = ref<FloorsType[]>([]); // 房屋列表
|
||||
const houseList = ref<HouseListVO[]>([]); // 房屋列表
|
||||
const chargeItems = ref<ChargeItemVO[]>([]);
|
||||
const tableData = ref([]);
|
||||
const dialog = reactive<DialogOption>({
|
||||
@@ -572,12 +557,10 @@ function changeTabs(value: string) {
|
||||
}
|
||||
// 选择小区
|
||||
function handleChangeVillage(val: string) {
|
||||
queryParams.value.unitNoId = undefined;
|
||||
queryParams.value.buildingId = undefined;
|
||||
queryParams.value.chargeItemId = undefined;
|
||||
queryParams.value.houseId = undefined;
|
||||
buildingList.value = [];
|
||||
unitList.value = [];
|
||||
if (val) {
|
||||
getBuildinglistAPI({
|
||||
villageId: val
|
||||
@@ -599,27 +582,13 @@ function handleChargeItem(id: string) {
|
||||
}
|
||||
// 选择楼栋
|
||||
function handleChangeBuilding(val: string): void {
|
||||
queryParams.value.unitNoId = undefined;
|
||||
queryParams.value.houseId = undefined;
|
||||
unitList.value = [];
|
||||
if (val !== undefined) {
|
||||
getHouselistAPI(val).then((res) => {
|
||||
unitList.value = res.data.units;
|
||||
houseList.value = res.data.houses;
|
||||
});
|
||||
}
|
||||
}
|
||||
// 选择 单元
|
||||
function handleChangeUnit(val: string) {
|
||||
if (val === undefined) {
|
||||
return;
|
||||
}
|
||||
const find = unitList.value.find((item) => item.unitNoId === val);
|
||||
queryParams.value.houseId = undefined;
|
||||
houseList.value = [];
|
||||
if (find) {
|
||||
houseList.value = find.floors;
|
||||
}
|
||||
}
|
||||
|
||||
// 清空缴费周期
|
||||
function handleClearChargePeriod(type: 'start' | 'end' = 'start') {
|
||||
@@ -668,7 +637,6 @@ const defaultQueryParams = () => ({
|
||||
payStatus: null as number | null,
|
||||
villageId: villageId as string | undefined,
|
||||
buildingId: undefined,
|
||||
unitNoId: undefined,
|
||||
houseId: undefined,
|
||||
houseUseTypeId: undefined,
|
||||
payTime: undefined,
|
||||
@@ -687,18 +655,13 @@ const resetQuery = () => {
|
||||
...defaultQueryParams(),
|
||||
payStatus: queryParams.value.payStatus // 保留当前 tab
|
||||
};
|
||||
houseList.value = [];
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
// 清空楼栋
|
||||
function handleClearBuildingId() {
|
||||
queryParams.value.buildingId = undefined;
|
||||
queryParams.value.unitNoId = undefined;
|
||||
queryParams.value.houseId = undefined;
|
||||
}
|
||||
// 清空单元
|
||||
function handleClearUnit() {
|
||||
queryParams.value.unitNoId = undefined;
|
||||
queryParams.value.houseId = undefined;
|
||||
}
|
||||
// 清空其他参数
|
||||
@@ -953,11 +916,18 @@ const submitForm = () => {
|
||||
return ElMessage.warning('实缴金额等于应收金额时,请选择 【已缴纳】 状态');
|
||||
}
|
||||
}
|
||||
// // 已缴纳时 判断 支付金额 和 预计支付金额 是否相等
|
||||
// if (inComeFrom.value.payStatus === PayStatus.PAID) {
|
||||
// if (!eqMoney(totalPayAmount.value, payListAllAmount.value)) {
|
||||
// buttonLoading.value = false;
|
||||
// return ElMessage.warning('支付金额不足,可以选择 【部分缴纳】 状态');
|
||||
// }
|
||||
// }
|
||||
// 已缴纳时 判断 支付金额 和 预计支付金额 是否相等
|
||||
if (inComeFrom.value.payStatus === PayStatus.PAID) {
|
||||
if (!eqMoney(totalPayAmount.value, payListAllAmount.value)) {
|
||||
buttonLoading.value = false;
|
||||
return ElMessage.warning('支付金额不足,可以选择 【部分缴纳】 状态');
|
||||
return ElMessage.warning('支付金额不足');
|
||||
}
|
||||
}
|
||||
const obj = {
|
||||
|
||||
Reference in New Issue
Block a user