8/10 新增删除账单功能,收费分类-关联
This commit is contained in:
@@ -101,6 +101,7 @@
|
||||
<div class="actions">
|
||||
<el-button @click="handleIncome(false)" :disabled="!single">收费</el-button>
|
||||
<el-button @click="printPIaoJuByOnly(false)" :disabled="!printSingle">打印票据</el-button>
|
||||
<el-button @click="handleDelete(false)">批量删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-card class="flex-1" shadow="never">
|
||||
@@ -153,14 +154,11 @@
|
||||
<el-table-column label="缴费人" width="120" align="center" prop="residentName" />
|
||||
<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="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" width="150" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" v-if="scope.row.payStatus !== '1'" @click="handleIncome(scope.row)" v-has-permi="['bill:bill:edit']"
|
||||
>收款</el-button
|
||||
>
|
||||
<el-button link type="success" v-if="scope.row.payStatus === '1'" @click="printPIaoJuByOnly(scope.row)" v-has-permi="['bill:bill:query']"
|
||||
>打印票据</el-button
|
||||
>
|
||||
<el-button link type="primary" v-if="scope.row.payStatus !== '1'" @click="handleIncome(scope.row)">收款</el-button>
|
||||
<el-button link type="success" v-if="scope.row.payStatus === '1'" @click="printPIaoJuByOnly(scope.row)">打印票据</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -431,7 +429,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 { billEdit, billlistType, billPrint, BillPrintType, billQuery } from '@/api/system/SdbCashier';
|
||||
import { billDelete, billEdit, billlistType, billPrint, BillPrintType, billQuery } 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';
|
||||
@@ -541,7 +539,9 @@ function handleChangeVillage(val: string) {
|
||||
buildingList.value = [];
|
||||
unitList.value = [];
|
||||
if (val) {
|
||||
getBuildinglistAPI().then((res) => {
|
||||
getBuildinglistAPI({
|
||||
villageId: val
|
||||
}).then((res) => {
|
||||
buildingList.value = res.data;
|
||||
handleChargeItem(val);
|
||||
});
|
||||
@@ -1042,6 +1042,26 @@ function conFimPrint() {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// 删除
|
||||
async function handleDelete(row: billlistType | false) {
|
||||
if (row) {
|
||||
await proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?');
|
||||
billDelete(row.detailsId).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
if (ids.value.length <= 0) {
|
||||
return ElMessage.warning('请选择账单!');
|
||||
}
|
||||
await proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?');
|
||||
billDelete(ids.value.map((item) => item.detailsId)).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
queryParams.value.villageId = villageId;
|
||||
getList();
|
||||
@@ -1143,10 +1163,7 @@ function handlePayListIsEmpt() {
|
||||
item.payAmount === undefined ||
|
||||
item.payAmount === ''
|
||||
);
|
||||
if (invalidIndex !== -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return invalidIndex === -1;
|
||||
}
|
||||
|
||||
// 校验数字
|
||||
|
||||
Reference in New Issue
Block a user