corala 2 лет назад
Родитель
Сommit
92ec7d595b
4 измененных файлов: 70 добавлений и 48 удалений
  1. +7
    -5
      src/pages/my/electContract.vue
  2. +13
    -5
      src/pages/otherPage/rent.vue
  3. +12
    -2
      src/pages/otherPage/rentDetail.vue
  4. +38
    -36
      src/pages/otherPage/shouding.vue

+ 7
- 5
src/pages/my/electContract.vue Просмотреть файл

@@ -361,6 +361,7 @@
onLoad(options) {
if (options.id){
this.roomId = options.id;
this.roomNum = options.roomNum;
}else{
this.electContractInfo = uni.getStorageSync('electContractInfo');
uni.removeStorageSync('electContractInfo');
@@ -540,14 +541,15 @@
submit1(){
this.$u.api.deal({body:{contractId: this.contractId}}).then((res)=>{
if(res.ErrNo =='0000'){
this.$refs.uToast.show({
title: res.ErrMsg
uni.showToast({
title: res.ErrMsg,
icon: 'none'
})
setTimeout(()=>{
uni.navigateBack({
delta: 1
uni.navigateTo({
url: '/pages/otherPage/rent'
});
},1000)
},2000)
}
})
},


+ 13
- 5
src/pages/otherPage/rent.vue Просмотреть файл

@@ -11,7 +11,7 @@
<view class="select-item" @click="buildTypeShow=true">房型</view>
<view class="select-item" @click="houseTypeShow=true">户型</view>
</view>
<view class="list-box">
<view :refresher-threshold="100" :scroll-top="scrolltop" refresher-enabled="true" class="list-box" scroll-y="true" >
<view class="list-item" @click="topage(item)" v-for="(item,index) in listData" :key="index">
<!-- roomFlag 1转租、2违约 -->
<view class="mark" v-if="item.roomFlag==1">转租</view>
@@ -34,9 +34,9 @@
正在加载中
</view>
<view class="empty-box" v-if="listData.length==0&&!loading">
<image class="img" src="http://images.2weisou.com/20221031114904TSF6jF4S.png" mode=""/>
<view class="no-data">暂无数据</view>
</view>
<image class="img" src="http://images.2weisou.com/20221031114904TSF6jF4S.png" mode=""/>
<view class="no-data">暂无数据</view>
</view>
</view>
<!-- 位置 -->
<u-popup v-model="addressShow" mode="top">
@@ -127,13 +127,18 @@
listData: [],
pageNo: 1,
pageSize: 10,
loadDone: false,
loadDone: false
};
},
created(){
},
onShow(){
this.position_roomNum = uni.getStorageSync('position_roomNum')
uni.removeStorageSync('position_roomNum')
if(this.position_roomNum){
this.keyword = this.position_roomNum
}
this.pageNo = 1
this.listData = []
this.loadDone = false
@@ -257,6 +262,7 @@
// console.log(res)
this.loading = false;
if(res.result&&res.result.length){
if(this.pageNo==1){
this.listData = res.result
}else{
@@ -283,6 +289,7 @@
<style lang="scss" scoped>
.container{
width: 750rpx;
overflow-y: auto;
min-height: 100vh;
.top-box{
padding: 0 30rpx;
@@ -326,6 +333,7 @@
}
.list-box{
padding: 30rpx;
height: calc(100vh - var(--status-bar-height) - 78rpx - 92rpx);
.list-item{
width: 690rpx;
height: 202rpx;


+ 12
- 2
src/pages/otherPage/rentDetail.vue Просмотреть файл

@@ -28,7 +28,7 @@
<view class="bot-cont">
<view class="item-btn color1" @click="topage()">改价历史</view>
<view class="item-btn color2" @click="topage('my/changePrice_check')">改价审核</view>
<view class="item-btn color3" @click="topage('my/electContract')">成交合同</view>
<view class="item-btn color3" @click="tohtpage('my/electContract')">成交合同</view>
</view>
</view>
<view class="detail-info">
@@ -65,7 +65,7 @@
<view class="item-text">门锁密码</view>
</view>
<view class="line"></view>
<view class="item" v-if="roomInfo.rentPeriod!=1" @click="topage('otherPage/shouding')">
<view class="item" v-if="roomInfo.rentPeriod!=1" @click="toShoudingPage('otherPage/shouding')">
<image class="item-icon" src="/static/czDetail/money1.png" mode="" />
<view class="item-text">收定</view>
</view>
@@ -122,6 +122,16 @@
url: "/pages/" + page +'?id='+this.roomId,
});
},
toShoudingPage(page){
uni.navigateTo({
url: "/pages/" + page +'?id='+this.roomId+'&roomNum='+this.roomInfo.roomNum
});
},
tohtpage(page){
uni.navigateTo({
url: "/pages/" + page +'?id='+this.roomId+'&roomNum='+this.roomInfo.roomNum
});
},
tomap(info){
const latitude = 39.9219
const longitude = 116.44355


+ 38
- 36
src/pages/otherPage/shouding.vue Просмотреть файл

@@ -60,24 +60,25 @@
<view class="item">
<view class="label">租约期限</view>
<view class="input" >
<u-input height="100" @click="openCalendar(0)" disabled input-align="right" v-model="form.starDate" placeholder="请选择开始时间"></u-input>
<image class="calendar" @click="openCalendar(0)" src="/static/kehu/calendar.png" mode=""/>
<u-calendar :min-date="form.mindate" :max-date="form.maxdate" v-model="calendarShow1" mode="date" @change="dateConfirm1"></u-calendar>
<u-input height="100" @click="calendarShow1=true" disabled input-align="right" v-model="form.starDate" placeholder="请选择开始时间"></u-input>
<image class="calendar" @click="calendarShow1=true" src="/static/kehu/calendar.png" mode=""/>
<u-picker mode="time" confirm-color="#FF6D25" :default-time="form.starDate" v-model="calendarShow1" :params="params" @confirm="dateConfirm1"></u-picker>
</view>
</view>
<view class="item">
<view class="label">至</view>
<view class="input" >
<u-input height="100" @click="openCalendar(1)" disabled input-align="right" v-model="form.endDate" placeholder="请选择结束时间"></u-input>
<image class="calendar" @click="openCalendar(1)" src="/static/kehu/calendar.png" mode=""/>
<u-input height="100" @click="calendarShow2= true" disabled input-align="right" v-model="form.endDate" placeholder="请选择结束时间"></u-input>
<image class="calendar" @click="calendarShow2= true" src="/static/kehu/calendar.png" mode=""/>
<u-picker mode="time" confirm-color="#FF6D25" :default-time="form.endDate" v-model="calendarShow2" :params="params" @confirm="dateConfirm2"></u-picker>
</view>
</view>
<view class="item">
<view class="label">签约时间</view>
<view class="input" >
<u-input height="100" @click="calendarShow2 = true" disabled input-align="right" v-model="form.rent_date" placeholder="请选择签约时间"></u-input>
<image class="calendar" @click="calendarShow2 = true" src="/static/kehu/calendar.png" mode=""/>
<u-calendar v-model="calendarShow2" maxdate='2099-12-31' mode="date" @change="dateConfirm2"></u-calendar>
<u-input height="100" @click="calendarShow3 = true" disabled input-align="right" v-model="form.rent_date" placeholder="请选择签约时间"></u-input>
<image class="calendar" @click="calendarShow3 = true" src="/static/kehu/calendar.png" mode=""/>
<u-picker mode="time" confirm-color="#FF6D25" :default-time="form.rent_date" v-model="calendarShow3" :params="params" @confirm="dateConfirm3"></u-picker>
</view>
</view>
</view>
@@ -88,10 +89,14 @@
export default {
data() {
return {
mindate: '',
maxdate: '2099-12-31',
params: {
year: true,
month: true,
day: true
},
calendarShow1: false,
calendarShow2: false,
calendarShow3: false,
payTypeShow: false,
form: {
customerName: '',
@@ -126,53 +131,41 @@
label: '年付'
},
],
type:0,
customStyle:{
maxHeight:'200rpx',
padding: '20rpx',
fontSize: '30rpx',
borderBottom:'1px solid #e0e0e0'
},
roomId: ''
roomId: '',
roomNum: ''
};
},
onLoad(options) {
this.roomId = options.id;
this.roomNum = options.roomNum;
},
onShow() {
},
methods: {
openCalendar(type){
if(type==0){
this.type = 0
this.form.mindate = ''
this.form.maxdate = this.form.endDate
}else{
this.type = 1
this.form.mindate = this.form.starDate
this.form.maxdate = '2099-12-31'
}
this.calendarShow1 = true;
},
// 租约期限
dateConfirm1(e){
if(this.type==0){
this.form.starDate = e.result
}else{
this.form.endDate = e.result
}
this.form.starDate = e.year + '-'+e.month + '-'+e.day
},
// 租约期限
dateConfirm2(e){
this.form.rent_date = e.result
this.form.endDate = e.year + '-'+e.month + '-'+e.day
},
// 签约时间
dateConfirm3(e){
this.form.rent_date = e.year + '-'+e.month + '-'+e.day
},
confirmPaytype(e){
console.log(e)
this.form.payment_way = e[0].value
this.form.payTypeName = e[0].label
},
submit() {
let body={
// "companyId": 22,
let body = {
"roomId": this.roomId,
"customerName": this.form.customerName,
"customerTel": this.form.mobile,
@@ -185,11 +178,20 @@
"rent_date_start":this.form.starDate,
"rent_date_end": this.form.endDate,
"rent_date": this.form.rent_date,
"idno": this.form.idno,
"idno": this.form.idno
}
this.$u.api.appSave({body:body}).then((res)=>{
if(res.ErrNo=='0000'){
uni.navigateBack()
uni.showToast({
title: res.ErrMsg,
icon: 'none'
})
uni.setStorageSync('position_roomNum',this.roomNum)
setTimeout(()=>{
uni.navigateTo({
url: '/pages/otherPage/rent'
});
},2000)
}
})
},


Загрузка…
Отмена
Сохранить