Sfoglia il codice sorgente

接单列表添加搜索和筛选

chenyidong 3 mesi fa
parent
commit
1b13eca1fe

+ 560 - 0
pages/order/components/filterQuery.vue

@@ -0,0 +1,560 @@
1
+<template>
2
+	<view>
3
+		<u-popup :show="showFilter" mode="bottom" closeable @close="handleClose" @open="handleOpen">
4
+			<scroll-view scroll-y :style="{ height: mapHeight }" @touchmove.stop="() => {}">
5
+				<view class="filterQuery" :style="{ height : mapHeight }">
6
+						<view class="query_wrap">
7
+							<view class="title">
8
+								发单日期
9
+							</view>
10
+							<view class="dept_wrap form_input_pointer_events" @click="handleShowJtimePickerPopup">
11
+								<u--input v-model="createTimeTxt" disabled style='pointer-events: none !important'
12
+									disabledColor="#ffffff" placeholder="点击选择" border="none">
13
+								</u--input>
14
+								<u-icon slot="right" name="arrow-right"></u-icon>
15
+							</view>
16
+				
17
+							<view class="title">
18
+								机构部门
19
+							</view>
20
+							<view class="dept_wrap form_input_pointer_events" @click="handleShowDept">
21
+								<u--input v-model="value.deptName" disabled style='pointer-events: none !important'
22
+									disabledColor="#ffffff" placeholder="点击选择" border="none">
23
+								</u--input>
24
+								<u-icon slot="right" name="arrow-right"></u-icon>
25
+							</view>
26
+				
27
+							<view class="title">
28
+								状态
29
+							</view>
30
+							<view class="dept_wrap form_input_pointer_events">
31
+								<ld-select :list="dicts.crmFormStatusDict" label-key="dictLabel" value-key="dictValue"
32
+									placeholder="请选择" v-model="value.status" :border="false" clearable></ld-select>
33
+								<u-icon slot="right" name="arrow-right"></u-icon>
34
+							</view>
35
+				
36
+							<view class="title">
37
+								阶段
38
+							</view>
39
+							<view class="dept_wrap form_input_pointer_events">
40
+								<ld-select :list="dicts.crmFormStateDict" label-key="dictLabel" value-key="dictValue"
41
+									placeholder="请选择" v-model="value.state" :border="false" clearable></ld-select>
42
+								<u-icon slot="right" name="arrow-right"></u-icon>
43
+							</view>
44
+				
45
+							<view class="title">
46
+								接单人
47
+							</view>
48
+							<view class="person_wrap">
49
+								<view class="person_item" v-for="(item,index) in identificationUserInfos" :key="item.userId">
50
+									<view class="person_top">
51
+										<u-avatar :src="$avatar(item.avatar)" size="40px"></u-avatar>
52
+									</view>
53
+									<view class="person_bottom">
54
+										{{item.nickName}}
55
+									</view>
56
+								</view>
57
+								<view class="person_item more_item" @click="handleShowIdentificationUser">
58
+									<view class="person_top">
59
+										<image src="/static/case/icon-more.png" mode="" class="more"></image>
60
+									</view>
61
+									<view class="person_bottom">
62
+										更多
63
+									</view>
64
+								</view>
65
+							</view>
66
+
67
+							<view class="title">
68
+								发单人
69
+							</view>
70
+							<view class="person_wrap">
71
+								<view class="person_item" v-for="(item,index) in createByUserInfos" :key="item.userId">
72
+									<view class="person_top">
73
+										<u-avatar :src="$avatar(item.avatar)" size="40px"></u-avatar>
74
+									</view>
75
+									<view class="person_bottom">
76
+										{{item.nickName}}
77
+									</view>
78
+								</view>
79
+								<view class="person_item more_item" @click="handleShowCreateByUser">
80
+									<view class="person_top">
81
+										<image src="/static/case/icon-more.png" mode="" class="more"></image>
82
+									</view>
83
+									<view class="person_bottom">
84
+										更多
85
+									</view>
86
+								</view>
87
+							</view>
88
+
89
+							<view class="title">
90
+								物品
91
+							</view>
92
+							<view class="search_input">
93
+								<u--input clearable prefixIcon="search" v-model="value.item"
94
+									placeholder="请输入物品名字"></u--input>
95
+							</view>
96
+				
97
+							<view class="title">
98
+								品牌
99
+							</view>
100
+							<view class="search_input">
101
+								<u--input clearable prefixIcon="search" v-model="value.brand" placeholder="请输入品牌名字"></u--input>
102
+							</view>
103
+				
104
+							<view class="title">
105
+								电话
106
+							</view>
107
+							<view class="search_input">
108
+								<u--input clearable prefixIcon="search" v-model="value.phone"
109
+									placeholder="请输入电话"></u--input>
110
+							</view>
111
+
112
+							<view class="title">
113
+								标签
114
+							</view>
115
+							<view class="option_list">
116
+								<ld-select :list="clueTagGroupVoList" label-key="name" value-key="id" placeholder="请选择标签"
117
+									v-model="value.allTagList" multiple clearable></ld-select>
118
+							</view>
119
+				
120
+						</view>
121
+						<u-tabbar :fixed="true" inactiveColor="#ffffff" class="case_tabbar" :placeholder="true"
122
+							:safeAreaInsetBottom="true">
123
+							<u-tabbar-item text="重置" :customStyle="{backgroundColor : '#fff'}" class="uTabbarItem close_btn"
124
+								@click="handleReset"></u-tabbar-item>
125
+							<u-tabbar-item text="确定" :customStyle="{backgroundColor : '#4c8afe'}" class="uTabbarItem"
126
+								@click="handleEnter"></u-tabbar-item>
127
+						</u-tabbar>
128
+				
129
+						<ba-tree-picker :selectParent="false" v-if="identificationUserListData.length > 0" ref="identificationUser" :multiple="false"
130
+							border title="接单人" :localdata="identificationUserListData" valueKey="id" textKey="label" childrenKey="children"
131
+							:selectedValues="value.identification" @select-change="identificationUserSeletchang" />
132
+				
133
+						<ba-tree-picker :selectParent="false" v-if="createByUserListData.length > 0" ref="createByUser" :multiple="false"
134
+							border title="发单人" :localdata="createByUserListData" valueKey="id" textKey="label" childrenKey="children"
135
+							:selectedValues="value.createBy" @select-change="createByUserSeletchang" />
136
+				
137
+						<ba-tree-picker :selectParent="true" v-if="deptList.length > 0" ref="dept" :multiple='false'
138
+							@select-change="deptSeletchang" border title="机构部门" :localdata="deptList" valueKey="deptId"
139
+							textKey="deptName" childrenKey="children" :selectedValues="value.deptId"
140
+							:personNames="value.deptName" />
141
+				
142
+						<jtimePickerPopup :isShowShortTimeList="true" shortTimeTitle="快捷时间" :shortTimeList="shortTimeList"
143
+							:isShowSeletTimeTitle="true" seletTimeTitle="时间选择" cancelText="取消" confirmText="确认"
144
+							:endSelectMonth="-1" :endSelectDay="-1" beginTimePlaceHolder='开始时间' endTimePlaceHolder="结束时间"
145
+							:isDateTypeRange="true" :isShowSelectedTimeEcho="true" @confirm="getSelectTime"
146
+							ref="jtimePickerPopup">
147
+						</jtimePickerPopup>
148
+				
149
+					</view>
150
+			</scroll-view>
151
+		</u-popup>
152
+	</view>
153
+</template>
154
+
155
+<script>
156
+	import {
157
+		filterCustomerManager,
158
+		handleTree
159
+	} from '@/utils/util';
160
+	import jtimePickerPopup from '@/uni_modules/jtime-picker-popup/components/JTimePicker/JTimePicker.vue';
161
+	export default {
162
+		components: {
163
+			jtimePickerPopup
164
+		},
165
+		props: {
166
+			value: {
167
+				type: Object,
168
+			},
169
+			mapHeight: {
170
+				type: String,
171
+			},
172
+			dicts: {
173
+				type: Object
174
+			},
175
+		},
176
+		emits: ["getList"],
177
+		data() {
178
+			return {
179
+
180
+				statusDict: [{
181
+						dictLabel: '待处理',
182
+						dictValue: '1'
183
+					},
184
+					{
185
+						dictLabel: '进行中',
186
+						dictValue: '2'
187
+					},
188
+					{
189
+						dictLabel: '已完成',
190
+						dictValue: '3'
191
+					},
192
+					{
193
+						dictLabel: '已取消',
194
+						dictValue: '4'
195
+					},
196
+				],
197
+				
198
+				stateDict: [{
199
+						dictLabel: '初始阶段',
200
+						dictValue: '1'
201
+					},
202
+					{
203
+						dictLabel: '处理阶段',
204
+						dictValue: '2'
205
+					},
206
+					{
207
+						dictLabel: '完成阶段',
208
+						dictValue: '3'
209
+					},
210
+				],
211
+
212
+
213
+				showFilter: false,
214
+
215
+				dictCascadeData: [],
216
+
217
+				identificationUserListData: [], // 接单人列表 
218
+				createByUserListData: [], // 发单人列表 
219
+
220
+				deptList: [],
221
+
222
+				dateRange: [], // 日期范围
223
+
224
+				shortTimeList: [{
225
+						unit: 'day',
226
+						key: '全部',
227
+						value: 0
228
+					},
229
+					{
230
+						unit: 'day',
231
+						key: '今天',
232
+						value: 1
233
+					},
234
+					{
235
+						unit: 'day',
236
+						key: '昨天',
237
+						value: -1
238
+					},
239
+					{
240
+						unit: 'day',
241
+						key: '近3天',
242
+						value: 3
243
+					},
244
+					{
245
+						unit: 'day',
246
+						key: '近7天',
247
+						value: 7
248
+					},
249
+					{
250
+						unit: 'day',
251
+						key: '近15天',
252
+						value: 15
253
+					},
254
+					{
255
+						unit: 'month',
256
+						key: '本月',
257
+						value: 1
258
+					},
259
+					{
260
+						unit: 'month',
261
+						key: '上月',
262
+						value: -1
263
+					},
264
+				],
265
+
266
+				createTimeTxt: null,
267
+
268
+				identificationUserInfos: [], // 接单人用户信息
269
+				createByUserInfos: [], // 发单人用户信息
270
+
271
+				clueTagGroupVoList: [],
272
+
273
+				defaultRegion: ['广东省', '广州市', '番禺区'],
274
+
275
+				sortParams: [{
276
+					value: 1,
277
+					text: '企业名称'
278
+				}, {
279
+					value: 2,
280
+					text: '项目名称'
281
+				}, {
282
+					value: 3,
283
+					text: '项目状态'
284
+				}, {
285
+					value: 4,
286
+					text: '项目等级'
287
+				}, {
288
+					value: 5,
289
+					text: '省市区'
290
+				}, {
291
+					value: 6,
292
+					text: '委托日期'
293
+				}, {
294
+					value: 7,
295
+					text: '创建日期'
296
+				}, {
297
+					value: 8,
298
+					text: '跟进时间'
299
+				}]
300
+			}
301
+		},
302
+		mounted() {
303
+			this.handleInitTag();
304
+		},
305
+		methods: {
306
+			handleOpen(){
307
+				if(this.createTimeTxt === null){
308
+					this.$refs.jtimePickerPopup.handleInit();
309
+				}
310
+			},
311
+
312
+			getSelectTime(timeValue) {
313
+				this.value.sendDateStart = timeValue.beginTime;
314
+				this.value.sendDateEnd = timeValue.endTime;
315
+				if (this.value.sendDateStart && this.value.sendDateEnd) {
316
+					this.createTimeTxt = this.value.sendDateStart + "至" + this.value.sendDateEnd;
317
+				} else {
318
+					this.createTimeTxt = "";
319
+				}
320
+			},
321
+			deptSeletchang(ids, names) {
322
+				this.value.deptId = ids[0];
323
+				this.value.deptName = names[0];
324
+			},
325
+			handleShowJtimePickerPopup() {
326
+				this.$refs.jtimePickerPopup.pickerShow();
327
+			},
328
+			handleShowDept() {
329
+				this.$refs.dept._show();
330
+			},
331
+
332
+
333
+			identificationUserSeletchang(ids, names) {
334
+				this.value.identification = ids[0];
335
+				if (ids.length > 0) {
336
+					// 暂时只做单向
337
+					uni.$u.api.getUserByUserIds({
338
+						userIds: ids.join(",")
339
+					}).then(res => {
340
+						const {
341
+							data
342
+						} = res;
343
+						this.identificationUserInfos = data;
344
+					})
345
+				} else {
346
+					this.identificationUserInfos = [];
347
+				}
348
+			},
349
+			createByUserSeletchang(ids, names) {
350
+				this.value.createBy = ids[0];
351
+				if (ids.length > 0) {
352
+					// 暂时只做单向
353
+					uni.$u.api.getUserByUserIds({
354
+						userIds: ids.join(",")
355
+					}).then(res => {
356
+						const {
357
+							data
358
+						} = res;
359
+						this.createByUserInfos = data;
360
+					})
361
+				} else {
362
+					this.createByUserInfos = [];
363
+				}
364
+			},
365
+			handleShowIdentificationUser() {
366
+				this.$refs.identificationUser._show();
367
+			},
368
+			handleShowCreateByUser() {
369
+				this.$refs.createByUser._show();
370
+			},
371
+			handleInitTag() {
372
+				uni.$u.api.selectAllDeptList({
373
+					isDept: 2
374
+				}).then(({
375
+					data
376
+				}) => {
377
+					this.deptList = handleTree(data, 'deptId');
378
+				});
379
+
380
+				// 获取接单人
381
+				uni.$u.api.getDeptOwner({ excludeDeptIds : [100,369,378,356] }).then(res => {
382
+					this.identificationUserListData = filterCustomerManager(res.data);
383
+				});
384
+				
385
+				// 获取发单人
386
+				uni.$u.api.getDeptCustomerByOrg({ deptId : 369 }).then(res => {
387
+					this.createByUserListData = filterCustomerManager(res.data);
388
+				});
389
+
390
+				// 获取所有标签
391
+				uni.$u.api.getClueTagGroupVoList({ tagGroupApplication : '2' }).then(({
392
+					data
393
+				}) => {
394
+					this.clueTagGroupVoList = data.reduce((acc, cur) => {
395
+						return acc.concat(cur.clueTagDataList);
396
+					}, []);
397
+				});
398
+			},
399
+			handleClose() {
400
+				this.showFilter = false;
401
+			},
402
+			handleClickTag(item, attr) {
403
+				if (item.isCheck) {
404
+					const index = this.value[attr].findIndex(v => v == item.dictValue);
405
+					this.value[attr].splice(index, 1);
406
+				} else {
407
+					this.value[attr].push(item.dictValue);
408
+				}
409
+			},
410
+			handleReset() {
411
+				this.value.sendDateStart = undefined;
412
+				this.value.sendDateEnd = undefined;
413
+				this.value.deptId = undefined;
414
+				this.value.deptName = undefined;
415
+				this.value.status = '';
416
+				this.value.state = '';
417
+				this.value.identification = undefined;
418
+				this.value.createBy = undefined;
419
+				this.value.item = '';
420
+				this.value.phone = '';
421
+				this.value.allTagList = [];
422
+				this.createTimeTxt = null;
423
+				this.identificationUserInfos = [];
424
+				this.createByUserInfos = [];
425
+			},
426
+			handleEnter() {
427
+				this.$emit("getList");
428
+				this.showFilter = false;
429
+			},
430
+			handleChangeSort(sort) {
431
+				this.value.sort = sort;
432
+			},
433
+			handleChangeSortField(value) {
434
+				this.value.sortField = value;
435
+			},
436
+			show() {
437
+				this.showFilter = true;
438
+			}
439
+		},
440
+	}
441
+</script>
442
+
443
+<style lang="scss" scoped>
444
+	.filterQuery {
445
+		padding: 20px;
446
+		box-sizing: border-box;
447
+		overflow: scroll;
448
+
449
+		.dept_wrap {
450
+			border: 2px solid #ddd;
451
+			display: flex;
452
+			padding: 10rpx 20rpx;
453
+			border-radius: 6rpx;
454
+			margin-bottom: 20rpx;
455
+		}
456
+
457
+		.pick_regions_wrap {}
458
+
459
+		.person_wrap {
460
+			display: flex;
461
+			flex-wrap: wrap;
462
+			align-items: center;
463
+			margin-bottom: 15px;
464
+
465
+			.person_item {
466
+				width: 10%;
467
+				display: flex;
468
+				flex-direction: column;
469
+				align-items: center;
470
+				margin-bottom: 10px;
471
+
472
+				.person_top {
473
+					width: 40px;
474
+					height: 40px;
475
+					display: flex;
476
+					align-items: center;
477
+					justify-content: center;
478
+				}
479
+
480
+				.person_bottom {
481
+					margin-top: 5px;
482
+					font-size: 12px;
483
+					color: #202020;
484
+				}
485
+			}
486
+
487
+			.more_item {
488
+				.more {
489
+					width: 28px;
490
+					height: 28px;
491
+				}
492
+
493
+				.person_bottom {
494
+					color: #4c8afe;
495
+					font-size: 12px;
496
+					margin-top: 0px;
497
+				}
498
+			}
499
+		}
500
+
501
+		.search_input {
502
+			border: 1px solid #ddd;
503
+			border-radius: 4px;
504
+			overflow: hidden;
505
+			margin-bottom: 15px;
506
+		}
507
+
508
+		.query_wrap {
509
+			.title {
510
+				font-size: 18px;
511
+				color: #202020;
512
+				margin-bottom: 10px;
513
+			}
514
+
515
+			.option_list {
516
+				display: flex;
517
+				flex-wrap: wrap;
518
+				margin-bottom: 15px;
519
+
520
+				.option_item {
521
+					width: calc(33.33% - 10px);
522
+					margin-right: 10px;
523
+					margin-bottom: 10px;
524
+
525
+					::v-deep .u-tag__text {
526
+						margin: auto;
527
+						font-size: 14px;
528
+					}
529
+
530
+					&:nth-child(6n) {
531
+						margin-right: 0px;
532
+					}
533
+				}
534
+			}
535
+
536
+			.follow_option_list {
537
+				.option_item {
538
+					::v-deep .u-tag__text {
539
+						font-size: 12px;
540
+					}
541
+				}
542
+			}
543
+		}
544
+	}
545
+
546
+	.case_tabbar {
547
+		.uTabbarItem {
548
+			::v-deep .u-tabbar-item__text {
549
+				font-size: 18px;
550
+			}
551
+		}
552
+
553
+		.close_btn {
554
+			::v-deep .u-tabbar-item__text {
555
+				font-size: 18px;
556
+				color: #606060 !important;
557
+			}
558
+		}
559
+	}
560
+</style>

+ 138 - 43
pages/order/components/orderCenter.vue

@@ -1,46 +1,64 @@
1 1
 <template>
2 2
 	<view class="order_center_wrap">
3
-		<view class="order_item" v-for="item in listData" :key="item.id" @click="handleToDetail(item)">
4
-			<view class="order_top">
5
-				<view class="top_left">{{item.item}}</view>
6
-				<view class="top_right">
7
-					<text :class="getStatusClass(item.status)">{{getStatusText(item.status)}}</text>
8
-				</view>
3
+
4
+		<view class="queryParams_wrap">
5
+			<view class="search">
6
+				<u--input clearable prefixIcon="search" v-model="queryParams.phone" shape="circle" clearable
7
+					@blur="handleKeyword" @clear="handleKeywordClear" placeholder="请输入电话"></u--input>
8
+			</view>
9
+			<view class="query">
10
+				<view style="margin-right: 10rpx;" @click="handleshowFilter">筛选</view>
11
+				<u-icon name="arrow-down-fill" color="#aaa" size="10"></u-icon>
9 12
 			</view>
10
-			<view class="order_info">
11
-				<view class="telPhone">
12
-					<view class="phone">
13
-						<text>电话: </text>
14
-						<show-real-text :real="item.phone" :type='type'
15
-							:style="{ color : item.repetitionOperationName ? 'red' : 'black' }"></show-real-text>
13
+		</view>
14
+
15
+
16
+		<view class="order_item_wrap">
17
+			<view class="order_item" v-for="item in listData" :key="item.id" @click="handleToDetail(item)">
18
+				<view class="order_top">
19
+					<view class="top_left">{{item.item}}</view>
20
+					<view class="top_right">
21
+						<text :class="getStatusClass(item.status)">{{getStatusText(item.status)}}</text>
16 22
 					</view>
17
-					<view class="copy_btn" @click.stop="handleCopy(item)" v-if="type != '1'">复制</view>
18 23
 				</view>
19
-				<view class="info">
20
-					<view class="createUser" style="margin-right: 20px;">发单人:
21
-						{{ item.createNickName ? item.createNickName : "-" }}</view>
22
-					<view class="orgName">机构: {{ item.orgName ? item.orgName : "-" }}</view>
23
-				</view>
24
-				<view class="info">
25
-					<view class="sendDate" style="margin-right: 20px;">发单日期: {{ item.sendDate ? item.sendDate : "-" }}
24
+				<view class="order_info">
25
+					<view class="telPhone">
26
+						<view class="phone">
27
+							<text>电话: </text>
28
+							<show-real-text :real="item.phone" :type='type'
29
+								:style="{ color : item.repetitionOperationName ? 'red' : 'black' }"></show-real-text>
30
+						</view>
31
+						<view class="copy_btn" @click.stop="handleCopy(item)" v-if="type != '1'">复制</view>
26 32
 					</view>
27
-				</view>
28
-				<view class="info">
29
-					<view class="owner">所属人 {{ item.clueOwnerName ? item.clueOwnerName : "-" }}</view>
30
-					<view class="operation" style="margin-right: 20px;">运营人
31
-						{{ item.clueOperationName ? item.clueOperationName : "-" }}</view>
32
-				</view>
33
-			</view>
34
-			<view class="clue_state_wrap">
35
-				<view class="clue_state">
36
-					<view class="state_wrap">
37
-						<view class="label">阶段:</view>{{crm_form_state(item.state)}}
33
+					<view class="info">
34
+						<view class="createUser" style="margin-right: 20px;">发单人:
35
+							{{ item.createNickName ? item.createNickName : "-" }}
36
+						</view>
37
+						<view class="orgName">机构: {{ item.orgName ? item.orgName : "-" }}</view>
38
+					</view>
39
+					<view class="info">
40
+						<view class="sendDate" style="margin-right: 20px;">发单日期:
41
+							{{ item.sendDate ? item.sendDate : "-" }}
42
+						</view>
38 43
 					</view>
39
-					<view class="clueTag">
40
-						<view class="label">标签:</view>
41
-						<u-tag :text="tag.name" plain plainFill borderColor="#fff" size="mini"
42
-							v-for="(tag) in item.tags" :key="tag.id" style="margin-right: 10px;"
43
-							:bgColor="tag.color" color="#fff"></u-tag>
44
+					<view class="info">
45
+						<view class="owner">所属人 {{ item.clueOwnerName ? item.clueOwnerName : "-" }}</view>
46
+						<view class="operation" style="margin-right: 20px;">运营人
47
+							{{ item.clueOperationName ? item.clueOperationName : "-" }}
48
+						</view>
49
+					</view>
50
+				</view>
51
+				<view class="clue_state_wrap">
52
+					<view class="clue_state">
53
+						<view class="state_wrap">
54
+							<view class="label">阶段:</view>{{crm_form_state(item.state)}}
55
+						</view>
56
+						<view class="clueTag">
57
+							<view class="label">标签:</view>
58
+							<u-tag :text="tag.name" plain plainFill borderColor="#fff" size="mini"
59
+								v-for="(tag) in item.tags" :key="tag.id" style="margin-right: 10px;"
60
+								:bgColor="tag.color" color="#fff"></u-tag>
61
+						</view>
44 62
 					</view>
45 63
 				</view>
46 64
 			</view>
@@ -50,12 +68,18 @@
50 68
 		<u-loadmore :status="loadStatus" v-if="listData.length > 0" />
51 69
 		<!-- 空状态 -->
52 70
 		<show-emtry v-if="listData.length === 0"></show-emtry>
71
+
72
+		<filter-query ref="filter" v-model="queryParams" @getList="resetData" :mapHeight="mapHeight"
73
+			:dicts="dicts"></filter-query>
53 74
 	</view>
54 75
 </template>
55 76
 
56 77
 <script>
57 78
 	import pullUpRefresh from "@/utils/pullUpRefresh";
58
-	import { selectDictLabel } from "@/utils/util";
79
+	import {
80
+		selectDictLabel
81
+	} from "@/utils/util";
82
+	import filterQuery from "./filterQuery.vue";
59 83
 	export default {
60 84
 		mixins: [pullUpRefresh],
61 85
 		props: {
@@ -68,19 +92,46 @@
68 92
 				required: true
69 93
 			}
70 94
 		},
95
+		components: {
96
+			filterQuery,
97
+		},
71 98
 		data() {
72 99
 			return {
73 100
 				// 可以添加特定于接单中心的参数
74 101
 				queryParams: {
102
+					sendDateStart: '',
103
+					sendDateEnd: '',
104
+					type: '2',
105
+					item: undefined,
106
+					phone: undefined,
107
+					deptId: undefined,
108
+					state: undefined,
109
+					status: undefined,
110
+					allTagList: [],
111
+					identification: undefined,
112
+					createBy: undefined,
75 113
 					pageNum: 1,
76 114
 					pageSize: 10,
77 115
 				},
116
+
117
+				mapHeight: "0px"
78 118
 			}
79 119
 		},
80 120
 		methods: {
121
+			handleKeyword() {
122
+				this.resetData();
123
+			},
124
+			handleKeywordClear() {
125
+				// 组件有bug 清空后的值还是存在
126
+				this.queryParams.phone = "";
127
+				this.resetData();
128
+			},
129
+			handleshowFilter() {
130
+				this.$refs.filter.show();
131
+			},
81 132
 			// 字典翻译
82 133
 			crm_form_state(state) {
83
-				return selectDictLabel(this.dicts.crmFormStateDicts, state);
134
+				return selectDictLabel(this.dicts.crmFormStateDict, state);
84 135
 			},
85 136
 			getStatusText(status) {
86 137
 				const statusMap = {
@@ -138,15 +189,56 @@
138 189
 		},
139 190
 		mounted() {
140 191
 			this.resetData();
141
-		}
192
+			// 根据路由名称设置类型
193
+			this.queryParams.type = this.type;
194
+			uni.getSystemInfo({
195
+				success: (e) => {
196
+					const {
197
+						windowTop,
198
+						windowBottom,
199
+						windowHeight
200
+					} = e;
201
+					this.mapHeight = windowHeight + 'px';
202
+				}
203
+			});
204
+		},
142 205
 	}
143 206
 </script>
144 207
 
145 208
 <style lang="scss" scoped>
146 209
 	.order_center_wrap {
147
-		padding: 20px;
148 210
 		box-sizing: border-box;
149 211
 		min-height: 100vh;
212
+
213
+		.queryParams_wrap {
214
+			display: flex;
215
+			background: #fff;
216
+			padding: 14px 0;
217
+
218
+
219
+			.query,
220
+			.search {
221
+				display: flex;
222
+				align-items: center;
223
+				justify-content: center;
224
+				font-size: 16px;
225
+				font-weight: 700;
226
+				color: #202020;
227
+			}
228
+
229
+			.query {
230
+				flex: 1;
231
+			}
232
+
233
+			.search {
234
+				flex: 2;
235
+				padding-left: 20px;
236
+			}
237
+		}
238
+	}
239
+
240
+	.order_item_wrap {
241
+		padding: 20px 20px;
150 242
 	}
151 243
 
152 244
 	.order_item {
@@ -214,20 +306,23 @@
214 306
 	.empty_wrap {
215 307
 		margin-top: 100px;
216 308
 	}
217
-	
309
+
218 310
 	.clue_state_wrap {
219 311
 		font-size: 14px;
220 312
 		background: #f8f9fb;
221 313
 		padding: 10px;
222 314
 		color: #9b9aa2;
223 315
 		overflow: hidden;
224
-		.state_wrap{
316
+
317
+		.state_wrap {
225 318
 			display: flex;
226 319
 			margin-bottom: 10px;
227 320
 		}
228
-		.label{
321
+
322
+		.label {
229 323
 			flex: 0 0 40px !important;
230 324
 		}
325
+
231 326
 		.clueTag {
232 327
 			display: flex;
233 328
 		}

+ 149 - 0
pages/order/components/sort.vue

@@ -0,0 +1,149 @@
1
+<template>
2
+	<view>
3
+		<u-popup :show="showSort" mode="bottom" closeable @close="handleClose">
4
+			<scroll-view scroll-y :style="{ height: mapHeight }" @touchmove.stop="() => {}">
5
+			<view class="sort_wrap" :style="{ height : mapHeight }">
6
+				<view class="sort_way">
7
+					<view class="title">
8
+						排序方式
9
+					</view>
10
+					<view class="option_item" @click="handleChangeSort('asc')"
11
+						:class="{ active : value.sort == 'asc' }">
12
+						<text>正序排序</text>
13
+						<u-icon name="checkbox-mark" color="#4c8afe"></u-icon>
14
+					</view>
15
+					<view class="option_item" @click="handleChangeSort('desc')"
16
+						:class="{ active : value.sort == 'desc' }">
17
+						<text>倒序排序</text>
18
+						<u-icon name="checkbox-mark" color="#4c8afe"></u-icon>
19
+					</view>
20
+					<view class="title" style="margin-top: 30rpx;">
21
+						排序属性
22
+					</view>
23
+					<view class="option_item" v-for="(item,index) in sortParams" :key="index" 
24
+					@click="handleChangeSortField(item.value)" :class="{ active : value.sortField == item.value }">
25
+						<text>{{item.text}}</text>
26
+						<u-icon name="checkbox-mark" color="#4c8afe"></u-icon>
27
+					</view>
28
+				</view>
29
+				<u-tabbar :fixed="true" inactiveColor="#ffffff" class="case_tabbar" :placeholder="true"
30
+					:safeAreaInsetBottom="true">
31
+					<u-tabbar-item text="重置" :customStyle="{backgroundColor : '#fff'}"
32
+						class="uTabbarItem close_btn" @click="handleReset"></u-tabbar-item>
33
+					<u-tabbar-item text="确定" :customStyle="{backgroundColor : '#4c8afe'}"
34
+						class="uTabbarItem" @click="handleEnter"></u-tabbar-item>
35
+				</u-tabbar>
36
+			</view>
37
+			</scroll-view>
38
+		</u-popup>
39
+	</view>
40
+</template>
41
+
42
+<script>
43
+	export default {
44
+		props: {
45
+			value: {
46
+				type: Object,
47
+			},
48
+			mapHeight : {
49
+				type : String,
50
+			},
51
+		},
52
+		emits : ["getList"],
53
+		data() {
54
+			return {
55
+				showSort: false,
56
+				sortParams: [{
57
+					value: 1,
58
+					text: '创建时间'
59
+				}, {
60
+					value: 2,
61
+					text: '分配时间'
62
+				},{
63
+					value: 3,
64
+					text: '跟进时间'
65
+				}]
66
+			}
67
+		},
68
+		mounted(){
69
+		},
70
+		methods: {
71
+			handleClose(){
72
+				this.showSort = false;
73
+			},
74
+			handleReset(){
75
+				this.value.sort = undefined;
76
+				this.value.sortField = undefined;
77
+			},
78
+			handleEnter(){
79
+				this.$emit("getList");
80
+				this.showSort = false;
81
+			},
82
+			handleChangeSort(sort) {
83
+				this.value.sort = sort;
84
+			},
85
+			handleChangeSortField(value){
86
+				this.value.sortField = value;
87
+			},
88
+			show() {
89
+				this.showSort = true;
90
+			}
91
+		},
92
+	}
93
+</script>
94
+
95
+<style lang="scss" scoped>
96
+	.sort_wrap {
97
+	  padding: 20px;
98
+	  box-sizing: border-box;
99
+	  overflow: scroll;
100
+	
101
+	  .title {
102
+	    font-size: 18px;
103
+	    color: #202020;
104
+	  }
105
+	
106
+	  .option_item {
107
+	    display: flex;
108
+	    justify-content: space-between;
109
+	    align-items: center;
110
+	    font-size: 15px;
111
+	    padding: 18px 0;
112
+	    border-bottom: 1px solid #eeeef2;
113
+	    color: #606060;
114
+	    &:last-child{
115
+	      border: none;
116
+	    }
117
+	  }
118
+	
119
+	  .active {
120
+	    color:#4c8afe;
121
+	
122
+	    ::v-deep & .u-icon__icon {
123
+	      display: block;
124
+	    }
125
+	  }
126
+	
127
+	  ::v-deep .u-icon__icon {
128
+	    display: none;
129
+	    font-weight: bold !important;
130
+	    font-size: 19px !important;
131
+	  }
132
+	}
133
+
134
+
135
+	.case_tabbar {
136
+		.uTabbarItem {
137
+			::v-deep .u-tabbar-item__text {
138
+				font-size: 18px;
139
+			}
140
+		}
141
+
142
+		.close_btn {
143
+			::v-deep .u-tabbar-item__text {
144
+				font-size: 18px;
145
+				color: #606060 !important;
146
+			}
147
+		}
148
+	}
149
+</style>

+ 14 - 2
pages/order/index.vue

@@ -58,7 +58,10 @@
58 58
 					}
59 59
 				],
60 60
 				dicts : {
61
-					crmFormStateDicts : [],
61
+					crmFormStatusDict : [],
62
+					crmFormCategoryDict : [],
63
+					crmFormStateDict : [],
64
+					crmFormTacticDict : [],
62 65
 				}
63 66
 			}
64 67
 		},
@@ -74,7 +77,16 @@
74 77
 				}
75 78
 			});
76 79
 			this.$getDicts('crm_follow_status').then(res => {
77
-				this.dicts.crmFormStateDicts = res;
80
+				this.dicts.crmFormStatusDict = res;
81
+			});
82
+			this.$getDicts('crm_form_category').then(res => {
83
+				this.dicts.crmFormCategoryDict = res;
84
+			});
85
+			this.$getDicts('crm_form_state').then(res => {
86
+				this.dicts.crmFormStateDict = res;
87
+			});
88
+			this.$getDicts('crm_form_tactic').then(res => {
89
+				this.dicts.crmFormTacticDict = res;
78 90
 			});
79 91
 		},
80 92
 		methods: {