Blame view

pages/shops/shops.vue 11.1 KB
4dfe89e4   monkeyhouyi   初始化
1
2
3
4
  <template>
  	<view class="page">
  		<!-- 搜索 -->
  		<view class="head-search">
354e3811   杨鑫   '验收'
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>
4dfe89e4   monkeyhouyi   初始化
7
8
  		</view>
  		<view class="screen-list">
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
9
  			<view class="list" @click="show = true">
4dfe89e4   monkeyhouyi   初始化
10
  				<text>区域</text>
c62ab6f2   杨鑫   1
11
  				<image  :src="$imgUrl('/down.png')"></image>
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
12
  				<u-select v-model="show" :list="areList" @confirm="(v) => {queryChange('belongingRegion', v)}"></u-select>
4dfe89e4   monkeyhouyi   初始化
13
  			</view>
354e3811   杨鑫   '验收'
14
  		<!-- 	<view class="list" @click="setList(1)">
4dfe89e4   monkeyhouyi   初始化
15
  				<text>租金</text>
c62ab6f2   杨鑫   1
16
  				<image :src="$imgUrl('/down.png')"></image>
4dfe89e4   monkeyhouyi   初始化
17
18
19
  			</view>
  			<view class="list" @click="setList(2)">
  				<text>默认排序</text>
c62ab6f2   杨鑫   1
20
  				<image :src="$imgUrl('/down.png')"></image>
4dfe89e4   monkeyhouyi   初始化
21
22
23
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">
  			<view class="goods-list">
  				<view class="list" v-for="(item,index) in tableData" :key="index" @click="reconciliationdetail(item)">
  					<view class="thumb">
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
32
33
  						<u-image width="25vw" height="25vw" :src="item.displayMainImage"></u-image>
  						<!-- <image :src="item.displayMainImage" mode=""></image> -->
4dfe89e4   monkeyhouyi   初始化
34
35
36
37
38
39
  					</view>
  					<view class="item">
  						<view class="title">
  							<text class="one-omit">{{item.shopName}}</text>
  						</view>
  						<view class="tag">
c62ab6f2   杨鑫   1
40
41
  							<!-- <text>标签标签</text>
  							<text>标签标签</text> -->
4dfe89e4   monkeyhouyi   初始化
42
43
  						</view>
  						<view class="introduce">
c62ab6f2   杨鑫   1
44
  							<image  :src="$imgUrl('/kefu.png')"></image>
4dfe89e4   monkeyhouyi   初始化
45
46
47
48
49
50
  							<text class="one-omit">{{item.detailedLocation}}</text>
  						</view>
  						<view class="like-goods">
  							<view class="retail-price">
  								<text>租金:</text>
  								<text class="min">¥</text>
354e3811   杨鑫   '验收'
51
  								<text class="max">{{item.id * 10}}</text>
4dfe89e4   monkeyhouyi   初始化
52
53
54
  								<text class="min">/月</text>
  								<text class="line"></text>
  								<text>面积:</text>
c62ab6f2   杨鑫   1
55
  								<text class="max">{{item.actualUsableArea}}</text>
4dfe89e4   monkeyhouyi   初始化
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  								<text class="min">/m²</text>
  							</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>
  					<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(1)">
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.zulei ==''?'请选择':formList.zulei}}</text>
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
  				<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)">
354e3811   杨鑫   '验收'
76
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.belongingRegion ==''?'请选择':formList.belongingRegion}}</text>
4dfe89e4   monkeyhouyi   初始化
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
  				<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(3)">
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.zuqi ==''?'请选择':formList.zuqi}}</text>
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
  				<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(4)">
  							<text class="mc" style="margin-right: 10rpx;"> {{formList.zujin ==''?'请选择':formList.zujin}}</text>
  							<u-icon name="arrow-down"></u-icon>
  						</view>
  				</view>
  				<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>
354e3811   杨鑫   '验收'
101
  				<!-- <view class="" style="display: flex;justify-content: space-between;border-bottom:1px solid #F6F9FA;padding: 20rpx 0;">
4dfe89e4   monkeyhouyi   初始化
102
103
104
105
106
107
108
109
110
111
  						<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>
354e3811   杨鑫   '验收'
112
  				</view> -->
4dfe89e4   monkeyhouyi   初始化
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  				<view class="" style="text-align: center;padding: 16rpx 0;background-color: #00BE4B;color: #fff;border-radius: 20rpx;margin: 20rpx 0;" @click="request">
  					确定
  				</view>
  			</view>
  			<u-select v-model="show" :list="companys" @confirm="handleCompanyConfirm" mini borderless></u-select>
  			
  		</u-popup>
  
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
128
  				query: {
354e3811   杨鑫   '验收'
129
  					shopName:'',
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
130
  					belongingRegion: '',
354e3811   杨鑫   '验收'
131
132
  					pageNumber: 1, 
  					pageSize: 10 ,
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
133
  				},
4dfe89e4   monkeyhouyi   初始化
134
135
136
137
  				pageindex: {
  					pageNumber: 1,
  					pageSize: 10,
  				},
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
138
139
140
141
142
143
144
145
146
147
148
149
150
  				tableData: [],
  				areList: [
  					{value: '武侯区', label: '武侯区'},
  					{value: '锦江区', label: '锦江区'},
  					{value: '青羊区', label: '青羊区'},
  					{value: '金牛区', label: '金牛区'},
  					{value: '双流区', label: '双流区'},
  					{value: '郫都区', label: '郫都区'},
  					{value: '龙泉驿区', label: '龙泉驿区'},
  					{value: '温江区', label: '温江区'},
  				], // 区域列表
  				
  				
4dfe89e4   monkeyhouyi   初始化
151
152
153
  				zidongS: false,
  				formList: {
  					zulei: '',
354e3811   杨鑫   '验收'
154
  					belongingRegion: '',
4dfe89e4   monkeyhouyi   初始化
155
156
157
158
  					zuqi:'',
  					zujin: '',
  					mianji:'',
  					name:'',
354e3811   杨鑫   '验收'
159
160
161
  					phone:'',
  					pageNumber: 1,
  					pageSize: 10,
4dfe89e4   monkeyhouyi   初始化
162
163
164
165
  				},
  				showSex: false,
  				show:false,
  				index:1,
c62ab6f2   杨鑫   1
166
167
168
169
170
  				zujinList:[
  					{price:'4800'},
  					{price:'3400'},
  					{price:'3000'}
  				],
4dfe89e4   monkeyhouyi   初始化
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
  				companys: [
  					{
  						value: '1',
  						label: '商铺'
  					},
  					{
  						value: '2',
  						label: '临铺'
  					},
  					{
  						value: '3',
  						label: '广告位'
  					}
  				],
  				show1:false,
  				list:[],
  				xuanval:0,
4dfe89e4   monkeyhouyi   初始化
188
189
190
191
192
193
  			}
  		},
  		mounted() {
  			this.getAll()
  		},
  		methods: {
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
194
  			//请求列表数据
4dfe89e4   monkeyhouyi   初始化
195
  			getAll() {
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
196
197
  				let query = Object.assign(this.query, this.pageindex);
  				this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', query, 1).then(res => {
4dfe89e4   monkeyhouyi   初始化
198
199
200
201
202
203
204
  					//成功回调
  					this.tableData = res.data.data.content
  				}).catch(err => {
  					console.log(err)
  					//请求失败
  				})
  			},
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
205
206
  			// 查询
  			search() {
354e3811   杨鑫   '验收'
207
208
209
210
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.query, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
211
212
213
214
215
216
217
218
219
220
221
222
223
224
  			},
  			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}`
  				})
  			},
  			
  			
  			// 自动匹配
4dfe89e4   monkeyhouyi   初始化
225
226
227
228
229
230
231
232
233
234
235
  			zidong() {
  					this.zidongS = true
  			},
  			showS(val){
  			   this.index = val 
  			   if(val == 1){
  				   this.companys = [
  					{
  						value: '1',
  						label: '商铺'
  					},
354e3811   杨鑫   '验收'
236
237
238
239
240
241
242
243
  					// {
  					// 	value: '2',
  					// 	label: '临铺'
  					// },
  					// {
  					// 	value: '3',
  					// 	label: '广告位'
  					// }
4dfe89e4   monkeyhouyi   初始化
244
245
246
247
248
249
  				]
  				
  			   }else if(val ==2 ){
  				   this.companys = [
  				   	{
  				   		value: '1',
354e3811   杨鑫   '验收'
250
  				   		label: '成华区'
4dfe89e4   monkeyhouyi   初始化
251
252
253
  				   	},
  				   	{
  				   		value: '2',
354e3811   杨鑫   '验收'
254
255
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
  				   		label: '武侯区'
  				   	},
  					{
  						value: '3',
  						label: '锦江区'
  					},
  					{
  						value: '4',
  						label: '青羊区'
  					},
  					{
  						value: '5',
  						label: '金牛区'
  					},
  					{
  						value: '6',
  						label: '双流区'
  					},
  					{
  						value: '7',
  						label: '郫都区'
  					},
  					{
  						value: '8',
  						label: '龙泉驿区'
  					},
  					{
  						value: '9',
  						label: '温江区'
  					}
  					
  					
4dfe89e4   monkeyhouyi   初始化
286
287
288
289
290
  				   ]
  			   }else if(val == 3){
  				   this.companys = [
  				   	{
  				   		value: '1',
354e3811   杨鑫   '验收'
291
  				   		label: '1年'
4dfe89e4   monkeyhouyi   初始化
292
293
294
  				   	},
  				   	{
  				   		value: '2',
354e3811   杨鑫   '验收'
295
  				   		label: '2年'
4dfe89e4   monkeyhouyi   初始化
296
297
298
299
300
301
  				   	}
  				   ]
  			   }else if(val == 4){
  				   this.companys = [
  				   	{
  				   		value: '1',
354e3811   杨鑫   '验收'
302
  				   		label: '0-5000'
4dfe89e4   monkeyhouyi   初始化
303
304
305
  				   	},
  				   	{
  				   		value: '2',
354e3811   杨鑫   '验收'
306
  				   		label: '5000-10000'
4dfe89e4   monkeyhouyi   初始化
307
308
309
310
311
312
  				   	}
  				   ]
  			   }else{
  				   this.companys = [
  				   	{
  				   		value: '1',
354e3811   杨鑫   '验收'
313
  				   		label: '0-100'
4dfe89e4   monkeyhouyi   初始化
314
315
316
  				   	},
  				   	{
  				   		value: '2',
354e3811   杨鑫   '验收'
317
  				   		label: '100-200'
4dfe89e4   monkeyhouyi   初始化
318
319
320
321
322
323
  				   	}
  				   ]
  			   }
  			   this.show = true
  			},
  		handleCompanyConfirm(e){
4dfe89e4   monkeyhouyi   初始化
324
325
326
  			if(this.index == 1){
  				this.formList.zulei = e[0].label
  			}else if(this.index  == 2){
354e3811   杨鑫   '验收'
327
  				this.formList.belongingRegion = e[0].label 
4dfe89e4   monkeyhouyi   初始化
328
329
330
331
332
333
334
335
336
337
  			}else if(this.index  == 3){
  				this.formList.zuqi = e[0].label
  			}else if(this.index  == 4){
  				this.formList.zujin = e[0].label
  			}else{
  				this.formList.mianji = e[0].label
  			}
  			
  		},
  		setList(val){
4dfe89e4   monkeyhouyi   初始化
338
339
340
341
342
  			this.xuanval = val
  			if(val == 0){
  			const filteredTableData = this.tableData.filter(item => item.hasOwnProperty('belongingRegion'));
  			
  			// 提取 belongingRegion 字段并进行去重
1b38b4ce   monkeyhouyi   商铺、广告-列表、详情
343
344
345
  			const labeledBelongingRegions = filteredTableData.map(item => ({
  				label: item.belongingRegion
  			}));
4dfe89e4   monkeyhouyi   初始化
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
  		
  			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 = {
  				pageNumber: 1,
  				pageSize: 10,
  				belongingRegion:val[0].label
  			}
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', page, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
  		},
354e3811   杨鑫   '验收'
368
369
370
371
372
  		clearGet(){
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.pageindex, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
4dfe89e4   monkeyhouyi   初始化
373
374
  		},
  		request(){
354e3811   杨鑫   '验收'
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
  			this.$http.sendRequest('/cereBasicInformationShop/queryByPage', 'POST', this.formList, 1).then(res => {
  				//成功回调
  				this.tableData = res.data.data.content
  			})
  			this.formList = {
  					zulei: '',
  					belongingRegion: '',
  					zuqi:'',
  					zujin: '',
  					mianji:'',
  					name:'',
  					phone:'',
  					pageNumber: 1,
  					pageSize: 10,
  				
  			}
4dfe89e4   monkeyhouyi   初始化
391
392
393
394
395
396
397
398
399
  			this.zidongS = false
  		}
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'shops.scss';
  </style>