Hwt vor 2 Jahren
Ursprung
Commit
c668d3164f

+ 20 - 2
operationSupport/src/views/ownerManagement/landlordManagement/stepPage/add.vue

@@ -224,11 +224,13 @@
             v-for="(items, indexs) in houseInformation"
             :key="indexs"
           >
+            <!-- <span style="color:red;float: left;">*</span> -->
             <el-form-item
               label="房屋信息"
               class="width100"
+              :required="true"
             >
-              <div style="width: 50%; float: left;">
+              <div style="width: 48%; float: left;">
                 <el-radio
                   :label="1"
                   v-model="items.choice"
@@ -278,6 +280,7 @@
             <el-form-item
               label="计费规则"
               class="width100"
+              :required="true"
             >
               <el-select
                 v-model="houseInformation[indexs].billingRules"
@@ -298,10 +301,11 @@
             <el-form-item
               label="计费面积"
               class="width100"
+              :required="true"
             >
               <el-input
                 v-model="houseInformation[indexs].billingArea"
-                placeholder="请输入证件号码"
+                placeholder="请输入计费面积"
               ></el-input>
             </el-form-item>
             <div
@@ -824,6 +828,20 @@ export default {
     addEdit () {
       this.$refs['ruleForm'].validate((valid) => {
         if (valid) {
+          for (let a = 0; a < this.houseInformation.length; a++) {
+            if (this.houseInformation[a].region == null) {
+              if (this.houseInformation[a].region == null || this.houseInformation[a].billingRules.length == 0 || this.houseInformation[a].billingArea.length == 0) {
+                this.$message.error('请填写物业信息');
+                return;
+              }
+            } else {
+              if (this.houseInformation[a].region.length == 0 || this.houseInformation[a].billingRules.length == 0 || this.houseInformation[a].billingArea.length == 0) {
+                this.$message.error('请填写物业信息');
+                return;
+              }
+
+            }
+          }
           var url = '/czc-community/landlord/add';
           var params = {
             name: this.formData.name,