浏览代码

temp save

230320a303 11 月之前
父节点
当前提交
fbae36da98

+ 26 - 1
src/api/room.js

@@ -93,4 +93,29 @@ export default {
   apirenthouseedit: params => { // 二手房 出租 编辑
     return request('/api/rent/house/edit', params, 'loading')
   },
-}
+  apibuildingunitlist: params => { // 房源表 单元 列表
+    return request('/api/building/unit/list', params, 'loading')
+  },
+  apibuildingunitdel: params => { // 房源表 单元 删除
+    return request('/api/building/unit/del', params, 'loading')
+  },
+  apibuildingunitadd: params => { // 房源表 单元 添加
+    return request('/api/building/unit/add', params, 'loading')
+  },
+  apibuildingunitedit: params => { // 房源表 单元 编辑
+    return request('/api/building/unit/edit', params, 'loading')
+  },
+  apieshousepricelist: params => { // 房源表 房源价格单个 列表
+    return request('/api/es/house/price/list', params, 'loading')
+  },
+  apieshousepriceadd: params => { // 房源表 房源价格单个 添加
+    return request('/api/es/house/price/add', params, 'loading')
+  },
+  apieshousepriceedit: params => { // 房源表 房源价格单个 编辑
+    return request('/api/es/house/price/edit', params, 'loading')
+  },
+  apieshousepricedel: params => { // 房源表 房源价格单个 删除
+    return request('/api/es/house/price/del', params, 'loading')
+  },
+}
+

+ 1 - 0
src/app.jsx

@@ -146,6 +146,7 @@ class App extends Component {
           'rentUpload',
           'dtl',
           'roomPrice',
+          'roomPrice2',
           'roomPriceXk',
           // 'roomPriceEdit',
           'roomPriceImg',

+ 4 - 1
src/app.scss

@@ -19,6 +19,9 @@
     height: 120px;
     z-index: 99;
     overflow: hidden;
+    &.b2 {
+      bottom: 300px;
+    }
     &.t2 {
       bottom: auto;
       top: 400px;
@@ -127,7 +130,7 @@ pendant {
 
 .g-fixed-top-left {
   position: fixed;
-  top: 50px;
+  top: 90px;
   left: 20px;
   width: 64px;
   height: 64px;

二进制
src/assets/img/images/icon_g_share6s2.png


+ 34 - 9
src/pagesHouse/indexDtl.jsx

@@ -850,6 +850,27 @@ class Index extends Component {
     )
   }
 
+
+  renderEntryYH2 () {
+    const i1 = require('./img/yfyj/yfyj01.png')
+    const i2 = require('./img/yfyj/yfyj02.png')
+    const bg = require('./img/yfyj/yfyj03s.jpg')
+    const { curObj } = this.state
+    const lotteryObj = curObj.estate_lottery || {}
+    const { userInfo } = this.state
+    const uInfo = userInfo || Taro.getStorageSync('APP_userInfo')
+    console.log(uInfo.is_sale)
+    return (
+      <View className={uInfo.is_sale == 1 ? 'scoped-entry-yh' : 'scoped-entry-yh hide'}>
+        <Navigator url={`/pagesRoom/roomPrice2?eId=${curObj.id}&name=${curObj.estate_name}&id=${lotteryObj.id}`} className="sey-wrap">
+          <View className="sey-img">
+            <Image className="img" src={bg}></Image>
+          </View>
+        </Navigator>
+      </View>
+    )
+  }
+
   renderEntryYH () {
     const i1 = require('./img/yfyj/yfyj01.png')
     const i2 = require('./img/yfyj/yfyj02.png')
@@ -866,11 +887,11 @@ class Index extends Component {
           <Navigator url={`/pagesRoom/roomPriceXk?eId=${curObj.id}&name=${curObj.estate_name}&id=${lotteryObj.id}`} className="sey-wrap">
             <View className="sey-p1">
               <Image className="i" src={i1}></Image>
-              <View className="t">{lotteryObj.under_way}</View>
+              <View className="t">最新更新:{lotteryObj.building_num}</View>
             </View>
             <View className="sey-p1">
               <Image className="i" src={i2}></Image>
-              <View className="t2">{lotteryObj.lottery_time}</View>
+              <View className="t2">{lotteryObj.update_at}</View>
             </View>
             <View className="sey-img">
               <Image className="img" src={bg}></Image>
@@ -880,11 +901,11 @@ class Index extends Component {
           <Navigator url={`/pagesRoom/roomPrice?eId=${curObj.id}&name=${curObj.estate_name}&id=${lotteryObj.id}`} className="sey-wrap">
             <View className="sey-p1">
               <Image className="i" src={i1}></Image>
-              <View className="t">{lotteryObj.under_way}</View>
+              <View className="t">最新更新:{lotteryObj.building_num}</View>
             </View>
             <View className="sey-p1">
               <Image className="i" src={i2}></Image>
-              <View className="t2">{lotteryObj.lottery_time}</View>
+              <View className="t2">{lotteryObj.update_at}</View>
             </View>
             <View className="sey-img">
               <Image className="img" src={bg}></Image>
@@ -1111,11 +1132,6 @@ class Index extends Component {
             }
             
             {/* {
-              YH === 'yhjg'
-              &&
-              this.renderYH()
-            } */}
-            {
               lotteryObj.lottery_res
               ? this.renderYH()
               :
@@ -1123,6 +1139,15 @@ class Index extends Component {
               ?
               this.renderEntryYH()
               : ''
+            } */}
+            {
+              curObj.estate_tag === '二手'
+              ? this.renderEntryYH2()
+              :
+              lotteryObj.building_num
+              ?
+              this.renderEntryYH()
+              : ''
             }
             {this.renderEntry()}
             {this.renderOptionsInfo()}

+ 3 - 0
src/pagesHouse/indexDtl.scss

@@ -352,6 +352,9 @@ page {
 
 
 .scoped-entry-yh {
+  &.hide {
+    display: none;
+  }
   .sey-wrap {
     background: #fff;
     padding: 20px 0 0;

+ 2 - 1
src/pagesHouse/vrList.jsx

@@ -47,6 +47,7 @@ class Index extends Component {
     const { curId } = this.state
     Taro.api.house.apiestatevrhistorylist({estate_id: curId}).then(res => {
       let list = res.list || []
+      console.log(res)
       this.setState({
         dataList: list
       })
@@ -83,7 +84,7 @@ class Index extends Component {
   linkVrDtl (item) {
     const { id, estateName, eid } = this.$router.params
     Taro.navigateTo({
-      url: `/pagesHouse/vr?eid=${eid}&id=${id}&estateName=${estateName}`
+      url: `/pagesHouse/vr?eid=${eid}&id=${item.vr_key}&estateName=${estateName}`
     })
   }
 

+ 39 - 15
src/pagesRoom/dtl.jsx

@@ -48,7 +48,8 @@ class Index extends Component {
       curObj: {},
       curImgIndex: 0,
       // curShareCardImg: require('./img/dtl/bg_room_dtl.png')
-      curShareCardImg: ''
+      curShareCardImg: '',
+      curShareCardImgType: '',
     }
   }
 
@@ -289,7 +290,7 @@ class Index extends Component {
         <View className="sm-tags">
           {
             appUserInfo.is_sale == 1
-            ? <Navigator url={`/pagesRoom/follow/room?id=${curObj.id}`} className="s s2">跟进记录</Navigator>
+            ? <Navigator url={`/pagesRoom/follow/room?id=${curObj.id}`} className="s s2">{curObj.id}跟进记录</Navigator>
             : ''
           }
           {
@@ -338,7 +339,7 @@ class Index extends Component {
           </View>
           <View className="op">
             <View className="k">交房</View>
-            <View className="v">{curObj.delivery_at}</View>
+            <View className="v">{curObj.delivery_at || '未知'}</View>
           </View>
           <View className="op">
             <View className="k">电梯</View>
@@ -694,15 +695,19 @@ class Index extends Component {
   // }
 
 
-  async drawAndShareImage () {
-    const { curObj, curShareCardImg } = this.state
+  async drawAndShareImage (str) {
+    const { curObj, curShareCardImg, curShareCardImgType } = this.state
     if (curShareCardImg) {
-      wx.showShareImageMenu({
-        path: curShareCardImg,
-        success: res => {
-          console.log(res, 22);
-        }
-      })
+      if (curShareCardImgType === str) {
+        wx.showShareImageMenu({
+          path: curShareCardImg,
+          success: res => {
+            console.log(res, 22);
+          }
+        })
+      } else {
+        Taro.$msgConfirm('请返回上一层页面,再重新进入当前页面生成图片~')
+      }
       return
     }
     const imageArr = curObj.images.split(',')
@@ -760,10 +765,16 @@ class Index extends Component {
 
     
     that.drawText(ctx, '#333', curObj.title.length > 25 ? curObj.title.substring(0, 25) + '...' : curObj.title, 98, 846, '18px')
-    if (curObj.estate_name.length > 7) {
-      that.drawText(ctx, '#333', curObj.estate_name, 80, 220, 'normal bold 36px')
+    if (str === 'hide') {
+      that.drawText(ctx, '#333', '详情咨询巴老师', 80, 220, 'normal bold 40px')
     } else {
-      that.drawText(ctx, '#333', curObj.estate_name, 80, 220, 'normal bold 56px')
+      if (curObj.estate_name.length > 10) {
+        that.drawText(ctx, '#333', curObj.estate_name, 80, 220, 'normal bold 26px')
+      } else if (curObj.estate_name.length > 7) {
+        that.drawText(ctx, '#333', curObj.estate_name, 80, 220, 'normal bold 36px')
+      } else {
+        that.drawText(ctx, '#333', curObj.estate_name, 80, 220, 'normal bold 56px')
+      }
     }
 
 
@@ -797,8 +808,10 @@ class Index extends Component {
       encoding: 'base64',
       success: res => {
         that.setState({
+          curShareCardImgType: str,
           curShareCardImg: filePath
         })
+        ctx.clearRect(0, 0, cvs.width, cvs.height)
         Taro.hideLoading()
         wx.showShareImageMenu({
           path: filePath,
@@ -831,7 +844,16 @@ class Index extends Component {
   renderShare () {
     const iconShare = require('@img/images/icon_g_share6s.png')
     return (
-      <Button className="g-icon-share btn-to-div" onClick={this.drawAndShareImage.bind(this)}>
+      <Button className="g-icon-share btn-to-div" onClick={this.drawAndShareImage.bind(this, 'normal')}>
+        <Image className="img" src={iconShare} />
+      </Button>
+    )
+  }
+
+  renderShare2 () {
+    const iconShare = require('@img/images/icon_g_share6s2.png')
+    return (
+      <Button className="g-icon-share b2 btn-to-div" onClick={this.drawAndShareImage.bind(this, 'hide')}>
         <Image className="img" src={iconShare} />
       </Button>
     )
@@ -867,6 +889,7 @@ class Index extends Component {
 
 
   render () {
+    const userInfo = Taro.getStorageSync('APP_userInfo') || {}
     const { curObj } = this.state
     return (
       <View className="l-box has-footer">
@@ -879,6 +902,7 @@ class Index extends Component {
         {this.renderSale()}
         {this.renderPopup()}
         {this.renderShare()}
+        {userInfo.is_sale == 1 ? this.renderShare2() : ''}
       </View>
     )
   }

+ 4 - 0
src/pagesRoom/dtl.scss

@@ -141,6 +141,10 @@ page {
         color: #fff;
         background: #13CE66;
       }
+      &.s3 {
+        color: #fff;
+        background: #FFC82C;
+      }
     }
   }
   .sm-title {

+ 500 - 0
src/pagesRoom/roomPrice2.jsx

@@ -0,0 +1,500 @@
+import Taro, { Component } from '@tarojs/taro'
+import { 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 Chat from '@/c/chat/com'
+import './roomPrice2.scss'
+import room from '../api/room'
+
+class Index extends Component {
+
+  constructor (props) {
+    super(props)
+    const {eId: curId} = this.$router.params
+    this.state = {
+      curId,
+      curObj: {},
+      curNav: 0,
+      buildingNumList: [],
+      roomArr: [],
+      curRoomObj: {},
+      houseSaleStateArr: ['未售', '小定', '已定', '已售', '洪楼售'],
+      isDtlShow: false,
+      allData: {},
+      isEdit: false,
+      isNavPopupShow: false,
+      navObj: {},
+      edRoomList: [],
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '二手房房源表',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    this.getNavInfo()
+  }
+
+  getNavInfo = () => {
+    const { eId } = this.$router.params
+    const { curNav } = this.state
+    Taro.api.room.apibuildingunitlist({
+      page_size: 1000,
+      estate_id: eId,
+    }).then(res => {
+      const buildingNumList = res.list || []
+      this.setState({
+        buildingNumList,
+        curObj: buildingNumList[curNav]
+      }, () => {
+        this.getRoomList()
+      })
+    })
+  }
+  
+
+
+  refChat = (ref) => {
+    this.subChat = ref
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+  renderTop () {
+    const {eId, id, name} = this.$router.params
+    const { curNav, buildingNumList, isEdit } = this.state
+    const newTabList = buildingNumList.map(item => {
+      return {
+        title: `${item.building}栋${item.unit}单元`,
+      }
+    })
+    const nameIcon = require('./img/yfyj/yfyj04.png')
+    return (
+      <View className="scoped-header">
+        <View className="scoped-top">
+          <View className="st-wrap">
+            <View className="st-header">
+              <View className="text">
+                <Image src={nameIcon} className="i"></Image>
+                <View className="t">{name}</View>
+              </View>
+              <View className="r" onClick={this.openNavPopup.bind(this)}>添加楼栋</View>
+              {
+                isEdit ? (
+                  <View className="r2 t2" onClick={this.changeNavTab.bind(this)}>展示</View>
+                ) : (
+                  <View className="r2" onClick={this.changeNavTab.bind(this)}>编辑</View>
+                )
+              }
+            </View>
+          </View>
+        </View>
+        <View className="sh-nav">
+          <AtTabs
+            current={curNav}
+            scroll
+            tabList={newTabList}
+            onClick={this.navClick.bind(this)}>
+          </AtTabs>
+        </View>
+      </View>
+    )
+  }
+  openNavPopup (str) {
+    this.setState({
+      isNavPopupShow: true
+    })
+    if (str === 'edit') {
+      const { buildingNumList, curNav } = this.state
+      this.setState({
+        navObj: buildingNumList[curNav]
+      })
+    } else {
+      this.setState({
+        navObj: {}
+      })
+    }
+  }
+  closeNavPopup (str) {
+    this.setState({
+      isNavPopupShow: false
+    })
+    if (str === 'edit') {
+      const { eId } = this.$router.params
+      let { navObj, isEdit } = this.state
+      let apiStr = 'apibuildingunitadd'
+      let params = {
+        estate_id: eId,
+        building: navObj.building || '',
+        unit: navObj.unit || '',
+        total_floor: navObj.total_floor || '',
+        room_num: navObj.room_num || '',
+        remark: navObj.remark || '',
+      }
+      if (isEdit) {
+        apiStr = 'apibuildingunitedit'
+        params.id = navObj.id
+      }
+      Taro.api.room[apiStr](params).then(res => {
+        this.getNavInfo()
+      })
+    }
+  }
+
+
+
+
+
+  changeNavTab () {
+    const { isEdit } = this.state
+    this.setState({
+      isEdit: !isEdit
+    })
+  }
+
+  urlLink (u, params) {
+    if (u === 'dev') {
+      Taro.$msg('开发中~敬请期待')
+    } else {
+      let url = u
+      if (params) url += `?${params}`
+      Taro.navigateTo({
+        url
+      })
+    }
+  }
+  navClick (value) {
+    const { isEdit } = this.state
+    this.setState({
+      curNav: value
+    }, () => {
+      if (isEdit) {
+        this.openNavPopup('edit')
+      } else {
+        this.getNavInfo()
+      }
+    })
+  }
+  renderQrcode () {
+    const qrcodeImg = 'http://icon.honglounews.com/miniqrcode.jpg'
+    return (
+      <Image src={qrcodeImg} className="scoped-qrcode"  onClick={this.previewQrcodeImageHandle.bind(this, qrcodeImg, [qrcodeImg])} />
+    )
+  }
+  previewQrcodeImageHandle (current, urls) {
+    Taro.previewImage({
+      current,
+      urls
+    })
+  }
+  //  
+  urlDtlLink () {
+    const { eId } = this.$router.params
+    Taro.navigateTo({url: '/pagesHouse/indexDtl?id=' + eId + '&YH=zzyh'})
+  }
+
+  create2DArray(x, y) {
+    let array = new Array(x).fill({data: new Array(y).fill({house_sale_state: ''})})
+    return array
+  }
+  
+  renderInfo () {
+    const { curObj, edRoomList } = this.state
+    let cArr = this.create2DArray(curObj.total_floor, curObj.room_num) || []
+    return (
+      <View className="scoped-room-price">
+        {
+          cArr.map((one, oIndex) => {
+            return (
+              <View className="srp-row" key={oIndex}>
+                <View className="srp-col">{cArr.length - oIndex}层</View>
+                {
+                  one.data
+                  ?
+                  one.data.map((two, tIndex) => {
+                    const oneDataLength = one.data.length
+                    let boxClassStr2 = `'srp-col num'${oneDataLength}`
+                    const room = `${cArr.length - oIndex}0${tIndex+1}`
+                    let curTwo = {...two}
+                    edRoomList.forEach(r => {
+                      if (r.room === room) {
+                        curTwo = {...r}
+                      }
+                    })
+                    if (curTwo.final_price) boxClassStr2 = `'srp-col t4 num'${oneDataLength}`
+                    return (
+                      <View className={boxClassStr2} key={tIndex} onClick={this.openDtlPopup.bind(this, curTwo, cArr, oIndex, tIndex)}>
+                        {
+                          curTwo.final_price
+                          ? 
+                          <View className="srp-tag">已售</View>
+                          : ''
+                        }
+                        {
+                          two.toward
+                          ?
+                          <View className="srp-tag2">{curTwo.toward}</View>
+                          : ''
+                        }
+                        <View className="srp-room">
+                          <View className="srpr-p1">{`${cArr.length - oIndex}0${tIndex+1}`}</View>
+                          {
+                            curTwo.id
+                            ?
+                            <View>
+                              <View className="srpr-p2">面积:{curTwo.built}㎡</View>
+                              {
+                                curTwo.final_price
+                                ? <View className="srpr-p2">成交:{curTwo.final_price}万<View>¥{(curTwo.final_price * 10000 / curTwo.built).toFixed(2) }/㎡</View></View>
+                                : <View className="srpr-p2">挂牌:{curTwo.listing_price}万<View>¥{(curTwo.listing_price * 10000 / curTwo.built).toFixed(2) }/㎡</View></View>
+                              }
+                            </View>
+                            :
+                            <View>
+                              <View className="srpr-p3">暂无数据</View>
+                              <View className="srpr-p3">点击新增</View>
+                            </View>
+                          }
+                        </View>
+                      </View>
+                    )
+                  })
+                  : ''
+                }
+              </View>
+            )
+          })
+        }
+      </View>
+    )
+  }
+  previewImageHandle (cur, arr) {
+    const current = `${cur}_plus`
+    const urls = arr.map(item => {
+      return `${item}_plus`
+    })
+    Taro.previewImage({
+      current,
+      urls
+    })
+  }
+
+
+  renderEditTips () {
+    return (
+      <View className="edit-tips">
+        <View className="et-t">点击上方标签,修改编辑楼栋单元</View>
+      </View>
+    )
+  }
+
+  renderNavPopup () {
+    const { isNavPopupShow, navObj } = this.state
+    return (
+      <View className={isNavPopupShow ? 'l-modal-box' : 'l-modal-box hide'}>
+        <View className='lmb-bg'></View>
+        <View className='lmb-body'>
+          <View className="scoped-form">
+            <View className="sf-item t2">
+              <Input className="i2" type='text' placeholder='' value={navObj.building} onInput={this.inputCHnage.bind(this, 'building')} />
+              <View className="k2">栋的</View>
+              <Input className="i2" type='text' placeholder='' value={navObj.unit} onInput={this.inputCHnage.bind(this, 'unit')} />
+              <View className="k2">单元</View>
+            </View>
+            <View className="sf-item t2">
+              <View className="k2">总共</View>
+              <Input className="i2" type='number' placeholder='' value={navObj.total_floor} onInput={this.inputCHnage.bind(this, 'total_floor')} />
+              <View className="k2">层,每层</View>
+              <Input className="i2" type='number' placeholder='' value={navObj.room_num} onInput={this.inputCHnage.bind(this, 'room_num')} />
+              <View className="k2">户</View>
+            </View>
+            <View className="sf-item">
+              <View className="k">备注:</View>
+              <Input className="i" type='number' placeholder='请输入' value={navObj.remark} onInput={this.inputCHnage.bind(this, 'remark')} />
+            </View>
+            <View className="l-floor-footer t2">
+              <View className="lff-flex">
+                <View className="lff-btn t3" onClick={this.closeNavPopup.bind(this)}>关闭</View>
+                <View className="lff-btn t2s" onClick={this.closeNavPopup.bind(this, 'edit')}>保存</View>
+                {
+                  navObj.id
+                  ?
+                  <View className="lff-btn t4" onClick={this.delNav.bind(this)}>删除</View>
+                  : ''
+                }
+              </View>
+            </View>
+          </View>
+        </View>
+      </View>
+    )
+  }
+  inputCHnage (str, e) {
+    let { navObj } = this.state
+    navObj[str] = e.target.value
+    this.setState({
+      navObj
+    })
+  }
+  delNav () {
+    let { navObj } = this.state
+    Taro.$msgConfirm(`确定删除${navObj.building}栋${navObj.unit}单元吗?`, () => {
+      Taro.api.room.apibuildingunitdel({id: navObj.id}).then(res => {
+        Taro.$msg('删除成功!')
+        this.getNavInfo()
+        this.closeNavPopup()
+      })
+    })
+  }
+
+  renderDtl () {
+    const { isDtlShow, curRoomObj, curObj } = this.state
+    return (
+      <View className={isDtlShow ? 'l-modal-box' : 'l-modal-box hide'}>
+        <View className='lmb-bg'></View>
+        <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>
+            <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 className="sf-item">
+              <View className="k">备注:</View>
+              <Input className="i" type='number' placeholder='请输入' value={curRoomObj.remark} onInput={this.roomChange.bind(this, 'remark')} />
+            </View>
+            <View className="l-floor-footer t2">
+              <View className="lff-flex">
+                <View className="lff-btn t3" onClick={this.closeRulePopup.bind(this)}>关闭</View>
+                <View className="lff-btn t2s" onClick={this.closeRulePopup.bind(this, 'edit')}>保存</View>
+                {
+                  curRoomObj.id
+                  ?
+                  <View className="lff-btn t4" onClick={this.delRoom.bind(this)}>删除</View>
+                  : ''
+                }
+              </View>
+            </View>
+          </View>
+        </View>
+      </View>
+    )
+  }
+  roomChange (str, e) {
+    let { curRoomObj } = this.state
+    curRoomObj[str] = e.target.value
+    this.setState({
+      curRoomObj
+    })
+  }
+  delRoom () {
+    let { curObj,curRoomObj } = this.state
+    Taro.$msgConfirm(`确定删除${curObj.building}栋${curObj.unit}单元的${curRoomObj.storey}层${curRoomObj.room}吗?`, () => {
+      Taro.api.room.apieshousepricedel({id: curRoomObj.id}).then(res => {
+        Taro.$msg('删除成功!')
+        this.closeRulePopup()
+        this.getRoomList()
+      })
+    })
+  }
+  openDtlPopup (two, cArr, oIndex, tIndex) {
+    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
+    })
+  }
+  closeRulePopup (str) {
+    const {eId} = this.$router.params
+    if (str === 'edit') {
+      let { curRoomObj, curObj } = this.state
+      let params = {
+        estate_id: eId,
+        building_id: curObj.id,
+        storey: curRoomObj.storey || '',
+        room: curRoomObj.room || '',
+        built: curRoomObj.built || '',
+        listing_price: curRoomObj.listing_price || '',
+        final_price: curRoomObj.final_price || '',
+        remark: curRoomObj.remark || '',
+      }
+      if (!params.built) {
+        Taro.$msg('请输入房屋面积!')
+        return
+      }
+      if (!params.listing_price && !params.final_price) {
+        Taro.$msg('请输入成交价或最新挂总价!')
+        return
+      }
+      this.setState({
+        curRoomObj: {},
+        isDtlShow: false
+      })
+      let apiStr = 'apieshousepriceadd'
+      if (curRoomObj.id) {
+        params.id = curRoomObj.id
+        apiStr = 'apieshousepriceedit'
+      }
+      Taro.api.room[apiStr](params).then(res => {
+        Taro.$msg('操作成功!')
+        this.getRoomList()
+      })
+    } else {
+      this.setState({
+        curRoomObj: {},
+        isDtlShow: false
+      })
+    }
+  }
+  
+  getRoomList () {
+    const {eId} = this.$router.params
+    let { curObj } = this.state
+    Taro.api.room.apieshousepricelist({
+      estate_id: eId,
+      building_id: curObj.id,
+    }).then(res => {
+      this.setState({
+        edRoomList: res || []
+      })
+    })
+  }
+
+  render () {
+    const { isEdit} = this.state
+    return (
+      <View className="l-box">
+        {/* <WaterMark /> */}
+        <LoginJudge />
+        {this.renderTop()}
+        {isEdit ? this.renderEditTips() : this.renderInfo()}
+        {this.renderNavPopup()}
+        {this.renderDtl()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 397 - 0
src/pagesRoom/roomPrice2.scss

@@ -0,0 +1,397 @@
+@import '@css/mixin.scss';
+@import '@css/modal.scss';
+.l-box {
+  padding-bottom: 140px;
+}
+.scoped-header {
+  position: fixed;
+  top: 0;
+  left: 0;
+  z-index: 9;
+  width: 750px;
+  height: 190px;
+  box-shadow: 0 6px 6px #ccc;
+  background: #fff;
+  .sh-nav {
+    height: 88px;
+  }
+}
+.scoped-top {
+  width: 750px;
+  height: 100px;
+  position: relative;
+  background-color: #369af7;
+  .bg {
+    position: absolute;
+    width: 750px;
+    height: 100px;
+    top: 0;
+    left: 0;
+    z-index: 1;
+  }
+  .st-wrap {
+    position: absolute;
+    width: 750px;
+    height: 100px;
+    top: 0;
+    left: 0;
+    z-index: 2;
+    box-sizing: border-box;
+    padding: 20px;
+    color: #fff;
+  }
+  .scoped-qrcode {
+    position: absolute;
+    right: 20px;
+    top: 120px;
+    width: 200px;
+    height: 200px;
+  }
+  .st-header {
+    height: 80px;
+    position: relative;
+    padding: 10px 0 0 20px;
+    box-sizing: border-box;
+    border-bottom: 1PX solid #59a1e3;
+    margin-bottom: 20px;
+    .i {
+      display: inline-block;
+      vertical-align: top;
+      width: 30px;
+      height: 30px;
+      margin-right: 10px;
+    }
+    .t {
+      display: inline-block;
+      vertical-align: top;
+      font-size: 30px;
+      font-weight: bold;
+    }
+    .r {
+      position: absolute;
+      top: 10px;
+      right: 0;
+      height: 50px;
+      line-height: 50px;
+      text-align: center;
+      font-size: 24px;
+      color: $mainColor;
+      border-radius: 20px;
+      background: #fff;
+      padding: 0 20px;
+    }
+    .r2 {
+      position: absolute;
+      top: 10px;
+      right: 150px;
+      height: 50px;
+      line-height: 50px;
+      text-align: center;
+      font-size: 24px;
+      color: $mainColor2;
+      border-radius: 20px;
+      background: #fff;
+      padding: 0 20px;
+      &.t2 {
+        color: #fff;
+        background-color: $mainColor2;
+      }
+    }
+  }
+  .st-p1 {
+    width: 480px;
+    display: flex;
+    margin-bottom: 20px;
+    .t2 {
+      display: inline-block;
+      vertical-align: top;
+      flex: 1;
+      line-height: 30px;
+      color: #fff;
+      font-size: 24px;
+    }
+    .t {
+      display: inline-block;
+      vertical-align: top;
+      flex: 1;
+      line-height: 30px;
+      color: #fff;
+      font-size: 28px;
+      font-weight: bold;
+    }
+    .i {
+      display: inline-block;
+      vertical-align: top;
+      width: 30px;
+      height: 30px;
+      margin-right: 10px;
+    }
+  }
+  .st-p2 {
+    display: flex;
+    flex-wrap: wrap;
+    width: 480px;
+    .op1 {
+      width: 176px;
+      height: 46px;
+      margin-right: 20px;
+      margin-bottom: 10px;
+    }
+    .op2 {
+      width: 198px;
+      height: 46px;
+      margin-right: 20px;
+      margin-bottom: 10px;
+    }
+    .op3 {
+      width: 158px;
+      height: 46px;
+      margin-right: 20px;
+    }
+    .op4 {
+      width: 238px;
+      height: 46px;
+    }
+  }
+}
+
+
+.scoped-room-price {
+  padding-top: 190px;
+  .srp-row {
+    display: flex;
+  }
+  .srp-col {
+    width: 170px;
+    background: #fff8eb;
+    border-bottom: 1PX solid #fff;
+    border-right: 1PX solid #fff;
+    text-align: center;
+    box-sizing: border-box;
+    position: relative;
+    .srp-tag {
+      position: absolute;
+      left: 0;
+      top: 0;
+      color: #fff;
+      font-size: 20px;
+    }
+    .srp-tag2 {
+      position: absolute;
+      left: 0;
+      bottom: 0;
+      color: #f00;
+      font-size: 20px;
+      font-weight: bold;
+    }
+    &.t2 {
+      background-color: #ffc107;
+      .srpr-p1 {
+        color: #fff!important;
+        .s {
+          color: #fff!important;
+        }
+      }
+      .srpr-p2 {
+        color: #fff!important;
+      }
+      .srp-tag2 {
+        color: #fff!important;
+      }
+    }
+    &.t3 {
+      background-color: #9e9e9e;
+      .srpr-p1 {
+        color: #fff!important;
+        .s {
+          color: #fff!important;
+        }
+      }
+      .srpr-p2 {
+        color: #fff!important;
+      }
+      .srp-tag2 {
+        color: #fff!important;
+      }
+    }
+    &.t4 {
+      background-color: #f44336;
+      .srpr-p1 {
+        color: #fff!important;
+        .s {
+          color: #fff!important;
+        }
+      }
+      .srpr-p2 {
+        color: #fff!important;
+      }
+      .srp-tag2 {
+        color: #fff!important;
+      }
+    }
+    &.t5 {
+      background-color: #369af7;
+      .srpr-p1 {
+        color: #fff!important;
+        .s {
+          color: #fff!important;
+        }
+      }
+      .srpr-p2 {
+        color: #fff!important;
+      }
+      .srp-tag2 {
+        color: #fff!important;
+      }
+    }
+    &.num2 {
+      width: 340px;
+    }
+    &.num3 {
+      width: 226px;
+    }
+    &.num1 {
+      width: 680px;
+    }
+    &:nth-child(1) {
+      width: 70px;
+      background: #eceff6;
+      box-sizing: border-box;
+      padding: 70px 20px 0;
+      font-size: 24px;
+      color: #9b9b9b;
+    }
+  }
+  .srp-ht {
+    padding: 10px 0;
+    .p1 {
+      font-size: 24px;
+      font-weight: bold;
+      color: #313131;
+    }
+    .p2 {
+      font-size: 20px;
+      color: $mainColor;
+    }
+  }
+  .srp-img {
+    display: inline-block;
+    width: 120px;
+    height: 120px;
+    text-align: center;
+    position: relative;
+    .img {
+      width: 100px;
+      height: 100px;
+    }
+    .tips {
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      height: 40px;
+      width: 100%;
+      .bg {
+        position: absolute;
+        width: 100%;
+        height: 40px;
+        left: 0;
+        bottom: 0;
+        background: #000;
+        opacity: .2;
+        z-index: 1;
+      }
+      .t {
+        position: absolute;
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+        left: 0;
+        bottom: 0;
+        color: #fff;
+        z-index: 1;
+        font-size: 20px;
+      }
+    }
+  }
+  .srp-room {
+    padding: 20px 0 10px;
+    .srpr-p1 {
+      display: block;
+      font-size: 30px;
+      font-weight: bold;
+      color: #313131;
+      padding-bottom: 10px;
+      .s {
+        display: inline-block;
+        vertical-align: top;
+        font-size: 20px;
+        text-decoration: underline;
+        color: #999;
+        margin-left: -8px;
+        padding-top: 6px;
+      }
+    }
+    .srpr-p2 {
+      display: block;
+      font-size: 22px;
+      color: #e94141;
+      padding-bottom: 6px;
+    }
+    .srpr-p3 {
+      display: block;
+      font-size: 22px;
+      color: #999;
+      padding-bottom: 6px;
+    }
+  }
+}
+
+
+.scoped-form {
+  position: relative;
+  width: 700px;
+  background: #fff;
+  text-align: center;
+  box-sizing: border-box;
+  padding: 20px;
+  border-radius: 20px;
+  .sf-item {
+    border-bottom: 1PX solid #e5e5e5;
+    display: flex;
+    padding: 30px 20px;
+    font-size: 28px;
+    .k {
+      color: #666;
+      width: 200px;
+      text-align: right;
+    }
+    .i {
+      flex: 1;
+      text-align: left;
+    }
+    &.t2 {
+      justify-content: center;
+    }
+    .i2 {
+      width: 100rpx;
+      text-align: center;
+      border-bottom: 1PX solid #ccc;
+    }
+    .k2 {
+      color: #666;
+      width: auto;
+      text-align: left;
+    }
+  }
+}
+
+
+
+.edit-tips {
+  padding: 300rpx 0 50rpx;
+  text-align: center;
+  color: #666;
+  font-size: 28rpx;
+}
+
+