7/24 收银台 日期筛选,合计

This commit is contained in:
Zy
2026-07-24 09:23:50 +08:00
parent 0c4c9676b5
commit 903c92fef0
8 changed files with 143 additions and 219 deletions

View File

@@ -15,8 +15,8 @@
<div class="flex flex-items-center">
<div style="width: 50px; text-align: right; padding-right: 10px">楼栋</div>
<div class="flex-1"></div>
<el-select @change="handleChangebuilding" clearable style="width: 120px" v-model="queryParams.buildingId">
<el-option v-for="(item, index) in buildinglist" :key="index" :label="item.buildingName" :value="item.id"></el-option>
<el-select @change="handleChangeBuilding" clearable style="width: 120px" v-model="queryParams.buildingId">
<el-option v-for="(item, index) in buildingList" :key="index" :label="item.buildingName" :value="item.id"></el-option>
</el-select>
</div>
<div class="flex flex-items-center mr-20px">
@@ -49,11 +49,19 @@
</div>
</div>
<div>
<el-button type="primary" @click="getlist">查询</el-button>
<el-button type="primary" @click="getList">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</div>
</nav>
<el-table row-key="houseId" v-loading="loading" ref="multipleTableRef" :data="tableData" border @selection-change="handleSelectionChange">
<el-table
style="height: 500px"
row-key="houseId"
v-loading="loading"
ref="multipleTableRef"
:data="tableData"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="55" type="index" />
<el-table-column label="小区" align="center" prop="villageName" />
@@ -70,15 +78,15 @@
<div class="dialog-footer flex flex-items-center flex-justify-between">
<pagination
style="margin-top: 0"
layout="total, prev, pager, next, jumper"
layout="total, prev, sizes, pager, next, jumper"
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getlist"
@pagination="getList"
/>
<div>
<el-button @click="conback">退出</el-button>
<el-button @click="conBack">退出</el-button>
<el-button type="primary" @click="confirm"> 确定 </el-button>
</div>
</div>
@@ -176,7 +184,7 @@ const handleUserSelection = () => {
const houseUseTypeList = ref([]);
const isFetching = ref(false);
// 获取列表
function getlist() {
function getList() {
isFetching.value = true; // 🔒 加锁:禁止 selection-change 更新数据
loading.value = true;
listBillHouse(queryParams.value)
@@ -195,39 +203,39 @@ function getlist() {
}
/** 楼栋列表 */
const buildinglist = ref([]);
const buildingList = ref([]);
/** 房屋列表 */
const unitlist = ref([]);
/** 获取楼栋 列表 */
function handleChangeHouse() {
getBuildinglistAPI().then((res) => {
buildinglist.value = res.data;
buildingList.value = res.data;
});
}
function handleClear() {
queryParams.value.residentName = '';
getlist();
getList();
}
function handleHouseUseChange() {
getlist();
getList();
}
/** 单元列表 */
function handleChangebuilding(val: string) {
function handleChangeBuilding(val: string) {
queryParams.value.unitNoId = null;
unitlist.value = [];
if (queryParams.value.buildingId) {
getHouselistAPI(val).then((res) => {
unitlist.value = res.data.units;
getlist();
getList();
});
}
getlist();
getList();
}
function handleChangeUnit() {
getlist();
getList();
}
// ==============================================
@@ -285,11 +293,11 @@ function resetQuery() {
houseNo: '',
residentName: ''
};
getlist();
getList();
}
// 退出
function conback() {
function conBack() {
dialog.value.dialogVisible = false;
resetQuery();
}
@@ -338,7 +346,7 @@ defineExpose({
}) as BillHouse
);
}
getlist();
getList();
dialog.value.dialogVisible = true;
listHouseUseType_add_house().then((res) => {
houseUseTypeList.value = res.data;
@@ -356,7 +364,7 @@ defineExpose({
border: 1px solid #ccc;
border-radius: 5px;
padding: 0 10px;
.defaultbox {
.defaultBox {
display: flex;
align-items: center;
justify-content: space-between;