|
|
@@ -2,6 +2,14 @@
|
|
|
<view class="page">
|
|
|
<view class="form">
|
|
|
<u-form :model="form" ref="uForm">
|
|
|
+ <u-form-item label-width="150" label="房屋类型" prop="house_type" required>
|
|
|
+ <u-radio-group v-model="form.house_type" active-color="#2979ff">
|
|
|
+ <u-radio :name="HT.val" v-for="HT in houseTypeList" :key="HT.val">{{HT.key}}</u-radio>
|
|
|
+ </u-radio-group>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item v-if="form.house_type == 2" label-width="150" label="房源人" prop="house_create" required>
|
|
|
+ <u-input @click="openRoomPopup" placeholder="请选择" v-model="form.house_create" type="text" disabled></u-input>
|
|
|
+ </u-form-item>
|
|
|
<u-form-item label-width="150" label="成交楼盘" prop="deal_item" required>
|
|
|
<u-input placeholder="请输入成交楼盘" v-model="form.deal_item" type="text"></u-input>
|
|
|
</u-form-item>
|
|
|
@@ -9,11 +17,6 @@
|
|
|
<u-input placeholder="请输入成交房号" v-model="form.house_no" type="text"></u-input>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label-width="150" label="房屋类型" prop="house_type" required>
|
|
|
- <u-radio-group v-model="form.house_type" active-color="#2979ff">
|
|
|
- <u-radio :name="HT.val" v-for="HT in houseTypeList" :key="HT.val">{{HT.key}}</u-radio>
|
|
|
- </u-radio-group>
|
|
|
- </u-form-item>
|
|
|
<u-form-item label-width="150" label="成交店员" prop="deal_clerk" required>
|
|
|
<u-input placeholder="请输入成交店员" v-model="form.deal_clerk" type="text"></u-input>
|
|
|
</u-form-item>
|
|
|
@@ -129,6 +132,31 @@
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
+ <u-popup v-model="curPopup2Show" mode="center" width="90%" height="100%">
|
|
|
+ <view class="bwin-popup scoped-cur-popup">
|
|
|
+ <view class="scp-header-input">
|
|
|
+ <u-input class="input" type="number" v-model="curPopup2Keyword" placeholder="点这输入房源ID搜索"></u-input>
|
|
|
+ <view class="b" @click="getCurData2List">搜索</view>
|
|
|
+ </view>
|
|
|
+ <scroll-view :scroll-y="true" class="popup-body">
|
|
|
+ <view class="scoped-cust-list">
|
|
|
+ <view v-for="(item, index) in popupData2List" :key="index" :class="form.house_id == item.id ? 'scl-item cur' : 'scl-item'" @click="roomHandle(item)">
|
|
|
+ <view class="p1">[{{item.estate_name}}] {{item.title}}
|
|
|
+ </view>
|
|
|
+ <view class="p2">{{item.area}}m²-房号:<View class="red">{{ item.house_no }}</View>
|
|
|
+ </view>
|
|
|
+ <view class="p3"><View class="red">{{item.sale_name}}</View>{{item.create_at}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="popup-footer" style="position: fixed;bottom: 12rpx;">
|
|
|
+ <u-button size="medium" @click="curPopup2Show = false">关闭</u-button>
|
|
|
+ <u-button size="medium" type="primary" @click="curPopup2Show = false">确定</u-button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
</view>
|
|
|
@@ -138,9 +166,12 @@ export default {
|
|
|
data() {
|
|
|
const userInfo = uni.getStorageSync('MD_userInfo2')
|
|
|
return {
|
|
|
+ curPopup2Show: false,
|
|
|
curPopupShow: false,
|
|
|
curPopupKeyword: '',
|
|
|
+ curPopup2Keyword: '',
|
|
|
popupDataList: [],
|
|
|
+ popupData2List: [],
|
|
|
brokerage_img: '',
|
|
|
dealAtShow: false,
|
|
|
birthdayShow: false,
|
|
|
@@ -155,6 +186,8 @@ export default {
|
|
|
store_type: '其它',
|
|
|
deal_at: '',
|
|
|
customer_name: '',
|
|
|
+ house_create: '',
|
|
|
+ house_id: '',
|
|
|
customer_phone: '',
|
|
|
area: '',
|
|
|
price: '',
|
|
|
@@ -305,6 +338,8 @@ export default {
|
|
|
that.form.store_type = data.info.store_type;
|
|
|
that.form.deal_at = data.info.deal_at;
|
|
|
that.form.customer_name = data.info.customer_name;
|
|
|
+ that.form.house_create = data.info.house_create;
|
|
|
+ that.form.house_id = data.info.house_id;
|
|
|
that.form.customer_phone = data.info.customer_phone;
|
|
|
that.form.area = String(data.info.area);
|
|
|
that.form.price = String(data.info.price);
|
|
|
@@ -340,16 +375,35 @@ export default {
|
|
|
form.customer_phone = item.phone
|
|
|
this.form = {...form}
|
|
|
},
|
|
|
+ roomHandle (item) {
|
|
|
+ let form = this.form
|
|
|
+ form.house_id = item.id
|
|
|
+ form.house_create = item.sale_name
|
|
|
+ form.deal_item = item.estate_name
|
|
|
+ form.house_no = item.house_no
|
|
|
+ form.area = item.area
|
|
|
+ this.form = {...form}
|
|
|
+ },
|
|
|
getCurDataList () {
|
|
|
uni.api.cust.apicustomerlist({page_size: 100, phone: this.curPopupKeyword}).then(res => {
|
|
|
let list = res.list || []
|
|
|
this.popupDataList = [...list]
|
|
|
})
|
|
|
},
|
|
|
+ getCurData2List () {
|
|
|
+ uni.api.cust.apitradehouselist({page_size: 100, house_id: this.curPopup2Keyword}).then(res => {
|
|
|
+ let list = res.list || []
|
|
|
+ this.popupData2List = [...list]
|
|
|
+ })
|
|
|
+ },
|
|
|
openCustPopup () {
|
|
|
this.curPopupShow = true
|
|
|
this.getCurDataList()
|
|
|
},
|
|
|
+ openRoomPopup () {
|
|
|
+ this.curPopup2Show = true
|
|
|
+ this.getCurData2List()
|
|
|
+ },
|
|
|
uploadImgHandle (bc) {
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
|
|
@@ -385,7 +439,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
openDealAtPopoup () {
|
|
|
- console.log('成交日期成交日期')
|
|
|
this.dealAtShow = true
|
|
|
},
|
|
|
dealAtChange (e) {
|
|
|
@@ -419,6 +472,8 @@ export default {
|
|
|
store_type: that.form.store_type,
|
|
|
deal_at: that.form.deal_at,
|
|
|
customer_name: that.form.customer_name,
|
|
|
+ house_create: that.form.house_create,
|
|
|
+ house_id: that.form.house_id,
|
|
|
customer_phone: that.form.customer_phone,
|
|
|
price: that.form.price,
|
|
|
area: that.form.area,
|
|
|
@@ -430,6 +485,15 @@ export default {
|
|
|
birthday: that.form.birthday,
|
|
|
remark: that.form.remark
|
|
|
}
|
|
|
+ if (params.house_type == 2) {
|
|
|
+ if (!params.house_create) {
|
|
|
+ uni.$msg('请选择房源录入创建人')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ delete form.house_id
|
|
|
+ delete form.house_create
|
|
|
+ }
|
|
|
if(that.isEdit) {
|
|
|
apiStr = 'apitradeedit'
|
|
|
params.id = that.form.id
|
|
|
@@ -462,6 +526,8 @@ export default {
|
|
|
deal_at: '',
|
|
|
birthday: '',
|
|
|
customer_name: '',
|
|
|
+ house_create: '',
|
|
|
+ house_id: '',
|
|
|
customer_phone: '',
|
|
|
area: '',
|
|
|
price: '',
|
|
|
@@ -672,6 +738,10 @@ export default {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
}
|
|
|
+ .red {
|
|
|
+ display: inline-block;
|
|
|
+ color: #f00;
|
|
|
+ }
|
|
|
.p3 {
|
|
|
color: #999;
|
|
|
font-size: 24rpx;
|