8/19 账单-时间类型-自然/滚动

This commit is contained in:
Zy
2026-08-19 09:27:48 +08:00
parent 3fa96351d7
commit 406cf90db5
29 changed files with 442 additions and 120 deletions

View File

@@ -441,7 +441,7 @@ import pagination from '@/components/Pagination/index.vue';
import DictTag from '@/components/DictTag/index.vue';
import { getBuildinglistAPI, getHouselistAPI } from '@/api/system/house';
import { getCommunitylistAPI } from '@/api/system/community';
import { billDelete, billEdit, billlistType, billPrint, BillPrintType, billQuery } from '@/api/system/SdbCashier';
import { billDelete, billEdit, billlistType, billPrint, BillPrintType, billQuery, getAllAccount } from '@/api/system/SdbCashier';
import { listChargeItem } from '@/api/system/SdbChargeItem';
import { ref } from 'vue';
import { add, div, eq, eqMoney, gtMoney, ltMoney, minMoney, moneyAdd, mul, sub, sum, toBig } from '@/utils/money';
@@ -574,6 +574,7 @@ function handleChangeBuilding(val: string): void {
// 选择 单元
function handleChangeUnit(val: string) {
const find = unitList.value.find((item) => item.unitNoId === val);
queryParams.value.houseId = undefined;
houseList.value = [];
if (find) {
houseList.value = find.floors;
@@ -606,7 +607,21 @@ function getList() {
.finally(() => {
loading.value = false;
});
getAllBillAmount();
}
function getAllBillAmount() {
getAllAccount(queryParams.value).then((res) => {
console.log(res);
totalAll.value = {
totalDiscountAmount: res.data.discountAmount, // 总优惠金额
TotalPaymentAmount: res.data.receivedAmount, // 总实收金额
totalAccount: res.data.receivableAmount, // 总金额
TotalUnPaymentAmount: res.data.unpaidAmount // 未收金额
};
});
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
@@ -687,12 +702,6 @@ function initInComeFrom() {
discount: '0', // 优惠金额
residentName: '' // 缴费人
};
totalAll.value = {
totalDiscountAmount: 0, // 总优惠金额
TotalPaymentAmount: 0, // 总实收金额
totalAccount: 0, // 总金额
TotalUnPaymentAmount: 0 // 未收金额
};
payList.value = [
{
payType: '',
@@ -1076,18 +1085,13 @@ onMounted(() => {
// 总 表单
const totalAll = ref({
totalDiscountAmount: 0, // 总优惠金额
TotalPaymentAmount: 0, // 总实收金额
totalAccount: 0, // 总金额
TotalUnPaymentAmount: 0 // 未收金额
totalDiscountAmount: '0', // 总优惠金额
TotalPaymentAmount: '0', // 总实收金额
totalAccount: '0', // 总金额
TotalUnPaymentAmount: '0' // 未收金额
});
// 多选时 统计总金额,优惠总金额,实付总金额
function handleSelectBill(val: billlistType[]) {
totalAll.value.totalAccount = sum(val.map((item) => item.amount ?? 0));
totalAll.value.TotalPaymentAmount = sum(val.map((item) => item.actualAccount ?? 0));
totalAll.value.totalDiscountAmount = sum(val.map((item) => item.singleDiscountAmount ?? 0));
totalAll.value.TotalUnPaymentAmount = sum(val.map((item) => item.needPayAmount ?? 0));
}
function handleSelectBill() {}
function handleChangePayTypeId(val: string, index: number) {
// 【可选兜底校验】防止异常数据出现重复
@@ -1245,6 +1249,7 @@ function checkMoney(value: string) {
}
.footerBox {
min-height: 72px;
display: flex;
align-items: center;
justify-content: space-between;