瀏覽代碼

补充品牌素筛选

chenyidong 3 月之前
父節點
當前提交
15092605f9
共有 4 個文件被更改,包括 56 次插入18 次删除
  1. 二進制
      943c87e4f214f261b1f269e1d2d32326.keystore
  2. 41 10
      pages/clueDetail/page/clueDetail.vue
  3. 14 8
      pages/receiptForm/index.vue
  4. 1 0
      utils/api.js

二進制
943c87e4f214f261b1f269e1d2d32326.keystore


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

@@ -93,23 +93,26 @@
93 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 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 101
 			</template>
101 102
 			<template #advertising>
102 103
 				<advertising :clueId="clueDetail.id" v-if="clueDetail.id" ref="advertisingRef"></advertising>
103 104
 			</template>
104 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 108
 			</template>
107 109
 			<template #callRecord>
108 110
 				<callRecord :clueId="clueDetail.id" :clueDetail="clueDetail" v-if="clueDetail.id" ref="callRecordRef">
109 111
 				</callRecord>
110 112
 			</template>
111 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 116
 			</template>
114 117
 		</yui-tabs>
115 118
 		<u-tabbar class="clueDetail_tabber" :fixed="true" inactiveColor="#ffffff" :placeholder="true"
@@ -318,18 +321,46 @@
318 321
 				if (count > 0) {
319 322
 					uni.showModal({
320 323
 						title: '该线索已发单是否再次发单?',
321
-						success: function (res) {
324
+						success: (res)=> {
322 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 342
 					uni.navigateTo({
331 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 28
           ></u--input>
29 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 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 41
         </u-form-item>
39 42
 
40 43
         <u-form-item
@@ -360,6 +363,7 @@ export default {
360 363
         { label: "否", value: 2 },
361 364
       ],
362 365
       categoryDict: [],
366
+      sendOrderTypeDict: [],
363 367
       brandDict: [],
364 368
       labelStyle: {
365 369
         fontSize: "28rpx",
@@ -523,12 +527,14 @@ export default {
523 527
     // 获取字典数据
524 528
     async getDicts() {
525 529
       try {
526
-        const [categoryRes, brandRes] = await Promise.all([
530
+        const [categoryRes, brandRes,sendOrderTypeRes] = await Promise.all([
527 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 535
         this.categoryDict = categoryRes;
531 536
         this.brandDict = brandRes;
537
+		this.sendOrderTypeDict = sendOrderTypeRes;
532 538
       } catch (error) {
533 539
         console.error("获取字典数据失败:", error);
534 540
       }

+ 1 - 0
utils/api.js

@@ -102,6 +102,7 @@ const install = (Vue, vm) => {
102 102
 		listReceiptFormByOrderId:(orderFormId,config={})=>http.get(store.state.user.path + '/clueReceiptForm/listByOrderId/' + orderFormId),
103 103
 		getReceiptForm:(id,config={})=>http.get(store.state.user.path + '/clueReceiptForm/' + id),
104 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