|
@@ -32,7 +32,7 @@ class Index extends Component {
|
|
|
curNav: 0,
|
|
|
roomArr: [],
|
|
|
curRoomObj: {},
|
|
|
- houseSaleStateArr: ['未售', '小定', '已定', '已售'],
|
|
|
+ houseSaleStateArr: ['未售', '小定', '已定', '已售', '洪楼售'],
|
|
|
isDtlShow: false,
|
|
|
buildingNumList: [],
|
|
|
}
|
|
@@ -252,14 +252,21 @@ class Index extends Component {
|
|
|
if (two.house_sale_state === '小定') boxClassStr2 = `'srp-col t2 num'${oneDataLength}`
|
|
|
if (two.house_sale_state === '已定') boxClassStr2 = `'srp-col t3 num'${oneDataLength}`
|
|
|
if (two.house_sale_state === '已售') boxClassStr2 = `'srp-col t4 num'${oneDataLength}`
|
|
|
+ if (two.house_sale_state === '洪楼售') boxClassStr2 = `'srp-col t5 num'${oneDataLength}`
|
|
|
return (
|
|
|
<View className={boxClassStr2} key={tIndex} onClick={this.openDtlPopup.bind(this, two)}>
|
|
|
{
|
|
|
- two.house_sale_state === '小定' || two.house_sale_state === '已定' || two.house_sale_state === '已售'
|
|
|
+ two.house_sale_state === '小定' || two.house_sale_state === '已定' || two.house_sale_state === '已售' || two.house_sale_state === '洪楼售'
|
|
|
?
|
|
|
<View className="srp-tag">{two.house_sale_state}</View>
|
|
|
: ''
|
|
|
}
|
|
|
+ {
|
|
|
+ two.toward
|
|
|
+ ?
|
|
|
+ <View className="srp-tag2">{two.toward}</View>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
<View className="srp-room">
|
|
|
<View className="srpr-p1">{two.room}
|
|
|
<View className="s">{'>>'}</View>
|
|
@@ -297,6 +304,7 @@ class Index extends Component {
|
|
|
if (curRoomObj.house_sale_state === '小定') boxClassStr = `'p2 t2`
|
|
|
if (curRoomObj.house_sale_state === '已定') boxClassStr = `'p2 t3`
|
|
|
if (curRoomObj.house_sale_state === '已售') boxClassStr = `'p2 t4`
|
|
|
+ if (curRoomObj.house_sale_state === '洪楼售') boxClassStr = `'p2 t5`
|
|
|
|
|
|
let newTotalPrice = curRoomObj.price
|
|
|
if (curRoomObj.house_discount) {
|
|
@@ -321,14 +329,14 @@ class Index extends Component {
|
|
|
<View className='lmb-bg'></View>
|
|
|
<View className='lmb-body'>
|
|
|
<View className="scoped-dtl">
|
|
|
- <View className="sd-img">
|
|
|
+ {/* <View className="sd-img">
|
|
|
<Image src={curRoomObj.house_img + '_xs'} className="img" onClick={this.previewImageHandle.bind(this, curRoomObj.house_img, [curRoomObj.house_img])}/>
|
|
|
<View className="tips">
|
|
|
<View className="bg"></View>
|
|
|
<View className="t">查看大图</View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
- <View className="sd-p">
|
|
|
+ </View> */}
|
|
|
+ <View className="sd-p" onClick={this.previewImageHandle.bind(this, curRoomObj.house_img, [curRoomObj.house_img])}>
|
|
|
<View className="p2">{curRoomObj.house_type}</View>
|
|
|
<View className="p2">{curRoomObj.building_num}</View>
|
|
|
<View className="p2">房号:{curRoomObj.room}</View>
|
|
@@ -356,13 +364,21 @@ class Index extends Component {
|
|
|
<View className="p2">折扣:
|
|
|
<Input type='text' placeholder='请输入' value={curRoomObj.house_discount} onInput={this.inputCHnage.bind(this, 'house_discount')} />
|
|
|
</View>
|
|
|
- <View className="p2">备注:
|
|
|
- <Textarea placeholder='请输入' style='background:#fff;width:100%;min-height:50px;padding:0 30rpx;box-sizing: border-box;text-align: left;color: #666;' value={curRoomObj.house_sale_remark} autoHeight/>
|
|
|
+ <View className="p2">朝向:
|
|
|
+ <Input type='text' placeholder='请输入' value={curRoomObj.toward} onInput={this.inputCHnage.bind(this, 'toward')} />
|
|
|
</View>
|
|
|
<View className="p2">
|
|
|
<View className="s">折后总价:{newTotalPrice || '暂无'}元</View>
|
|
|
<View className="s">折后单价:{newOnePrice || '暂无'}元/㎡</View>
|
|
|
</View>
|
|
|
+ <View className="p">备注:
|
|
|
+ <Textarea placeholder='请输入' style='background:#fff;width:100%;min-height:50px;padding:0 30rpx;box-sizing: border-box;text-align: left;color: #666;' value={curRoomObj.house_sale_remark} autoHeight/>
|
|
|
+ </View>
|
|
|
+ <View className="p3">
|
|
|
+ <View className="t">输入验证码{curRoomObj.id},将本单元全部改为已售</View>
|
|
|
+ <Input type='text' className="i" placeholder='请输入' value={curRoomObj.inputId} onInput={this.inputCHnage.bind(this, 'inputId')} />
|
|
|
+ <View className="b" onClick={this.tagHandle.bind(this)}>本单元全部已售</View>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
<View className="l-floor-footer t2">
|
|
|
<View className="lff-flex">
|
|
@@ -375,6 +391,12 @@ class Index extends Component {
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
+ // const { curNav, buildingNumList } = this.state
|
|
|
+ // const {eId, name, id} = this.$router.params
|
|
|
+ // Taro.api.house.apiestatelotterypricelist({
|
|
|
+ // estate_id: eId,
|
|
|
+ // lottery_id: buildingNumList[curNav].id,
|
|
|
+ // building_num: buildingNumList[curNav].title,
|
|
|
inputCHnage (str, e) {
|
|
|
let { curRoomObj } = this.state
|
|
|
curRoomObj[str] = e.target.value
|
|
@@ -382,7 +404,26 @@ class Index extends Component {
|
|
|
curRoomObj
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ tagHandle () {
|
|
|
+ const { curNav, buildingNumList } = this.state
|
|
|
+ const {eId} = this.$router.params
|
|
|
+ let { curRoomObj } = this.state
|
|
|
+ if (curRoomObj.id == curRoomObj.inputId) {
|
|
|
+ Taro.$msgConfirm(`确定该单元全部改为已售?`, () => {
|
|
|
+ Taro.api.house.apiestatelotterypricebatch({
|
|
|
+ estate_id: eId,
|
|
|
+ house_sale_state: '已售',
|
|
|
+ building_num: buildingNumList[curNav].title
|
|
|
+ }).then(res => {
|
|
|
+ this.getDtl()
|
|
|
+ this.closeRulePopup()
|
|
|
+ Taro.$msg(`更新成功~`)
|
|
|
+ })
|
|
|
+ }, () => {})
|
|
|
+ } else {
|
|
|
+ Taro.$msg(`请输入正确的验证码`)
|
|
|
+ }
|
|
|
+ }
|
|
|
// const { valStr, bc } = this.props
|
|
|
// bc(valStr, strTrim())
|
|
|
onSaleStateChange = e => {
|
|
@@ -406,11 +447,12 @@ class Index extends Component {
|
|
|
})
|
|
|
if (str === 'edit') {
|
|
|
let { curRoomObj } = this.state
|
|
|
- let house_discount = curRoomObj.house_discount.replace(/,|、|\/|\\/g, ',')
|
|
|
+ let house_discount = curRoomObj.house_discount ? curRoomObj.house_discount.replace(/,|、|\/|\\/g, ',') : ''
|
|
|
Taro.api.house.apiestatelotterypriceedit({
|
|
|
id: curRoomObj.id,
|
|
|
house_sale_state: curRoomObj.house_sale_state,
|
|
|
house_sale_remark: curRoomObj.house_sale_remark || '',
|
|
|
+ toward: curRoomObj.toward || '',
|
|
|
house_discount,
|
|
|
}).then(res => {
|
|
|
this.getDtl()
|