5.1日 暂定 水电表管理

This commit is contained in:
Zy
2026-05-01 18:36:37 +08:00
parent 7b89144dd4
commit a8bb4e66ad
103 changed files with 1071 additions and 533 deletions

View File

@@ -118,8 +118,6 @@ if (route.query.id) {
}
// !== 提交 =============================================================================
// 提交
// TODO 收费项目提交
const submitForm = () => {
formRef.value?.validate(async (valid: boolean) => {
if (valid) {

View File

@@ -5,8 +5,8 @@
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="项目名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
<el-form-item label="项目名称" prop="itemName">
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -21,10 +21,10 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['chargeItem:chargeItem:add']">新增</el-button>
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['sdb:add:chargeitem']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['chargeItem:chargeItem:edit']"
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['sdb:edit:chargeitem']"
>修改</el-button
>
</el-col>
@@ -85,7 +85,7 @@
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['chargeItem:chargeItem:edit']">修改</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['sdb:edit:chargeitem']">修改</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeItem:chargeItem:remove']">删除</el-button>
</template>
</el-table-column>
@@ -126,34 +126,16 @@ const dialog = reactive<DialogOption>({
const initFormData: ChargeItemForm = {
id: undefined,
name: undefined,
billingMethod: undefined,
price: undefined,
unit: undefined,
precision: undefined,
carryMethod: undefined,
lateFee: undefined,
remark: undefined,
villageId: undefined
itemName: undefined
};
const data = reactive<PageData<ChargeItemForm, ChargeItemQuery>>({
form: { ...initFormData },
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
billingMethod: undefined,
price: undefined,
unit: undefined,
precision: undefined,
carryMethod: undefined,
lateFee: undefined,
villageId: undefined,
params: {}
itemName: undefined
},
rules: {
id: [{ required: true, message: '收费项目管理表id不能为空', trigger: 'blur' }]
}
rules: {}
});
const { queryParams, form, rules } = toRefs(data);
@@ -217,7 +199,6 @@ const handleUpdate = async (row?: ChargeItemVO) => {
};
const handleSwitch = (val: string, row: ChargeItemVO) => {
console.log(val, typeof val, row);
// 1停用 0 启用
updateChargeItem({
id: row.id,