Hwt 2 rokov pred
rodič
commit
ace3859fdd

+ 12 - 9
operationSupport/src/views/assetManagement/housingManagement/add.vue

@@ -479,14 +479,15 @@ export default {
       this.resunitList = [];
       this.$http.get('/czc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
         if (res.status == 0) {
-          if (res.data.buildingUnitList.length != 0) {
-            for (let i = 0; i < res.data.buildingUnitList.length; i++) {
-              if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
-                this.resunitList.push(res.data.buildingUnitList[i])
-              }
-            }
-            this.unitList = res.data.buildingUnitList;
-          }
+
+          // if (res.data.buildingUnitList.length != 0) {
+          //   for (let i = 0; i < res.data.buildingUnitList.length; i++) {
+          //     if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
+          //       this.resunitList.push(res.data.buildingUnitList[i])
+          //     }
+          //   }
+          this.unitList = res.data.floorVo;
+          // }
         }
       });
     },
@@ -494,9 +495,11 @@ export default {
     unitChoice (e) {
       this.floorNumberList = [];
       this.unitList.map((item) => {
-        this.floorNumberList.push(item.unitFloorList[0].floorNumber);
+        this.floorNumberList.push(item.floorNumber);
+        // this.floorNumberList.push(item.unitFloorList[0].floorNumber);
       });
       this.floorNumberList = Array.from(new Set(this.floorNumberList))
+      this.floorNumberList = this.floorNumberList.sort()
     },
 
     getDetails (id) {

+ 9 - 9
operationSupport/src/views/assetManagement/housingManagement/saveEdits.vue

@@ -487,15 +487,15 @@ export default {
       this.$http.get('/czc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
 
         if (res.status == 0) {
-          if (res.data.buildingUnitList.length != 0) {
+          // if (res.data.buildingUnitList.length != 0) {
 
-            for (let i = 0; i < res.data.buildingUnitList.length; i++) {
-              if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
-                this.resunitList.push(res.data.buildingUnitList[i])
-              }
-            }
-            this.unitList = res.data.buildingUnitList;
-          }
+          //   for (let i = 0; i < res.data.buildingUnitList.length; i++) {
+          //     if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
+          //       this.resunitList.push(res.data.buildingUnitList[i])
+          //     }
+          //   }
+          this.unitList = res.data.floorVo;
+          // }
         }
       });
     },
@@ -505,7 +505,7 @@ export default {
       this.floorNumberList = [];
 
       this.unitList.map((item) => {
-        this.floorNumberList.push(item.unitFloorList[0].floorNumber);
+        this.floorNumberList.push(item.floorNumber);
       });
 
       this.floorNumberList = Array.from(new Set(this.floorNumberList))

+ 11 - 10
operationSupport/src/views/assetManagement/shopManagement/saveEdits.vue

@@ -367,15 +367,15 @@ export default {
       this.$http.get('/czc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
 
         if (res.status == 0) {
-          if (res.data.buildingUnitList.length != 0) {
+          // if (res.data.buildingUnitList.length != 0) {
 
-            for (let i = 0; i < res.data.buildingUnitList.length; i++) {
-              if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
-                this.resunitList.push(res.data.buildingUnitList[i])
-              }
-            }
-            this.unitList = res.data.buildingUnitList;
-          }
+          //   for (let i = 0; i < res.data.buildingUnitList.length; i++) {
+          //     if (res.data.buildingUnitList[i].unitName != null && res.data.buildingUnitList[i].unitName != '') {
+          //       this.resunitList.push(res.data.buildingUnitList[i])
+          //     }
+          //   }
+          this.unitList = res.data.floorVo;
+          // }
         }
       });
     },
@@ -384,10 +384,11 @@ export default {
 
       this.floorNumberList = [];
       this.unitList.map((item) => {
-        this.floorNumberList.push(item.unitFloorList[0].floorNumber)
+        this.floorNumberList.push(item.floorNumber)
 
       })
-      this.floorNumberList = Array.from(new Set(this.floorNumberList))
+      this.floorNumberList = Array.from(new Set(this.floorNumberList));
+      this.floorNumberList = this.floorNumberList.sort()
 
     },
 

+ 13 - 1
operationSupport/src/views/buildingManagement/index.vue

@@ -124,6 +124,7 @@
     <addplan
       v-else
       :params="activeData"
+      :todoRow="todoRow"
       @clerOwnerStatus="clerOwnerStatus"
       :isAdd="isAdd"
     ></addplan>
@@ -141,6 +142,7 @@ export default {
     return {
       ownerStatus: '',
       activeData: {},
+      c: '',
       isAdd: true,
       communityList: [], //社区名称下拉列表
       query: {
@@ -158,7 +160,15 @@ export default {
         },
         {
           label: '单元数',
-          prop: 'unitNumber'
+          prop: 'unitNumber',
+          format (val) {
+            if (val == 0) {
+              return '-'
+            } else {
+              return val
+            }
+          }
+
         },
         {
           label: '楼栋类型',
@@ -225,6 +235,7 @@ export default {
     },
     addCommand (command) {
       if (command === 'add') {
+        this.todoRow = command;
         this.addOrEdit('add');
       }
       if (command == 'addTemplate') {
@@ -236,6 +247,7 @@ export default {
     addOrEdit (todo, row) {
       if (todo == 'edit') {
         this.activeData = row;
+        this.todoRow = todo;
         this.isAdd = false;
       }
       this.ownerStatus = todo;

+ 41 - 10
operationSupport/src/views/buildingManagement/pageJump/addoredit.vue

@@ -90,7 +90,14 @@
       </div>
       <div class="right_content">
         <div class="right_content_head">
-          <span class="head_text">创建房屋</span>
+          <span
+            class="head_text"
+            v-if="this.todoRow == 'add' ? true : false"
+          >创建房屋</span>
+          <span
+            class="head_text"
+            v-else
+          >房屋信息</span>
           <span
             class="close"
             @click="close"
@@ -228,7 +235,8 @@
                   class="el-mgRight-md"
                   :disabled="!isAdd"
                   @click="createDoor"
-                >{{ doorData.length ? '重新' : '' }}生成房屋</el-button>
+                >
+                  {{ doorData.length ? '重新' : '' }}生成房屋</el-button>
                 <el-button
                   @click="clearDoor"
                   :disabled="!isAdd"
@@ -436,6 +444,7 @@
                               ></el-input>
                             </el-tag>
                             <el-button
+                              v-show="todoRow == 'edit' ? false : true"
                               class="el-icon-plus button-new-tag"
                               size="small"
                               @click="showInput"
@@ -520,6 +529,7 @@
                       </div>
                       <div class="add-floor">
                         <el-button
+                          v-show="todoRow == 'edit' ? false : true"
                           class="el-icon-plus button-new-tag"
                           size="small"
                           @click="showInput"
@@ -676,11 +686,12 @@ export default {
         remarks: '',
         houseType: 1,
         floorsNumber: '1', //每栋层数
-        unitNumber: 1, //单元数
+        // unitNumber: 1, //单元数
+        unitNumber: '', //单元数
         householdsPerFloor: '1' //每层户数
       },
       initialUnitList: {
-        checkedUnit: true,
+        checkedUnit: false,
         enableUnit: 1, //勾选了复选框
         unit: {
           type: 'Number', //  Number letter
@@ -754,6 +765,9 @@ export default {
     params: {
       type: Object
     },
+    todoRow: {
+      type: toString
+    },
     isAdd: {
       type: Boolean,
       default: true
@@ -784,9 +798,10 @@ export default {
 
     checkedUnit (val) {
       if (val) {
+        this.formdata.unitNumber = 1;
         this.initialUnitList.enableUnit = 1;
       } else {
-        this.formdata.unitNumber = 1;
+
         this.initialUnitList.enableUnit = 0;
       }
     },
@@ -800,13 +815,15 @@ export default {
       }).then((v) => {
         if (this.initialUnitList.checkedUnit) {
           this.initialUnitList.enableUnit = 1;
-        } else {
           this.formdata.unitNumber = 1;
+        } else {
           this.initialUnitList.enableUnit = 0;
         }
         let isNumberUnitFlag = this.initialUnitList.unit.type == 'Number' ? true : false;
         let checkUnit = this.initialUnitList.unit.start <= this.initialUnitList.unit.end ? true : false;
+        console.log('777', this.initialUnitList.checkedUnit)
         if (this.initialUnitList.checkedUnit) {
+
           if (checkUnit && isNumberUnitFlag) {
             this.formdata.unitNumber = this.initialUnitList.unit.end - this.initialUnitList.unit.start + 1;
           } else if (!isNumberUnitFlag && checkUnit) {
@@ -817,8 +834,21 @@ export default {
             this.$message.error('单元起始和结束设置出错');
             return;
           }
-        }
+        } else {
+          if (checkUnit && isNumberUnitFlag) {
 
+            this.formdata.unitNumber = ''
+            // this.formdata.unitNumber = this.initialUnitList.unit.end - this.initialUnitList.unit.start + 1;
+          } else if (!isNumberUnitFlag && checkUnit) {
+            this.formdata.unitNumber = ''
+            // this.formdata.unitNumber =
+            // this.initialUnitList.unit.end.charCodeAt() - this.initialUnitList.unit.start.charCodeAt() + 1;
+          } else {
+            this.formdata.unitNumber = '';
+            // this.$message.error('单元起始和结束设置出错');
+            return;
+          }
+        }
         this.doorData = initDoor(this.formdata, this.initialUnitList).generateUnit;
       });
     },
@@ -833,7 +863,7 @@ export default {
           door: initDoor(this.formdata, this.initialUnitList).generateDoor(value)
         };
         if (querySame()) {
-          debugger
+
           if (code == 'unit') {
             arr.push({
               unitName: value,
@@ -906,7 +936,8 @@ export default {
             this.formdata.householdsPerFloor = data.floorVo[0].roomList.length;
             this.initialUnitList = {
               checkedUnit: data.unitNumber !== 0 ? true : false,
-              enableUnit: data.unitNumber !== 0 ? 1 : 0,
+              // enableUnit: data.unitNumber !== 0 ? 1 : 0,
+              enableUnit: data.unitNumber,
               unit: {
                 type: 'Number', //  Number letter
                 start: data.floorVo[0]['unitName'], // 1 A单元的起始单元
@@ -946,7 +977,7 @@ export default {
 }
 
 .el-select-dropdown__wrap {
-    min-height: 80px !important;
+    min-height: 65px !important;
 }
 
 .formContent-item_title_center::-webkit-scrollbar {

+ 117 - 78
operationSupport/src/views/buildingManagement/pageJump/basedata.js

@@ -1,83 +1,122 @@
 export const initDoor = (data, initialUnitList) => {
-	const { floor, unit } = initialUnitList;
-	const { buildingNumber, unitNumber, floorsNumber, householdsPerFloor } = data;
-	const letter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
-	const getDoor = (k) => {
-		const arr = [];
-		for (let l = 0; l < householdsPerFloor; l++) {
-			const roomNumber = (l + 1) >= 10 ? `${k}${l + 1}` : `${k}0${l + 1}`
-			arr.push({
-				roomNumber,
+    const { floor, unit } = initialUnitList;
+    const { buildingNumber, unitNumber, floorsNumber, householdsPerFloor } = data;
+    const letter = [
+        'A',
+        'B',
+        'C',
+        'D',
+        'E',
+        'F',
+        'G',
+        'H',
+        'I',
+        'J',
+        'K',
+        'L',
+        'M',
+        'N',
+        'O',
+        'P',
+        'Q',
+        'R',
+        'S',
+        'T',
+        'U',
+        'V',
+        'W',
+        'X',
+        'Y',
+        'Z'
+    ];
+    const getDoor = (k) => {
+        const arr = [];
+        for (let l = 0; l < householdsPerFloor; l++) {
+            const roomNumber = l + 1 >= 10 ? `${k}${l + 1}` : `${k}0${l + 1}`;
+            arr.push({
+                roomNumber
+            });
+        }
+        return arr;
+    };
+    const getFoolr = () => {
+        const arr = [];
+        for (let k = 0; k < floorsNumber; k++) {
+            arr.push({
+                floorNumber: k + 1,
 
-			})
-		}
-		return arr;
-	}
-	const getFoolr = () => {
-		const arr = [];
-		for (let k = 0; k < floorsNumber; k++) {
-			arr.push({
-				floorNumber: k + 1,
+                roomList: getDoor(k + 1)
+            });
+        }
+        return arr;
+    };
+    const regExp1 = /^[0-9]+$/;
+    const getUnit = () => {
+        const start =
+            unit.type == 'Number' ? (!regExp1.test(Number(unit.start)) ? 1 : unit.start) : !letter.includes(unit.start) ? 'A' : unit.start;
+        const arr = [];
+        if (unitNumber == '') {
+            arr.push({
+                unitName: '',
+                unitFloorList: getFoolr()
+            });
 
-				roomList: getDoor(k + 1)
-			})
-		}
-		return arr;
-	}
-	const regExp1 = /^[0-9]+$/;
-	const getUnit = () => {
-		const start = unit.type == 'Number' ? !regExp1.test(Number(unit.start)) ? 1 : unit.start : !letter.includes(unit.start) ? 'A' : unit.start;
-		const arr = [];
-		for (let j = 0; j < unitNumber; j++) {
-			arr.push({
-				unitName: (unit.type == 'Number' ? j + (Number(start) || 1) : letter[start && letter.indexOf(start) + j || j] || `未命名${j + 1}`) + '单元',
-				unitFloorList: getFoolr()
-			})
-		}
-		return arr;
-	}
-	//楼栋下有几栋,每栋有几单元,每个单元有几层,每层下有几户
-	// const initArray = () => {
-	// 	const start = floor.type == 'Number' ? !regExp1.test(Number(floor.start)) ? 1 : floor.start : !letter.includes(floor.start) ? 'A' : floor.start;
-	// 	const doorArray = [];
-	// 	for(let i = 0; i < buildingNumber; i++) {
-	// 		doorArray.push({
-	// 			name: floor.type == 'Number' ? i + (Number(start) || 1) : letter[start && letter.indexOf(start) + i || i] || `未命名${i + 1}`,
-	// 			code: 'build',
-	// 			children: getUnit()
-	// 		})
-	// 	}
-	// 	return doorArray;
-	// }
-	return {
-		// initDoor: initArray(),
-		// initDoor: getUnit(),
-		generateUnit: getUnit(),
-		generateFloor: getFoolr(),
-		generateDoor: (k) => getDoor(k),
-	}
-}
+            return arr;
+        } else {
+            for (let j = 0; j < unitNumber; j++) {
+                arr.push({
+                    unitName:
+                        (unit.type == 'Number'
+                            ? j + (Number(start) || 1)
+                            : letter[(start && letter.indexOf(start) + j) || j] || `未命名${j + 1}`) + '单元',
+                    unitFloorList: getFoolr()
+                });
+            }
+            return arr;
+        }
+    };
+    //楼栋下有几栋,每栋有几单元,每个单元有几层,每层下有几户
+    // const initArray = () => {
+    // 	const start = floor.type == 'Number' ? !regExp1.test(Number(floor.start)) ? 1 : floor.start : !letter.includes(floor.start) ? 'A' : floor.start;
+    // 	const doorArray = [];
+    // 	for(let i = 0; i < buildingNumber; i++) {
+    // 		doorArray.push({
+    // 			name: floor.type == 'Number' ? i + (Number(start) || 1) : letter[start && letter.indexOf(start) + i || i] || `未命名${i + 1}`,
+    // 			code: 'build',
+    // 			children: getUnit()
+    // 		})
+    // 	}
+    // 	return doorArray;
+    // }
+    return {
+        // initDoor: initArray(),
+        // initDoor: getUnit(),
+        generateUnit: getUnit(),
+        generateFloor: getFoolr(),
+        generateDoor: (k) => getDoor(k)
+    };
+};
 
 export const calcDoor = (data, checkedUnit) => {
-	let number1 = 1,
-		number2 = 0,
-		number3 = 0,
-		number4 = 0;
-	_.each(data, (v1) => {
-		if (checkedUnit) {
-			number2++;
-		}
-		_.each(v1.unitFloorList, (v2) => {
-			number3++;
-			_.each(v2.roomList, (v3) => {
-				number4++;
-			})
-		})
-	})
-	return {
-		buildNumber: number1,
-		unitNumber: number2,
-		floorNumber: number3,
-		doorNumber: number4
-	}
-}
+    let number1 = 1,
+        number2 = 0,
+        number3 = 0,
+        number4 = 0;
+    _.each(data, (v1) => {
+        if (checkedUnit) {
+            number2++;
+        }
+        _.each(v1.unitFloorList, (v2) => {
+            number3++;
+            _.each(v2.roomList, (v3) => {
+                number4++;
+            });
+        });
+    });
+    return {
+        buildNumber: number1,
+        unitNumber: number2,
+        floorNumber: number3,
+        doorNumber: number4
+    };
+};

+ 16 - 7
operationSupport/src/views/ownerManagement/index.vue

@@ -31,7 +31,8 @@
                         item.label
                     }}</el-option>
         </el-select>
-        <el-select
+        <!-- 住户状态 -->
+        <!-- <el-select
           v-model="mixins_query.residentStatus"
           clearable
           placeholder="住户状态"
@@ -44,7 +45,7 @@
           >{{
                         item.label
                     }}</el-option>
-        </el-select>
+        </el-select> -->
         <el-button
           class="search-btn"
           type="primary"
@@ -176,14 +177,15 @@
             >{{
                             item.residentStatus === 1 ? '在住' : '已注销'
                         }}</span>
-            <el-switch
+            <!-- 是否选择注销和在住 -->
+            <!-- <el-switch
               :value="item.residentStatus"
               @change="cancellation(item)"
               :active-value="1"
               :inactive-value="0"
               style="margin-right: 20px"
             >
-            </el-switch>
+            </el-switch> -->
           </div>
         </template>
 
@@ -291,7 +293,7 @@ export default {
           label: '入住时间',
           prop: 'checkInDate',
           slot: 'checkInDate',
-          width: '80'
+          // width: '80'
         },
         {
           label: '操作',
@@ -388,8 +390,15 @@ export default {
       if (row.residentStatus === 0) {
         status = 1;
       }
-      let title = `您确定要修改状态住户“${buildingName}${unitName.indexOf('单元') === -1 ? unitName + '单元' : unitName
-        }${roomNumber}”`;
+      let title = ''
+      if (unitName == null) {
+        title = `您确定要修改状态住户“${buildingName}-${roomNumber}”`;
+      } else {
+        title = `您确定要修改状态住户“${buildingName}${unitName.indexOf('单元') === -1 ? unitName + '单元' : unitName
+          }${roomNumber}”`;
+      }
+
+
       this.$msgBox('是否修改住户状态', title)
         .then(() => {
           this.$http

+ 16 - 13
operationSupport/src/views/ownerManagement/ownerReview/toExamine.vue

@@ -336,6 +336,9 @@ export default {
         {
           status: 3,
           label: '租客'
+        }, {
+          status: 4,
+          label: '承租人'
         }
       ],
       formRules: {
@@ -352,6 +355,7 @@ export default {
       this.getDetails(this.params.id);
     } else {
       if (this.$parent.thisLeftData.type == 'room') {
+
         this.formData.houseList = [
           {
             checkInDate: '',
@@ -387,21 +391,20 @@ export default {
   },
   methods: {
     getDetails (id) {
+
       let url = '/czc-community/scResident/audit/find/' + id;
-      this.$http
-        .get(url)
-        .then(({ data, status, msg }) => {
-          if (0 === status) {
-            let { effectiveDateStart, effectiveDateEnd } = data;
-            if (effectiveDateStart == null || effectiveDateEnd == null) {
-              effectiveDateStart = '';
-              effectiveDateEnd = '';
-            }
-            this.formData = data;
-          } else {
-            this.$message.error(msg);
+      this.$http.get(url).then(({ data, status, msg }) => {
+        if (0 === status) {
+          let { effectiveDateStart, effectiveDateEnd } = data;
+          if (effectiveDateStart == null || effectiveDateEnd == null) {
+            effectiveDateStart = '';
+            effectiveDateEnd = '';
           }
-        })
+          this.formData = data;
+        } else {
+          this.$message.error(msg);
+        }
+      })
         .catch(() => { });
     },
     lookFormCols (cols) {

+ 1 - 1
operationSupport/src/views/ownerManagement/stepPage/newAdd.vue

@@ -412,7 +412,7 @@ export default {
         name: '',
         phone: '',
         personnelNumber: '',
-        sex: 1,
+        sex: '',
         remarks: '',
         facePictureUrl: '',
         id: 0,

+ 1 - 0
operationSupport/src/views/patrolManagement/popups/addPoint.vue

@@ -27,6 +27,7 @@
           v-model="formData.pointNo"
           :disabled="params.todo == 'edit'"
           @change="initDotTggle"
+          onkeyup="value=value.replace(/[^\x00-\xff]|\s+/g, '')"
           placeholder="请输入巡更点编号"
         > </el-input>
       </template>