Blame view

lvdao-miniapp/pages/shops/shops.vue 12 KB
3f535f30   杨鑫   '初始'
1
2
3
  <template>
  	<view class="page">
  		<!-- 搜索 -->
f692f3a5   wesley88   1
4
  <!-- 		<view class="head-search">
e5b57447   杨鑫   '分包问卷'
5
6
  			<u-search bg-color="#fff" placeholder="请输入" v-model="query.shopName" :show-action="false" @search="search" @clear="clearGet"></u-search>
  			<u-button type="success" @click="search" style="height:32px;">搜索</u-button>
f692f3a5   wesley88   1
7
8
  		</view> -->
  		<view style="margin: 20rpx 0;background-color: #FFFFFF;border-radius: 18rpx;border: 2rpx solid #E8E8E8;	margin: 22rpx 24rpx;overflow: hidden;" >
e3789a75   杨鑫   '最新'
9
  			<u-search :action-style="{'background':'#19be6b','color':'#fff','height':'32px','line-height':'32px','border-radius':'18rpx'}" bg-color="#fff" placeholder="请输入关键词" v-model="query.shopName" action-text="搜索" @clear="search" @search="search" @custom="search"></u-search>
3f535f30   杨鑫   '初始'
10
11
  		</view>
  		<view class="screen-list">
e5b57447   杨鑫   '分包问卷'
12
  			<view class="list" @click="show = true">
3f535f30   杨鑫   '初始'
13
14
  				<text>区域</text>
  				<image  :src="$imgUrl('/down.png')"></image>
e5b57447   杨鑫   '分包问卷'
15
  				<u-select v-model="show" :list="areList" @confirm="(v) => {queryChange('belongingRegion', v)}"></u-select>
3f535f30   杨鑫   '初始'
16
  			</view>
e5b57447   杨鑫   '分包问卷'
17
  		<!-- 	<view class="list" @click="setList(1)">
3f535f30   杨鑫   '初始'
18
19
20
21
22
23
  				<text>租金</text>
  				<image :src="$imgUrl('/down.png')"></image>
  			</view>
  			<view class="list" @click="setList(2)">
  				<text>默认排序</text>
  				<image :src="$imgUrl('/down.png')"></image>
3f535f30   杨鑫   '初始'
24
25
26
27
28
29
30
31
  			</view> -->
  			<view class="zidong" @click="zidong">
  				自动匹配
  			</view>
  			<u-select v-model="show1" :list="list" @confirm="confirm" mini borderless></u-select>
  		</view>
  		<!-- 订单列表 -->
  		<view class="goods-data">
d64cd58f   wesley88   上传验收小程序
32
  			<view v-if="tableData.length == 0" style="padding: 50rpx 0;text-align: center;">暂无数据</view>
3f535f30   杨鑫   '初始'
33
34
35
  			<view class="goods-list">
  				<view class="list" v-for="(item,index) in tableData" :key="index" @click="reconciliationdetail(item)">
  					<view class="thumb">
0fd8b750   杨鑫   '最新落地1'
36
  						<u-image width="25vw" height="25vw" border-radius="20" :src="$img + (item.displayMainImage || item.locationDiagram || item.displayImage) | getimgurl"></u-image>
e5b57447   杨鑫   '分包问卷'
37
  						<!-- <image :src="item.displayMainImage" mode=""></image> -->
3f535f30   杨鑫   '初始'
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  					</view>
  					<view class="item">
  						<view class="title">
  							<text class="one-omit">{{item.shopName}}</text>
  						</view>
  						<view class="tag">
  							<!-- <text>标签标签</text>
  							<text>标签标签</text> -->
  						</view>
  						<view class="introduce">
  							<image  :src="$imgUrl('/kefu.png')"></image>
  							<text class="one-omit">{{item.detailedLocation}}</text>
  						</view>
  						<view class="like-goods">
e3789a75   杨鑫   '最新'
52
53
54
55
56
  							<view class="retail-price" v-if="item.belongingRegion">
  									<text>所属区域:</text>
  									<text class="max">{{item.belongingRegion}}</text>
  								</view>
  							<view class="retail-price" >
d64cd58f   wesley88   上传验收小程序
57
  						<!-- 		<text>租金:</text>
3f535f30   杨鑫   '初始'
58
  								<text class="min">¥</text>
e5b57447   杨鑫   '分包问卷'
59
  								<text class="max">{{item.id * 10}}</text>
3f535f30   杨鑫   '初始'
60
  								<text class="min">/月</text>
d64cd58f   wesley88   上传验收小程序
61
  								<text class="line"></text> -->
3f535f30   杨鑫   '初始'
62
63
  								<text>面积:</text>
  								<text class="max">{{item.actualUsableArea}}</text>
e3789a75   杨鑫   '最新'
64
  								<text class="min" >/m²</text>
3f535f30   杨鑫   '初始'
65
66
67
68
69
70
71
72
73
  							</view>
  						</view>
  					</view>
  				</view>
  			</view>
  		</view>
  		<u-popup v-model="zidongS" mode="center" width="90%" border-radius="20" :mask-close-able="false" :closeable="true" close-icon-pos="top-right">
  			<view class="zulinY">
  				<view style="font-size: 32rpx;font-weight: 600;margin-bottom: 20rpx;">请填写您的租赁意向</view>
3f535f30   杨鑫   '初始'
74
75
76
  				<view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
  						<text class="sc" style="color: #979797;font-size: 30rpx;">意向区域</text>
  						<view @click="showS(2)">
e5b57447   杨鑫   '分包问卷'
77
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.belongingRegion ==''?'请选择':formList.belongingRegion}}</text>
3f535f30   杨鑫   '初始'
78
79
80
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
cfcb44ef   杨鑫   '改bug版'
81
  				<view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
e3789a75   杨鑫   '最新'
82
  						<text class="sc" style="color: #979797;font-size: 30rpx;">意向租金(月)</text>
3f535f30   杨鑫   '初始'
83
84
85
86
  						<view @click="showS(4)">
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.zujin ==''?'请选择':formList.zujin}}</text>
  							<u-icon name="arrow-down"></u-icon>
  						</view>
cfcb44ef   杨鑫   '改bug版'
87
  				</view>
3f535f30   杨鑫   '初始'
88
89
90
91
92
93
94
  				<view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
  						<text class="sc" style="color: #979797;font-size: 30rpx;">意向面积</text>
  						<view @click="showS(5)">
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.mianji ==''?'请选择':formList.mianji}}</text>
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
e5b57447   杨鑫   '分包问卷'
95
  				<!-- <view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
3f535f30   杨鑫   '初始'
96
97
98
99
100
101
102
103
104
105
  						<view class="sc" style="color: #979797;font-size: 30rpx;line-height: 200%;">租赁人姓名</view>
  						<view style="width: 20%">
  							<u-input v-model="formList.name" type="text" :border="false" placeholder="请输入" :clearable="false" />
  						</view>
  				</view>
  				<view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
  						<view class="sc" style="color: #979797;font-size: 30rpx;line-height: 200%;">联系电话</view>
  						<view style="width: 20%">
  							<u-input v-model="formList.phone" type="text" :border="false" placeholder="请输入" :clearable="false"/>
  						</view>
e5b57447   杨鑫   '分包问卷'
106
  				</view> -->
3f535f30   杨鑫   '初始'
107
108
109
110
  				<view class="" style="text-align: center;padding: 16rpx 0;background-color: #00BE4B;color: #fff;border-radius: 20rpx;margin: 20rpx 0;" @click="request">
  					确定
  				</view>
  			</view>
e3789a75   杨鑫   '最新'
111
  			<u-select v-model="showList" :list="companys" @confirm="handleCompanyConfirm" mini borderless></u-select>
3f535f30   杨鑫   '初始'
112
113
114
115
116
117
118
119
120
121
  			
  		</u-popup>
  
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
e5b57447   杨鑫   '分包问卷'
122
123
124
  				query: {
  					shopName:'',
  					belongingRegion: '',
0fd8b750   杨鑫   '最新落地1'
125
  					pageNumber: 0, 
e5b57447   杨鑫   '分包问卷'
126
  					pageSize: 10 ,
cfcb44ef   杨鑫   '改bug版'
127
128
129
  					publishStatus:2,
  					minPrice:0,
  					maxPrice:1000000
e5b57447   杨鑫   '分包问卷'
130
  				},
3f535f30   杨鑫   '初始'
131
  				pageindex: {
d64cd58f   wesley88   上传验收小程序
132
  					pageNumber: 0,
3f535f30   杨鑫   '初始'
133
  					pageSize: 10,
cfcb44ef   杨鑫   '改bug版'
134
135
136
  					publishStatus:2,
  					minPrice:0,
  					maxPrice:1000000
3f535f30   杨鑫   '初始'
137
  				},
e5b57447   杨鑫   '分包问卷'
138
139
140
141
142
143
144
145
146
147
148
149
  				tableData: [],
  				areList: [
  					{value: '武侯区', label: '武侯区'},
  					{value: '锦江区', label: '锦江区'},
  					{value: '青羊区', label: '青羊区'},
  					{value: '金牛区', label: '金牛区'},
  					{value: '双流区', label: '双流区'},
  					{value: '郫都区', label: '郫都区'},
  					{value: '龙泉驿区', label: '龙泉驿区'},
  					{value: '温江区', label: '温江区'},
  				], // 区域列表
  				
e3789a75   杨鑫   '最新'
150
  				showList:false,
3f535f30   杨鑫   '初始'
151
152
153
  				zidongS: false,
  				formList: {
  					zulei: '',
e5b57447   杨鑫   '分包问卷'
154
  					belongingRegion: '',
3f535f30   杨鑫   '初始'
155
156
157
158
  					zuqi:'',
  					zujin: '',
  					mianji:'',
  					name:'',
e5b57447   杨鑫   '分包问卷'
159
  					phone:'',
e3789a75   杨鑫   '最新'
160
  					pageNumber: 0,
e5b57447   杨鑫   '分包问卷'
161
  					pageSize: 10,
e3789a75   杨鑫   '最新'
162
  					publishStatus:2
3f535f30   杨鑫   '初始'
163
164
165
166
  				},
  				showSex: false,
  				show:false,
  				index:1,
3f535f30   杨鑫   '初始'
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
  				companys: [
  					{
  						value: '1',
  						label: '商铺'
  					},
  					{
  						value: '2',
  						label: '临铺'
  					},
  					{
  						value: '3',
  						label: '广告位'
  					}
  				],
  				show1:false,
  				list:[],
  				xuanval:0,
3f535f30   杨鑫   '初始'
184
185
  			}
  		},
d64cd58f   wesley88   上传验收小程序
186
187
188
189
190
191
  		filters: {
  			getimgurl(e) {
  				let c1 = e.split(',')[0]
  				return c1;
  			},
  		},
3f535f30   杨鑫   '初始'
192
193
194
195
  		mounted() {
  			this.getAll()
  		},
  		methods: {
e5b57447   杨鑫   '分包问卷'
196
  			//请求列表数据
3f535f30   杨鑫   '初始'
197
  			getAll() {
e5b57447   杨鑫   '分包问卷'
198
199
  				let query = Object.assign(this.query, this.pageindex);
  				this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', query, 1).then(res => {
3f535f30   杨鑫   '初始'
200
201
202
203
204
205
206
  					//成功回调
  					this.tableData = res.data.data.content
  				}).catch(err => {
  					console.log(err)
  					//请求失败
  				})
  			},
e5b57447   杨鑫   '分包问卷'
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
  			// 查询
  			search() {
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.query, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
  			},
  			queryChange(key, val) {
  				this.query[`${key}`] = val[0].value;
  				this.search();
  			},
  			reconciliationdetail(item) {
  				let items = JSON.stringify(item)
  				uni.navigateTo({
  					url: `/pages/details/details?item=${items}`
  				})
  			},
  			
  			
  			// 自动匹配
3f535f30   杨鑫   '初始'
227
228
229
230
231
232
233
234
235
236
237
  			zidong() {
  					this.zidongS = true
  			},
  			showS(val){
  			   this.index = val 
  			   if(val == 1){
  				   this.companys = [
  					{
  						value: '1',
  						label: '商铺'
  					},
e5b57447   杨鑫   '分包问卷'
238
239
240
241
242
243
244
245
  					// {
  					// 	value: '2',
  					// 	label: '临铺'
  					// },
  					// {
  					// 	value: '3',
  					// 	label: '广告位'
  					// }
3f535f30   杨鑫   '初始'
246
247
248
249
250
251
  				]
  				
  			   }else if(val ==2 ){
  				   this.companys = [
  				   	{
  				   		value: '1',
e5b57447   杨鑫   '分包问卷'
252
  				   		label: '成华区'
3f535f30   杨鑫   '初始'
253
254
255
  				   	},
  				   	{
  				   		value: '2',
e5b57447   杨鑫   '分包问卷'
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
  				   		label: '武侯区'
  				   	},
  					{
  						value: '3',
  						label: '锦江区'
  					},
  					{
  						value: '4',
  						label: '青羊区'
  					},
  					{
  						value: '5',
  						label: '金牛区'
  					},
  					{
  						value: '6',
  						label: '双流区'
  					},
  					{
  						value: '7',
  						label: '郫都区'
  					},
  					{
  						value: '8',
  						label: '龙泉驿区'
  					},
  					{
  						value: '9',
  						label: '温江区'
  					}
  					
  					
3f535f30   杨鑫   '初始'
288
289
290
291
292
  				   ]
  			   }else if(val == 3){
  				   this.companys = [
  				   	{
  				   		value: '1',
e5b57447   杨鑫   '分包问卷'
293
  				   		label: '1年'
3f535f30   杨鑫   '初始'
294
295
296
  				   	},
  				   	{
  				   		value: '2',
e5b57447   杨鑫   '分包问卷'
297
  				   		label: '2年'
3f535f30   杨鑫   '初始'
298
299
300
301
302
303
  				   	}
  				   ]
  			   }else if(val == 4){
  				   this.companys = [
  				   	{
  				   		value: '1',
cfcb44ef   杨鑫   '改bug版'
304
  				   		label: '0-2000'
3f535f30   杨鑫   '初始'
305
306
307
  				   	},
  				   	{
  				   		value: '2',
cfcb44ef   杨鑫   '改bug版'
308
309
310
311
312
313
  				   		label: '2000-5000'
  				   	},
  					{
  						value: '3',
  						label: '5000-10000'
  					}
3f535f30   杨鑫   '初始'
314
315
316
317
318
  				   ]
  			   }else{
  				   this.companys = [
  				   	{
  				   		value: '1',
e5b57447   杨鑫   '分包问卷'
319
  				   		label: '0-100'
3f535f30   杨鑫   '初始'
320
321
322
  				   	},
  				   	{
  				   		value: '2',
e5b57447   杨鑫   '分包问卷'
323
  				   		label: '100-200'
cfcb44ef   杨鑫   '改bug版'
324
325
326
327
  				   	},
  				   	{
  				   		value: '3',
  				   		label: '200-300'
3f535f30   杨鑫   '初始'
328
329
330
  				   	}
  				   ]
  			   }
e3789a75   杨鑫   '最新'
331
  			   this.showList = true
3f535f30   杨鑫   '初始'
332
333
  			},
  		handleCompanyConfirm(e){
3f535f30   杨鑫   '初始'
334
335
336
  			if(this.index == 1){
  				this.formList.zulei = e[0].label
  			}else if(this.index  == 2){
e5b57447   杨鑫   '分包问卷'
337
  				this.formList.belongingRegion = e[0].label 
3f535f30   杨鑫   '初始'
338
339
340
  			}else if(this.index  == 3){
  				this.formList.zuqi = e[0].label
  			}else if(this.index  == 4){
cfcb44ef   杨鑫   '改bug版'
341
342
343
344
345
346
347
348
349
350
351
  				this.formList.zujin = e[0].label 
  				if(e[0].value == 1){
  					this.formList.minPrice = 0
  					this.formList.maxPrice = 2000
  				}else if(e[0].value == 2){
  					this.formList.minPrice = 2000
  					this.formList.maxPrice = 5000
  				}else{
  					this.formList.minPrice = 5000
  					this.formList.maxPrice = 10000
  				}
3f535f30   杨鑫   '初始'
352
  			}else{
cfcb44ef   杨鑫   '改bug版'
353
354
355
356
357
358
359
360
361
362
363
364
  				this.formList.mianji = e[0].label 
  				if(e[0].value == 1){
  					this.formList.minActualUsableArea = 0
  					this.formList.maxActualUsableArea = 100
  				}else if(e[0].value == 2){
  					this.formList.minActualUsableArea = 100
  					this.formList.maxActualUsableArea = 200
  				}else{
  					this.formList.minActualUsableArea = 200
  					this.formList.maxActualUsableArea = 300
  				}
  				
3f535f30   杨鑫   '初始'
365
366
367
368
  			}
  			
  		},
  		setList(val){
3f535f30   杨鑫   '初始'
369
370
371
372
373
  			this.xuanval = val
  			if(val == 0){
  			const filteredTableData = this.tableData.filter(item => item.hasOwnProperty('belongingRegion'));
  			
  			// 提取 belongingRegion 字段并进行去重
e5b57447   杨鑫   '分包问卷'
374
375
376
  			const labeledBelongingRegions = filteredTableData.map(item => ({
  				label: item.belongingRegion
  			}));
3f535f30   杨鑫   '初始'
377
378
379
380
381
382
383
384
385
386
387
388
389
  		
  			const uniqueBelongingRegions = [...new Set(labeledBelongingRegions)];
  				console.log(uniqueBelongingRegions)
  				this.list  = uniqueBelongingRegions
  			}else if(val == 1){
  				this.list = []
  			}else if(val == 2){
  				this.list = []
  			}
  			this.show1 = true
  		},
  		confirm(val){
  			let page = {
e3789a75   杨鑫   '最新'
390
  				pageNumber: 0,
3f535f30   杨鑫   '初始'
391
392
393
394
395
396
397
398
  				pageSize: 10,
  				belongingRegion:val[0].label
  			}
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', page, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
  		},
e5b57447   杨鑫   '分包问卷'
399
400
401
402
403
  		clearGet(){
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.pageindex, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
3f535f30   杨鑫   '初始'
404
405
  		},
  		request(){
e5b57447   杨鑫   '分包问卷'
406
407
408
409
410
411
412
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.formList, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
  			this.formList = {
  					zulei: '',
  					belongingRegion: '',
e5b57447   杨鑫   '分包问卷'
413
414
415
416
  					zujin: '',
  					mianji:'',
  					name:'',
  					phone:'',
e3789a75   杨鑫   '最新'
417
  					pageNumber: 0,
e5b57447   杨鑫   '分包问卷'
418
  					pageSize: 10,
e3789a75   杨鑫   '最新'
419
  					publishStatus:2
e5b57447   杨鑫   '分包问卷'
420
421
  				
  			}
3f535f30   杨鑫   '初始'
422
423
424
425
426
427
428
429
430
  			this.zidongS = false
  		}
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'shops.scss';
  </style>