Hwt 2 vuotta sitten
vanhempi
commit
62c15d91aa

+ 140 - 104
operationSupport/src/views/ownerManagement/landlordManagement/stepPage/add.vue

@@ -215,119 +215,122 @@
           </el-form-item>
         </div>
 
-        <div
-          class="formContent-item"
-          style="max-height: 500px; overflow: hidden; overflow-y: auto;"
-        >
+        <div class="formContent-item">
           <div class="formContent-item_title">物业信息</div>
           <div
-            v-for="(items, indexs) in houseInformation"
-            :key="indexs"
+            style="max-height: 400px; overflow: hidden; overflow-y: auto; padding-right: 10px;"
+            class="formContent-item_title_center"
           >
-            <!-- <span style="color:red;float: left;">*</span> -->
-            <el-form-item
-              label="房屋信息"
-              class="width100"
-              :required="true"
+            <div
+              v-for="(items, indexs) in houseInformation"
+              :key="indexs"
             >
-              <div style="width: 48%; float: left;">
-                <el-radio
-                  :label="1"
-                  v-model="items.choice"
-                >按楼栋</el-radio>
-                <el-radio
-                  :label="2"
-                  v-model="items.choice"
-                >按房间</el-radio>
-              </div>
-              <div
-                style="width: 50%;float: left; "
-                v-if="items.choice == 1 ? true : flase"
+              <!-- <span style="color:red;float: left;">*</span> -->
+              <el-form-item
+                label="房屋信息"
+                class="width100"
+                :required="true"
               >
-                <el-cascader
-                  :ref="`getCheckeds`+indexs"
-                  :props="{emitPath:false}"
-                  :options="options"
-                  class="width100"
-                  placeholder="请选择区域"
-                  @change="shareScopeChange1(indexs)"
-                  v-model="items.region"
-                  clearable
-                ></el-cascader>
-              </div>
-              <div
-                style="width: 50%;float: left;"
-                v-if="items.choice == 2 ? true : flase && this.isAdd"
+                <div style="width: 49%; float: left;">
+                  <el-radio
+                    :label="1"
+                    v-model="items.choice"
+                  >按楼栋</el-radio>
+                  <el-radio
+                    :label="2"
+                    v-model="items.choice"
+                  >按房间</el-radio>
+                </div>
+                <div
+                  style="width: 50%;float: left; "
+                  v-if="items.choice == 1 ? true : flase"
+                >
+                  <el-cascader
+                    :ref="`getCheckeds`+indexs"
+                    :props="{emitPath:false}"
+                    :options="options"
+                    class="width100"
+                    placeholder="请选择区域"
+                    @change="shareScopeChange1(indexs)"
+                    v-model="items.region"
+                    clearable
+                  ></el-cascader>
+                </div>
+                <div
+                  style="width: 50%;float: left;"
+                  v-if="items.choice == 2 ? true : flase && this.isAdd"
+                >
+                  <el-cascader
+                    :ref="`getChecked`+indexs"
+                    :options="scopeList"
+                    :props="props"
+                    class="width100"
+                    placeholder="请选择区域"
+                    @change="shareScopeChange(indexs)"
+                    v-model="items.region"
+                    clearable
+                    :show-all-levels="false"
+                    :filter-node-method="filterNodeHouse"
+                    collapse-tags
+                  ></el-cascader>
+                </div>
+                <!-- :props="{ label: 'name', value: 'code' }" -->
+
+              </el-form-item>
+
+              <el-form-item
+                label="计费规则"
+                class="width100"
+                :required="true"
               >
-                <el-cascader
-                  :ref="`getChecked`+indexs"
-                  :options="scopeList"
-                  :props="props"
-                  class="width100"
-                  placeholder="请选择区域"
-                  @change="shareScopeChange(indexs)"
-                  v-model="items.region"
+                <el-select
+                  v-model="houseInformation[indexs].billingRules"
                   clearable
-                  :show-all-levels="false"
-                  :filter-node-method="filterNodeHouse"
-                  collapse-tags
-                ></el-cascader>
-              </div>
-              <!-- :props="{ label: 'name', value: 'code' }" -->
+                  class="width100"
+                  @click.native="houseCommunityRules(indexs)"
+                >
 
-            </el-form-item>
+                  <el-option
+                    v-for="(item, index) in houseInformation[indexs].billing"
+                    :key="index"
+                    :label="item.name"
+                    :value="item.value"
+                  >{{item.name}}</el-option>
+                </el-select>
 
-            <el-form-item
-              label="计费规则"
-              class="width100"
-              :required="true"
-            >
-              <el-select
-                v-model="houseInformation[indexs].billingRules"
-                clearable
+              </el-form-item>
+              <el-form-item
+                label="计费面积"
                 class="width100"
-                @click.native="houseCommunityRules(indexs)"
+                :required="true"
               >
+                <el-input
+                  v-model="houseInformation[indexs].billingArea"
+                  placeholder="请输入计费面积"
+                ></el-input>
+              </el-form-item>
+              <div
+                style="width: 100%;"
+                v-if="houseInformation.length == 1 ? flase : indexs == 0 ? flase :  true"
+              >
+                <el-button
+                  type="primary"
+                  style="float: right; position: relative; z-index: 100;"
+                  key="indexs"
+                  @click="closeshouseInformation(indexs)"
+                >删除</el-button>
+              </div>
 
-                <el-option
-                  v-for="(item, index) in houseInformation[indexs].billing"
-                  :key="index"
-                  :label="item.name"
-                  :value="item.value"
-                >{{item.name}}</el-option>
-              </el-select>
-
-            </el-form-item>
-            <el-form-item
-              label="计费面积"
-              class="width100"
-              :required="true"
-            >
-              <el-input
-                v-model="houseInformation[indexs].billingArea"
-                placeholder="请输入计费面积"
-              ></el-input>
-            </el-form-item>
-            <div
-              style="width: 100%;"
-              v-if="houseInformation.length == 1 ? flase : indexs == 0 ? flase :  true"
-            >
+              <div style="width: 100%; height: 0.005vw; background: #E0E1E3; margin: 20px 0; float: left;"></div>
+
+            </div>
+            <div>
               <el-button
+                @click="addhouseInformation"
+                style="float: left;"
                 type="primary"
-                style="float: right;"
-                @click="closeshouseInformation(indexs)"
-              >删除</el-button>
+              >新增物业信息</el-button>
             </div>
-
-            <div style="width: 100%; height: 0.005vw; background: #E0E1E3; margin: 20px 0; float: left;"></div>
-
-          </div>
-          <div>
-            <el-button
-              @click="addhouseInformation"
-              style="float: left;"
-              type="primary"
-            >新增物业信息</el-button>
           </div>
 
         </div>
@@ -665,8 +668,12 @@ export default {
     shareScopeChange (index) {
 
       var data = this.$refs[`getChecked${index}`][0].getCheckedNodes();
-
-
+      if (data.length == 0) {
+        this.houseInformation[index].billingRules = '';
+        this.houseInformation[index].billing = [];
+        this.communityId = '';
+        return;
+      }
       this.shareScope = [];
       this.communityIdTree = [];
       for (let a = 0; a < data.length; a++) {
@@ -808,11 +815,14 @@ export default {
     },
     houseCommunityRules (index) {
       this.communityRules(index);
+
     },
     // 获取对应社区的规则
     communityRules (index) {
       this.$http.get('/czc-charge/scChargeStrategy/list', { communityId: this.communityId[index][0] }).then(({ status, data, msg }) => {
         if (status == 0) {
+          this.houseInformation[index].billing = [];
+          this.houseInformation[index].billingRules = ''
           data.map((item, indexs) => {
             this.houseInformation[index].billing.push({
               name: item.chargeName,
@@ -828,6 +838,8 @@ export default {
       this.$http.get('/czc-charge/scChargeStrategy/list', { communityId: communityId }).then(({ status, data, msg }) => {
         if (status == 0) {
           data.map((item, indexs) => {
+            this.houseInformation[index].billing = [];
+            this.houseInformation[index].billingRules = ''
             this.houseInformation[index].billing.push({
               name: item.chargeName,
               value: item.id
@@ -841,8 +853,14 @@ export default {
     shareScopeChange1 (index) {
 
       var data = this.$refs[`getCheckeds${index}`][0].getCheckedNodes();
-      var id = data[0].path[0];
-      this.RescommunityRules(index, id);
+      if (data.length != 0) {
+        var id = data[0].path[0];
+        this.RescommunityRules(index, id);
+      } else {
+
+        this.houseInformation[index].billingRules = '';
+        this.houseInformation[index].billing = [];
+      }
 
     },
     closes () {
@@ -962,7 +980,7 @@ export default {
       })
     },
     closeshouseInformation (id) {
-
+      debugger
       if (this.houseInformation.length > 1) {
         this.houseInformation.splice(id, 1);
       }
@@ -1127,9 +1145,27 @@ export default {
 .formContent-item .ownerScroll[data-v-2c08d612]::-webkit-scrollbar-thumb {
     background: #c6c4c4a9;
 }
-.formContent-item::-webkit-scrollbar {
+.formContent-item_title_center::-webkit-scrollbar {
     width: 5px !important;
 }
+.formContent-item_title_center::-webkit-scrollbar {
+    /*滚动条整体样式*/
+    width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
+    height: 1px;
+}
+.formContent-item_title_center::-webkit-scrollbar-thumb {
+    /*滚动条里面小方块*/
+    border-radius: 10px;
+    // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    background: #c6c4c4a9;
+}
+.formContent-item_title_center::-webkit-scrollbar-track {
+    /*滚动条里面轨道*/
+    // -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    border-radius: 10px;
+    background: #f4f7f9a8;
+}
+
 .el-cascader-panel {
     .el-scrollbar:first-child {
         .el-checkbox {