房屋详情,单元变更
This commit is contained in:
@@ -69,16 +69,17 @@
|
||||
<el-table-column label="验收人" align="center" prop="inspectionName" />
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<!-- TODO 验收 -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="scope.row.inspectionResult !== '1'"
|
||||
@click="handleInspection(scope.row)"
|
||||
@click="handleInspection(scope.row, 0, '验收')"
|
||||
v-hasPermi="['repair:edit:decoration']"
|
||||
>验收</el-button
|
||||
>
|
||||
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['decoration:decoration:query']">详情</el-button>
|
||||
<el-button link type="primary" v-else @click="handleInspection(scope.row, 1, '详情')" v-hasPermi="['decoration:decoration:query']"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">编辑</el-button>
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['decoration:decoration:remove']">删除</el-button>
|
||||
</template>
|
||||
@@ -90,11 +91,26 @@
|
||||
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="decorationFormRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="验收人姓名" prop="inspectionName">
|
||||
<el-input v-model="form.inspectionName" placeholder="请输入验收人姓名" />
|
||||
<el-form-item label="小区名称" prop="villageName" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.villageName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋号" prop="houseName" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.houseName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人" prop="applyName" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.applyName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="装修公司" prop="decorationCompany" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.decorationCompany" />
|
||||
</el-form-item>
|
||||
<el-form-item label="装修内容" prop="decorationContent" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.decorationContent" />
|
||||
</el-form-item>
|
||||
<el-form-item label="装修押金" prop="decorationDeposit" v-if="isedit === 1">
|
||||
<el-input :disabled="isedit === 1" v-model="form.decorationDeposit" />
|
||||
</el-form-item>
|
||||
<el-form-item label="验收结果" prop="inspectionResult">
|
||||
<el-select v-model="form.inspectionResult" placeholder="请选择装修验收结果">
|
||||
<el-select :disabled="isedit === 1" v-model="form.inspectionResult" placeholder="请选择装修验收结果">
|
||||
<el-option
|
||||
v-for="item in com_decoration_status.filter((item) => item.value !== '0')"
|
||||
:key="item.value"
|
||||
@@ -103,11 +119,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="验收人" prop="inspectionName">
|
||||
<el-input :disabled="isedit === 1" v-model="form.inspectionName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" :rows="5"></el-input>
|
||||
<el-input :disabled="isedit === 1" v-model="form.remark" type="textarea" placeholder="请输入" :rows="5"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<template #footer v-if="isedit !== 1">
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
@@ -151,6 +170,8 @@ const initFormData: DecorationForm = {
|
||||
decorationDeposit: undefined,
|
||||
inspectionResult: undefined,
|
||||
remark: undefined,
|
||||
villageName: undefined,
|
||||
houseName: undefined,
|
||||
inspectionName: undefined
|
||||
};
|
||||
const data = reactive<PageData<DecorationForm, DecorationQuery>>({
|
||||
@@ -233,14 +254,16 @@ const handleUpdate = async (row?: DecorationVO) => {
|
||||
});
|
||||
};
|
||||
|
||||
const isedit = ref(1);
|
||||
/** 验收 */
|
||||
const handleInspection = (row: DecorationVO) => {
|
||||
const handleInspection = (row: DecorationVO, edit: number, type: string) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
...row
|
||||
};
|
||||
dialog.visible = true;
|
||||
dialog.title = '验收';
|
||||
dialog.title = type;
|
||||
isedit.value = edit;
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
|
||||
Reference in New Issue
Block a user