8/25 dev 权限,sse,账单

This commit is contained in:
Zy
2026-08-27 17:32:23 +08:00
parent b83735e993
commit 2ea75ee5ef
55 changed files with 870 additions and 293 deletions

View File

@@ -2,7 +2,7 @@ export interface ChargeTypeVO {
/** /**
* 收费类型表id * 收费类型表id
*/ */
id: string | number; id: string;
/** /**
* 收费类型名称 * 收费类型名称

View File

@@ -70,6 +70,6 @@ export const changePlanStatus = (id: string, status: string) => {
return request({ return request({
url: '/inspection/plan/changeStatus', url: '/inspection/plan/changeStatus',
method: 'put', method: 'put',
data: { id, status } params: { id, status }
}); });
}; };

View File

@@ -67,3 +67,33 @@ export const delQuestionnaire = (ids: string | string[], vailid: boolean = true)
} }
}); });
}; };
/**
* 查询问卷调查回答列表
*/
export const getQuestionnaireAnswer = (
{
pageSize,
pageNum,
questionnaireId
}
) => {
return request({
url: '/questionnaireAnswer/list',
method: 'GET',
params: {
pageSize,
pageNum,
questionnaireId,
answerStatus: '1'
}
});
};
/**
* 查询问卷调查回答详情
*/
export const getQuestionnaireAnswerMain = (id: string) => {
return request({
url: '/questionnaireAnswer/' + id,
method: 'GET'
});
};

View File

@@ -154,6 +154,7 @@ export interface QuestionComponentItem {
type: string; type: string;
title: string; title: string;
required: boolean; required: boolean;
options: QuestionComponentOption[]; options: QuestionComponentOption[];
} }

View File

@@ -37,12 +37,8 @@ export type ChargeTypeAmounts = {
export type FilterResponse = { export type FilterResponse = {
code: number; code: number;
data: { data: {
'field': string; 'chargeTypeId': string;
'label': string; 'chargeTypeName': string;
'type': string;
'placeholder': string;
'chargeTypeName': null;
'subField': null;
}[]; }[];
msg: string; msg: string;
}; };

View File

@@ -356,7 +356,7 @@ defineExpose({
// 重置查询条件,避免残留上次的筛选条件 // 重置查询条件,避免残留上次的筛选条件
queryParams.value = { queryParams.value = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 5,
buildingId: null, buildingId: null,
residentName: null, residentName: null,
houseNo: null, houseNo: null,

View File

@@ -26,15 +26,16 @@ export const initSSE = (url: any) => {
watch(data, () => { watch(data, () => {
if (!data.value) return; if (!data.value) return;
const notice = JSON.parse(data.value);
useNoticeStore().addNotice({ useNoticeStore().addNotice({
message: data.value, message: notice.message,
read: false, read: false,
time: new Date().toLocaleString() time: new Date().toLocaleString()
}); });
ElNotification({ ElNotification({
title: '消息', title: notice.title,
message: data.value, message: notice.message,
type: 'success', type: notice.type,
duration: 3000 duration: 3000
}); });
data.value = null; data.value = null;

View File

@@ -51,6 +51,11 @@
</el-table-column> </el-table-column>
<el-table-column label="标题" align="center" prop="title" /> <el-table-column label="标题" align="center" prop="title" />
<el-table-column label="主办方" align="center" prop="organizer" /> <el-table-column label="主办方" align="center" prop="organizer" />
<el-table-column label="签到时间" width="120" align="center" prop="signInTime">
<template #default="scope">
<span>{{ scope.row.signinStartTime }}-{{ scope.row.signinEndTime }}</span>
</template>
</el-table-column>
<el-table-column label="发布状态" width="100" align="center" prop="status"> <el-table-column label="发布状态" width="100" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<DictTag :value="scope.row.status" :options="com_publish_status"></DictTag> <DictTag :value="scope.row.status" :options="com_publish_status"></DictTag>
@@ -66,6 +71,7 @@
<el-table-column label="活动地点" align="center" prop="address" /> <el-table-column label="活动地点" align="center" prop="address" />
<el-table-column label="联系人" width="120" align="center" prop="contactName" /> <el-table-column label="联系人" width="120" align="center" prop="contactName" />
<el-table-column label="联系电话" width="120" align="center" prop="contactPhone" /> <el-table-column label="联系电话" width="120" align="center" prop="contactPhone" />
<el-table-column label="活动名额" width="80" align="center" prop="contactPhone"> <el-table-column label="活动名额" width="80" align="center" prop="contactPhone">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.quota === 0">无限制</span> <span v-if="scope.row.quota === 0">无限制</span>

View File

@@ -126,7 +126,7 @@ const formInfo = ref({
'phone': '', 'phone': '',
'problemImageUrl': '', 'problemImageUrl': '',
/** /**
* 投诉状态 0 待处理 1 已处理╬╬╬╬╬╬ * 投诉状态 0 待处理 1 已处理
*/ */
'status': '1', 'status': '1',
'handleId': '', 'handleId': '',
@@ -155,11 +155,12 @@ async function init() {
getComplaint(userid.value).then((res) => { getComplaint(userid.value).then((res) => {
formInfo.value = { formInfo.value = {
...formInfo.value, ...formInfo.value,
...res.data ...res.data,
}; };
form.value = { form.value = {
...form.value, ...form.value,
...res.data ...res.data,
status: '1'
}; };
// 处理照片 // 处理照片
problemImageUrlList.value = res.data.problemImageUrl ? res.data.problemImageUrl.split(',') : []; problemImageUrlList.value = res.data.problemImageUrl ? res.data.problemImageUrl.split(',') : [];

View File

@@ -60,7 +60,7 @@
type="primary" type="primary"
v-if="scope.row.inspectionResult !== '1'" v-if="scope.row.inspectionResult !== '1'"
@click="handleInspection(scope.row, EditType.Add, '验收')" @click="handleInspection(scope.row, EditType.Add, '验收')"
v-has-permi="['repair:edit:decoration']" v-has-permi="['decoration:decoration:edit']"
>验收</el-button >验收</el-button
> >
<el-button <el-button

View File

@@ -45,13 +45,14 @@
</el-col> </el-col>
<el-col :span="2"></el-col> <el-col :span="2"></el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="有效日期" prop="phone"> <el-form-item label="有效日期" prop="startTime">
<el-date-picker <el-date-picker
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
v-model="checkDate" v-model="checkDate"
type="daterange" type="daterange"
@clear="handleClear"
placeholder="选择日期" placeholder="选择日期"
@change="handleDate" @change="handleDate"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@@ -124,6 +125,11 @@ function handleDate() {
form.value.startTime = checkDate.value[0]; form.value.startTime = checkDate.value[0];
form.value.endTime = checkDate.value[1]; form.value.endTime = checkDate.value[1];
} }
function handleClear() {
checkDate.value = [];
form.value.startTime = '';
form.value.endTime = '';
}
const rules = ref({ const rules = ref({
cardCode: [ cardCode: [
{ required: true, message: '请输入月卡编号', trigger: 'blur' }, { required: true, message: '请输入月卡编号', trigger: 'blur' },

View File

@@ -65,7 +65,7 @@
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)">详情</el-button> <el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['notice:notice:query']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['notice:notice:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['notice:notice:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['notice:notice:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['notice:notice:remove']">删除</el-button>
</template> </template>

View File

@@ -1,10 +1,19 @@
<template> <template>
<div class="p-2 h-full flex flex-col"> <div class="p-2 h-full flex flex-col">
<div class="container_box flex-1"> <PageHeader></PageHeader>
<div class="titlebox flex justify-between items-center"> <el-card class="mt-20px" style="min-height: 80px">
<span>问卷内容</span> <div class="tabs">
<el-button link type="primary" @click="router.back()">返回</el-button> <div class="tab-item" :class="{ 'active': activeTab == 'preview' }" @click="handleTabClick('preview')">
<div class="tab-content">问卷预览</div>
</div> </div>
<div class="tab-item" :class="{ 'active': activeTab == 'detail' }" @click="handleTabClick('detail')">
<div class="tab-content">调查详情</div>
</div>
</div>
</el-card>
<div class="flex-1 mt-20px">
<el-card v-if="activeTab == 'preview'">
<div class="container_box flex-1">
<div class="contentBox h-full" v-loading="viewLoading"> <div class="contentBox h-full" v-loading="viewLoading">
<div class="detail-header"> <div class="detail-header">
<h2>{{ viewData.title }}</h2> <h2>{{ viewData.title }}</h2>
@@ -28,7 +37,6 @@
<span class="option-label">{{ opt.label }}</span> <span class="option-label">{{ opt.label }}</span>
</div> </div>
</div> </div>
<!-- 填空题/多行文本展示 --> <!-- 填空题/多行文本展示 -->
<div v-else-if="q.type === 'input'" class="input-placeholder"> <div v-else-if="q.type === 'input'" class="input-placeholder">
<el-input disabled placeholder="用户输入区域" /> <el-input disabled placeholder="用户输入区域" />
@@ -44,13 +52,88 @@
</div> </div>
</div> </div>
</div> </div>
</el-card>
<el-card v-else-if="activeTab == 'detail'">
<div>
<el-table :data="list" style="width: 100%">
<el-table-column prop="answerName" label="答题人" />
<el-table-column prop="type" label="提交时间" />
<el-table-column prop="options" label="操作">
<template #default="scope">
<el-button type="primary" link @click="handleGetMain(scope.row.id)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-card>
</div>
<el-dialog :title="dialog.title" v-model="dialog.visible" width="680px" append-to-body>
<el-form ref="houseRentalFormRef" :model="form.content" label-width="120px">
<div class="detail-header">
<h2>{{ viewData.title }}</h2>
<p style="color: #666">{{ viewData.description }}</p>
</div>
<el-divider />
<div class="detail-content">
<div v-for="(q, index) in form.content" :key="q.cid" class="question-item">
<div class="title">
<span style="font-weight: bold">{{ index + 1 }}. {{ q.title }}</span>
<span style="color: #f56c6c; margin-left: 5px" v-if="q.required">*</span>
</div>
<div class="type-tag">
<el-tag size="small">{{ getComponentLabel(q.type) }}</el-tag>
</div>
<!-- 单选题/多选题选项展示 -->
<div v-if="q.type === 'radio'" class="options">
<el-radio-group v-model="q.value as string">
<div>
<div v-for="(opt, idx) in q.options" :key="idx">
<el-radio disabled :value="opt.label">{{ opt.label }}</el-radio>
</div>
</div>
</el-radio-group>
</div>
<div v-if="q.type === 'checkbox'" class="options">
<el-checkbox-group v-model="q.value as string[]">
<div v-for="(opt, idx) in q.options" :key="idx">
<el-checkbox disabled :label="opt.label" :value="opt.label" />
</div>
</el-checkbox-group>
</div>
<!-- 填空题/多行文本展示 -->
<div v-else-if="q.type === 'input'" class="input-placeholder">
<el-input disabled placeholder="" v-model="q.value as string" />
</div>
<div v-else-if="q.type === 'textarea'" class="input-placeholder">
<el-input disabled type="textarea" placeholder="" v-model="q.value as string" />
</div>
</div>
</div>
<el-divider />
<div>
<span>备注: {{ viewData.remark ? viewData.remark : '暂无' }}</span>
</div>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getQuestionnaire } from '@/api/system/Questionnaire'; import { getQuestionnaire, getQuestionnaireAnswer, getQuestionnaireAnswerMain } from '@/api/system/Questionnaire';
import { QuestionComponentItem } from '@/api/system/Questionnaire/type'; import { QuestionComponentItem } from '@/api/system/Questionnaire/type';
import { ref } from 'vue'; import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue';
import QuestionnaireEdit from '@/views/system/Questionnaire/components/QuestionnaireEdit.vue';
import Pagination from '@/components/Pagination/index.vue';
import { UploadFilled } from '@element-plus/icons-vue';
const viewLoading = ref(false); const viewLoading = ref(false);
const viewData = ref({ const viewData = ref({
'id': '', 'id': '',
@@ -65,9 +148,21 @@ const viewData = ref({
'endTime': '2026-04-09 00:00:00', 'endTime': '2026-04-09 00:00:00',
'remark': '' 'remark': ''
}); });
const router = useRouter(); const queryParams = ref({
pageNum: 1,
pageSize: 10
});
const total = ref(0);
const route = useRoute(); const route = useRoute();
const activeTab = ref<'preview' | 'detail'>('preview');
function handleTabClick(tab: 'preview' | 'detail') {
activeTab.value = tab;
if (activeTab.value === 'detail') {
getList();
}
}
const viewid = ref(null); const viewid = ref(null);
// 组件库定义(用于获取类型名称) // 组件库定义(用于获取类型名称)
const componentList = [ const componentList = [
@@ -103,9 +198,71 @@ function init() {
}); });
} }
init(); init();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
type FormQuestionComponentItem = QuestionComponentItem & { value?: string | string[] };
const form = ref({
id: '',
questionnaireId: '',
answerContent: [] as FormQuestionComponentItem[],
answerId: '',
answerName: '',
answerStatus: '',
content: [] as FormQuestionComponentItem[]
});
const list = ref([]);
function getList() {
getQuestionnaireAnswer({
pageSize: queryParams.value.pageSize,
pageNum: queryParams.value.pageNum,
questionnaireId: viewid.value
}).then((res) => {
list.value = res.rows;
total.value = res.total;
});
}
function handleGetMain(id: string) {
getQuestionnaireAnswerMain(id).then((res) => {
form.value = res.data;
form.value.answerContent = (JSON.parse(res.data.answerContent) as QuestionComponentItem[]) ?? [];
form.value.content = (JSON.parse(res.data.content) as QuestionComponentItem[]) ?? [];
form.value.content.forEach((item) => {
const find = form.value.answerContent.find((i) => i.cid === item.cid);
if (find) {
item.value = find.value;
}
});
dialog.visible = true;
dialog.title = '问卷调查回答详情';
console.log(form.value);
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tabs {
display: flex;
flex-direction: row;
justify-content: start;
.tab-item {
font-weight: bold;
padding: 10px 10px;
cursor: pointer;
margin-right: 10px;
letter-spacing: 3px;
&:hover {
color: #409eff;
}
&.active {
color: #409eff;
border-bottom: 4px solid #409eff;
}
}
}
.titlebox { .titlebox {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;

View File

@@ -23,8 +23,8 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:show-edit="false" :show-edit="false"
:show-add="checkPermi(['payRecordList:payRecordList:add'])" :show-add="checkPermi(['payRecord:payRecord:add'])"
:show-delete="checkPermi(['payRecordList:payRecordList:remove'])" :show-delete="checkPermi(['payRecord:payRecord:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:delete="handleDelete()" @update:delete="handleDelete()"
></right-toolbar> ></right-toolbar>
@@ -62,7 +62,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['sdb:main:payrecord']">明细</el-button> <el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['payRecord:payRecord:query']">明细</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['payRecord:payRecord:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['payRecord:payRecord:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -87,7 +87,7 @@
</el-form-item> </el-form-item>
<el-form-item v-if="form.chargePeriod !== '2'" label="周期计算维度" prop="periodCalcType"> <el-form-item v-if="form.chargePeriod !== '2'" label="周期计算维度" prop="periodCalcType">
<div class="w-full flex flex-row flex-items-center"> <div class="w-full flex flex-row flex-items-center">
<el-select v-model="form.periodCalcType"> <el-select @change="handleChangePeriodCalcType" v-model="form.periodCalcType">
<el-option v-for="(item, index) in PeriodicCalculationDimensionList" :key="index" :value="item.value" :label="item.label"></el-option> <el-option v-for="(item, index) in PeriodicCalculationDimensionList" :key="index" :value="item.value" :label="item.label"></el-option>
</el-select> </el-select>
<el-tooltip class="box-item" effect="light" placement="top"> <el-tooltip class="box-item" effect="light" placement="top">
@@ -127,10 +127,10 @@
unlink-panels unlink-panels
@update:model-value="handleDate" @update:model-value="handleDate"
@clear="handleClear" @clear="handleClear"
:value-format="datepicker[2].format" :value-format="eldatepick.valueformat"
:disabled-date="handleDisableDate" :disabled-date="handleDisableDate"
:format="datepicker[2].format" :format="eldatepick.format"
:type="datepicker[2].type" :type="eldatepick.type"
range-separator="" range-separator=""
start-placeholder="开始" start-placeholder="开始"
end-placeholder="结束" end-placeholder="结束"
@@ -161,7 +161,6 @@ import PageHeader from '@/components/Pageheader/index.vue';
import { listChargeItem } from '@/api/system/SdbChargeItem'; import { listChargeItem } from '@/api/system/SdbChargeItem';
import { getBill, updateBill, addBill } from '@/api/system/SdbBill'; import { getBill, updateBill, addBill } from '@/api/system/SdbBill';
import type { DatePickerType } from 'element-plus'; import type { DatePickerType } from 'element-plus';
import { formatDate2 } from '@/utils';
import { QuestionFilled } from '@element-plus/icons-vue'; import { QuestionFilled } from '@element-plus/icons-vue';
import DictTag from '@/components/DictTag/index.vue'; import DictTag from '@/components/DictTag/index.vue';
@@ -169,16 +168,11 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_bill_charge_scope_house, com_questionnaire_scope, com_bill_charge_period, com_charge_item_unit } = toRefs<any>( const { com_bill_charge_scope_house, com_questionnaire_scope, com_bill_charge_period, com_charge_item_unit } = toRefs<any>(
proxy?.useDict('com_bill_charge_scope_house', 'com_questionnaire_scope', 'com_bill_charge_period', 'com_charge_item_unit') proxy?.useDict('com_bill_charge_scope_house', 'com_questionnaire_scope', 'com_bill_charge_period', 'com_charge_item_unit')
); );
const eldatepick = ref({
type PickerConfig = { type: 'daterange' as DatePickerType,
type: DatePickerType; format: 'YYYY-MM-DD',
format: string; valueformat: 'YYYY-MM-DD'
}; });
const datepicker: Record<string, PickerConfig> = {
'0': { type: 'yearrange', format: 'YYYY' },
'1': { type: 'monthrange', format: 'YYYY-MM' },
'2': { type: 'daterange', format: 'YYYY-MM-DD' }
};
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
@@ -188,12 +182,12 @@ const form = ref({
'billName': '', 'billName': '',
'chargeItemId': '', // 收费项目 'chargeItemId': '', // 收费项目
'chargeScope': '0', // 业主范围 'chargeScope': '0', // 业主范围
'chargePeriod': '2', // 费用周期 'chargePeriod': '2', // 费用周期 2 day 0 year 1 month 3 jidu
houseIds: [], // 部分房屋 houseIds: [], // 部分房屋
residentIds: [], // 部分业主 residentIds: [], // 部分业主
parkingIds: [], parkingIds: [],
chargeTypeId: '', // 收费类型 chargeTypeId: '', // 收费类型
periodCalcType: '0', // 周期计算维度 periodCalcType: '0', // 周期计算维度 // 0 自然 1 滚动
'startDate': '', // 开始 'startDate': '', // 开始
'endDate': '', // 结束 'endDate': '', // 结束
'remark': '' 'remark': ''
@@ -210,51 +204,58 @@ const userid = ref(null);
// 开始结束日期 // 开始结束日期
const StartEndDate = ref([]); const StartEndDate = ref([]);
// 禁止
function handleDisableDate(date: Date) { function handleDisableDate(date: Date) {
// 月 - 自然月/滚动月 // 月 - 自然月/滚动月
if (form.value.periodCalcType === '0') { if (form.value.chargePeriod === '1') {
// 自然月 // 自然月
if (form.value.periodCalcType === '0') {
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1; const month = date.getMonth();
const firstDay = new Date(year, month - 1, 1); const day = date.getDate();
const lastDay = new Date(year, month, 0); const lastDay = new Date(year, month + 1, 0).getDate();
if (date.getTime() == lastDay.getTime() || date.getTime() == firstDay.getTime()) { // 不是1号也不是月末 → 禁用
return day !== 1 && day !== lastDay;
} else {
return false; return false;
} }
return true; } else if (form.value.chargePeriod === '0' && form.value.periodCalcType === '0') {
} else if (form.value.periodCalcType === '1') { const month = date.getMonth(); // 0=1月11=12月
// 滚动月 const day = date.getDate();
// 允许1月1日 (month=0, day=1) 、12月31日 (month=11, day=31)
const isJan1 = month === 0 && day === 1;
const isDec31 = month === 11 && day === 31;
// 不是这两天 → 禁用
return !isJan1 && !isDec31;
} else {
return false; return false;
} }
} }
function handleDate(val: string[]) { function handleDate(val: string[]) {
if (val === null || val.length === 0) { if (val === null || val.length === 0) {
form.value.startDate = ''; handleClear();
form.value.endDate = '';
} else { } else {
form.value.startDate = val[0] + ' 00:00:00'; form.value.startDate = val[0] + ' 00:00:00';
form.value.endDate = val[1] + ' 23:59:59'; form.value.endDate = val[1] + ' 23:59:59';
if (form.value.chargePeriod === '0' && form.value.periodCalcType === '0') {
form.value.startDate = val[0] + '-01-01 00:00:00';
form.value.endDate = val[1] + '-12-31 23:59:59';
}
} }
} }
function handleClear() { function handleClear() {
form.value.startDate = ''; form.value.startDate = '';
StartEndDate.value = [];
form.value.endDate = ''; form.value.endDate = '';
} }
// 收费类型 // 收费类型
const chargeItemList = ref([]); const chargeItemList = ref([]);
// // 房屋列表
// const houselist = ref([]);
// // 住户列表
// const userlist = ref([]);
async function init() { async function init() {
listChargeItem({}).then((res) => { listChargeItem({}).then((res) => {
chargeItemList.value = res.rows; chargeItemList.value = res.rows;
// const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
// houselist.value = res.rows;
// const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
// userlist.value = res2.rows;
if (route.query.id) { if (route.query.id) {
userid.value = route.query.id; userid.value = route.query.id;
getBill(userid.value).then((res) => { getBill(userid.value).then((res) => {
@@ -266,9 +267,6 @@ async function init() {
form.value.houseIds = res.data.houseIds || []; form.value.houseIds = res.data.houseIds || [];
form.value.residentIds = res.data.residentIds || []; form.value.residentIds = res.data.residentIds || [];
form.value.parkingIds = res.data.parkingIds || []; form.value.parkingIds = res.data.parkingIds || [];
form.value.startDate = formatDate2(form.value.startDate);
form.value.endDate = formatDate2(form.value.endDate);
StartEndDate.value = [form.value.startDate, form.value.endDate];
checkoutHouses.value = []; checkoutHouses.value = [];
checkoutUser.value = []; checkoutUser.value = [];
checkoutParking.value = []; checkoutParking.value = [];
@@ -277,6 +275,11 @@ async function init() {
checkoutParking.value = form.value.parkingIds.filter((item) => item); checkoutParking.value = form.value.parkingIds.filter((item) => item);
handleChange(form.value.chargeItemId); handleChange(form.value.chargeItemId);
handleChangePeriod(form.value.chargePeriod); handleChangePeriod(form.value.chargePeriod);
handleChangePeriodCalcType();
form.value.startDate = res.data.startDate;
form.value.endDate = res.data.endDate;
StartEndDate.value = [form.value.startDate, form.value.endDate];
console.log(form.value);
}); });
} }
}); });
@@ -306,7 +309,6 @@ function handleChange(val: string, callback: boolean = false) {
if (find) { if (find) {
form.value.chargeTypeId = find.typeId; form.value.chargeTypeId = find.typeId;
typeName.value = find.typeId; typeName.value = find.typeId;
if (callback) { if (callback) {
handleClearCheckout(); handleClearCheckout();
} }
@@ -379,6 +381,46 @@ function handleChangePeriod(val: string) {
} }
]; ];
} }
// eldatepick.value.format = 'YYYY-MM-DD';
// eldatepick.value.valueformat = 'YYYY-MM-DD';
// // 0 年
// if (val === '0') {
// eldatepick.value.type = 'yearrange';
// eldatepick.value.format = 'YYYY';
// eldatepick.value.valueformat = 'YYYY';
// // 1 月
// } else if (val === '1') {
// eldatepick.value.type = 'daterange';
// // 2 日
// } else if (val === '2') {
// eldatepick.value.type = 'daterange';
// }
handleClear();
}
// 计算维度周期 变化
function handleChangePeriodCalcType() {
handleClear();
// if (form.value.chargePeriod === '0') {
// if (val === '0') {
// eldatepick.value.type = 'yearrange';
// eldatepick.value.format = 'YYYY';
// eldatepick.value.valueformat = 'YYYY';
// } else if (val === '1') {
// eldatepick.value.type = 'daterange';
// eldatepick.value.format = 'YYYY-MM-DD';
// eldatepick.value.valueformat = 'YYYY-MM-DD';
// }
// } else if (form.value.chargePeriod === '1') {
// if (val === '0') {
// eldatepick.value.type = 'daterange';
// eldatepick.value.format = 'YYYY-MM-DD';
// eldatepick.value.valueformat = 'YYYY-MM-DD';
// } else if (val === '1') {
// eldatepick.value.type = 'daterange';
// eldatepick.value.format = 'YYYY-MM-DD';
// eldatepick.value.valueformat = 'YYYY-MM-DD';
// }
// }
} }
// !== 提交 ============================================================================= // !== 提交 =============================================================================

View File

@@ -66,11 +66,11 @@
<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" />
</el-card> </el-card>
<el-dialog v-model="BillVisible" :title="BillForm.title" width="500"> <el-dialog v-model="BillVisible" :title="BillForm.title" width="500">
<el-form :model="BillForm" label-width="auto" style="max-width: 600px"> <el-form v-loading="UploadLoading" :model="BillForm" label-width="auto" style="max-width: 600px">
<el-form-item label="账单生成时间"> <el-form-item label="账单生成时间">
<el-date-picker <el-date-picker
v-if="BillForm.chargePeriod === '0'" v-if="BillForm.chargePeriod === '0'"
v-model="BillForm.year" v-model="BillForm.years"
type="years" type="years"
format="YYYY" format="YYYY"
value-format="YYYY" value-format="YYYY"
@@ -99,6 +99,17 @@
:disabled-date="handleDisableMonth" :disabled-date="handleDisableMonth"
style="width: 100%" style="width: 100%"
/> />
<el-date-picker
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-else-if="BillForm.chargePeriod === '2'"
v-model="BillForm.days"
:disabled-date="handleDisableMonth"
type="dates"
placeholder="选择日期生成每日账单"
style="width: 100%"
/>
<!-- 季度账单-滚动季度 --> <!-- 季度账单-滚动季度 -->
<!-- <QuarterSelect v-if="BillForm.chargePeriod === '3' && BillForm.periodCalcType === '1'" v-model="myQuarter" @change="onQuarterChange" />--> <!-- <QuarterSelect v-if="BillForm.chargePeriod === '3' && BillForm.periodCalcType === '1'" v-model="myQuarter" @change="onQuarterChange" />-->
</el-form-item> </el-form-item>
@@ -123,7 +134,7 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="BillVisible = false">关闭</el-button> <el-button @click="BillVisible = false">关闭</el-button>
<el-button type="primary" @click="handleChangeApi"> 生成 </el-button> <el-button :loading="UploadLoading" type="primary" @click="handleChangeApi"> 生成 </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@@ -247,6 +258,13 @@ function handleMain(row: BillVO) {
} }
}); });
} }
// 删除
// function handleDelete(row: BillVO) {
// delBill(row.id).then((res) => {
// ElMessage.success(res.msg);
// getList();
// })
// }
const BillVisible = ref(false); const BillVisible = ref(false);
const BillForm = ref<{ const BillForm = ref<{
title: string; title: string;
@@ -257,10 +275,11 @@ const BillForm = ref<{
chargePeriod: string; chargePeriod: string;
chargeScope: string; chargeScope: string;
yearMonths?: string[]; yearMonths?: string[];
days?: string[];
periodCalcType: string; periodCalcType: string;
houseId: string[]; houseId: string[];
yearQuarters?: string[]; yearQuarters?: string[];
year?: string[]; years?: string[];
startDate?: string; startDate?: string;
endDate?: string; endDate?: string;
}>({ }>({
@@ -298,12 +317,19 @@ function handleChange(row: BillVO) {
BillForm.value['year'] = []; BillForm.value['year'] = [];
} }
} }
const UploadLoading = ref(false);
// 生成账单 // 生成账单
function handleChangeApi() { function handleChangeApi() {
manualGenerateApi(BillForm.value).then((res) => { UploadLoading.value = true;
manualGenerateApi(BillForm.value)
.then((res) => {
ElMessage.success(res.msg); ElMessage.success(res.msg);
clearChangeBillForm(); clearChangeBillForm();
BillVisible.value = false; BillVisible.value = false;
})
.finally(() => {
UploadLoading.value = false;
}); });
} }
// 清空表单 // 清空表单

View File

@@ -28,10 +28,10 @@
</el-col> </el-col>
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false"> <right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
<template #dropdown> <template #dropdown>
<el-dropdown-item @click="handleMarkQRCode" v-if="checkPermi(['equipment:addqrcode:electricitydevice'])"> <el-dropdown-item @click="handleMarkQRCode">
<span>批量生成条形码</span> <span>批量生成条形码</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="handleMarkQrcodeZip" v-if="checkPermi(['equipment:addqrcode:electricitydevice'])"> <el-dropdown-item @click="handleMarkQrcodeZip">
<span>批量下载条形码</span> <span>批量下载条形码</span>
</el-dropdown-item> </el-dropdown-item>
<!-- <el-dropdown-item v-has-permi="['equipment:addqrcode:electricitydevice']"> <!-- <el-dropdown-item v-has-permi="['equipment:addqrcode:electricitydevice']">
@@ -105,11 +105,11 @@
<el-table-column min-width="120" label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column min-width="120" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<div class="actions"> <div class="actions">
<el-button link type="primary" @click="handleRecode(scope.row)" v-has-permi="['equipment:view:electricitydevice']">充值记录</el-button> <el-button link type="primary" @click="handleRecode(scope.row)" >充值记录</el-button>
<el-button link type="primary" @click="handleQrCode(scope.row)" v-has-permi="['equipment:addqrcode:electricitydevice']" <el-button link type="primary" @click="handleQrCode(scope.row)"
>生成条码</el-button >生成条码</el-button
> >
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-has-permi="['equipment:useWater:electricitydevice']" <el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)"
>用电量</el-button >用电量</el-button
> >
<!-- <el-button <!-- <el-button
@@ -124,10 +124,9 @@
v-if="!scope.row.houseName" v-if="!scope.row.houseName"
type="primary" type="primary"
@click="handleOpenDialog('UpdateHouse', scope.row)" @click="handleOpenDialog('UpdateHouse', scope.row)"
v-has-permi="['equipment:edithouse:electricitydevice']"
>绑定房屋</el-button >绑定房屋</el-button
> >
<el-button v-else link type="primary" @click="handleUnbind(scope.row)" v-has-permi="['equipment:edithouse:electricitydevice']" <el-button v-else link type="primary" @click="handleUnbind(scope.row)"
>解绑房屋</el-button >解绑房屋</el-button
> >
<!-- <el-dropdown style="vertical-align: text-top"> <!-- <el-dropdown style="vertical-align: text-top">

View File

@@ -38,7 +38,7 @@
</el-col> </el-col>
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false"> <right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
<template #dropdown> <template #dropdown>
<el-dropdown-item @click="handleMarkqrcode" v-if="checkPermi(['equipment:addqrcode:waterdevice'])"> <el-dropdown-item @click="handleMarkqrcode" >
<span>批量生成条形码</span> <span>批量生成条形码</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="handleMarkQrcodeZip"> <el-dropdown-item @click="handleMarkQrcodeZip">
@@ -112,7 +112,7 @@
<el-table-column label="操作" min-width="150" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" min-width="150" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<div class="actions"> <div class="actions">
<el-button link type="primary" @click="handleRecode(scope.row)" v-has-permi="['equipment:view:waterdevice']">充值记录</el-button> <el-button link type="primary" @click="handleRecode(scope.row)" >充值记录</el-button>
<el-button <el-button
link link
type="primary" type="primary"
@@ -121,10 +121,10 @@
v-has-permi="['equipment:addqrcode:waterdevice']" v-has-permi="['equipment:addqrcode:waterdevice']"
>生成条码</el-button >生成条码</el-button
> >
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-has-permi="['equipment:useWater:waterdevice']" <el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)"
>用水量</el-button >用水量</el-button
> >
<el-button link type="primary" @click="handleOpenDialog('Upload', scope.row)" v-has-permi="['equipment:updatehardware:waterdevice']" <el-button link type="primary" @click="handleOpenDialog('Upload', scope.row)"
>更新固件</el-button >更新固件</el-button
> >
<!-- <el-button link type="primary" @click="handleUpdate(scope.row.deviceCode)">最新抄表记录</el-button> --> <!-- <el-button link type="primary" @click="handleUpdate(scope.row.deviceCode)">最新抄表记录</el-button> -->
@@ -134,10 +134,9 @@
link link
type="primary" type="primary"
@click="handleOpenDialog('UpdateHouse', scope.row)" @click="handleOpenDialog('UpdateHouse', scope.row)"
v-has-permi="['equipment:edithouse:waterdevice']"
>绑定房屋</el-button >绑定房屋</el-button
> >
<el-button v-else link type="primary" @click="handleUnbind(scope.row)" v-has-permi="['equipment:edithouse:waterdevice']" <el-button v-else link type="primary" @click="handleUnbind(scope.row)"
>解绑房屋</el-button >解绑房屋</el-button
> >

View File

@@ -110,7 +110,7 @@ const rules = ref({
} }
], ],
area: [ area: [
{ required: true, message: '请输入区域面积', trigger: 'blur' }, { required: false, message: '请输入区域面积', trigger: 'blur' },
{ {
validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => { validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => {
if (value === '' || value === null) { if (value === '' || value === null) {

View File

@@ -64,7 +64,7 @@
<script setup name="Car" lang="ts"> <script setup name="Car" lang="ts">
import Pageheader from '@/components/Pageheader/index.vue'; import Pageheader from '@/components/Pageheader/index.vue';
import { listCar, delCar } from '@/api/system/cars/index'; import { listCar, delCar } from '@/api/system/cars';
import { CarVO, CarQuery, CarForm } from '@/api/system/cars/type'; import { CarVO, CarQuery, CarForm } from '@/api/system/cars/type';
import { checkPermi } from '@/utils/permission'; import { checkPermi } from '@/utils/permission';
@@ -73,7 +73,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter(); const router = useRouter();
const carList = ref<CarVO[]>([]); const carList = ref<CarVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true); const loading = ref(true);
const showSearch = ref(true); const showSearch = ref(true);
const ids = ref<Array<string | number>>([]); const ids = ref<Array<string | number>>([]);
@@ -82,7 +81,6 @@ const multiple = ref(true);
const total = ref(0); const total = ref(0);
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const carFormRef = ref<ElFormInstance>();
const initFormData: CarForm = { const initFormData: CarForm = {
id: undefined, id: undefined,
@@ -161,7 +159,7 @@ const handleAdd = () => {
}; };
/** 修改按钮操作 */ /** 修改按钮操作 */
const handleUpdate = async (row?: CarVO) => { const handleUpdate = (row?: CarVO) => {
const id = row?.id || ids.value[0]; const id = row?.id || ids.value[0];
router.push({ router.push({
path: '/carArea/editCars', path: '/carArea/editCars',

View File

@@ -27,9 +27,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:device:add'])" :show-add="checkPermi(['warehouse:device:add'])"
:show-edit="checkPermi(['system:device:edit'])" :show-edit="checkPermi(['warehouse:device:edit'])"
:show-delete="checkPermi(['system:device:remove'])" :show-delete="checkPermi(['warehouse:device:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -53,9 +53,9 @@
<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="180" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['system:device:query']">查看详情</el-button> <el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['warehouse:device:query']">查看详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:device:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:device:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:device:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:device:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:deviceCategory:add'])" :show-add="checkPermi(['warehouse:deviceCategory:add'])"
:show-edit="false" :show-edit="false"
:show-delete="checkPermi(['system:deviceCategory:remove'])" :show-delete="checkPermi(['warehouse:deviceCategory:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -44,8 +44,8 @@
<el-table-column label="添加时间" align="center" prop="createTime" /> <el-table-column label="添加时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:deviceCategory:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:deviceCategory:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:deviceCategory:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:deviceCategory:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -109,7 +109,8 @@ const form = ref({
const rules = ref({ const rules = ref({
deviceId: [{ required: true, message: '请选择 设备类型', trigger: 'blur' }], deviceId: [{ required: true, message: '请选择 设备类型', trigger: 'blur' }],
deviceName: [{ required: true, message: '请输入 设备名称', trigger: 'blur' }], deviceName: [{ required: true, message: '请输入 设备名称', trigger: 'blur' }],
faultDesc: [{ required: true, message: '请输入 故障描述', trigger: 'blur' }] faultDesc: [{ required: true, message: '请输入 故障描述', trigger: 'blur' }],
maintainUserIds: [{ required: true, message: '请选择 维修人员', trigger: 'blur' }]
}); });
const userid = ref(null); const userid = ref(null);

View File

@@ -26,9 +26,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:deviceRepair:add'])" :show-add="checkPermi(['warehouse:deviceRepair:add'])"
:show-edit="checkPermi(['system:deviceRepair:edit'])" :show-edit="checkPermi(['warehouse:deviceRepair:edit'])"
:show-delete="checkPermi(['system:deviceRepair:remove'])" :show-delete="checkPermi(['warehouse:deviceRepair:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -57,9 +57,9 @@
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['system:deviceRepair:query']">详情</el-button> <el-button link type="primary" @click="handleMain(scope.row)" v-has-permi="['warehouse:deviceRepair:query']">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:deviceRepair:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:deviceRepair:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:deviceRepair:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:deviceRepair:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -261,7 +261,6 @@ function init() {
if (route.query.id) { if (route.query.id) {
routeid.value = route.query.id as string; routeid.value = route.query.id as string;
getHouseMain(routeid.value).then((res) => { getHouseMain(routeid.value).then((res) => {
console.log(res);
HouseInfo.value = res.data; HouseInfo.value = res.data;
}); });
} }

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="AddBuildingBox"> <div class="AddBuildingBox">
<PageHeader title="房屋租赁管理"></PageHeader> <PageHeader title="房屋租赁管理"></PageHeader>
<div class="AddBuildingBody"> <div class="AddBuildingBody" v-loading="loading">
<div class="title flex flex-items-center flex-justify-between"> <div class="title flex flex-items-center flex-justify-between">
<div> <div>
<span>基础资料 </span> <span>基础资料 </span>
@@ -65,7 +65,7 @@
:src="item" :src="item"
:preview-src-list="HouseInfo.houseImageUrls" :preview-src-list="HouseInfo.houseImageUrls"
show-progress show-progress
:initial-index="0" :initial-index="index"
class="houseImage" class="houseImage"
></el-image> ></el-image>
</div> </div>
@@ -135,20 +135,23 @@ const HouseInfo = ref({
'facilitieslist': [], 'facilitieslist': [],
'houseImageUrls': [] 'houseImageUrls': []
}); });
const loading = ref(false);
const housefacilities = ref([]); const housefacilities = ref([]);
async function init() { async function init() {
if (route.query.id) { if (route.query.id) {
houseRentalid.value = route.query.id; houseRentalid.value = route.query.id;
} }
loading.value = true;
const reslist = await listHouseFacilities(); const reslist = await listHouseFacilities();
housefacilities.value = reslist.rows; housefacilities.value = reslist.rows;
await houseStore.getCurrentVilageTreeHouse(); await houseStore.getCurrentVilageTreeHouse();
getHouseRental(houseRentalid.value).then((res) => { getHouseRental(houseRentalid.value)
.then((res) => {
HouseInfo.value = res.data; HouseInfo.value = res.data;
HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item); HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item);
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item); HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
}); })
.finally(() => (loading.value = false));
} }
init(); init();

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:item:add'])" :show-add="checkPermi(['inspection:item:add'])"
:show-edit="checkPermi(['system:item:edit'])" :show-edit="checkPermi(['inspection:item:edit'])"
:show-delete="checkPermi(['system:item:remove'])" :show-delete="checkPermi(['inspection:item:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"

View File

@@ -64,7 +64,7 @@
<el-col :span="12"> <el-col :span="12">
<el-table v-loading="loading" border :data="itemList"> <el-table v-loading="loading" border :data="itemList">
<el-table-column fixed="left" label="日期" width="100" align="center" prop="statDate" /> <el-table-column fixed="left" label="日期" width="100" align="center" prop="statDate" />
<el-table-column label="计划巡检任务" width="110" align="center" prop="totalPlans" /> <el-table-column label="计划巡检任务" width="110" align="center" prop="totalTasks" />
<el-table-column label="按时完成" align="center" prop="completedTasks" /> <el-table-column label="按时完成" align="center" prop="completedTasks" />
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" /> <el-table-column label="超时完成" align="center" prop="outCompletedTasks" />
<el-table-column label="超时未完成" width="110" align="center" prop="outUncompletedTasks" /> <el-table-column label="超时未完成" width="110" align="center" prop="outUncompletedTasks" />
@@ -291,22 +291,30 @@ const getList = async () => {
loading.value = true; loading.value = true;
const res = await listItem(queryParams.value); const res = await listItem(queryParams.value);
itemList.value = res.rows; itemList.value = res.rows;
list.value.forEach((item) => { list.value.forEach((item) => {
item.value = 0; item.value = 0;
}); });
list.value[0].value = itemList.value[0].totalPlans ?? 0;
itemList.value.forEach((item) => { list.value[1].value = itemList.value[0].totalTasks ?? 0;
list.value[0].value += item.totalPlans ?? 0; list.value[4].value = itemList.value[0].outUncompletedTasks ?? 0;
list.value[1].value += item.totalTasks ?? 0; list.value[2].value = itemList.value[0].outCompletedTasks + itemList.value[0].completedTasks || 0;
list.value[4].value += item.outUncompletedTasks ?? 0; //
const num = item.outCompletedTasks + item.completedTasks || 0; // if (!Number.isNaN(+list.value[2].value) && !Number.isNaN(+list.value[1].value)) {
list.value[2].value += num; // const num = Number(list.value[2].value) / Number(list.value[1].value);
}); // list.value[3].value = Math.min((Number.isNaN(num) ? 0 : num) * 100, 100).toFixed(2) + '%';
if (!Number.isNaN(+list.value[2].value) && !Number.isNaN(+list.value[1].value)) { // }
const num = Number(list.value[2].value) / Number(list.value[1].value); list.value[3].value = itemList.value[0].completionRateDisplay || '0%';
list.value[3].value = Math.min((Number.isNaN(num) ? 0 : num) * 100, 100).toFixed(2) + '%'; // itemList.value.forEach((item) => {
} // list.value[0].value += item.totalPlans ?? 0;
// list.value[1].value += item.totalTasks ?? 0;
// list.value[4].value += item.outUncompletedTasks ?? 0;
// const num = item.outCompletedTasks + item.completedTasks || 0;
// list.value[2].value += num;
// });
// if (!Number.isNaN(+list.value[2].value) && !Number.isNaN(+list.value[1].value)) {
// const num = Number(list.value[2].value) / Number(list.value[1].value);
// list.value[3].value = Math.min((Number.isNaN(num) ? 0 : num) * 100, 100).toFixed(2) + '%';
// }
handleEchartsData(ecartslist.value.find((item) => item.key === activeEchartsindex.value)); handleEchartsData(ecartslist.value.find((item) => item.key === activeEchartsindex.value));
total.value = res.total; total.value = res.total;

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:plan:add'])" :show-add="checkPermi(['inspection:plan:add'])"
:show-edit="checkPermi(['system:plan:edit'])" :show-edit="checkPermi(['inspection:plan:edit'])"
:show-delete="checkPermi(['system:plan:remove'])" :show-delete="checkPermi(['inspection:plan:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -57,8 +57,8 @@
</el-table-column> </el-table-column>
<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">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:plan:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:plan:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:plan:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['inspection:plan:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:point:add'])" :show-add="checkPermi(['inspection:point:add'])"
:show-edit="checkPermi(['system:point:edit'])" :show-edit="checkPermi(['inspection:point:edit'])"
:show-delete="checkPermi(['system:point:remove'])" :show-delete="checkPermi(['inspection:point:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -56,8 +56,8 @@
<el-table-column label="添加时间" align="center" prop="createTime" /> <el-table-column label="添加时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:point:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:point:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:point:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['inspection:point:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -62,7 +62,7 @@
<el-table-column label="关联计划" align="center" prop="planName" /> <el-table-column label="关联计划" align="center" prop="planName" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:main:record']">查看详情</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:record:query']">查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -27,7 +27,7 @@
<el-form-item label="绘制巡检路线" prop="routeName"> <el-form-item label="绘制巡检路线" prop="routeName">
<MapWrapper :click-or-draw="false" ref="MapWrapperRef"></MapWrapper> <MapWrapper :click-or-draw="false" ref="MapWrapperRef"></MapWrapper>
<div class="tips flex flex-items-center justify-between"> <div class="tips flex flex-items-center justify-between">
<div>点击地图绘制巡检路线再次点击可继续绘制下一条但只能保留一条</div> <div>点击地图绘制巡检路线再次点击可继续绘制下一条但只能保留一条;右击结束绘制</div>
<div> <div>
<span <span
class="deleteMarker" class="deleteMarker"

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:route:add'])" :show-add="checkPermi(['inspection:route:add'])"
:show-edit="checkPermi(['system:route:edit'])" :show-edit="checkPermi(['inspection:route:edit'])"
:show-delete="checkPermi(['system:route:remove'])" :show-delete="checkPermi(['inspection:route:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -57,8 +57,8 @@
<!-- <el-table-column label="备注" align="center" prop="remark" /> --> <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:route:edit']">修改</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:route:edit']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:route:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['inspection:route:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -60,7 +60,7 @@
</el-form-item> </el-form-item>
<el-form-item label="关联计划" prop="planId"> <el-form-item label="关联计划" prop="planId">
<el-select @change="handleChangeMap" v-model="form.planId" placeholder="请选择" style="width: 100%"> <el-select @change="handleChangeMap" v-model="form.planId" placeholder="请选择" style="width: 100%">
<el-option v-for="item in planList" :key="item.id" :label="item.planName" :value="item.id" /> <el-option v-for="item in planList" :disabled="item.status === '1'" :key="item.id" :label="item.planName" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="计划路线" prop="planId"> <el-form-item label="计划路线" prop="planId">

View File

@@ -37,9 +37,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:task:add'])" :show-add="checkPermi(['inspection:task:add'])"
:show-edit="checkPermi(['system:task:edit'])" :show-edit="checkPermi(['inspection:task:edit'])"
:show-delete="checkPermi(['system:task:remove'])" :show-delete="checkPermi(['inspection:task:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -65,8 +65,8 @@
<el-table-column label="关联巡检计划" align="center" prop="planName" /> <el-table-column label="关联巡检计划" align="center" prop="planName" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:task:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['inspection:task:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:task:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['inspection:task:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -144,6 +144,7 @@ const form = ref({
const rules = ref({ const rules = ref({
areaId: [{ required: true, message: '请选择车位区域', trigger: 'blur' }], areaId: [{ required: true, message: '请选择车位区域', trigger: 'blur' }],
type: [{ required: true, message: '请选择车位类型', trigger: 'blur' }], type: [{ required: true, message: '请选择车位类型', trigger: 'blur' }],
parkingStatus: [{ required: true, message: '请选择车位状态', trigger: 'blur' }],
parkingCode: [ parkingCode: [
{ required: true, message: '请输入车位编号', trigger: 'blur' }, { required: true, message: '请输入车位编号', trigger: 'blur' },
{ {
@@ -185,7 +186,7 @@ const rules = ref({
], ],
contactName: [{ required: true, message: '请输入联系人名称', trigger: 'blur' }], contactName: [{ required: true, message: '请输入联系人名称', trigger: 'blur' }],
parkingArea: [ parkingArea: [
{ required: true, message: '请输入车位面积', trigger: 'blur' }, { required: false, message: '请输入车位面积', trigger: 'blur' },
{ {
validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => { validator: (_: any, value: string | number, callback: (arg0?: Error) => void) => {
if (value === '' || value === null) { if (value === '' || value === null) {

View File

@@ -51,16 +51,16 @@
<template #default="scope"> {{ scope.row.parkingArea }} </template> <template #default="scope"> {{ scope.row.parkingArea }} </template>
</el-table-column> </el-table-column>
<el-table-column label="楼层" width="80" align="center" prop="parkingFloor" /> <el-table-column label="楼层" width="80" align="center" prop="parkingFloor" />
<el-table-column label="车位状态" width="80" align="center" prop="parkingStatus">
<template #default="scope">
<dict-tag :options="com_parking_status" :value="scope.row.parkingStatus" />
</template>
</el-table-column>
<el-table-column label="车位类型" align="center" prop="type"> <el-table-column label="车位类型" align="center" prop="type">
<template #default="scope"> <template #default="scope">
<dict-tag :options="com_parking_type" :value="scope.row.type" /> <dict-tag :options="com_parking_type" :value="scope.row.type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车位状态" width="80" align="center" prop="parkingStatus">
<template #default="scope">
<dict-tag :options="com_parking_status" :value="scope.row.parkingStatus" />
</template>
</el-table-column>
<el-table-column label="持有人" align="center" prop="residentName"> <el-table-column label="持有人" align="center" prop="residentName">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.residentName ?? scope.row.contactName }}</span> <span>{{ scope.row.residentName ?? scope.row.contactName }}</span>

View File

@@ -41,26 +41,23 @@
<DictTag :options="com_parking_status" :value="parkingReviewInfo.parking.parkingStatus"></DictTag> <DictTag :options="com_parking_status" :value="parkingReviewInfo.parking.parkingStatus"></DictTag>
</div> </div>
</div> </div>
<div class="carInfo_item"> <div class="carInfo_item" v-if="parkingReviewInfo.parking.residentId">
<div class="label">持有人</div> <div class="label">持有人</div>
<div class="main"> <div class="main">
<span> <span>
{{ parkingReviewInfo.parking.residentName }} {{ parkingReviewInfo.parking.residentName }}
</span> </span>
<el-button <el-button @click="getUserInfo" type="primary" link style="font-size: smaller; margin-left: 15px">详情</el-button>
v-if="parkingReviewInfo.parking.residentId"
@click="getUserInfo"
type="primary"
link
style="font-size: smaller; margin-left: 15px"
>详情</el-button
>
</div> </div>
</div> </div>
<div class="carInfo_item"> <div class="carInfo_item">
<div class="label">添加时间</div> <div class="label">添加时间</div>
<div class="main">{{ parkingReviewInfo.parking.createTime }}</div> <div class="main">{{ parkingReviewInfo.parking.createTime }}</div>
</div> </div>
<div class="carInfo_item">
<div class="label">添加人</div>
<div class="main">{{ parkingReviewInfo.parking.createName }}</div>
</div>
</div> </div>
<div class="CarInfoBox" style="margin-top: 20px"> <div class="CarInfoBox" style="margin-top: 20px">
<div class="carInfo_item" v-if="parkingReviewInfo.parking.contactName"> <div class="carInfo_item" v-if="parkingReviewInfo.parking.contactName">
@@ -388,7 +385,7 @@ getInfo();
font-size: 14px; font-size: 14px;
.label { .label {
font-weight: 600; font-weight: 600;
width: 100px; width: 120px;
text-align: right; text-align: right;
padding-right: 10px; padding-right: 10px;
} }

View File

@@ -41,7 +41,7 @@
<DictTag :options="com_parking_status" :value="parkingReviewInfo.parking.parkingStatus"></DictTag> <DictTag :options="com_parking_status" :value="parkingReviewInfo.parking.parkingStatus"></DictTag>
</div> </div>
</div> </div>
<div class="carInfo_item"> <div class="carInfo_item" v-if="parkingReviewInfo.parking.residentId">
<div class="label">持有人</div> <div class="label">持有人</div>
<div class="main"> <div class="main">
<span> <span>
@@ -57,7 +57,17 @@
<div class="label">添加人</div> <div class="label">添加人</div>
<div class="main">{{ parkingReviewInfo.parking.createName }}</div> <div class="main">{{ parkingReviewInfo.parking.createName }}</div>
</div> </div>
<div class="carInfo_item"> </div>
<div class="CarInfoBox" style="margin-top: 20px">
<div class="carInfo_item" v-if="parkingReviewInfo.parking.contactName">
<div class="label">非业主联系人</div>
<div class="main">{{ parkingReviewInfo.parking.contactName }}</div>
</div>
<div class="carInfo_item" style="margin-top: 20px" v-if="parkingReviewInfo.parking.contactPhone">
<div class="label">联系电话</div>
<div class="main">{{ parkingReviewInfo.parking.contactPhone }}</div>
</div>
<div class="carInfo_item" style="margin-top: 20px">
<div class="label">备注</div> <div class="label">备注</div>
<div class="main">{{ parkingReviewInfo.parking.remark }}</div> <div class="main">{{ parkingReviewInfo.parking.remark }}</div>
</div> </div>
@@ -204,6 +214,7 @@
import { ref } from 'vue'; import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue'; import PageHeader from '@/components/Pageheader/index.vue';
import { getParkingReview, getParkingReviewInfo } from '@/api/system/parking'; import { getParkingReview, getParkingReviewInfo } from '@/api/system/parking';
import DictTag from '@/components/DictTag/index.vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status')); const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'));
@@ -269,6 +280,8 @@ type parkingType = {
id: string; id: string;
areaId: string; areaId: string;
areaName: string; areaName: string;
contactName: string;
contactPhone: string;
villageId: string; villageId: string;
villageName: string; villageName: string;
parkingCode: string; parkingCode: string;
@@ -298,6 +311,8 @@ const parkingReviewInfo = ref<parkingReviewType>({
'id': '', 'id': '',
'areaId': '', 'areaId': '',
'areaName': '', 'areaName': '',
contactPhone: '',
contactName: '',
'villageId': '', 'villageId': '',
'villageName': '', 'villageName': '',
'parkingCode': '', 'parkingCode': '',
@@ -426,7 +441,7 @@ function handleBack() {
&.gridBox { &.gridBox {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
gap: 20px; gap: 20px;
row-gap: 40px; row-gap: 40px;
} }
@@ -436,7 +451,7 @@ function handleBack() {
font-size: 14px; font-size: 14px;
.label { .label {
font-weight: 600; font-weight: 600;
width: 80px; width: 120px;
text-align: right; text-align: right;
padding-right: 10px; padding-right: 10px;
} }

View File

@@ -151,16 +151,19 @@ function handleVillageChange(val: string) {
queryParams.value.chargeItemId = '-1'; queryParams.value.chargeItemId = '-1';
} }
const chargeItemList = ref([]); const chargeItemList = ref([]);
// 忽略的收费项目id 水费,电费,燃气费,上线前手工导入
const ignoreChargeItemList = ['2049026503017136129', '2064181187503652865', '2091072780916981761', '2049026540430327809'];
function getChargeList() {
listChargeType().then((res) => { listChargeType().then((res) => {
chargeItemList.value = [ chargeItemList.value = [
{ {
id: '-1', id: '-1',
name: '全部项目' name: '全部项目'
}, },
...res.rows ...res.rows.filter((item) => !ignoreChargeItemList.includes(item.id))
]; ];
}); });
}
function handleViewTypeChange(val: number) { function handleViewTypeChange(val: number) {
queryParams.value.viewType = val; queryParams.value.viewType = val;
getList(); getList();
@@ -350,6 +353,7 @@ const handleExport = () => {
}; };
onMounted(() => { onMounted(() => {
getChargeList();
getList(); getList();
handleQueryHouseUse(); handleQueryHouseUse();
getAllVillage(); getAllVillage();

View File

@@ -111,6 +111,8 @@ const getList = async () => {
rows.value = res.payTypes; rows.value = res.payTypes;
if (res.rows.length > 0) { if (res.rows.length > 0) {
AgingList.value = [...res.rows, res.summary]; AgingList.value = [...res.rows, res.summary];
}else{
AgingList.value = [];
} }
total.value = res.total; total.value = res.total;
}) })

View File

@@ -4,16 +4,163 @@
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]"> <div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover"> <el-card shadow="hover">
<el-form label-width="auto" ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true"> <el-form
<div class="flex justify-between flex-wrap"> :rules="formRules"
<div v-for="(item, index) in queryParamsList" :key="index"> label-width="180px"
<el-form-item :label="item[ite].label" :prop="item[ite].parameter" v-for="(ite, ind) in Object.keys(item)" :key="ind"> label-position="right"
<el-input v-model.trim="queryParams[item[ite].parameter]" :placeholder="item[ite].placeholder"></el-input> ref="queryFormRef"
</el-form-item> :model="queryParams"
</div> @submit.prevent="handleQuery"
:inline="true"
>
<div> <div>
<el-form-item label="日期" prop="payTime">
<el-date-picker
v-model="payTime"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
@clear="handleClear()"
@update:model-value="(val: string[]) => handleUpdateLeaseDate(val)"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="户主" prop="residentName">
<el-input v-model.trim="queryParams.residentName" placeholder="请输入户主姓名"></el-input>
</el-form-item>
<el-form-item label="房号" prop="houseName">
<el-input v-model.trim="queryParams.houseName" placeholder="请输入房号"></el-input>
</el-form-item>
<el-form-item label="">
<div v-show="!isShow" class="flex justify-end">
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetQuery">重置</el-button> <el-button @click="resetQuery">重置</el-button>
<div @click="toggleShow" class="flex items-center cursor-pointer hover:color-blue" style="margin-left: 10px; font-size: 13px">
<span>展开</span>
<el-icon style="margin-left: 5px"><ArrowDownBold /></el-icon>
</div>
</div>
</el-form-item>
</div>
<div v-show="isShow">
<el-form-item label="现金" prop="cashAmount">
<el-input v-model.trim="queryParams.cashAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="支付宝" prop="alipayAmount">
<el-input v-model.trim="queryParams.alipayAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="宜当付" prop="yiDangFuAmount">
<el-input v-model.trim="queryParams.yiDangFuAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="银联" prop="unionPayAmount">
<el-input v-model.trim="queryParams.unionPayAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="转账" prop="transferAmount">
<el-input v-model.trim="queryParams.transferAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="微信" prop="wechatAmount">
<el-input v-model.trim="queryParams.wechatAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="押金抵顶" prop="depositAmount">
<el-input v-model.trim="queryParams.depositAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="房产抵顶" prop="propertyOffsetAmount">
<el-input v-model.trim="queryParams.propertyOffsetAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="减免优惠" prop="discountAmount">
<el-input v-model.trim="queryParams.discountAmount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
</div>
<div v-show="isShow">
<el-form-item label="水费" prop="waterFee">
<el-input v-model.trim="queryParams.waterFee" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="电费" prop="electricFee">
<el-input v-model.trim="queryParams.electricFee" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item label="押金" prop="deposit">
<el-input v-model.trim="queryParams.deposit" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
</div>
<div v-show="isShow" class="flex justify-between flex-wrap">
<div v-for="(item, index) in queryParamsList" :key="index">
<el-form-item :label="`${item.chargeTypeName} (金额)`">
<el-input v-model.trim="queryParams.chargeTypeFilters[index].amount" placeholder="区间搜索 1000-10000"></el-input>
</el-form-item>
<el-form-item :label="`${item.chargeTypeName} (开始时间)`">
<el-date-picker
v-model="queryParams.chargeTypeFilters[index].startDate"
@update:model-value="
(val: string[]) => {
if (val.length === 0) {
return;
}
queryParams.chargeTypeFilters[index].startDateBegin = val[0];
queryParams.chargeTypeFilters[index].startDateEnd = val[1];
}
"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
clearable
@clear="
() => {
queryParams.chargeTypeFilters[index].startDate = '';
queryParams.chargeTypeFilters[index].startDateBegin = '';
queryParams.chargeTypeFilters[index].startDateEnd = '';
}
"
type="datetimerange"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间"
/>
</el-form-item>
<el-form-item :label="`${item.chargeTypeName} (结束时间)`">
<el-date-picker
v-model="queryParams.chargeTypeFilters[index].endDate"
type="datetimerange"
@update:model-value="
(val: string[]) => {
if (val.length === 0) {
return;
}
queryParams.chargeTypeFilters[index].endDateBegin = val[0];
queryParams.chargeTypeFilters[index].endDateEnd = val[1];
}
"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
clearable
@clear="
() => {
queryParams.chargeTypeFilters[index].endDate = '';
queryParams.chargeTypeFilters[index].endDateBegin = '';
queryParams.chargeTypeFilters[index].endDateEnd = '';
}
"
range-separator=""
start-placeholder="开始时间"
end-placeholder="结束时间"
/>
</el-form-item>
</div>
</div>
<!-- <div v-show="isShow">-->
<!-- <el-form-item label="经办人" prop="handler">-->
<!-- <el-input v-model.trim="queryParams.handler" placeholder="请输入经办人姓名"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备注" prop="remark">-->
<!-- <el-input v-model.trim="queryParams.remark" placeholder="请输入备注"></el-input>-->
<!-- </el-form-item>-->
<!-- </div>-->
<div v-show="isShow" class="flex justify-end">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
<div @click="toggleShow" class="flex items-center cursor-pointer hover:color-blue" style="margin-left: 10px; font-size: 13px">
<span>收起</span>
<el-icon style="margin-left: 5px"><ArrowUpBold /></el-icon>
</div> </div>
</div> </div>
</el-form> </el-form>
@@ -33,7 +180,6 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<el-table :row-class-name="handleRowClass" v-loading="loading" border :data="ArrearsDetailList"> <el-table :row-class-name="handleRowClass" v-loading="loading" border :data="ArrearsDetailList">
<el-table-column label="日期" width="100" align="center" fixed="left" prop="payTime" /> <el-table-column label="日期" width="100" align="center" fixed="left" prop="payTime" />
<el-table-column label="房屋信息" align="center" fixed="left"> <el-table-column label="房屋信息" align="center" fixed="left">
@@ -90,8 +236,8 @@
</el-table-column> </el-table-column>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="经办人" align="center" prop="handler" /> <!-- <el-table-column label="经办人" align="center" prop="handler" />-->
<el-table-column show-overflow-tooltip width="250" label="备注" align="center" prop="remark" /> <!-- <el-table-column show-overflow-tooltip width="250" label="备注" align="center" prop="remark" />-->
</el-table> </el-table>
<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" />
</el-card> </el-card>
@@ -106,6 +252,8 @@ import { ColumnConfig, exportToExcel } from '@/utils/xlsx';
import { listHouseUseType } from '@/api/system/houseUse'; import { listHouseUseType } from '@/api/system/houseUse';
import { getDailyFeeReportDynamicList, getDailyFeeReportList } from '@/api/system/report/dailyFeeReport'; import { getDailyFeeReportDynamicList, getDailyFeeReportList } from '@/api/system/report/dailyFeeReport';
import { Datum } from '@/api/system/report/dailyFeeReport/type'; import { Datum } from '@/api/system/report/dailyFeeReport/type';
import { FormRules } from 'element-plus';
import { ArrowDownBold, ArrowUpBold } from '@element-plus/icons-vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const ArrearsDetailList = ref<Datum[]>([]); const ArrearsDetailList = ref<Datum[]>([]);
@@ -130,40 +278,139 @@ function getHouseUseList() {
}); });
} }
const isShow = ref(false);
function toggleShow() {
isShow.value = !isShow.value;
}
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10,
startDate: '',
endDate: '',
residentName: '',
houseName: '',
cashAmount: '',
alipayAmount: '',
yiDangFuAmount: '',
unionPayAmount: '',
transferAmount: '',
wechatAmount: '',
depositAmount: '',
propertyOffsetAmount: '',
discountAmount: '',
waterFee: '',
electricFee: '',
deposit: '',
handler: '',
remark: '',
chargeTypeFilters: []
}); });
const staticSearchKey = [
'cashAmount',
'alipayAmount',
'yiDangFuAmount',
'unionPayAmount',
'transferAmount',
'wechatAmount',
'depositAmount',
'propertyOffsetAmount',
'discountAmount',
'waterFee',
'electricFee',
'deposit'
];
// 动态生成表单验证规则
const formRules = computed<FormRules>(() => {
const dynamicRules: FormRules = {};
staticSearchKey.forEach((item) => {
dynamicRules[item] = [
{
validator: (_: any, value: string, callback: (error?: any) => void) => {
if (!value || value === '') {
callback();
return;
}
const rangePattern = /^(-?\d+(\.\d{1,2})?)-(-?\d+(\.\d{1,2})?)?$/;
const singlePattern = /^-?\d+(\.\d{1,2})?$/;
const MAX_AMOUNT = 99999999;
if (rangePattern.test(value)) {
const parts = value.split('-');
const min = Number(parts[0]);
const max = parts[1] !== '' ? Number(parts[1]) : null; // 空字符串才是 null
// 校验下限
if (Math.abs(min) > MAX_AMOUNT) {
return callback(new Error(`金额不能超过 ${MAX_AMOUNT}`));
}
// 只有当 max 存在时才校验
if (max !== null) {
if (Math.abs(max) > MAX_AMOUNT) {
return callback(new Error(`金额不能超过 ${MAX_AMOUNT}`));
}
if (min > max) {
return callback(new Error('下限不能大于上限'));
}
}
return callback();
} else if (singlePattern.test(value)) {
const amount = Number(value);
if (Math.abs(amount) > MAX_AMOUNT) {
return callback(new Error(`金额不能超过 ${MAX_AMOUNT}`));
} else {
return callback();
}
} else {
callback(new Error('格式错误,示例: 0-1000、-1000、0-、1000'));
}
},
trigger: 'blur'
}
];
});
return dynamicRules;
});
const payTime = ref([]);
function handleClear() {
payTime.value = [];
queryParams.value.startDate = '';
queryParams.value.endDate = '';
}
function handleUpdateLeaseDate(val: string[]) {
queryParams.value.startDate = val[0];
queryParams.value.endDate = val[1];
}
// 参数列表 // 参数列表
const queryParamsList = ref([]); const queryParamsList = ref([]);
function getQueryParams() { function getQueryParams() {
getDailyFeeReportDynamicList().then((res) => { getDailyFeeReportDynamicList().then((res) => {
const obj = {}; queryParamsList.value = res.data;
const list = res.data.map((item) => { handleAddQuery();
const obj2 = {}; });
const list = item.field.split(',') ?? []; }
console.log(list); function handleAddQuery() {
list.forEach((item2) => { const list = queryParamsList.value.map((item) => {
obj[item2] = ''; return {
obj2[item2] = { 'chargeTypeName': item.chargeTypeName,
label: item.label, 'chargeTypeId': item.chargeTypeId,
parameter: item2, 'amount': '',
placeholder: item.placeholder, startDate: '',
type: item.type, endDate: '',
subField: item.subField 'startDateBegin': '',
'startDateEnd': '',
'endDateBegin': '',
'endDateEnd': ''
}; };
}); });
return obj2;
});
queryParams.value = {
...queryParams.value,
...obj
};
queryParamsList.value = list; queryParamsList.value = list;
console.log(list); queryParams.value.chargeTypeFilters = list;
});
} }
const rowChargeTypesList = ref([]); const rowChargeTypesList = ref([]);
@@ -181,7 +428,7 @@ const getList = async () => {
getDailyFeeReportList(search) getDailyFeeReportList(search)
.then((res) => { .then((res) => {
ArrearsDetailList.value = [...(res.rows ?? [])]; ArrearsDetailList.value = [...(res.rows ?? [])];
rowChargeTypesList.value = Object.keys(res.rows[0].chargeTypeAmounts); rowChargeTypesList.value = Object.keys(res.rows[0].chargeTypeAmounts) ?? [];
total.value = res.total; total.value = res.total;
}) })
.finally(() => { .finally(() => {
@@ -206,9 +453,30 @@ const handleQuery = () => {
const resetQuery = () => { const resetQuery = () => {
queryFormRef.value?.resetFields(); queryFormRef.value?.resetFields();
queryParams.value = { queryParams.value = {
endDate: undefined,
startDate: undefined,
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10,
residentName: '',
houseName: '',
cashAmount: '',
alipayAmount: '',
yiDangFuAmount: '',
unionPayAmount: '',
transferAmount: '',
wechatAmount: '',
depositAmount: '',
propertyOffsetAmount: '',
discountAmount: '',
waterFee: '',
electricFee: '',
deposit: '',
handler: '',
remark: '',
chargeTypeFilters: []
}; };
handleAddQuery();
handleClear();
handleQuery(); handleQuery();
}; };
/** 导出Excel */ /** 导出Excel */
@@ -272,15 +540,15 @@ const handleExport = () => {
? [] ? []
: [ : [
{ label: '金额', prop: `chargeTypeAmounts.${item}.amount` }, { label: '金额', prop: `chargeTypeAmounts.${item}.amount` },
{ label: '开始时间', prop: `chargeTypeAmounts.${item}.startTime` }, { label: '开始时间', prop: `chargeTypeAmounts.${item}.startDate` },
{ label: '截止时间', prop: `chargeTypeAmounts.${item}.endTime` } { label: '截止时间', prop: `chargeTypeAmounts.${item}.endDate` }
] ]
}; };
}) })
] ]
}, }
{ label: '经办人', prop: 'inspectorName' }, // { label: '经办人', prop: 'inspectorName' },
{ label: '备注', prop: 'remark' } // { label: '备注', prop: 'remark' }
]; ];
console.log(columns); console.log(columns);
exportToExcel(ArrearsDetailList.value, columns, `日报_${new Date().getTime()}`); exportToExcel(ArrearsDetailList.value, columns, `日报_${new Date().getTime()}`);

View File

@@ -27,14 +27,14 @@
<el-form-item label="房号" prop="houseNo"> <el-form-item label="房号" prop="houseNo">
<el-input v-model.trim="queryParams.houseNo" placeholder="请输入房号" /> <el-input v-model.trim="queryParams.houseNo" placeholder="请输入房号" />
</el-form-item> </el-form-item>
<el-form-item label="欠费月数" prop="month"> <el-form-item label="欠费月数" prop="arrearsMonths">
<el-select v-model="queryParams.month" placeholder="请选择"> <el-select v-model="queryParams.arrearsMonths" placeholder="请选择">
<el-option v-for="item in MonthList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in MonthList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" :loading="loading" @click="handleQuery">查询</el-button>
<el-button @click="resetQuery">重置</el-button> <el-button @click="resetQuery">重置</el-button>
</div> </div>
</div> </div>
@@ -60,7 +60,7 @@
<el-table :span-method="mergeSpanMethod" v-loading="loading" border :data="ArrearsDetailList"> <el-table :span-method="mergeSpanMethod" v-loading="loading" border :data="ArrearsDetailList">
<el-table-column label="序号" width="80" align="center" prop="serialNumber" /> <el-table-column label="序号" width="80" align="center" prop="serialNumber" />
<el-table-column label="区域" align="center" prop="area" /> <el-table-column label="区域" align="center" prop="area" />
<el-table-column label="房号" align="center" prop="houseNo" /> <el-table-column label="楼栋-单元-房号" align="center" prop="houseNo" />
<el-table-column label="客户" align="center" prop="customerName" /> <el-table-column label="客户" align="center" prop="customerName" />
<el-table-column label="联系电话" align="center" prop="phone" /> <el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="欠费月数" width="80" align="center" prop="arrearsMonths" /> <el-table-column label="欠费月数" width="80" align="center" prop="arrearsMonths" />
@@ -115,13 +115,13 @@ const data = reactive({
startTime: '', startTime: '',
endTime: '', endTime: '',
houseNo: '', houseNo: '',
month: '-1' arrearsMonths: '-1'
} }
}); });
const { queryParams } = toRefs(data); const { queryParams } = toRefs(data);
// 查询小区╬╬zn // 查询小区
const villageList = ref([]); const villageList = ref([]);
function getAllVillage() { function getAllVillage() {
getCommunitylistAPI().then((res) => { getCommunitylistAPI().then((res) => {
@@ -137,15 +137,15 @@ function getAllVillage() {
// 区域改变时,查询收费项目 // 区域改变时,查询收费项目
function handleVillageChange(val: string) { function handleVillageChange(val: string) {
queryParams.value.villageId = val; queryParams.value.villageId = val;
queryParams.value.houseNo = '-1'; queryParams.value.houseNo = '';
} }
// 月份 // 月份
const MonthList = ref([]); const MonthList = ref([]);
function getMonthList() { function getMonthList() {
const arr = Array.from({ length: 12 }).fill((i: number) => { const arr = Array.from({ length: 12 }).map((_, i: number) => {
return { return {
id: `${i + 1}`, id: `${i + 1}`,
name: `${i + 1}` name: `${i + 1}`
}; };
}); });
MonthList.value = []; MonthList.value = [];
@@ -186,7 +186,6 @@ const getList = async () => {
ArrearsDetailList.value = res.rows; ArrearsDetailList.value = res.rows;
total.value = res.total; total.value = res.total;
dynamicColumns.value = updateDynamicColumns(res.rows); dynamicColumns.value = updateDynamicColumns(res.rows);
ArrearsDetailList.value[ArrearsDetailList.value.length - 1].serialNumber = '合计'; ArrearsDetailList.value[ArrearsDetailList.value.length - 1].serialNumber = '合计';
}) })
.finally(() => { .finally(() => {

View File

@@ -53,7 +53,7 @@
<template #header> <template #header>
<el-row :gutter="10" style="margin-bottom: 30px"> <el-row :gutter="10" style="margin-bottom: 30px">
<el-col :span="5"> <el-col :span="5">
<span> 收费 </span> <span> 收费 </span>
</el-col> </el-col>
<el-col :span="18"></el-col> <el-col :span="18"></el-col>
<el-col :span="1"> <el-col :span="1">
@@ -67,11 +67,19 @@
<el-table-column label="本月应收" align="center" prop="monthReceivable" /> <el-table-column label="本月应收" align="center" prop="monthReceivable" />
<el-table-column label="本月已收" align="center" prop="monthReceived" /> <el-table-column label="本月已收" align="center" prop="monthReceived" />
<el-table-column label="本月未收" align="center" prop="monthUnpaid" /> <el-table-column label="本月未收" align="center" prop="monthUnpaid" />
<el-table-column label="月收费率" align="center" prop="monthRate" /> <el-table-column label="月收费率" align="center" prop="monthRate">
<template #default="scope">
{{ `${scope.row.monthRate}%` || '0%' }}
</template>
</el-table-column>
<el-table-column label="本年应收" align="center" prop="yearReceivable" /> <el-table-column label="本年应收" align="center" prop="yearReceivable" />
<el-table-column label="本年已收" align="center" prop="yearReceived" /> <el-table-column label="本年已收" align="center" prop="yearReceived" />
<el-table-column label="本年未收" align="center" prop="yearUnpaid" /> <el-table-column label="本年未收" align="center" prop="yearUnpaid" />
<el-table-column label="年收费率" align="center" prop="yearRate" /> <el-table-column label="年收费率" align="center" prop="yearRate">
<template #default="scope">
{{ `${scope.row.yearRate}%` || '0%' }}
</template>
</el-table-column>
<el-table-column label="综合欠收" align="center" prop="totalPrepaid" /> <el-table-column label="综合欠收" align="center" prop="totalPrepaid" />
<el-table-column label="综合预收" align="center" prop="totalArrears" /> <el-table-column label="综合预收" align="center" prop="totalArrears" />
</el-table> </el-table>

View File

@@ -75,7 +75,6 @@
import pagination from '@/components/Pagination/index.vue'; import pagination from '@/components/Pagination/index.vue';
import pageHeader from '@/components/Pageheader/index.vue'; import pageHeader from '@/components/Pageheader/index.vue';
import { getCommunitylistAPI } from '@/api/system/community'; import { getCommunitylistAPI } from '@/api/system/community';
import { validator } from '@/utils/Reg';
import { getPaidInExpensesReceivableList } from '@/api/system/report/paidInExpensesReceivable'; import { getPaidInExpensesReceivableList } from '@/api/system/report/paidInExpensesReceivable';
import { Detail } from '@/api/system/report/paidInExpensesReceivable/type'; import { Detail } from '@/api/system/report/paidInExpensesReceivable/type';
import { listChargeType } from '@/api/system/ChargeType'; import { listChargeType } from '@/api/system/ChargeType';
@@ -91,16 +90,16 @@ const total = ref(0);
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const queryTime = ref([]); const queryTime = ref([]);
function handleQueryTime(val: string[]) { function handleQueryTime(val: string[]) {
queryParams.value.startTime = val[0]; queryParams.value.startDate = val[0];
queryParams.value.endTime = val[1]; queryParams.value.endDate = val[1];
} }
const data = reactive({ const data = reactive({
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
villageId: '-1', villageId: '-1',
startTime: '', startDate: '',
endTime: '', endDate: '',
chargeTypeId: '-1' chargeTypeId: '-1'
} }
}); });
@@ -121,6 +120,8 @@ function getAllVillage() {
}); });
} }
// 忽略的收费项目id 水费,电费,燃气费,上线前手工导入
const ignoreChargeItemList = ['2049026503017136129', '2064181187503652865', '2091072780916981761', '2049026540430327809'];
// 收费类型 // 收费类型
const chargeTypesList = ref([]); const chargeTypesList = ref([]);
function getChargeTypeList() { function getChargeTypeList() {
@@ -130,7 +131,7 @@ function getChargeTypeList() {
name: '全部类型', name: '全部类型',
id: '-1' id: '-1'
}, },
...res.rows ...res.rows.filter((item) => !ignoreChargeItemList.includes(item.id))
]; ];
}); });
} }

View File

@@ -77,7 +77,7 @@ import { listHouseUseType } from '@/api/system/houseUse';
import { Row } from '@/api/system/report/prepaidBalance/type'; import { Row } from '@/api/system/report/prepaidBalance/type';
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
// ╬╬╬2╬╬ // 预收费用余额汇总
const ArrearsDetailList = ref<Row[]>([]); const ArrearsDetailList = ref<Row[]>([]);
const loading = ref(true); const loading = ref(true);
const showSearch = ref(true); const showSearch = ref(true);

View File

@@ -76,7 +76,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import PageHeader from '@/components/Pageheader/index.vue'; import PageHeader from '@/components/Pageheader/index.vue';
import { getBuildinglists } from '@/api/system/house'; import { getBuildinglistAPI, getBuildinglists } from '@/api/system/house';
import { addStoreroom, getStoreroom, updateStoreroom } from '@/api/system/storeroom'; import { addStoreroom, getStoreroom, updateStoreroom } from '@/api/system/storeroom';
import { StoreroomVO } from '@/api/system/storeroom/types'; import { StoreroomVO } from '@/api/system/storeroom/types';
import { getByBUildingidtoUnitNo } from '@/api/system/houseUnit'; import { getByBUildingidtoUnitNo } from '@/api/system/houseUnit';
@@ -192,8 +192,8 @@ function getStoreRoomInfo(id: string) {
} }
// 根据小区id获取楼栋单元 // 根据小区id获取楼栋单元
function init() { function init() {
getBuildinglists().then((res) => { getBuildinglistAPI().then((res) => {
BuildingLists.value = res.rows; BuildingLists.value = res.data;
}); });
} }
init(); init();
@@ -207,6 +207,7 @@ onMounted(() => {
function handleChangeBuild(val: string, callback?: () => void) { function handleChangeBuild(val: string, callback?: () => void) {
getByBUildingidtoUnitNo(val).then((res) => { getByBUildingidtoUnitNo(val).then((res) => {
units.value = res.data; units.value = res.data;
form.value.unitNoId = '';
callback && callback(); callback && callback();
}); });
} }

View File

@@ -50,7 +50,7 @@
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" /> <el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:edit:inventory']">查看</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -192,6 +192,10 @@ function handleDeleteRow(id: string) {
// !== 提交 ============================================================================= // !== 提交 =============================================================================
// 提交 // 提交
const submitForm = () => { const submitForm = () => {
// if (form.value.items.length <= 0) {
// ElMessage.error('请添加出库物料');
// return;
// }
formRef.value?.validate(async (valid: boolean) => { formRef.value?.validate(async (valid: boolean) => {
if (valid) { if (valid) {
if (userid.value) { if (userid.value) {

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:material:add'])" :show-add="checkPermi(['warehouse:material:add'])"
:show-edit="checkPermi(['system:material:edit'])" :show-edit="checkPermi(['warehouse:material:edit'])"
:show-delete="checkPermi(['system:material:remove'])" :show-delete="checkPermi(['warehouse:material:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -42,8 +42,8 @@
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" /> <el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:material:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:material:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:material:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:material:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -63,7 +63,7 @@
<template #default="scope"> <template #default="scope">
<el-input-number <el-input-number
maxlength="7" maxlength="7"
:min="0" :min="1"
:max="9999999" :max="9999999"
v-model.trim.number="scope.row.costPrice" v-model.trim.number="scope.row.costPrice"
placeholder="请输入" placeholder="请输入"
@@ -72,7 +72,7 @@
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" prop="inNo"> <el-table-column label="数量" align="center" prop="inNo">
<template #default="scope"> <template #default="scope">
<el-input-number maxlength="7" :min="0" :max="9999999" v-model.trim.number="scope.row.inNum" placeholder="请输入"></el-input-number> <el-input-number maxlength="7" :min="1" :max="9999999" v-model.trim.number="scope.row.inNum" placeholder="请输入"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark"> <el-table-column label="备注" align="center" prop="remark">
@@ -196,6 +196,10 @@ function handleDeleteRow(id: string) {
// !== 提交 ============================================================================= // !== 提交 =============================================================================
// 提交 // 提交
const submitForm = () => { const submitForm = () => {
if (form.value.items.length <= 0) {
ElMessage.error('请添加入库物料');
return;
}
formRef.value?.validate(async (valid: boolean) => { formRef.value?.validate(async (valid: boolean) => {
if (valid) { if (valid) {
// form.value.items = form.value.items.map((itme) => { // form.value.items = form.value.items.map((itme) => {

View File

@@ -23,9 +23,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:supplier:add'])" :show-add="checkPermi(['warehouse:supplier:add'])"
:show-edit="checkPermi(['system:supplier:edit'])" :show-edit="checkPermi(['warehouse:supplier:edit'])"
:show-delete="checkPermi(['system:supplier:remove'])" :show-delete="checkPermi(['warehouse:supplier:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -43,8 +43,8 @@
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" /> <el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:supplier:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:supplier:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:supplier:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:supplier:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -31,9 +31,9 @@
<right-toolbar <right-toolbar
:disable-delete="multiple" :disable-delete="multiple"
:disable-edit="single" :disable-edit="single"
:show-add="checkPermi(['system:warehouse:add'])" :show-add="checkPermi(['warehouse:warehouse:add'])"
:show-edit="checkPermi(['system:warehouse:edit'])" :show-edit="checkPermi(['warehouse:warehouse:edit'])"
:show-delete="checkPermi(['system:warehouse:remove'])" :show-delete="checkPermi(['warehouse:warehouse:remove'])"
@update:add="handleAdd" @update:add="handleAdd"
@update:edit="handleUpdate()" @update:edit="handleUpdate()"
@update:delete="handleDelete()" @update:delete="handleDelete()"
@@ -61,8 +61,8 @@
<el-table-column label="备注" width="80" align="center" prop="remark" show-overflow-tooltip /> <el-table-column label="备注" width="80" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['system:warehouse:edit']">编辑</el-button> <el-button link type="primary" @click="handleUpdate(scope.row)" v-has-permi="['warehouse:warehouse:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['system:warehouse:remove']">删除</el-button> <el-button link type="primary" @click="handleDelete(scope.row)" v-has-permi="['warehouse:warehouse:remove']">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -100,12 +100,12 @@ const list = ref([
function getVillageInfo() { function getVillageInfo() {
const id = localStorage.getItem('villageid'); const id = localStorage.getItem('villageid');
workSpaceTotalListApi(id).then((res) => { workSpaceTotalListApi(id).then((res) => {
list.value[0].value = res.totalResident; list.value[0].value = res.totalResident ?? 0;
list.value[1].value = res.totalHouse; list.value[1].value = res.totalHouse ?? 0;
list.value[2].value = res.totalParking; list.value[2].value = res.totalParking ?? 0;
list.value[3].value = res.totalDevice; list.value[3].value = res.totalDevice ?? 0;
list.value[4].value = res.totalComplaint; list.value[4].value = res.totalComplaint ?? 0;
list.value[5].value = res.totalMaterial; list.value[5].value = res.totalMaterial ?? 0;
}); });
getVillageByIdAPI(id).then((res) => { getVillageByIdAPI(id).then((res) => {
villageinfo.value = { villageinfo.value = {