chenyidong месяцев назад: 3
Родитель
Сommit
15092605f9
4 измененных файлов с 56 добавлено и 18 удалено
  1. BIN
      943c87e4f214f261b1f269e1d2d32326.keystore
  2. 41 10
      pages/clueDetail/page/clueDetail.vue
  3. 14 8
      pages/receiptForm/index.vue
  4. 1 0
      utils/api.js

BIN
943c87e4f214f261b1f269e1d2d32326.keystore


+ 41 - 10
pages/clueDetail/page/clueDetail.vue

@@ -93,23 +93,26 @@
93
 		</view>
93
 		</view>
94
 
94
 
95
 
95
 
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">
96
+		<yui-tabs :tabs="tabs" v-model="activeIndex" :lineWidth="'120rpx'" :isLazyRender="false" color="#108cff"
97
+			titleActiveColor="#108cff" :swipeable="true" :swiper="false" :ellipsis="false" :scroll-threshold="3">
98
 			<template #clueInfo>
98
 			<template #clueInfo>
99
-				<clueInfo :clueId="clueDetail.id" v-if="clueDetail.id" :params="params" ref="clueInfoRef" type="1"></clueInfo>
99
+				<clueInfo :clueId="clueDetail.id" v-if="clueDetail.id" :params="params" ref="clueInfoRef" type="1">
100
+				</clueInfo>
100
 			</template>
101
 			</template>
101
 			<template #advertising>
102
 			<template #advertising>
102
 				<advertising :clueId="clueDetail.id" v-if="clueDetail.id" ref="advertisingRef"></advertising>
103
 				<advertising :clueId="clueDetail.id" v-if="clueDetail.id" ref="advertisingRef"></advertising>
103
 			</template>
104
 			</template>
104
 			<template #followRecord>
105
 			<template #followRecord>
105
-				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="1"></followRecord>
106
+				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="1">
107
+				</followRecord>
106
 			</template>
108
 			</template>
107
 			<template #callRecord>
109
 			<template #callRecord>
108
 				<callRecord :clueId="clueDetail.id" :clueDetail="clueDetail" v-if="clueDetail.id" ref="callRecordRef">
110
 				<callRecord :clueId="clueDetail.id" :clueDetail="clueDetail" v-if="clueDetail.id" ref="callRecordRef">
109
 				</callRecord>
111
 				</callRecord>
110
 			</template>
112
 			</template>
111
 			<template #orderFollow>
113
 			<template #orderFollow>
112
-				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="3"></followRecord>
114
+				<followRecord :clueId="clueDetail.id" v-if="clueDetail.id" ref="followRecordRef" type="3">
115
+				</followRecord>
113
 			</template>
116
 			</template>
114
 		</yui-tabs>
117
 		</yui-tabs>
115
 		<u-tabbar class="clueDetail_tabber" :fixed="true" inactiveColor="#ffffff" :placeholder="true"
118
 		<u-tabbar class="clueDetail_tabber" :fixed="true" inactiveColor="#ffffff" :placeholder="true"
@@ -318,18 +321,46 @@
318
 				if (count > 0) {
321
 				if (count > 0) {
319
 					uni.showModal({
322
 					uni.showModal({
320
 						title: '该线索已发单是否再次发单?',
323
 						title: '该线索已发单是否再次发单?',
321
-						success: function (res) {
324
+						success: (res)=> {
322
 							if (res.confirm) {
325
 							if (res.confirm) {
323
-								uni.navigateTo({
324
-									url: `/pages/orderForm/index?clueId=${this.clueId}`
325
-								})
326
+								this.toOrderForm()
326
 							}
327
 							}
327
 						}
328
 						}
328
 					});
329
 					});
329
-				}else{
330
+				} else {
331
+					this.toOrderForm()
332
+				}
333
+			},
334
+			toOrderForm() {
335
+				const {
336
+					id,
337
+					ownLatestDynamicTime,
338
+					createTime,
339
+					clueOwnerId
340
+				} = this.clueDetail;
341
+				if (this.$store.state.user.userInfo.userId === clueOwnerId) {
330
 					uni.navigateTo({
342
 					uni.navigateTo({
331
 						url: `/pages/orderForm/index?clueId=${this.clueId}`
343
 						url: `/pages/orderForm/index?clueId=${this.clueId}`
332
 					})
344
 					})
345
+				} else {
346
+					// 确定用于判断的目标时间(ownLatestDynamicTime,为null则用createTime)
347
+					const date = ownLatestDynamicTime || createTime
348
+
349
+					const twoDaysLater = new Date(date)
350
+					twoDaysLater.setDate(twoDaysLater.getDate() + 2) // 日期加2天
351
+
352
+					// 是否大于当前时间 小于可以发单
353
+					let isOrderForm = false
354
+					if (twoDaysLater) {
355
+						isOrderForm = twoDaysLater.getTime() <= new Date().getTime()
356
+					}
357
+					if (isOrderForm) {
358
+						uni.navigateTo({
359
+							url: `/pages/orderForm/index?clueId=${this.clueId}`
360
+						})
361
+					} else {
362
+						uni.$u.toast('非所属人需两天内无跟进记录才可发单')
363
+					}
333
 				}
364
 				}
334
 			},
365
 			},
335
 			// 添加跟进记录
366
 			// 添加跟进记录

+ 14 - 8
pages/receiptForm/index.vue

@@ -28,13 +28,16 @@
28
           ></u--input>
28
           ></u--input>
29
         </u-form-item>
29
         </u-form-item>
30
 
30
 
31
-        <u-form-item label="客服" prop="customerServiceName" borderBottom>
32
-          <u--input
31
+        <u-form-item label="订单类型" prop="customerServiceName" borderBottom>
32
+          <ld-select
33
+            :list="sendOrderTypeDict"
34
+            label-key="dictLabel"
35
+            value-key="dictValue"
36
+            placeholder="请选择类别"
33
             v-model="form.customerServiceName"
37
             v-model="form.customerServiceName"
34
-            placeholder="请输入客服姓名"
35
-            border="none"
36
-            :disabled="!isEdit"
37
-          ></u--input>
38
+            :border="false"
39
+          ></ld-select>
40
+          <u-icon slot="right" name="arrow-right"></u-icon>
38
         </u-form-item>
41
         </u-form-item>
39
 
42
 
40
         <u-form-item
43
         <u-form-item
@@ -360,6 +363,7 @@ export default {
360
         { label: "否", value: 2 },
363
         { label: "否", value: 2 },
361
       ],
364
       ],
362
       categoryDict: [],
365
       categoryDict: [],
366
+      sendOrderTypeDict: [],
363
       brandDict: [],
367
       brandDict: [],
364
       labelStyle: {
368
       labelStyle: {
365
         fontSize: "28rpx",
369
         fontSize: "28rpx",
@@ -523,12 +527,14 @@ export default {
523
     // 获取字典数据
527
     // 获取字典数据
524
     async getDicts() {
528
     async getDicts() {
525
       try {
529
       try {
526
-        const [categoryRes, brandRes] = await Promise.all([
530
+        const [categoryRes, brandRes,sendOrderTypeRes] = await Promise.all([
527
           this.$getDicts("crm_form_category"),
531
           this.$getDicts("crm_form_category"),
528
-          this.$getDicts("crm_form_brand")
532
+          this.$getDicts("crm_form_brand"),
533
+		  this.$getDicts("crm_sendOrder_type")
529
         ]);
534
         ]);
530
         this.categoryDict = categoryRes;
535
         this.categoryDict = categoryRes;
531
         this.brandDict = brandRes;
536
         this.brandDict = brandRes;
537
+		this.sendOrderTypeDict = sendOrderTypeRes;
532
       } catch (error) {
538
       } catch (error) {
533
         console.error("获取字典数据失败:", error);
539
         console.error("获取字典数据失败:", error);
534
       }
540
       }

+ 1 - 0
utils/api.js

@@ -102,6 +102,7 @@ const install = (Vue, vm) => {
102
 		listReceiptFormByOrderId:(orderFormId,config={})=>http.get(store.state.user.path + '/clueReceiptForm/listByOrderId/' + orderFormId),
102
 		listReceiptFormByOrderId:(orderFormId,config={})=>http.get(store.state.user.path + '/clueReceiptForm/listByOrderId/' + orderFormId),
103
 		getReceiptForm:(id,config={})=>http.get(store.state.user.path + '/clueReceiptForm/' + id),
103
 		getReceiptForm:(id,config={})=>http.get(store.state.user.path + '/clueReceiptForm/' + id),
104
 		delReceiptForm:(id,config={})=>http.delete(store.state.user.path + '/clueReceiptForm/' + id),
104
 		delReceiptForm:(id,config={})=>http.delete(store.state.user.path + '/clueReceiptForm/' + id),
105
+		saveClueOrderForm:(data={})=>http.post(store.state.user.path + '/clueSendForm/saveClueOrderForm',data),
105
 	}
106
 	}
106
 }
107
 }
107
 
108