Lou
2023-12-06 e5c6cf597abe3a454f5686ec0c41bfe48d4e746c
subPackage/bs/views/rentDetail.vue
@@ -75,13 +75,12 @@
         @cancel="dueTimeShow = false"></u-datetime-picker>
      <view class="bottom-tools">
         <u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;"
            @click="addRentForm">再加一人</u-button>
         <u-button class="btn-item" type="error" @click="isModelShow = true"
            v-if="btnControls.deleteBtn">删除</u-button>
         <u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;" @click="addRentForm">再加一人</u-button>
         <u-button class="btn-item" type="error" @click="isModelShow = true" v-if="btnControls.deleteBtn">删除
         </u-button>
         <u-button class="btn-item" type="success" @click="verify" v-if="btnControls.verifyBtn">确认</u-button>
         <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)"
            @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
         <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)" @click="saveOrUpdate">
            {{ rentId === '' ? "保存" : "确认修改" }}</u-button>
      </view>
      <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
         @cancel="isModelShow = false" @confirm="deleteRent"></u-modal>
@@ -248,8 +247,8 @@
            this.typeShow = true
         },
         //类型选择确认
         typeSelect(e) {
            const [ result ] = e.value
         typeSelect(e) {
            const [result] = e.value
            this[this.selectBusModel] = result.name
            this.form[this.selectBusKey] = result.value
            this.typeShow = !this.typeShow
@@ -300,6 +299,8 @@
            }
         },
         saveOrUpdate() {
            this.form.houseTypeName = this.houseTypeName
            this.form.rentalUseName = this.rentalUseName
            this.$refs.form.validate().then(res => {
               let rentFormValidGroup = []
               this.$refs.rentform.forEach(item => {
@@ -316,9 +317,9 @@
         },
         // 新增操作
         async save() {
            let houseTenantVOList = []
            let householdVOList = []
            this.$refs.rentform.forEach(item => {
               houseTenantVOList.push(item.form)
               householdVOList.push(item.form)
            })
            if (this.form.images.length > 0) {
               let urls = []
@@ -339,7 +340,7 @@
               houseStatus: this.dataList.houseType[statusIndex].value,
               rentalUse: this.dataList.rentalUse[rentalIndex].value,
               fileUrls: this.form.fileUrls,
               houseTenantVOList
               householdVOList
            }
            const {
               code,
@@ -395,9 +396,9 @@
         },
         // 更新操作
         async update() {
            let houseTenantVOList = []
            let householdVOList = []
            this.$refs.rentform.forEach(item => {
               houseTenantVOList.push(item.form)
               householdVOList.push(item.form)
            })
            if (this.form.images.length > 0) {
               let urls = []
@@ -418,7 +419,7 @@
               houseStatus: this.dataList.houseType[statusIndex].value,
               rentalUse: this.dataList.rentalUse[rentalIndex].value,
               fileUrls: this.form.fileUrls,
               houseTenantVOList
               householdVOList
            }
            const res = await updateRetalInfo(data)
            if (res.code !== 200) {
@@ -463,7 +464,7 @@
               rentalUse,
               rentalTime,
               dueTime,
               houseTenantVOList,
               householdVOList,
               fileUrls
            } = houseRentalList.find(item => item.id === this.rentId)
            // 合同展示处理
@@ -488,9 +489,9 @@
            this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
            this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
            this.houseTypeName = this.findObjValue(houseStatus, this.dataList.houseType)
            this.rentFormNum = houseTenantVOList.length
            this.rentFormNum = householdVOList.length
            this.$nextTick(() => {
               houseTenantVOList.forEach((item, index) => {
               householdVOList.forEach((item, index) => {
                  this.$refs.rentform[index].form = item
               })
            })
@@ -623,7 +624,8 @@
         // border-top: 1rpx solid #e4e4e4;
         z-index: 999;
         padding: 20rpx;
            padding-bottom: env(safe-area-inset-bottom);
         padding-bottom: env(safe-area-inset-bottom);
         /deep/ .u-button {
            color: #ffffff;
            font-weight: 700;
@@ -641,4 +643,4 @@
      padding: 5rpx 20rpx;
      border-bottom: 1px solid #eff1f3;
   }
</style>
</style>