瀏覽代碼

接单中心

chenyidong 3 月之前
父節點
當前提交
2bb93c6f2e

+ 11 - 0
pages.json

@@ -198,6 +198,12 @@
198 198
 				"navigationBarTitleText": "线索发单",
199 199
 				"navigationStyle": "custom"
200 200
 			}
201
+		},
202
+		{
203
+			"path": "pages/order/index",
204
+			"style": {
205
+				"navigationBarTitleText": "接单中心"
206
+			}
201 207
 		}
202 208
 	],
203 209
 	"globalStyle": {
@@ -229,6 +235,11 @@
229 235
 			"pagePath": "pages/privateClue/index",
230 236
 			"iconPath": "static/tabs/private.png",
231 237
 			"selectedIconPath": "static/tabs/private1.png"
238
+		}, {
239
+			"text": "接单中心",
240
+			"pagePath": "pages/order/index",
241
+			"iconPath": "static/tabs/private.png",
242
+			"selectedIconPath": "static/tabs/private1.png"
232 243
 		},{
233 244
 			"text": "我的",
234 245
 			"pagePath": "pages/person/index",

+ 8 - 11
pages/clueDetail/page/clueDetail.vue

@@ -93,21 +93,24 @@
93 93
 		</view>
94 94
 
95 95
 
96
-		<yui-tabs :tabs="tabs" :swipeThreshold="10" v-model="activeIndex" :lineWidth="'120rpx'" :isLazyRender="false"
97
-			color="#108cff" titleActiveColor="#108cff" :swipeable="true" :swiper="true" :scrollspy="true">
96
+		<yui-tabs :tabs="tabs" v-model="activeIndex" :lineWidth="'120rpx'" :isLazyRender="false"
97
+			color="#108cff" titleActiveColor="#108cff" :swipeable="true" :swiper="false" :ellipsis="false" :scroll-threshold="3">
98 98
 			<template #clueInfo>
99
-				<clueInfo :clueId="clueDetail.id" v-if="clueDetail.id" :params="params" ref="clueInfoRef"></clueInfo>
99
+				<clueInfo :clueId="clueDetail.id" v-if="clueDetail.id" :params="params" ref="clueInfoRef" type="1"></clueInfo>
100 100
 			</template>
101 101
 			<template #advertising>
102 102
 				<advertising :clueId="clueDetail.id" v-if="clueDetail.id" ref="advertisingRef"></advertising>
103 103
 			</template>
104 104
 			<template #followRecord>
105
-				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef"></followRecord>
105
+				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="1"></followRecord>
106 106
 			</template>
107 107
 			<template #callRecord>
108 108
 				<callRecord :clueId="clueDetail.id" :clueDetail="clueDetail" v-if="clueDetail.id" ref="callRecordRef">
109 109
 				</callRecord>
110 110
 			</template>
111
+			<template #orderFollow>
112
+				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="3"></followRecord>
113
+			</template>
111 114
 		</yui-tabs>
112 115
 		<u-tabbar class="clueDetail_tabber" :fixed="true" inactiveColor="#ffffff" :placeholder="true"
113 116
 			:safeAreaInsetBottom="true">
@@ -196,13 +199,7 @@
196 199
 					},
197 200
 					{
198 201
 						label: '后端跟进',
199
-						slot: 'callRecord'
200
-					},{
201
-						label: '后端跟进',
202
-						slot: 'callRecord'
203
-					},{
204
-						label: '后端跟进',
205
-						slot: 'callRecord'
202
+						slot: 'orderFollow'
206 203
 					}
207 204
 				],
208 205
 				activeIndex: 0,

+ 66 - 10
pages/clueDetail/tabs/followRecord/index.vue

@@ -52,12 +52,26 @@
52 52
 		props: {
53 53
 			clueId: {
54 54
 				required: true
55
+			},
56
+			orderId: {
57
+				type: String | Number,
58
+				required: false
59
+			},
60
+			type: {
61
+				type: String,
62
+				required: true
63
+				// '1' : 线索跟进
64
+				// '2' : 订单跟进(通过orderId)
65
+				// '3' : 订单跟进(通过clueId)
66
+				// '4' : 重复线索跟进
67
+				// 其他 : 重复订单跟进
55 68
 			}
56 69
 		},
57 70
 		data() {
58 71
 			return {
59 72
 				list: [0, 1],
60 73
 				dataList: {},
74
+				loading: false,
61 75
 				
62 76
 				showModal: false,
63 77
 				currentDeleteFollowId : undefined
@@ -71,18 +85,60 @@
71 85
 			},
72 86
 			isEmpty,
73 87
 			async getData() {
74
-				const {
75
-					data
76
-				} = await uni.$u.api.getClueFollowList({
77
-					clueId: this.clueId
78
-				});
79
-				this.dataList = data;
88
+				this.loading = true;
89
+				let data;
90
+				
91
+				// 根据type类型调用不同接口
92
+				if (this.type === '1') {
93
+					// 线索跟进
94
+					data = await uni.$u.api.getClueFollowList({
95
+						clueId: this.clueId
96
+					});
97
+				} else if (this.type === '2') {
98
+					// 订单跟进(通过orderId)
99
+					data = await uni.$u.api.getOrderFollowList({
100
+						orderId: this.orderId
101
+					});
102
+				} else if (this.type === '3') {
103
+					// 订单跟进(通过clueId)
104
+					data = await uni.$u.api.getOrderFollowListByClueId({
105
+						clueId: this.clueId
106
+					});
107
+				} else if (this.type === '4') {
108
+					// 重复线索跟进
109
+					data = await uni.$u.api.getDuplicateClueFollowByClueId({
110
+						clueId: this.clueId
111
+					});
112
+				} else {
113
+					// 重复订单跟进
114
+					data = await uni.$u.api.getDuplicateOrderFollowListByClueId({
115
+						clueId: this.clueId
116
+					});
117
+				}
118
+				
119
+				this.dataList = data.data;
120
+				this.loading = false;
80 121
 			},
81 122
 			async confirm() {
82
-				await uni.$u.api.deleteClueFollow([this.currentDeleteFollowId]);
83
-				uni.$u.toast("删除成功");
84
-				this.getData();
85
-				this.showModal = false;
123
+				try {
124
+					// 根据type类型调用不同删除接口
125
+					if (this.type === '1' || this.type === '4') {
126
+						// 线索跟进和重复线索跟进使用deleteClueFollow
127
+						await uni.$u.api.deleteClueFollow([this.currentDeleteFollowId]);
128
+					} else {
129
+						// 订单跟进(通过orderId)、订单跟进(通过clueId)、重复订单跟进使用deleteOrderFollow
130
+						await uni.$u.api.deleteOrderFollow([this.currentDeleteFollowId]);
131
+					}
132
+					
133
+					uni.$u.toast("删除成功");
134
+					this.getData();
135
+				} catch (error) {
136
+					console.error('删除跟进记录失败:', error);
137
+					uni.$u.toast("删除失败");
138
+				} finally {
139
+					this.showModal = false;
140
+					this.currentDeleteFollowId = undefined;
141
+				}
86 142
 			},
87 143
 		},
88 144
 		mounted() {

+ 22 - 0
pages/order/index.vue

@@ -0,0 +1,22 @@
1
+<template>
2
+	<view>
3
+		
4
+	</view>
5
+</template>
6
+
7
+<script>
8
+	export default {
9
+		data() {
10
+			return {
11
+				
12
+			}
13
+		},
14
+		methods: {
15
+			
16
+		}
17
+	}
18
+</script>
19
+
20
+<style>
21
+
22
+</style>

+ 1 - 1
uni_modules/yui-tabs/components/yui-tabs/css/index.less

@@ -114,7 +114,7 @@ uni-view , swiper-item, view{
114 114
 			font-size: 28rpx;
115 115
 			color: @inactiveColor;
116 116
 			text-align: center;
117
-			padding: 0 8rpx;
117
+			padding: 0 28rpx;
118 118
 			flex: 1;
119 119
 			cursor: pointer;
120 120
 			-webkit-tap-highlight-color: transparent;

+ 0 - 1
uni_modules/yui-tabs/components/yui-tabs/yui-tabs.vue

@@ -535,7 +535,6 @@
535 535
 			// 设置标签栏底部线条位置
536 536
 			setLine() {
537 537
 				if (this.isLine) { // 仅在 type="line" 时有效
538
-					console.log("currentIndex:", this.currentIndex);
539 538
 					const val = this.tabList[this.currentIndex].translateX
540 539
 					const transform = `translateX(${isDef(val) ? val + "px" : '-100%'}) translateX(-50%)`
541 540
 					const duration = `${this.lineAnimated?this.duration:'0'}s`

+ 5 - 0
utils/api.js

@@ -76,6 +76,11 @@ const install = (Vue, vm) => {
76 76
 		getCallClueFileByClueId : (params)=> http.get(store.state.user.path + '/clueFile/getCallClueFileByClueId',{params, custom : { noAuth: true }}),
77 77
 		getClueSendFormCountByClueId : (params = {},config = {})=>http.get(store.state.user.path + '/clueSendForm/getClueSendFormCountByClueId',{ params }),
78 78
 		saveClueOrderForm:(data,config={})=>http.post(store.state.user.path + '/clueSendForm/saveClueOrderForm',data),
79
+		getOrderFollowListByClueId:(params = {},config = {})=>http.get(store.state.user.path + '/orderFollow/getOrderFollowListByClueId',{ params }),
80
+		getDuplicateOrderFollowListByClueId:(params = {},config = {})=>http.get(store.state.user.path + '/orderFollow/getDuplicateOrderFollowListByClueId',{ params }),
81
+		deleteOrderFollow:(data,config={})=>http.post(store.state.user.path + '/orderFollow/deleteOrderFollow',data),
82
+		getOrderFollowList:(params = {},config = {})=>http.get(store.state.user.path + '/orderFollow/getOrderFollowList',{ params }),
83
+		getDuplicateClueFollowByClueId:(params = {},config = {})=>http.get(store.state.user.path + '/clueFollow/getDuplicateClueFollowByClueId',{ params }),
79 84
 	}
80 85
 }
81 86