| | |
| | | @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>
|
| | |
| | | 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
|
| | |
| | | }
|
| | | },
|
| | | saveOrUpdate() {
|
| | | this.form.houseTypeName = this.houseTypeName
|
| | | this.form.rentalUseName = this.rentalUseName
|
| | | this.$refs.form.validate().then(res => {
|
| | | let rentFormValidGroup = []
|
| | | this.$refs.rentform.forEach(item => {
|
| | |
| | | },
|
| | | // 新增操作
|
| | | 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 = []
|
| | |
| | | houseStatus: this.dataList.houseType[statusIndex].value,
|
| | | rentalUse: this.dataList.rentalUse[rentalIndex].value,
|
| | | fileUrls: this.form.fileUrls,
|
| | | houseTenantVOList
|
| | | householdVOList
|
| | | }
|
| | | const {
|
| | | code,
|
| | |
| | | },
|
| | | // 更新操作
|
| | | 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 = []
|
| | |
| | | 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) {
|
| | |
| | | rentalUse,
|
| | | rentalTime,
|
| | | dueTime,
|
| | | houseTenantVOList,
|
| | | householdVOList,
|
| | | fileUrls
|
| | | } = houseRentalList.find(item => item.id === this.rentId)
|
| | | // 合同展示处理
|
| | |
| | | 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
|
| | | })
|
| | | })
|
| | |
| | | // 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;
|
| | |
| | | padding: 5rpx 20rpx;
|
| | | border-bottom: 1px solid #eff1f3;
|
| | | }
|
| | | </style> |
| | | </style> |