| | |
| | | |
| | | <u-form labelWidth="70" :model="form" :rules="rules" ref="form"> |
| | | <view class="event-info"> |
| | | <u-form-item class="form-item" labelWidth="120" label="房屋" required prop="currentAddress" |
| | | <u-form-item class="form-item" labelWidth="60" label="房屋" required prop="currentAddress" |
| | | @click="isShowPopup = true"> |
| | | <u--input v-if="!form.currentAddress" border="none" disabled disabledColor="#ffffff" |
| | | placeholder="请选择房屋"> |
| | | </u--input> |
| | | <u-textarea v-if="form.currentAddress" border="none" :disabled="true" |
| | | <u-textarea v-if="form.currentAddress" border="none" :disabled="true" :autoHeight="true" |
| | | disabledColor="#ffffff" v-model="form.currentAddress" placeholder="请选择房屋"> |
| | | </u-textarea> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | |
| | | </u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | |
| | | <u-form-item v-if="form.currentAddress" class="form-item" labelWidth="110" label="业主名称" |
| | | prop="gender"> |
| | | <u--input border="none" v-model="form.houseName" disabled disabledColor="#ffffff"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | <u-form-item v-if="form.currentAddress" class="form-item" labelWidth="110" label="业主电话" |
| | | prop="gender"> |
| | | <u--input border="none" v-model="form.housePhone" disabled disabledColor="#ffffff"> |
| | | </u--input> |
| | | </u-form-item> |
| | | |
| | | </view> |
| | | </u-form> |
| | | |
| | |
| | | getHouseholdDetail, |
| | | saveOrUpdateHousehold, |
| | | removeHousehold, |
| | | saveOrUpdateHouseholdBatch |
| | | saveOrUpdateHouseholdBatch, |
| | | fetchHousehold |
| | | } from '@/api/house/household.js' |
| | | import { |
| | | bizDictionary |
| | |
| | | }, |
| | | |
| | | onShow() { |
| | | console.log(this.form); |
| | | // console.log(this.form); |
| | | if (this.id) { |
| | | // this.getHouseholdInfo() |
| | | this.getHoldLabel(); |
| | |
| | | roleName: uni.getStorageSync("activeRole").roleName, |
| | | addressCode: code || uni.getStorageSync("siteInfo").houseCode, |
| | | }).then(res => { |
| | | console.log(res); |
| | | // console.log(res); |
| | | if (type) { |
| | | if (res.data.isJur = 1) { |
| | | this.houseCode = code; |
| | | this.homeRegion = res.data.townStreetName; |
| | | this.form.currentAddress = res.data.addressName; |
| | | console.log("===>", this.getHouseRegion(res.data.townStreetName)); |
| | | // console.log("===>", this.getHouseRegion(res.data.townStreetName)); |
| | | this.form.homeAdcode = this.getHouseRegion(res.data.townStreetName).code; |
| | | this.homeIndex = this.getHouseRegion(res.data.townStreetName).index; |
| | | if (res.data.userHouseLabelVOList.length) { |
| | |
| | | this.houseCode = code; |
| | | this.homeRegion = res.data.townStreetName; |
| | | this.form.currentAddress = res.data.addressName; |
| | | console.log("===>", this.getHouseRegion(res.data.townStreetName)); |
| | | // console.log("===>", this.getHouseRegion(res.data.townStreetName)); |
| | | this.form.homeAdcode = this.getHouseRegion(res.data.townStreetName).code; |
| | | this.homeIndex = this.getHouseRegion(res.data.townStreetName).index; |
| | | this.getFetchHousehold(code) |
| | | if (res.data.userHouseLabelVOList.length) { |
| | | this.houseTag = res.data.userHouseLabelVOList[0].labelName |
| | | } |
| | |
| | | |
| | | getRegionList() { |
| | | select(361102).then(res => { |
| | | console.log(res); |
| | | // console.log(res); |
| | | if (res.code == 200) { |
| | | this.regionList = res.data; |
| | | } |
| | |
| | | |
| | | getRegionTree(callback) { |
| | | regionTree().then(res => { |
| | | console.log("region ==>", res.data) |
| | | // console.log("region ==>", res.data) |
| | | callback(res.data); |
| | | }) |
| | | }, |
| | | |
| | | regionSelect(e) { |
| | | console.log(e); |
| | | // console.log(e); |
| | | const [result] = e.value; |
| | | this.homeIndex = e.indexs[0]; |
| | | this.homeRegion = result.name; |
| | |
| | | } |
| | | }) |
| | | }, |
| | | // 查询住户 |
| | | getFetchHousehold(houseCode) { |
| | | fetchHousehold({ |
| | | houseCode: houseCode, |
| | | relationship: 1 |
| | | }).then((res) => { |
| | | // console.log("********************" + JSON.stringify(res)) |
| | | if (res.data.length > 0) { |
| | | let datas = res.data[0] |
| | | console.log("********************" + JSON.stringify(datas)) |
| | | this.form.houseName = datas.name |
| | | this.form.housePhone = datas.phoneNumber |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 显示选择弹框 |
| | | showSelectBus(title, key) { |
| | |
| | | }) |
| | | }, |
| | | handleData(res) { |
| | | console.log("-----------" + res) |
| | | // console.log("-----------" + res) |
| | | if (res) { |
| | | this.saveOrUpdate(); |
| | | } |
| | |
| | | if (i.userHouseLabelVOList.length) { |
| | | this.houseTag = i.userHouseLabelVOList[0].labelName; |
| | | } |
| | | this.getFetchHousehold(i.houseCode) |
| | | this.isShowPopup = false; |
| | | }, |
| | | |