|
@@ -1,50 +1,125 @@
|
|
|
<template>
|
|
|
- <el-dialog title="委托详情" v-model="showDialog" width="800px" @close="closeDialog">
|
|
|
- <el-descriptions
|
|
|
- class="margin-top"
|
|
|
- :title="'车位编号:'+data.parkingNumber"
|
|
|
- :column="3"
|
|
|
- border
|
|
|
- >
|
|
|
- <el-descriptions-item width="250" label="区县">
|
|
|
- {{ data.districtName }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item width="250" label="小区">
|
|
|
- {{ data.communityName }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item width="250" label="楼号">
|
|
|
- {{ data.buildingNumber }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item width="250" label="车位类型">
|
|
|
- {{ data.parkingType == 1 ? "车库" : "车位" }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="面积">
|
|
|
- {{ data.area }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="售卖方式">
|
|
|
- <el-tag style="margin: 0px 3px" v-if="data.entrustType==0">租售</el-tag>
|
|
|
- <el-tag style="margin: 0px 3px" v-if="data.entrustType==1">出租</el-tag>
|
|
|
- <el-tag style="margin: 0px 3px" v-if="data.entrustType==2">出售</el-tag>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="售价">
|
|
|
- {{ data.salePrice }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="租金">
|
|
|
- {{ data.hirePrice }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="委托人联系电话">
|
|
|
- {{ data.contactNumber }}
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="证明文件">
|
|
|
- <el-image v-if="data.evidenceFile.length>0"
|
|
|
- style="width: 100px; height: 100px"
|
|
|
- :src="data.evidenceFile[0]"
|
|
|
- :zoom-rate="1.2"
|
|
|
- :preview-src-list="data.evidenceFile"
|
|
|
- fit="cover"
|
|
|
- />
|
|
|
- </el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
+ <el-dialog title="委托详情" v-model="showDialog" width="1200px" @close="closeDialog">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style="border: #d9d9d9 1px solid">
|
|
|
+ <div style="padding:10px;background-color: #d9d9d9">用户提交</div>
|
|
|
+ <el-descriptions
|
|
|
+ class="margin-top"
|
|
|
+
|
|
|
+ :column="1"
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-descriptions-item width="250" label="区县">
|
|
|
+ {{ data.districtName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item width="250" label="小区">
|
|
|
+ {{ data.communityName }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item width="250" label="楼号">
|
|
|
+ {{ data.buildingNumber }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item width="250" label="车位编号">
|
|
|
+ <el-tag>{{ data.parkingNumber }}</el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item width="250" label="车位类型">
|
|
|
+ {{ data.parkingType == 1 ? "车库" : "车位" }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="面积">
|
|
|
+ {{ data.area }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="售卖方式">
|
|
|
+ <el-tag style="margin: 0px 3px" v-if="data.entrustType==0">租售</el-tag>
|
|
|
+ <el-tag style="margin: 0px 3px" v-if="data.entrustType==1">出租</el-tag>
|
|
|
+ <el-tag style="margin: 0px 3px" v-if="data.entrustType==2">出售</el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="售价">
|
|
|
+ {{ data.salePrice }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="租金">
|
|
|
+ {{ data.hirePrice }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="委托人联系电话">
|
|
|
+ {{ data.contactNumber }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="证明文件">
|
|
|
+ <el-image v-if="data.evidenceFile.length>0"
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
+ :src="data.evidenceFile[0]"
|
|
|
+ :zoom-rate="1.2"
|
|
|
+ :preview-src-list="data.evidenceFile"
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ </el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+
|
|
|
+ <el-col :span="16">
|
|
|
+ <div style="border: #d9d9d9 1px solid">
|
|
|
+ <div style="padding:10px;background-color: #d9d9d9">审核登记</div>
|
|
|
+
|
|
|
+ <el-form ref="formRef" :model="formData" label-position="right" label-width="100px"
|
|
|
+ :rules="formRules">
|
|
|
+ <el-tabs style="margin: 0 20px" v-model="activeTab">
|
|
|
+ <el-tab-pane name="first" label="车位信息">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="区县" prop="districtId">
|
|
|
+ <el-select v-model="formData.districtId" @visible-change="getDistrict">
|
|
|
+ <el-option v-for="item in districtList" :label="item.districtName" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="小区" prop="communityName">
|
|
|
+ <el-select v-model="formData.communityName" @visible-change="getCommunity" allow-create filterable
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in communityList" :label="item.communityName"
|
|
|
+ :value="item.communityName"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="楼号" prop="buildingNumber">
|
|
|
+ <el-select v-model="formData.buildingNumber" @visible-change="getBuilding" allow-create filterable
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in buildingList" :label="item.buildingNumber"
|
|
|
+ :value="item.buildingNumber"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="车位编号" prop="parkingNumber">
|
|
|
+ <el-input v-model="formData.parkingNumber"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="pictureUrl" label="主展示图">
|
|
|
+ <pictureUpload v-model="formData.pictureUrl"></pictureUpload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="parkingUrl" label="车位照片">
|
|
|
+ <pictureUpload2 :limit="10" v-model="formData.parkingUrl"></pictureUpload2>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="second" label="车位简介">
|
|
|
+ <el-form-item label="" prop="parkingShow" label-width="0">
|
|
|
+ <editor v-model="formData.parkingShow"></editor>
|
|
|
+ </el-form-item>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
|
|
|
<template #footer>
|
|
|
<el-button type="success" @click="submit(true)">审核通过</el-button>
|
|
@@ -56,9 +131,13 @@
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
-import { ref } from "vue";
|
|
|
+import { reactive, ref } from "vue";
|
|
|
import request from "/@/api/request";
|
|
|
-import { entrust } from "/@/api/controllerUrls";
|
|
|
+import { building_list, community_list, district_list, entrust } from "/@/api/controllerUrls";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+import pictureUpload from "/@/components/pictureUpload/index.vue";
|
|
|
+import pictureUpload2 from "/@/components/pictureUpload/multiple.vue";
|
|
|
+import editor from "/@/components/editor/index.vue";
|
|
|
|
|
|
|
|
|
let showDialog = ref(false);
|
|
@@ -74,20 +153,99 @@ let data = ref({});
|
|
|
function open(event) {
|
|
|
data.value = event;
|
|
|
data.value.evidenceFile = data.value.evidenceFile ? JSON.parse(data.value.evidenceFile) : [];
|
|
|
+
|
|
|
+ formRef.value?.resetFields();
|
|
|
+ formData.id = data.value.id;
|
|
|
+ formData.parkingNumber = event.parkingNumber;
|
|
|
showDialog.value = true;
|
|
|
}
|
|
|
|
|
|
-function submit(e) {
|
|
|
- request.edit(entrust, {
|
|
|
- id: data.value.id,
|
|
|
- operate: e ? 1 : 0
|
|
|
- }, "release").then((res) => {
|
|
|
+function submit(event) {
|
|
|
+ formData.operate = event ? 1 : 0;
|
|
|
+ request.edit(entrust, formData, "release").then((res) => {
|
|
|
if (res.code == 1) {
|
|
|
showDialog.value = false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+let activeTab = ref("first");
|
|
|
+
|
|
|
+let formRef = ref();
|
|
|
+
|
|
|
+let formData = reactive({
|
|
|
+ id: "",//委托单id
|
|
|
+ operate: 1,
|
|
|
+ districtId: "",
|
|
|
+ communityName: "",
|
|
|
+ buildingNumber: "",
|
|
|
+ parkingNumber: "",
|
|
|
+ parkingUrl: "",//车位展示图片
|
|
|
+ pictureUrl: "",//车位展示图片
|
|
|
+ parkingShow: "<p><br></p>"//车位简介
|
|
|
+});
|
|
|
+
|
|
|
+let formRules = {
|
|
|
+ districtId: [
|
|
|
+ { required: true, message: "不能为空" }
|
|
|
+ ],
|
|
|
+ communityName: [
|
|
|
+ { required: true, message: "不能为空" }
|
|
|
+ ],
|
|
|
+ buildingNumber: [
|
|
|
+ { required: true, message: "不能为空" }
|
|
|
+ ],
|
|
|
+ parkingNumber: [
|
|
|
+ { required: true, message: "不能为空" }
|
|
|
+ ]
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+//区县列表
|
|
|
+let districtList = ref([]);
|
|
|
+
|
|
|
+function getDistrict(event) {
|
|
|
+ if (!event) return;
|
|
|
+ request.index(district_list, {}, "").then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ districtList.value = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//小区列表
|
|
|
+let communityList = ref([]);
|
|
|
+
|
|
|
+//选择区县,获取小区列表
|
|
|
+function getCommunity(event) {
|
|
|
+ if (!event) return;
|
|
|
+ request.index(community_list, {
|
|
|
+ districtIds: formData.districtId
|
|
|
+ }, "").then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ communityList.value = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//楼号列表
|
|
|
+let buildingList = ref([]);
|
|
|
+
|
|
|
+//选择小区,获取楼号列表
|
|
|
+function getBuilding(event) {
|
|
|
+ if (!event) return;
|
|
|
+ if (/^[0-9]/.test(formData.communityId)) {
|
|
|
+ request.index(building_list, {
|
|
|
+ communityIds: formData.communityId
|
|
|
+ }, "").then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ buildingList.value = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
const emit = defineEmits(["close"]);
|
|
|
|
|
|
function closeDialog() {
|