230320a303 10 months ago
parent
commit
1ed84ca82d
3 changed files with 123 additions and 26 deletions
  1. 1 1
      src/pagesMore/center/uploadRoom2.jsx
  2. 98 24
      src/pagesRoom/roomPrice2.jsx
  3. 24 1
      src/pagesRoom/roomPrice2.scss

+ 1 - 1
src/pagesMore/center/uploadRoom2.jsx

@@ -1045,7 +1045,7 @@ class Index extends Component {
             onChange={this.baseFormChange.bind(this, 'remarked')}
             maxLength={300}
             height={200}
-            placeholder='仅编辑查看,房源内部备注信息(300字以内)'
+            placeholder='仅编辑查看,房源内部备注信息,看房钥匙或密码等(300字以内)'
           />
         </View>
         <View className="scoped-box">

+ 98 - 24
src/pagesRoom/roomPrice2.jsx

@@ -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) {

+ 24 - 1
src/pagesRoom/roomPrice2.scss

@@ -169,6 +169,10 @@
     text-align: center;
     box-sizing: border-box;
     position: relative;
+    .srp-rate {
+      display: inline-block;
+      vertical-align: middle;
+    }
     .srp-tag {
       position: absolute;
       left: 0;
@@ -356,6 +360,13 @@
   box-sizing: border-box;
   padding: 20px;
   border-radius: 20px;
+  .sf-flex {
+    display: flex;
+    flex-wrap: wrap;
+    .sff-op {
+      width: 50%;
+    }
+  }
   .sf-item {
     border-bottom: 1PX solid #e5e5e5;
     display: flex;
@@ -363,13 +374,18 @@
     font-size: 28px;
     .k {
       color: #666;
-      width: 200px;
+      width: 160px;
       text-align: right;
     }
     .i {
       flex: 1;
       text-align: left;
     }
+    .i1 {
+      flex: 1;
+      text-align: left;
+      border-bottom: 1PX solid #ccc;
+    }
     &.t2 {
       justify-content: center;
     }
@@ -383,6 +399,13 @@
       width: auto;
       text-align: left;
     }
+    .a {
+      color: $mainColor;
+      font-weight: bold;
+      display: inline-block;
+      font-size: 26rpx;
+      text-decoration: underline;
+    }
   }
 }