8/7 收银台加个未收,打印票据多个支付明细,房屋租赁-签约/上下架
This commit is contained in:
@@ -80,6 +80,10 @@ export const billPrint = (data: { 'detailsIds': string[]; 'residentId': string }
|
|||||||
export type BillPrintType = {
|
export type BillPrintType = {
|
||||||
'totalAccount': string;
|
'totalAccount': string;
|
||||||
'residentName': string;
|
'residentName': string;
|
||||||
|
'payTypeSummary': {
|
||||||
|
'payType': string;
|
||||||
|
'payAmount': string;
|
||||||
|
}[];
|
||||||
'detailsList': {
|
'detailsList': {
|
||||||
'detailsId': string;
|
'detailsId': string;
|
||||||
'chargeItemName': string;
|
'chargeItemName': string;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{ hidden: hidden }" class="pagination-container">
|
<div :class="{ hidden: hidden }" class="pagination-container">
|
||||||
|
<span class="total">共 {{ total }} 条</span>
|
||||||
|
<slot name="pageContent"></slot>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="currentPage"
|
v-model:current-page="currentPage"
|
||||||
v-model:page-size="pageSize"
|
v-model:page-size="pageSize"
|
||||||
@@ -25,7 +27,7 @@ const props = defineProps({
|
|||||||
pageSizes: { type: Array<number>, default: () => [10, 20, 30, 50, 100] },
|
pageSizes: { type: Array<number>, default: () => [10, 20, 30, 50, 100] },
|
||||||
// 移动端页码按钮的数量端默认值5
|
// 移动端页码按钮的数量端默认值5
|
||||||
pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
|
pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
|
||||||
layout: propTypes.string.def('total, sizes, prev, pager, next, jumper'),
|
layout: propTypes.string.def('sizes, prev, pager, next, jumper'),
|
||||||
background: propTypes.bool.def(true),
|
background: propTypes.bool.def(true),
|
||||||
autoScroll: propTypes.bool.def(true),
|
autoScroll: propTypes.bool.def(true),
|
||||||
hidden: propTypes.bool.def(false),
|
hidden: propTypes.bool.def(false),
|
||||||
@@ -67,7 +69,15 @@ function handleCurrentChange(val: number) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.total {
|
||||||
|
color: var(--el-text-color-regular);
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0 15px 0 0;
|
||||||
|
}
|
||||||
.pagination-container {
|
.pagination-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.el-pagination {
|
.el-pagination {
|
||||||
float: v-bind(float);
|
float: v-bind(float);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,12 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<el-table
|
<el-table v-loading="loading" border :data="tableData" @selection-change="handleSelectionChange">
|
||||||
v-loading="loading"
|
|
||||||
border
|
|
||||||
:data="tableData"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" fixed="left" width="55" align="center" />
|
<el-table-column type="selection" fixed="left" width="55" align="center" />
|
||||||
<el-table-column label="房屋/车位/车辆" fixed="left" align="center" prop="unitNo" width="120">
|
<el-table-column label="房屋/车位/车辆" fixed="left" align="center" prop="unitNo" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -156,7 +151,7 @@
|
|||||||
<el-table-column label="优惠金额" width="100" align="center" prop="singleDiscountAmount" />
|
<el-table-column label="优惠金额" width="100" align="center" prop="singleDiscountAmount" />
|
||||||
<el-table-column label="实缴金额" width="100" align="center" prop="actualAccount" />
|
<el-table-column label="实缴金额" width="100" align="center" prop="actualAccount" />
|
||||||
<el-table-column label="缴费人" width="120" align="center" prop="residentName" />
|
<el-table-column label="缴费人" width="120" align="center" prop="residentName" />
|
||||||
<el-table-column label="缴费时间" width="200" align="center" prop="payTime" />
|
<el-table-column label="缴费时间" width="200" align="center" prop="payTime" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -172,9 +167,10 @@
|
|||||||
<div class="footerBox">
|
<div class="footerBox">
|
||||||
<div class="totalBox">
|
<div class="totalBox">
|
||||||
<span>合计:</span>
|
<span>合计:</span>
|
||||||
<span>应收:{{ totalAll.totalAccount }}元</span>
|
<span style="padding: 0 10px">应收:{{ totalAll.totalAccount }}元</span>
|
||||||
<span style="padding: 0 20px">实收:{{ totalAll.TotalPaymentAmount }}元</span>
|
<span style="padding: 0 10px">实收:{{ totalAll.TotalPaymentAmount }}元</span>
|
||||||
<span>优惠:{{ totalAll.totalDiscountAmount }}元</span>
|
<span style="padding: 0 10px">优惠:{{ totalAll.totalDiscountAmount }}元</span>
|
||||||
|
<span style="padding: 0 10px">未收:{{ totalAll.TotalUnPaymentAmount }}元</span>
|
||||||
</div>
|
</div>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
@@ -404,6 +400,14 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>支付明细</td>
|
||||||
|
<td colspan="8" style="text-align: left; padding: 0 10px">
|
||||||
|
<span v-for="(item, index) in print_form.payTypeSummary" :key="index"
|
||||||
|
>{{ item.payType }}: {{ item.payAmount }} ; </span
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p style="font-size: 10px">说明:本收据收款单位和收款具签章方为有效,本收据手写无效</p>
|
<p style="font-size: 10px">说明:本收据收款单位和收款具签章方为有效,本收据手写无效</p>
|
||||||
@@ -683,9 +687,10 @@ function initInComeFrom() {
|
|||||||
residentName: '' // 缴费人
|
residentName: '' // 缴费人
|
||||||
};
|
};
|
||||||
totalAll.value = {
|
totalAll.value = {
|
||||||
totalDiscountAmount: 0,
|
totalDiscountAmount: 0, // 总优惠金额
|
||||||
TotalPaymentAmount: 0,
|
TotalPaymentAmount: 0, // 总实收金额
|
||||||
totalAccount: 0
|
totalAccount: 0, // 总金额
|
||||||
|
TotalUnPaymentAmount: 0 // 未收金额
|
||||||
};
|
};
|
||||||
payList.value = [
|
payList.value = [
|
||||||
{
|
{
|
||||||
@@ -920,6 +925,7 @@ const print_form = ref<BillPrintType>({
|
|||||||
totalActualAccount: '',
|
totalActualAccount: '',
|
||||||
'totalAccount': '',
|
'totalAccount': '',
|
||||||
'residentName': '',
|
'residentName': '',
|
||||||
|
'payTypeSummary': [],
|
||||||
'detailsList': [],
|
'detailsList': [],
|
||||||
'printDate': '',
|
'printDate': '',
|
||||||
'HouseName': '',
|
'HouseName': '',
|
||||||
@@ -1049,16 +1055,19 @@ onMounted(() => {
|
|||||||
|
|
||||||
// 总 表单
|
// 总 表单
|
||||||
const totalAll = ref({
|
const totalAll = ref({
|
||||||
totalDiscountAmount: 0,
|
totalDiscountAmount: 0, // 总优惠金额
|
||||||
TotalPaymentAmount: 0,
|
TotalPaymentAmount: 0, // 总实收金额
|
||||||
totalAccount: 0
|
totalAccount: 0, // 总金额
|
||||||
|
TotalUnPaymentAmount: 0 // 未收金额
|
||||||
});
|
});
|
||||||
// 多选时 统计总金额,优惠总金额,实付总金额
|
// 多选时 统计总金额,优惠总金额,实付总金额
|
||||||
function handleSelectBill(val: billlistType[]) {
|
function handleSelectBill(val: billlistType[]) {
|
||||||
totalAll.value.totalAccount = sum(val.map((item) => item.amount ?? 0));
|
totalAll.value.totalAccount = sum(val.map((item) => item.amount ?? 0));
|
||||||
totalAll.value.TotalPaymentAmount = sum(val.map((item) => item.actualAccount ?? 0));
|
totalAll.value.TotalPaymentAmount = sum(val.map((item) => item.actualAccount ?? 0));
|
||||||
totalAll.value.totalDiscountAmount = sum(val.map((item) => item.singleDiscountAmount ?? 0));
|
totalAll.value.totalDiscountAmount = sum(val.map((item) => item.singleDiscountAmount ?? 0));
|
||||||
|
totalAll.value.TotalUnPaymentAmount = sum(val.map((item) => item.needPayAmount ?? 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChangePayTypeId(val: string, index: number) {
|
function handleChangePayTypeId(val: string, index: number) {
|
||||||
// 【可选兜底校验】防止异常数据出现重复
|
// 【可选兜底校验】防止异常数据出现重复
|
||||||
const repeatCount = usedPayValues.value.filter((v) => v === val).length;
|
const repeatCount = usedPayValues.value.filter((v) => v === val).length;
|
||||||
|
|||||||
@@ -80,7 +80,13 @@
|
|||||||
<el-table-column label="充值金额" align="center" prop="rechargeAmount" />
|
<el-table-column label="充值金额" align="center" prop="rechargeAmount" />
|
||||||
<el-table-column label="缴费方式" align="center" prop="topUpType" />
|
<el-table-column label="缴费方式" align="center" prop="topUpType" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<div class="flex flex-items-center justify-end">
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList">
|
||||||
|
<template #pageContent>
|
||||||
|
<div class="totalMoney">共计: {{ totalMoney }} 元</div>
|
||||||
|
</template>
|
||||||
|
</pagination>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -88,6 +94,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getTopupRecordByDate, type TopupRecordList } from '@/api/system/SdbTopupRecord/index';
|
import { getTopupRecordByDate, type TopupRecordList } from '@/api/system/SdbTopupRecord/index';
|
||||||
import { checkPermi } from '@/utils/permission';
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
import { sum } from '@/utils/money';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const topupRecordList = ref<TopupRecordList[]>([]);
|
const topupRecordList = ref<TopupRecordList[]>([]);
|
||||||
@@ -105,6 +112,9 @@ const data = reactive({
|
|||||||
const SearchTime = ref([]);
|
const SearchTime = ref([]);
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
const totalMoney = ref(0);
|
||||||
|
|
||||||
/** 查询充值记录列表 */
|
/** 查询充值记录列表 */
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
if (!checkPermi(['water:topupRecord:list'])) return;
|
if (!checkPermi(['water:topupRecord:list'])) return;
|
||||||
@@ -113,6 +123,7 @@ const getList = async () => {
|
|||||||
topupRecordList.value = res.rows;
|
topupRecordList.value = res.rows;
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
totalMoney.value = sum(topupRecordList.value.map((item) => item.rechargeAmount));
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -121,7 +132,6 @@ onMounted(() => {
|
|||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
// exportTopupRecordByDate();
|
|
||||||
proxy?.download(
|
proxy?.download(
|
||||||
'/topupRecord/water/export',
|
'/topupRecord/water/export',
|
||||||
{
|
{
|
||||||
@@ -140,4 +150,14 @@ const handleExport = () => {
|
|||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.totalMoney {
|
||||||
|
min-width: 77px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
color: rgba(79, 79, 79, 1);
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 26px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -147,9 +147,11 @@
|
|||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
v-model:file-list="showImgList"
|
v-model:file-list="showImgList"
|
||||||
name="files"
|
name="files"
|
||||||
|
:limit="MAX_UPLOAD_FILES"
|
||||||
:onChange="handleChange"
|
:onChange="handleChange"
|
||||||
:onExceed="handleExceed"
|
:onExceed="handleExceed"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
|
:on-preview="handlePreview"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
drag
|
drag
|
||||||
:action="uploadApi"
|
:action="uploadApi"
|
||||||
@@ -339,6 +341,10 @@ const handleAdd = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function handlePreview(uploadFile: UploadFile) {
|
||||||
|
window.open(uploadFile.url);
|
||||||
|
}
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = (row?: HouseRentalVO) => {
|
const handleUpdate = (row?: HouseRentalVO) => {
|
||||||
const id = row?.id || ids.value[0];
|
const id = row?.id || ids.value[0];
|
||||||
@@ -424,7 +430,7 @@ const handleExceed = () => {
|
|||||||
};
|
};
|
||||||
const handleChange = (file: UploadUserFile) => {
|
const handleChange = (file: UploadUserFile) => {
|
||||||
// 实时判断当前已存在图片总数
|
// 实时判断当前已存在图片总数
|
||||||
if (showImgList.value.length >= MAX_UPLOAD_FILES) {
|
if (showImgList.value.length > MAX_UPLOAD_FILES) {
|
||||||
ElMessage.warning(`最多上传${MAX_UPLOAD_FILES}张,无法继续添加`);
|
ElMessage.warning(`最多上传${MAX_UPLOAD_FILES}张,无法继续添加`);
|
||||||
// 清除刚选中的文件,防止缓存残留
|
// 清除刚选中的文件,防止缓存残留
|
||||||
uploadRef.value?.handleRemove(file);
|
uploadRef.value?.handleRemove(file);
|
||||||
|
|||||||
Reference in New Issue
Block a user