Lou
2024-03-22 9f6b35252a6a7e097c6e2b8d6bbb34fdd3a18eba
subPackage/reside/edit.vue
@@ -3,6 +3,18 @@
      <view class="content bgc-ff">
         <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
            :labelStyle="{fontSize:'28rpx'}">
            <u-form-item label="房东姓名" prop="landlordName" borderBottom required>
               <u-input v-model="info.landlordName" border="none" disabled disabledColor="#fff"
                  placeholder="请输入房东姓名" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
            </u-form-item>
            <u-form-item label="房东电话" prop="landlordPhone" borderBottom required>
               <u-input v-model="info.landlordPhone" border="none" disabled disabledColor="#fff"
                  placeholder="请输入房东电话" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
            </u-form-item>
            <u-form-item label="姓名" prop="name" borderBottom required>
               <u-input v-model="info.name" border="none" placeholder="请输入姓名" placeholderClass="f-28 c-99"
                  inputAlign="right"></u-input>
@@ -61,7 +73,9 @@
               idCard: "",
               address: "",
               remak: "",
               houseCode: ""
               houseCode: "",
               landlordPhone: "",
               landlordName: ""
            },
            rules: {
               name: [{
@@ -119,11 +133,9 @@
            this.getDetail(option.id)
         } else {
            this.$set(this.info, "houseCode", uni.getStorageSync("siteInfo").houseCode)
            this.getHouseholdList();
            this.getHouseholdInfo()
         }
         this.getHouseholdList();
         this.getHouseholdInfo()
      },
      onReady() {
@@ -151,18 +163,27 @@
            }).then(res => {
               console.log(res)
               if (res.code == 200) {
                  this.houseHoldInfo = res.data[0]
                  this.$set(this.info, "landlordName", res.data.records[0].name)
                  this.$set(this.info, "landlordPhone", res.data.records[0].phoneNumber)
               }
            })
         },
         //获取业主信息
         //获取租户信息
         getHouseholdInfo() {
            householdDetail({
               houseCode: this.info.houseCode,
               associatedUserId: uni.getStorageSync("userInfo").user_id
            }).then(res => {
               console.log(res)
               if (res.code == 200) {
                  for (let i in this.info) {
                     this.info[i] = res.data[i]
                  }
                  this.info.phone = res.data.phoneNumber;
               }
            })