Selaa lähdekoodia

更新最近的提交

刘昊林 1 viikko sitten
vanhempi
commit
11adbca48a
3 muutettua tiedostoa jossa 69 lisäystä ja 55 poistoa
  1. 20 5
      src/views/zf/fwxq.vue
  2. 48 48
      src/views/zfgl/zfxxgl.vue
  3. 1 2
      vite.config.ts

+ 20 - 5
src/views/zf/fwxq.vue

@@ -52,6 +52,8 @@ const currentStep = ref(0)
 const submitting = ref(false)
 const terminating = ref(false)
 const loading = ref(true)
+const panduanareaisTrue = ref(true)
+
 const MINIO_URL = import.meta.env.VITE_MINIO_BASE_URL
 
 const propertyInfo = ref({
@@ -741,6 +743,16 @@ const nextStep = async () => {
   }
 }
 
+const geiAreaValueisTrue = async() => {
+  if(panduanareaisTrue.value){
+    console.log('当前有面积')
+    showRentalDialog.value = true;
+  }else{
+    console.log('当前没有面积')
+    ElMessage.error('此房屋没有填写房屋面积,请在"租房信息-租房信息管理-详情"中填写房屋信息后重试!')
+  }
+}
+
 const handleCloseRentalDialog = () => {
   showRentalDialog.value = false
   currentStep.value = 0
@@ -951,12 +963,14 @@ const getData = async () => {
       ElMessage.error(res.msg)
       return
     }
-    const data = res.data
+    const data = res.data;
+
     // 新增:获取收据信息
     await getReceiptData(data.contractInfo?.contractNumber || '')
-
-    console.log('接口返回数据:', data)
-
+    console.log(1111,data.houseInfo.area)
+    if(data.houseInfo.area === '' || data.houseInfo.area === null){
+      panduanareaisTrue.value = false;
+    }
     propertyInfo.value = {
       id: route.query.houseId as string,
       buildingNumber: data.houseName || '',
@@ -1433,9 +1447,10 @@ onMounted(() => {
               v-if="propertyInfo.status === '空闲'"
               type="primary"
               size="large"
-              @click="showRentalDialog = true"
+              @click="geiAreaValueisTrue"
               class="px-8 py-3"
             >
+
               <el-icon class="mr-2"><Plus /></el-icon>
               出租房屋
             </el-button>

+ 48 - 48
src/views/zfgl/zfxxgl.vue

@@ -1027,54 +1027,54 @@ onMounted(() => {
       <!--      </div>-->
 
       <!-- 数据表格 -->
-<!--      <ElCard shadow="never" class="">-->
-        <div class="">
-          <el-table
-            :data="tableData"
-            v-loading="loading"
-            @selection-change="handleSelectionChange"
-            class="w-full"
-            stripe
-            border
-          >
-            <el-table-column type="selection" width="55"/>
-            <el-table-column prop="assetType" label="资产类型" width="100">
-              <template #default="{ row }">
-                <el-tag :type="getAssetTypeTag(row.assetType)">
-                  {{ row.assetType }}
-                </el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column prop="houseName" label="房间名称" width="120"/>
-            <el-table-column prop="building" label="楼栋" width="100"/>
-            <el-table-column prop="floor" label="楼层" width="100"/>
-            <el-table-column prop="address" label="地址" min-width="200" show-overflow-tooltip/>
-            <el-table-column prop="status" label="状态" width="100">
-              <template #default="{ row }">
-                <el-tag :type="row.status === '空闲' ? 'success' : 'warning'">
-                  {{ row.status }}
-                </el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column prop="rentRange" label="租金" width="150"/>
-            <el-table-column label="操作" width="250" fixed="right">
-              <template #default="{ row }">
-                <div class="flex gap-2">
-                  <el-button type="primary" size="small" @click="handleViewDetail(row)" :icon="Eye">
-                    详情
-                  </el-button>
-                  <el-button type="warning" size="small" @click="handleEdit(row)" :icon="Edit">
-                    编辑
-                  </el-button>
-                  <el-button type="danger" size="small" @click="handleDelete(row)" :icon="Delete">
-                    删除
-                  </el-button>
-                </div>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-<!--      </ElCard>-->
+      <!--      <ElCard shadow="never" class="">-->
+      <div class="">
+        <el-table
+          :data="tableData"
+          v-loading="loading"
+          @selection-change="handleSelectionChange"
+          class="w-full"
+          stripe
+          border
+        >
+          <el-table-column type="selection" width="55"/>
+          <el-table-column prop="assetType" label="资产类型" width="100">
+            <template #default="{ row }">
+              <el-tag :type="getAssetTypeTag(row.assetType)">
+                {{ row.assetType }}
+              </el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column prop="houseName" label="房间名称" width="120"/>
+          <el-table-column prop="building" label="楼栋" width="100"/>
+          <el-table-column prop="floor" label="楼层" width="100"/>
+          <el-table-column prop="address" label="地址" min-width="200" show-overflow-tooltip/>
+          <el-table-column prop="status" label="状态" width="100">
+            <template #default="{ row }">
+              <el-tag :type="row.status === '空闲' ? 'success' : 'warning'">
+                {{ row.status }}
+              </el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column prop="rentRange" label="租金" width="150"/>
+          <el-table-column label="操作" width="250" fixed="right">
+            <template #default="{ row }">
+              <div class="flex gap-2">
+                <el-button type="primary" size="small" @click="handleViewDetail(row)" :icon="Eye">
+                  详情
+                </el-button>
+                <el-button type="warning" size="small" @click="handleEdit(row)" :icon="Edit">
+                  编辑
+                </el-button>
+                <el-button type="danger" size="small" @click="handleDelete(row)" :icon="Delete">
+                  删除
+                </el-button>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <!--      </ElCard>-->
       <!-- 分页 -->
       <div class="flex justify-center p-6">
         <el-pagination

+ 1 - 2
vite.config.ts

@@ -32,9 +32,8 @@ export default defineConfig({
     proxy: {
       '/api': {
         // target: 'http://192.168.110.93:8801',
-        // docker restatr tt
+        // docker restart tt
         target: 'http://192.168.110.235:8801',
-
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/api/, ''),
       },