ソースを参照

我的分成列表的筛选

chenyidong 3 ヶ月 前
コミット
4a539f93a9

+ 539 - 0
pages/order/components/commission/filterQuery.vue

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

+ 320 - 0
pages/order/components/commission/myCommission.vue

@@ -0,0 +1,320 @@
1
+<template>
2
+	<view class="my_commission_wrap">
3
+		<view class="queryParams_wrap">
4
+			<view class="search">
5
+				<u--input clearable prefixIcon="search" v-model="queryParams.phone" shape="circle" clearable
6
+					@blur="handleKeyword" @clear="handleKeywordClear" placeholder="请输入电话"></u--input>
7
+			</view>
8
+			<view class="query">
9
+				<view style="margin-right: 10rpx;" @click="handleshowFilter">筛选</view>
10
+				<u-icon name="arrow-down-fill" color="#aaa" size="10"></u-icon>
11
+			</view>
12
+		</view>
13
+
14
+		<view class="commission_item_wrap">
15
+			<!-- 统计信息 -->
16
+			<view class="commission_item" v-for="item in listData" :key="item.id">
17
+				<view class="commission_top">
18
+					<view class="top_left">{{item.item}}</view>
19
+					<view class="top_right">
20
+						<text class="account_type">{{ item.accountType === '1' ? '前端' : '后端' }}</text>
21
+					</view>
22
+				</view>
23
+				<view class="commission_info">
24
+					<view class="info_row">
25
+						<view class="info_item">
26
+							<text class="label">电话: </text>
27
+							<show-real-text :real="item.phone" :type='type'></show-real-text>
28
+						</view>
29
+					</view>
30
+					<view class="info_row">
31
+						<view class="info_item">
32
+							<text class="label">收单时间: </text>
33
+							<text class="value">{{item.receiptDate || '-'}}</text>
34
+						</view>
35
+					</view>
36
+					<view class="info_row">
37
+						<view class="info_item">
38
+							<text class="label">收单人: </text>
39
+							<text class="value">{{item.receiptNickName || '-'}}</text>
40
+						</view>
41
+						<view class="info_item">
42
+							<text class="label">公司: </text>
43
+							<text class="value">{{item.orgName || '-'}}</text>
44
+						</view>
45
+					</view>
46
+					<view class="info_row">
47
+						<view class="info_item">
48
+							<text class="label">分成所属人: </text>
49
+							<text class="value">{{item.userName || '-'}}</text>
50
+						</view>
51
+						<view class="info_item">
52
+							<text class="label">分成比例: </text>
53
+							<text class="value">{{item.commissionRate || '-'}}%</text>
54
+						</view>
55
+					</view>
56
+				</view>
57
+				<view class="commission_amount">
58
+					<view class="amount_item">
59
+						<view class="amount_label">业绩</view>
60
+						<view class="amount_value primary">{{formatAmount(item.commissionAmount)}}</view>
61
+					</view>
62
+					<view class="amount_item">
63
+						<view class="amount_label">毛业绩</view>
64
+						<view class="amount_value">{{formatAmount(item.grossAmount)}}</view>
65
+					</view>
66
+				</view>
67
+			</view>
68
+		</view>
69
+		
70
+		<filter-query ref="filter" v-model="queryParams" @getList="resetData" :mapHeight="mapHeight"></filter-query>
71
+
72
+		<!-- 加载更多 -->
73
+		<u-loadmore :status="loadStatus" v-if="listData.length > 0" />
74
+		<!-- 空状态 -->
75
+		<show-emtry v-if="listData.length === 0"></show-emtry>
76
+	</view>
77
+</template>
78
+
79
+<script>
80
+	import pullUpRefresh from "@/utils/pullUpRefresh";
81
+	import filterQuery from "./filterQuery.vue";
82
+	export default {
83
+		mixins: [pullUpRefresh],
84
+		components: {
85
+			filterQuery,
86
+		},
87
+		props: {
88
+			type: {
89
+				type: String,
90
+				default: '2'
91
+			},
92
+			showStats: {
93
+				type: Boolean,
94
+				default: true
95
+			}
96
+		},
97
+		data() {
98
+			return {
99
+				queryParams: {
100
+					phone : "",
101
+					pageNum: 1,
102
+					pageSize: 10,
103
+				},
104
+				
105
+				mapHeight: "0px"
106
+			}
107
+		},
108
+		methods: {
109
+			handleKeyword() {
110
+				this.resetData();
111
+			},
112
+			handleKeywordClear() {
113
+				// 组件有bug 清空后的值还是存在
114
+				this.queryParams.phone = "";
115
+				this.resetData();
116
+			},
117
+			handleshowFilter() {
118
+				this.$refs.filter.show();
119
+			},
120
+			formatAmount(amount) {
121
+				if (!amount) return '-';
122
+				return parseFloat(amount).toLocaleString();
123
+			},
124
+			async getList() {
125
+				const {
126
+					pageNum,
127
+					pageSize,
128
+				} = this.queryParams;
129
+				this.queryParams.type = this.type;
130
+				// 调用分成接口
131
+				const {
132
+					rows,
133
+					total
134
+				} = await uni.$u.api.selectCommissionList({
135
+					pageSize,
136
+					pageNum,
137
+				}, this.queryParams);
138
+				return rows;
139
+			},
140
+			handleOnReachBottom() {
141
+				this.handleReachBottom();
142
+			}
143
+		},
144
+		mounted() {
145
+			this.resetData();
146
+			uni.getSystemInfo({
147
+				success: (e) => {
148
+					const {
149
+						windowTop,
150
+						windowBottom,
151
+						windowHeight
152
+					} = e;
153
+					this.mapHeight = windowHeight + 'px';
154
+				}
155
+			});
156
+		}
157
+	}
158
+</script>
159
+
160
+<style lang="scss" scoped>
161
+	.my_commission_wrap {
162
+		.queryParams_wrap {
163
+			display: flex;
164
+			background: #fff;
165
+			padding: 14px 0;
166
+		
167
+		
168
+			.query,
169
+			.search {
170
+				display: flex;
171
+				align-items: center;
172
+				justify-content: center;
173
+				font-size: 16px;
174
+				font-weight: 700;
175
+				color: #202020;
176
+			}
177
+		
178
+			.query {
179
+				flex: 1;
180
+			}
181
+		
182
+			.search {
183
+				flex: 2;
184
+				padding-left: 20px;
185
+			}
186
+		}
187
+	}
188
+
189
+	.stats_info_wrap {
190
+		margin-bottom: 30px;
191
+	}
192
+
193
+	.stats_info_top {
194
+		display: flex;
195
+		margin-bottom: 20px;
196
+
197
+		.info_item {
198
+			box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
199
+			width: 23%;
200
+			margin-right: 2.6%;
201
+			height: 120px;
202
+			padding: 15px;
203
+			background: #fff;
204
+			border-radius: 15px;
205
+
206
+			&:last-child {
207
+				margin-right: 0;
208
+			}
209
+
210
+			.info_title {
211
+				font-size: 14px;
212
+				color: #6b7280;
213
+				margin-bottom: 15px;
214
+			}
215
+
216
+			.info_value {
217
+				font-size: 24px;
218
+				font-weight: bold;
219
+				color: #202020;
220
+			}
221
+		}
222
+	}
223
+
224
+	.commission_item_wrap {
225
+		padding: 20px 20px;
226
+	}
227
+
228
+	.commission_item {
229
+		background: #fff;
230
+		border-radius: 20px;
231
+		padding: 20px;
232
+		margin-bottom: 20px;
233
+		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
234
+
235
+		.commission_top {
236
+			display: flex;
237
+			justify-content: space-between;
238
+			margin-bottom: 15px;
239
+
240
+			.top_left {
241
+				font-size: 18px;
242
+				font-weight: bold;
243
+				color: #202020;
244
+			}
245
+
246
+			.top_right {
247
+				.account_type {
248
+					background: #108cff;
249
+					color: #fff;
250
+					padding: 4px 8px;
251
+					border-radius: 10px;
252
+					font-size: 12px;
253
+				}
254
+			}
255
+		}
256
+
257
+		.commission_info {
258
+			margin-bottom: 15px;
259
+
260
+			.info_row {
261
+				display: flex;
262
+				margin-bottom: 8px;
263
+
264
+				&:last-child {
265
+					margin-bottom: 0;
266
+				}
267
+
268
+				.info_item {
269
+					flex: 1;
270
+					display: flex;
271
+					align-items: center;
272
+					font-size: 14px;
273
+
274
+					.label {
275
+						color: #9b9aa2;
276
+						margin-right: 8px;
277
+						min-width: 60px;
278
+					}
279
+
280
+					.value {
281
+						color: #202020;
282
+					}
283
+				}
284
+			}
285
+		}
286
+
287
+		.commission_amount {
288
+			display: flex;
289
+			justify-content: space-around;
290
+			padding: 15px 0;
291
+			border-top: 1px solid #f0f0f0;
292
+			background: #f8f9fb;
293
+			border-radius: 10px;
294
+
295
+			.amount_item {
296
+				text-align: center;
297
+
298
+				.amount_label {
299
+					font-size: 12px;
300
+					color: #9b9aa2;
301
+					margin-bottom: 5px;
302
+				}
303
+
304
+				.amount_value {
305
+					font-size: 16px;
306
+					font-weight: bold;
307
+					color: #202020;
308
+
309
+					&.primary {
310
+						color: #108cff;
311
+					}
312
+				}
313
+			}
314
+		}
315
+	}
316
+
317
+	.empty_wrap {
318
+		margin-top: 100px;
319
+	}
320
+</style>

+ 0 - 249
pages/order/components/myCommission.vue

@@ -1,249 +0,0 @@
1
-<template>
2
-	<view class="my_commission_wrap">
3
-		<!-- 统计信息 -->
4
-		<view class="commission_item" v-for="item in listData" :key="item.id">
5
-			<view class="commission_top">
6
-				<view class="top_left">{{item.item}}</view>
7
-				<view class="top_right">
8
-					<text class="account_type">{{ item.accountType === '1' ? '前端' : '后端' }}</text>
9
-				</view>
10
-			</view>
11
-			<view class="commission_info">
12
-				<view class="info_row">
13
-					<view class="info_item">
14
-						<text class="label">电话: </text>
15
-						<show-real-text :real="item.phone" :type='type'></show-real-text>
16
-					</view>
17
-				</view>
18
-				<view class="info_row">
19
-					<view class="info_item">
20
-						<text class="label">收单时间: </text>
21
-						<text class="value">{{item.receiptDate || '-'}}</text>
22
-					</view>
23
-				</view>
24
-				<view class="info_row">
25
-					<view class="info_item">
26
-						<text class="label">收单人: </text>
27
-						<text class="value">{{item.receiptNickName || '-'}}</text>
28
-					</view>
29
-					<view class="info_item">
30
-						<text class="label">公司: </text>
31
-						<text class="value">{{item.orgName || '-'}}</text>
32
-					</view>
33
-				</view>
34
-				<view class="info_row">
35
-					<view class="info_item">
36
-						<text class="label">分成所属人: </text>
37
-						<text class="value">{{item.userName || '-'}}</text>
38
-					</view>
39
-					<view class="info_item">
40
-						<text class="label">分成比例: </text>
41
-						<text class="value">{{item.commissionRate || '-'}}%</text>
42
-					</view>
43
-				</view>
44
-			</view>
45
-			<view class="commission_amount">
46
-				<view class="amount_item">
47
-					<view class="amount_label">业绩</view>
48
-					<view class="amount_value primary">{{formatAmount(item.commissionAmount)}}</view>
49
-				</view>
50
-				<view class="amount_item">
51
-					<view class="amount_label">毛业绩</view>
52
-					<view class="amount_value">{{formatAmount(item.grossAmount)}}</view>
53
-				</view>
54
-			</view>
55
-		</view>
56
-
57
-		<!-- 加载更多 -->
58
-		<u-loadmore :status="loadStatus" v-if="listData.length > 0" />
59
-		<!-- 空状态 -->
60
-		<show-emtry v-if="listData.length === 0"></show-emtry>
61
-	</view>
62
-</template>
63
-
64
-<script>
65
-	import pullUpRefresh from "@/utils/pullUpRefresh";
66
-	export default {
67
-		mixins: [pullUpRefresh],
68
-		props: {
69
-			type: {
70
-				type: String,
71
-				default: '2'
72
-			},
73
-			showStats: {
74
-				type: Boolean,
75
-				default: true
76
-			}
77
-		},
78
-		data() {
79
-			return {
80
-				queryParams: {
81
-					pageNum: 1,
82
-					pageSize: 10,
83
-				},
84
-			}
85
-		},
86
-		methods: {
87
-			formatAmount(amount) {
88
-				if (!amount) return '-';
89
-				return parseFloat(amount).toLocaleString();
90
-			},
91
-			async getList() {
92
-				const {
93
-					pageNum,
94
-					pageSize,
95
-				} = this.queryParams;
96
-				this.queryParams.type = this.type;
97
-				// 调用分成接口
98
-				const {
99
-					rows,
100
-					total
101
-				} = await uni.$u.api.selectCommissionList({
102
-					pageSize,
103
-					pageNum,
104
-				}, this.queryParams);
105
-				return rows;
106
-			},
107
-			handleOnReachBottom() {
108
-				this.handleReachBottom();
109
-			}
110
-		},
111
-		mounted() {
112
-			this.resetData();
113
-		}
114
-	}
115
-</script>
116
-
117
-<style lang="scss" scoped>
118
-	.my_commission_wrap {
119
-		padding: 20px;
120
-	}
121
-
122
-	.stats_info_wrap {
123
-		margin-bottom: 30px;
124
-	}
125
-
126
-	.stats_info_top {
127
-		display: flex;
128
-		margin-bottom: 20px;
129
-
130
-		.info_item {
131
-			box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
132
-			width: 23%;
133
-			margin-right: 2.6%;
134
-			height: 120px;
135
-			padding: 15px;
136
-			background: #fff;
137
-			border-radius: 15px;
138
-
139
-			&:last-child {
140
-				margin-right: 0;
141
-			}
142
-
143
-			.info_title {
144
-				font-size: 14px;
145
-				color: #6b7280;
146
-				margin-bottom: 15px;
147
-			}
148
-
149
-			.info_value {
150
-				font-size: 24px;
151
-				font-weight: bold;
152
-				color: #202020;
153
-			}
154
-		}
155
-	}
156
-
157
-	.commission_item {
158
-		background: #fff;
159
-		border-radius: 20px;
160
-		padding: 20px;
161
-		margin-bottom: 20px;
162
-		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
163
-
164
-		.commission_top {
165
-			display: flex;
166
-			justify-content: space-between;
167
-			margin-bottom: 15px;
168
-
169
-			.top_left {
170
-				font-size: 18px;
171
-				font-weight: bold;
172
-				color: #202020;
173
-			}
174
-
175
-			.top_right {
176
-				.account_type {
177
-					background: #108cff;
178
-					color: #fff;
179
-					padding: 4px 8px;
180
-					border-radius: 10px;
181
-					font-size: 12px;
182
-				}
183
-			}
184
-		}
185
-
186
-		.commission_info {
187
-			margin-bottom: 15px;
188
-
189
-			.info_row {
190
-				display: flex;
191
-				margin-bottom: 8px;
192
-
193
-				&:last-child {
194
-					margin-bottom: 0;
195
-				}
196
-
197
-				.info_item {
198
-					flex: 1;
199
-					display: flex;
200
-					align-items: center;
201
-					font-size: 14px;
202
-
203
-					.label {
204
-						color: #9b9aa2;
205
-						margin-right: 8px;
206
-						min-width: 60px;
207
-					}
208
-
209
-					.value {
210
-						color: #202020;
211
-					}
212
-				}
213
-			}
214
-		}
215
-
216
-		.commission_amount {
217
-			display: flex;
218
-			justify-content: space-around;
219
-			padding: 15px 0;
220
-			border-top: 1px solid #f0f0f0;
221
-			background: #f8f9fb;
222
-			border-radius: 10px;
223
-
224
-			.amount_item {
225
-				text-align: center;
226
-
227
-				.amount_label {
228
-					font-size: 12px;
229
-					color: #9b9aa2;
230
-					margin-bottom: 5px;
231
-				}
232
-
233
-				.amount_value {
234
-					font-size: 16px;
235
-					font-weight: bold;
236
-					color: #202020;
237
-
238
-					&.primary {
239
-						color: #108cff;
240
-					}
241
-				}
242
-			}
243
-		}
244
-	}
245
-
246
-	.empty_wrap {
247
-		margin-top: 100px;
248
-	}
249
-</style>

pages/order/components/filterQuery.vue → pages/order/components/orderCenter/filterQuery.vue


pages/order/components/orderCenter.vue → pages/order/components/orderCenter/orderCenter.vue


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

@@ -1,149 +0,0 @@
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>

+ 3 - 3
pages/order/index.vue

@@ -11,15 +11,15 @@
11 11
 				<orderCenter ref="myOrder" type="2" :dicts="dicts"></orderCenter>
12 12
 			</template>
13 13
 			<template #myCommission>
14
-				<myCommission ref="myCommission" type="2" :showStats="true"></myCommission>
14
+				<myCommission ref="myCommission" type="2" :showStats="true" ></myCommission>
15 15
 			</template>
16 16
 		</yui-tabs>
17 17
 	</view>
18 18
 </template>
19 19
 
20 20
 <script>
21
-	import orderCenter from "./components/orderCenter";
22
-	import myCommission from "./components/myCommission";
21
+	import orderCenter from "./components/orderCenter/orderCenter.vue";
22
+	import myCommission from "./components/commission/myCommission.vue";
23 23
 
24 24
 	export default {
25 25
 		components: {