|
@@ -1,9 +1,9 @@
|
|
|
import Taro, { Component } from '@tarojs/taro'
|
|
|
-import { View } from '@tarojs/components'
|
|
|
+import { Navigator, View } from '@tarojs/components'
|
|
|
import LoginJudge from '@/c/login/Judge'
|
|
|
import WaterMark from '@/c/waterMark'
|
|
|
import { arrToObj } from '@utils'
|
|
|
-import { AtTabs } from 'taro-ui'
|
|
|
+import { AtTabs, AtRate } from 'taro-ui'
|
|
|
|
|
|
import Chat from '@/c/chat/com'
|
|
|
import './roomPrice2.scss'
|
|
@@ -28,6 +28,7 @@ class Index extends Component {
|
|
|
isNavPopupShow: false,
|
|
|
navObj: {},
|
|
|
edRoomList: [],
|
|
|
+ roomDtlObj: {},
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -256,7 +257,14 @@ class Index extends Component {
|
|
|
: ''
|
|
|
}
|
|
|
<View className="srp-room">
|
|
|
- <View className="srpr-p1">{`${cArr.length - oIndex}0${tIndex+1}`}</View>
|
|
|
+ <View className="srpr-p1">
|
|
|
+ {
|
|
|
+ curTwo.house_level
|
|
|
+ ?
|
|
|
+ <AtRate size='12' className='srp-rate' max={curTwo.house_level} value={curTwo.house_level} />
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ {`${cArr.length - oIndex}0${tIndex+1}`}</View>
|
|
|
{
|
|
|
curTwo.id
|
|
|
?
|
|
@@ -370,6 +378,15 @@ class Index extends Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ rateChange (v) {
|
|
|
+ let { curRoomObj } = this.state
|
|
|
+ curRoomObj.house_level = v
|
|
|
+ this.setState({
|
|
|
+ curRoomObj
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
renderDtl () {
|
|
|
const { isDtlShow, curRoomObj, curObj } = this.state
|
|
|
return (
|
|
@@ -378,26 +395,63 @@ class Index extends Component {
|
|
|
<View className='lmb-body'>
|
|
|
<View className="scoped-form">
|
|
|
<View className="sf-item t2">
|
|
|
- <View className="k2">{`${curObj.building}栋${curObj.unit}单元`} {curRoomObj.storey}层{curRoomObj.room}</View>
|
|
|
- </View>
|
|
|
- <View className="sf-item t2">
|
|
|
- <View className="k2">房屋面积</View>
|
|
|
- <Input className="i2" type='number' placeholder='' value={curRoomObj.built} onInput={this.roomChange.bind(this, 'built')} />
|
|
|
- <View className="k2">㎡</View>
|
|
|
- </View>
|
|
|
- <View className="sf-item t2">
|
|
|
- <View className="k2">最新挂总价</View>
|
|
|
- <Input className="i2" type='number' placeholder='' value={curRoomObj.listing_price} onInput={this.roomChange.bind(this, 'listing_price')} />
|
|
|
- <View className="k2">万元</View>
|
|
|
+ <View className="k2">
|
|
|
+ <AtRate max={3} value={curRoomObj.house_level} onChange={this.rateChange.bind(this)}/>
|
|
|
+ {`${curObj.building}栋${curObj.unit}单元`} {curRoomObj.storey}层{curRoomObj.room}
|
|
|
+ {
|
|
|
+ curRoomObj.es_house_id
|
|
|
+ ?
|
|
|
+ <Navigator url={'/pagesRoom/dtl?id='+curRoomObj.es_house_id} className="a">[房源详情{curRoomObj.es_house_id}]</Navigator>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- <View className="sf-item t2">
|
|
|
- <View className="k2">成交价[选填]</View>
|
|
|
- <Input className="i2" type='number' placeholder='' value={curRoomObj.final_price} onInput={this.roomChange.bind(this, 'final_price')} />
|
|
|
- <View className="k2">万元</View>
|
|
|
+ <View className="sf-flex">
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">房屋面积</View>
|
|
|
+ <Input className="i2" type='number' placeholder='' value={curRoomObj.built} onInput={this.roomChange.bind(this, 'built')} />
|
|
|
+ <View className="k2">㎡</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">成交价</View>
|
|
|
+ <Input className="i2" type='number' placeholder='' value={curRoomObj.final_price} onInput={this.roomChange.bind(this, 'final_price')} />
|
|
|
+ <View className="k2">万元</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">挂牌总价</View>
|
|
|
+ <Input className="i2" type='number' placeholder='' value={curRoomObj.listing_price} onInput={this.roomChange.bind(this, 'listing_price')} />
|
|
|
+ <View className="k2">万元</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">房东底价</View>
|
|
|
+ <Input className="i2" type='number' placeholder='' value={curRoomObj.owner_price} onInput={this.roomChange.bind(this, 'owner_price')} />
|
|
|
+ <View className="k2">万元</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">房东姓名</View>
|
|
|
+ <Input className="i1" placeholder='' value={curRoomObj.owner} onInput={this.roomChange.bind(this, 'owner')} />
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <View className="sff-op">
|
|
|
+ <View className="sf-item t2">
|
|
|
+ <View className="k2">房东电话</View>
|
|
|
+ <Input className="i1" type='number' placeholder='' value={curRoomObj.owner_phone} onInput={this.roomChange.bind(this, 'owner_phone')} />
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
+
|
|
|
<View className="sf-item">
|
|
|
- <View className="k">备注:</View>
|
|
|
- <Input className="i" type='number' placeholder='请输入' value={curRoomObj.remark} onInput={this.roomChange.bind(this, 'remark')} />
|
|
|
+ <View className="k2">备注:</View>
|
|
|
+ <Input className="i" placeholder='看房钥匙或密码' value={curRoomObj.remark} onInput={this.roomChange.bind(this, 'remark')} />
|
|
|
</View>
|
|
|
<View className="l-floor-footer t2">
|
|
|
<View className="lff-flex">
|
|
@@ -437,10 +491,26 @@ class Index extends Component {
|
|
|
let curRoomObj = {...two}
|
|
|
if (!curRoomObj.room) curRoomObj.room = `${cArr.length - oIndex}0${tIndex+1}`
|
|
|
if (!curRoomObj.storey) curRoomObj.storey = `${cArr.length - oIndex}`
|
|
|
- this.setState({
|
|
|
- curRoomObj,
|
|
|
- isDtlShow: true
|
|
|
- })
|
|
|
+ // console.log(curRoomObj)
|
|
|
+ // //
|
|
|
+ if (curRoomObj.es_house_id) {
|
|
|
+ Taro.api.room.apieshousedetail({id: curRoomObj.es_house_id}).then(res => {
|
|
|
+ const rObj = res || {}
|
|
|
+ curRoomObj.owner_price = rObj.floor_price
|
|
|
+ curRoomObj.owner = rObj.owner
|
|
|
+ curRoomObj.owner_phone = rObj.owner_phone
|
|
|
+ curRoomObj.remark = rObj.remarked
|
|
|
+ this.setState({
|
|
|
+ curRoomObj,
|
|
|
+ isDtlShow: true
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ curRoomObj,
|
|
|
+ isDtlShow: true
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
closeRulePopup (str) {
|
|
|
const {eId} = this.$router.params
|
|
@@ -454,6 +524,10 @@ class Index extends Component {
|
|
|
built: curRoomObj.built || '',
|
|
|
listing_price: curRoomObj.listing_price || '',
|
|
|
final_price: curRoomObj.final_price || '',
|
|
|
+ owner: curRoomObj.owner || '',
|
|
|
+ owner_phone: curRoomObj.owner_phone || '',
|
|
|
+ house_level: curRoomObj.house_level || '',
|
|
|
+ owner_price: curRoomObj.owner_price || '',
|
|
|
remark: curRoomObj.remark || '',
|
|
|
}
|
|
|
if (!params.built) {
|