|
|
@@ -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
|
// 添加跟进记录
|