Browse Source

fix(market): 修复线索管理页面的跟进时间和上课时间选择问题

- 将日期选择器类型从 3 改为 5,以选择具体时间
-修复跟进时间、上课时间和提醒时间的显示和选择逻辑
-优化下拉选择器的选项设置和逻辑处理
- 添加对未选择跟进类型的提示
- 优化市场人员和销售人员的选择逻辑
master
liutong 12 months ago
parent
commit
af27786d86
  1. 120
      pages/market/clue/writing_followUp.vue

120
pages/market/clue/writing_followUp.vue

@ -52,7 +52,7 @@
<view v-if="!formData.follow_up_time" class="input-title" style="margin-right:14rpx;" @click="selectCon(`follow_up_time`)">点击选择 <view v-if="!formData.follow_up_time" class="input-title" style="margin-right:14rpx;" @click="selectCon(`follow_up_time`)">点击选择
</view> </view>
<view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`follow_up_time`)"> <view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`follow_up_time`)">
{{ str_follow_up_time }} {{ formData.follow_up_time }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
@ -126,7 +126,7 @@
<view v-if="!formData.schooltime" class="input-title" style="margin-right:14rpx;" @click="selectCon(`schooltime`)">点击选择 <view v-if="!formData.schooltime" class="input-title" style="margin-right:14rpx;" @click="selectCon(`schooltime`)">点击选择
</view> </view>
<view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`schooltime`)"> <view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`schooltime`)">
{{ str_schooltime }} {{ formData.schooltime }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
@ -306,7 +306,7 @@
<view v-if="!formData.reminder_time" class="input-title" style="margin-right:14rpx;" @click="selectCon(`reminder_time`)">点击选择 <view v-if="!formData.reminder_time" class="input-title" style="margin-right:14rpx;" @click="selectCon(`reminder_time`)">点击选择
</view> </view>
<view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`reminder_time`)"> <view v-else class="input-title" style="margin-right:14rpx;" @click="selectCon(`reminder_time`)">
{{ str_reminder_time }} {{ formData.reminder_time }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
@ -338,7 +338,7 @@
<!-- 年月日-选择时间 --> <!-- 年月日-选择时间 -->
<fui-date-picker :show="show_date" type="3" @change="change_date" @cancel="cancel_date"></fui-date-picker> <fui-date-picker :show="show_date" type="5" @change="change_date" @cancel="cancel_date"></fui-date-picker>
<!-- 下拉选择器 --> <!-- 下拉选择器 -->
<fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="changeOptions" <fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="changeOptions"
@ -349,6 +349,7 @@
<script> <script>
import commonApi from '@/api/common.js'; import commonApi from '@/api/common.js';
import marketApi from '@/api/market.js'; import marketApi from '@/api/market.js';
import memberApi from '@/api/member.js';
const rules = [{ const rules = [{
name: "mobile", name: "mobile",
@ -773,31 +774,29 @@ export default {
switch (type) { switch (type) {
//线 //线
case 'sales_id': case 'sales_id':
this.options = this.options_source_channel this.options = this.options_sales_id
this.show = true this.show = true
this.linkage = true this.linkage = true
break; break;
// //->
case 'staff_id': case 'staff_id':
this.options = this.options_customer_source this.options = this.options_staff_id
this.show = true this.show = true
this.linkage = true this.linkage = true
break; break;
// //
case 'follow_up_time': case 'follow_up_time':
this.options = this.options_add_staff_id this.show_date = true
this.show = true
this.linkage = true
break; break;
// //
case 'purchasing_power': case 'purchasing_power':
this.options = this.options_entry_type this.options = this.options_purchasing_power
this.show = true this.show = true
this.linkage = true this.linkage = true
break; break;
// //
case 'cognitive_concept': case 'cognitive_concept':
this.options = this.options_staff_id this.options = this.options_cognitive_concept
this.show = true this.show = true
this.linkage = true this.linkage = true
break; break;
@ -807,23 +806,50 @@ export default {
break; break;
// //
case 'emotional_intensity': case 'emotional_intensity':
this.show_date = true this.options = this.options_emotional_intensity
this.show = true
this.linkage = true
break; break;
// //
case 'initial_customer_intent': case 'initial_customer_intent':
this.show_date = true this.options = this.options_initial_customer_intent
this.show = true
this.linkage = true
break; break;
// //
case 'initial_relationship_intent': case 'initial_relationship_intent':
this.show_date = true this.options = this.options_initial_relationship_intent
this.show = true
this.linkage = true
break; break;
// //
case 'entry_type': case 'entry_type':
this.show_date = true this.options = this.options_entry_type
this.show = true
this.linkage = true
//->
this.formData.follow_staff_id = ''
break; break;
// //->
case 'follow_staff_id': case 'follow_staff_id':
this.show_date = true if(!this.formData.entry_type){
uni.showToast({
title: '请先选择跟进类型',
icon: 'none'
})
return
}
if(this.formData.entry_type == 1){
//
this.options = this.options_follow_staff_id_sc
}else{
//
this.options = this.options_follow_staff_id_xs
}
this.show = true
this.linkage = true
break; break;
//-() //-()
case 'reminder_time': case 'reminder_time':
@ -837,25 +863,15 @@ export default {
this.show = false this.show = false
let type = this.options_type let type = this.options_type
switch (type) { switch (type) {
//
case 'source_channel':
this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value
break;
//线 //线
case 'sales_id': case 'sales_id':
this.str_source_channel = e.text//text this.str_sales_id = e.text//text
this.formData.source_channel = e.value//value this.formData.sales_id = e.value//value
break; break;
// //
case 'staff_id': case 'staff_id':
this.str_source_channel = e.text//text this.str_staff_id = e.text//text
this.formData.source_channel = e.value//value this.formData.staff_id = e.value//value
break;
//
case 'follow_up_time':
this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value
break; break;
// //
case 'purchasing_power': case 'purchasing_power':
@ -864,11 +880,6 @@ export default {
break; break;
// //
case 'cognitive_concept': case 'cognitive_concept':
this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value
break;
//
case 'schooltime':
this.str_source_channel = e.text//text this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value this.formData.source_channel = e.value//value
break; break;
@ -896,19 +907,40 @@ export default {
this.str_source_channel = e.text//text this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value this.formData.source_channel = e.value//value
break; break;
//-()
case 'reminder_time':
this.str_source_channel = e.text//text
this.formData.source_channel = e.value//value
break;
} }
}, },
//
cancel() {
this.show = false
},
//- //-
change_date(e) { change_date(e) {
//
this.show_date = false this.show_date = false
this.formData.follow_up_time = e.result ?? '' //
let type = this.options_type
console.log('时间选择器',type,e)
let val = (e.result ?? '')
if(val){
val = val + ':00'
}
switch (type) {
//
case 'follow_up_time':
this.formData.follow_up_time = val
break;
//
case 'schooltime':
this.formData.schooltime = val
break;
//->
case 'reminder_time':
this.formData.reminder_time = val
break;
}
}, },
// //
cancel_date() { cancel_date() {

Loading…
Cancel
Save