Browse Source

refactor(market): 优化线索添加页面代码结构

-调整代码缩进和格式,提高可读性
- 移除冗余的空行和注释,精简代码
-优化数据结构定义,集中声明变量
- 统一使用箭头函数,提升代码一致性
master
liutong 1 year ago
parent
commit
c829abeae8
  1. 845
      pages/market/clue/add_clues.vue

845
pages/market/clue/add_clues.vue

@ -1,121 +1,141 @@
<template> <template>
<view class="assemble"> <view class="assemble">
<view class="search_box"> <view class="search_box">
<view class="input_box"> <view class="input_box">
<input type="text" v-model="keyword" placeholder="请输入客户名称"> <input type="text" v-model="keyword" placeholder="请输入客户名称">
</view> </view>
<view class="btn">查重</view> <view class="btn">查重</view>
</view> </view>
<view class="form-style"> <view class="form-style">
<fui-form ref="form" top="0" :model="formData" :show="false"> <fui-form ref="form" top="0" :model="formData" :show="false">
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<fui-form-item label="学员姓名" asterisk asteriskPosition="right" labelSize='26' prop="student_name" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="学员姓名" asterisk asteriskPosition="right" labelSize='26' prop="student_name"
<view class="input-title" style="margin-right:14rpx;" > background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_name" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_name"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="学员手机号" asterisk asteriskPosition="right" labelSize='26' prop="student_phone" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="学员手机号" asterisk asteriskPosition="right" labelSize='26' prop="student_phone"
<view class="input-title" style="margin-right:14rpx;" > background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_phone" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.student_phone"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="年龄" labelSize='26' asterisk asteriskPosition="right" prop="mobile" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="年龄" labelSize='26' asterisk asteriskPosition="right" prop="mobile" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-input-number signColor="#FFF" :min="1" :max="100" v-model="formData.age"></fui-input-number> <fui-input-number signColor="#FFF" :min="1" :max="100" v-model="formData.age"></fui-input-number>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="学校" asteriskPosition="right" labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="学校" asteriskPosition="right" labelSize='26' prop="" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.school_name" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.school_name"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="年级" asteriskPosition="right" labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="年级" asteriskPosition="right" labelSize='26' prop="" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.grade" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.grade"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="班级" asteriskPosition="right" labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="班级" asteriskPosition="right" labelSize='26' prop="" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.class_name" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.class_name"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="客户来源" asterisk asteriskPosition="right" labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="客户来源" asterisk asteriskPosition="right" labelSize='26' prop="" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(1)" <view class="input-title" style="margin-right:14rpx;" @click="selectCon(1)"
v-if="result_customer_source == ''">点击选择 v-if="result_customer_source == ''">点击选择
</view> </view>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(1)" v-else>{{ result_customer_source }} <view class="input-title" style="margin-right:14rpx;" @click="selectCon(1)" v-else>
{{ result_customer_source }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="归属人员" asterisk asteriskPosition="right" labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="归属人员" asterisk asteriskPosition="right" labelSize='26' prop="" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(2)" <view class="input-title" style="margin-right:14rpx;" @click="selectCon(2)"
v-if="result_add_staff_id == ''">点击选择 v-if="result_add_staff_id == ''">点击选择
</view> </view>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(2)" v-else>{{ result_add_staff_id }} <view class="input-title" style="margin-right:14rpx;" @click="selectCon(2)" v-else>{{
result_add_staff_id
}}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="联系人" asterisk asteriskPosition="right" labelSize='26' prop="name" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="联系人" asterisk asteriskPosition="right" labelSize='26' prop="name" background='#434544'
<view class="input-title" style="margin-right:14rpx;" > labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.contact_name" backgroundColor="#434544" size="26" color="#fff"></fui-input> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.contact_name"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
</view> </view>
<!-- <!--
<view class="input-style" style="margin-top: 50rpx;"> <view class="input-style" style="margin-top: 50rpx;">
<view class="input-style"> <view class="input-style">
<fui-form-item label="客户状态" labelSize='26' asterisk asteriskPosition="right" prop="mobile" <fui-form-item label="客户状态" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
background='#434544' labelColor='#fff' :bottomBorder='false'> background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(4)" <view class="input-title" style="margin-right:14rpx;" @click="selectCon(4)"
v-if="result_status == ''">点击选择</view> v-if="result_status == ''">点击选择</view>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(4)" v-else>{{ result_status }} <view class="input-title" style="margin-right:14rpx;" @click="selectCon(4)" v-else>{{ result_status }}
</view> </view>
</fui-form-item> </fui-form-item>
<fui-form-item label="签单意向联系人" labelWidth="230" labelSize='26' asterisk asteriskPosition="right" prop="mobile" <fui-form-item label="签单意向联系人" labelWidth="230" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
background='#434544' labelColor='#fff' :bottomBorder='false'> background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(5)" <view class="input-title" style="margin-right:14rpx;" @click="selectCon(5)"
v-if="result_intention == ''">点击选择</view> v-if="result_intention == ''">点击选择</view>
<view class="input-title" style="margin-right:14rpx;" @click="selectCon(5)" v-else>{{ result_intention }} <view class="input-title" style="margin-right:14rpx;" @click="selectCon(5)" v-else>{{ result_intention }}
</view> </view>
</fui-form-item> </fui-form-item>
</view> </view>
<view> <view>
<fui-form-item label="跟进内容" labelSize='26' asterisk asteriskPosition="right" prop="mobile" <fui-form-item label="跟进内容" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
background='#434544' labelColor='#fff' :bottomBorder='false'> background='#434544' labelColor='#fff' :bottomBorder='false'>
</fui-form-item> </fui-form-item>
<view style="width: 100%;background: #434544;"> <view style="width: 100%;background: #434544;">
<view style="margin: auto;width: 92%;padding: 20rpx 0 50rpx;"> <view style="margin: auto;width: 92%;padding: 20rpx 0 50rpx;">
<fui-textarea :padding="[0]" v-model="formData.mobile" <fui-textarea :padding="[0]" v-model="formData.mobile"
backgroundColor="#434544" size="26" color="#fff" :textareaBorder="true"></fui-textarea> backgroundColor="#434544" size="26" color="#fff" :textareaBorder="true"></fui-textarea>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
--> -->
<view class="title" style="margin-top: 20rpx;">附加信息</view> <view class="title" style="margin-top: 20rpx;">附加信息</view>
<view class="input-style"> <view class="input-style">
<view > <view>
<fui-form-item label="所在地区" labelSize='26' asterisk asteriskPosition="right" prop="mobile" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="所在地区" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击选择" backgroundColor="#434544" size="26" color="#fff" @click="show_area=true" v-model="formData.full_address"></fui-input> background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击选择" backgroundColor="#434544" size="26"
color="#fff" @click="show_area=true" v-model="formData.full_address"></fui-input>
<!--地区三级联动--> <!--地区三级联动-->
<fui-picker <fui-picker
@ -127,372 +147,377 @@
></fui-picker> ></fui-picker>
</fui-form-item> </fui-form-item>
<fui-form-item label="小区" labelSize='26' asterisk asteriskPosition="right" prop="mobile" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="小区" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.community_name" backgroundColor="#434544" size="26" color="#fff"></fui-input> background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.community_name"
backgroundColor="#434544" size="26" color="#fff"></fui-input>
</fui-form-item> </fui-form-item>
<fui-form-item label="客户标签" labelSize='26' asterisk asteriskPosition="right" prop="mobile" background='#434544' labelColor='#fff' :bottomBorder='false'> <fui-form-item label="客户标签" labelSize='26' asterisk asteriskPosition="right" prop="mobile"
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击选择" v-model="formData.customer_tags_name" backgroundColor="#434544" size="26" color="#fff" @click="show_customer_tags=true"></fui-input> background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击选择" v-model="formData.customer_tags_name"
backgroundColor="#434544" size="26" color="#fff" @click="show_customer_tags=true"></fui-input>
<!--下拉多选--> <!--下拉多选-->
<fui-select :show="show_customer_tags" :options="options_customer_tags" title="请选择银行" multiple isReverse checkboxColor="#FFC529" btnBackground="#FFC529" btnColor="#1A1D26" closeColor="#6D758A" @confirm="onConfirmCustomerTags" @close="show_customer_tags=false"></fui-select> <fui-select :show="show_customer_tags" :options="options_customer_tags" title="请选择银行" multiple isReverse
checkboxColor="#FFC529" btnBackground="#FFC529" btnColor="#1A1D26" closeColor="#6D758A"
@confirm="onConfirmCustomerTags" @close="show_customer_tags=false"></fui-select>
</fui-form-item> </fui-form-item>
</view>
</view>
</fui-form>
</view>
</view> <view class="fui-btn__box">
</view> <fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</fui-form> </view>
</view>
<view class="fui-btn__box">
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</view>
<!-- 年月日-选择时间 --> <!-- 年月日-选择时间 -->
<fui-date-picker :show="show_date" type="3" @change="change_date" @cancel="cancel_date"></fui-date-picker> <fui-date-picker :show="show_date" type="3" @change="change_date" @cancel="cancel_date"></fui-date-picker>
<!-- 选择器 --> <!-- 选择器 -->
<fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="change" @cancel="cancel"></fui-picker> <fui-picker :linkage='linkage' :options="options" :layer="1" :show="show" @change="change"
@cancel="cancel"></fui-picker>
</view> </view>
</template> </template>
<script> <script>
import commonApi from '@/api/common.js'; import commonApi from '@/api/common.js';
import marketApi from '@/api/market.js';
const rules = [{
name: "mobile", const rules = [{
rule: ["required", "isMobile"], name: "mobile",
msg: ["请输入手机号", "请输入正确的手机号"] rule: ["required", "isMobile"],
}]; msg: ["请输入手机号", "请输入正确的手机号"]
export default { }];
data() { export default {
return { data() {
switchChange_type: 1, return {
rules, switchChange_type: 1,
formData: { rules,
formData: {
student_name:'',//*
student_phone:'',//* student_name: '',//*
age:'',//* student_phone: '',//*
school_name:'',// age: '',//*
grade:'',// school_name: '',//
class_name:'',// grade: '',//
customer_source:'',//* class_name: '',//
add_staff_id:'',//id* customer_source: '',//*
contact_name:'',//* add_staff_id: '',//id*
province_id:'',//- contact_name: '',//*
city_id:'',//- province_id: '',//-
district_id:'',//- city_id: '',//-
full_address:'',// district_id: '',//-
community_name:'',// full_address: '',//
customer_tags_name:'',//,, community_name: '',//
customer_tags:['2','3'],// customer_tags_name: '',//,,
customer_tags: ['2', '3'],//
},
show_date: false,
result_date: '',
result_leixing: '',
result_student: '',
result_status: '',
result_intention: '',
result_dates: '',
result_renwu: '',
result_fangshi: '',
show: false,
options: [],
linkage: true,
options_type: undefined,
options_leixing: [{
'value': 1,
'text': '类型1'
}, {
'value': 2,
'text': '类型2'
}, {
'value': 3,
'text': '类型3'
}],
options_student: [{
'value': 1,
'text': '张三'
}, {
'value': 2,
'text': '李四'
}, {
'value': 3,
'text': '王五'
}],
options_status: [{
'value': 1,
'text': '状态1'
}, {
'value': 2,
'text': '状态2'
}, {
'value': 3,
'text': '状态3'
}],
options_intention: [{
'value': 1,
'text': '张三1'
}, {
'value': 2,
'text': '李四2'
}, {
'value': 3,
'text': '王五3'
}],
options_kehu: [{
'value': 1,
'text': '张三'
}, {
'value': 2,
'text': '李四'
}, {
'value': 3,
'text': '王五'
}],
options_renwu: [{
'value': 1,
'text': '是'
}, {
'value': 2,
'text': '否'
}],
options_fangshi: [{
'value': 1,
'text': '短信'
}, {
'value': 2,
'text': '微信'
}],
keyword: '',//
//
result_customer_source: '',//
options_customer_source: [
{
'value': 1,
'text': '渠道1'
}, },
show_date: false, {
result_date: '', 'value': 2,
result_leixing: '', 'text': '渠道2'
result_student: '', }
result_status: '', ],//
result_intention: '', //(add_staff_id,id)
result_add_staff_id: '',//
result_dates: '', options_add_staff_id: [
result_renwu: '', {
result_fangshi: '', 'value': 1,
'text': '张三'
show: false, },
options: [], {
linkage: true, 'value': 2,
options_type : undefined, 'text': '李四'
options_leixing: [{ }
'value': 1, ],//
'text': '类型1'
}, { //
'value': 2, show_customer_tags: false,
'text': '类型2' options_customer_tags: [
}, { {
'value': 3, text: '标签1',
'text': '类型3' value: '1',
}], checked: false,//"true=,false=
options_student: [{ },
'value': 1, {
'text': '张三' text: '标签2',
}, { value: '2',
'value': 2, checked: false,//
'text': '李四' },
}, { {
'value': 3, text: '标签3',
'text': '王五' value: '3',
}], checked: false,//
options_status: [{ }
'value': 1, ],//
'text': '状态1'
}, { //
'value': 2, show_area: false,
'text': '状态2' options_area: [],
}, { }
'value': 3, },
'text': '状态3' onShow() {
}], this.init()
options_intention: [{ },
'value': 1, methods: {
'text': '张三1' //
}, { async init() {
'value': 2, this.getAreaTree()//
'text': '李四2'
}, {
'value': 3,
'text': '王五3'
}],
options_kehu: [{
'value': 1,
'text': '张三'
}, {
'value': 2,
'text': '李四'
}, {
'value': 3,
'text': '王五'
}],
options_renwu: [{
'value': 1,
'text': '是'
}, {
'value': 2,
'text': '否'
}],
options_fangshi: [{
'value': 1,
'text': '短信'
}, {
'value': 2,
'text': '微信'
}],
keyword:'',//
//
result_customer_source:'',//
options_customer_source: [
{
'value': 1,
'text': '渠道1'
},
{
'value': 2,
'text': '渠道2'
}
],//
//(add_staff_id,id)
result_add_staff_id:'',//
options_add_staff_id: [
{
'value': 1,
'text': '张三'
},
{
'value': 2,
'text': '李四'
}
],//
//
show_customer_tags:false,
options_customer_tags:[
{
text: '标签1',
value: '1',
checked:false,//"true=,false=
},
{
text: '标签2',
value: '2',
checked:false,//
},
{
text: '标签3',
value: '3',
checked:false,//
}
],//
//
show_area:false,
options_area:[],
}
},
onShow(){
this.init()
}, },
methods: {
//
async init(){
this.getAreaTree()//
},
// //
async getAreaTree(){ async getAreaTree() {
let res = await commonApi.getAreaTree() let res = await commonApi.getAreaTree()
if(res.code != 1){ if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
return return
} }
this.options_area = res.data this.options_area = res.data
}, },
// //
submit() { submit() {
console.log(this.formData) console.log(this.formData)
this.$refs.form.validator(null, null, true).then(res => { this.$refs.form.validator(null, null, true).then(res => {
console.log(res) console.log(res)
if (res.isPassed) { if (res.isPassed) {
console.log('校验通过!') console.log('校验通过!')
} else { } else {
console.log('向上滑动页面查看错误提示!') console.log('向上滑动页面查看错误提示!')
}
}).catch(err => {
console.log(err)
})
},
//
selectCon(type) {
if (type == 1) {
//
this.options_type = 1
this.options = this.options_customer_source
this.show = true
this.linkage = true
} else if (type == 2) {
//id
this.options_type = 2
this.options = this.options_add_staff_id
this.show = true
this.linkage = true
} else if (type == 3) {
this.options_type = 3
this.options = this.options_student
this.show = true
this.linkage = true
} else if (type == 4) {
this.options_type = 4
this.options = this.options_status
this.show = true
this.linkage = true
} else if (type == 5) {
this.options_type = 5
this.options = this.options_intention
this.show = true
this.linkage = true
}else if (type == 6) {
//
this.options_date_type = 6
this.show_date = true
} else if (type == 7) {
//
this.options_type = 7
this.options = this.options_renwu
this.show = true
this.linkage = true
} else if (type == 8) {
//
this.options_type = 8
this.options = this.options_fangshi
this.show = true
this.linkage = true
}
},
//
change_date(e) {
if(this.options_date_type == 1){
this.show_date = false
this.result_date = e.result ?? ''
}else if(this.options_date_type == 6){
this.show_date = false
this.result_dates = e.result ?? ''
}
},
//
cancel_date() {
this.show_date = false
},
//
change(e) {
this.show = false
console.log(e)
if(this.options_type == 1){
//
this.result_customer_source = e.result
this.formData.customer_source = e.value
} }
else if(this.options_type == 2){ }).catch(err => {
//(id) console.log(err)
this.result_add_staff_id = e.result })
this.formData.add_staff_id = e.value },
} else if (this.options_type == 3) { //
this.result_student = e.result selectCon(type) {
} else if (this.options_type == 4) { if (type == 1) {
this.result_status = e.result //
} else if (this.options_type == 5) { this.options_type = 1
this.result_intention = e.result this.options = this.options_customer_source
} else if(this.options_type == 7){ this.show = true
this.result_renwu = e.result this.linkage = true
} else if(this.options_type == 8){ } else if (type == 2) {
this.result_fangshi = e.result //id
} this.options_type = 2
}, this.options = this.options_add_staff_id
this.show = true
//- this.linkage = true
onConfirmCustomerTags(e){ } else if (type == 3) {
console.log('多选客户标签',e) this.options_type = 3
this.show_customer_tags = false this.options = this.options_student
let customer_tags_name_arr = [] this.show = true
let customer_tags_arr = [] this.linkage = true
e.options.forEach((v,k)=>{ } else if (type == 4) {
customer_tags_arr.push(v.value) this.options_type = 4
customer_tags_name_arr.push(v.text) this.options = this.options_status
//v.value this.options_customer_tagscheckedtrue this.show = true
this.options_customer_tags.forEach((v,k)=>{ this.linkage = true
if(v.value == v.value){ } else if (type == 5) {
v.checked = true this.options_type = 5
} this.options = this.options_intention
}) this.show = true
this.linkage = true
} else if (type == 6) {
//
this.options_date_type = 6
this.show_date = true
} else if (type == 7) {
//
this.options_type = 7
this.options = this.options_renwu
this.show = true
this.linkage = true
} else if (type == 8) {
//
this.options_type = 8
this.options = this.options_fangshi
this.show = true
this.linkage = true
}
},
//
change_date(e) {
if (this.options_date_type == 1) {
this.show_date = false
this.result_date = e.result ?? ''
} else if (this.options_date_type == 6) {
this.show_date = false
this.result_dates = e.result ?? ''
}
},
//
cancel_date() {
this.show_date = false
},
//
change(e) {
this.show = false
console.log(e)
if (this.options_type == 1) {
//
this.result_customer_source = e.result
this.formData.customer_source = e.value
} else if (this.options_type == 2) {
//(id)
this.result_add_staff_id = e.result
this.formData.add_staff_id = e.value
} else if (this.options_type == 3) {
this.result_student = e.result
} else if (this.options_type == 4) {
this.result_status = e.result
} else if (this.options_type == 5) {
this.result_intention = e.result
} else if (this.options_type == 7) {
this.result_renwu = e.result
} else if (this.options_type == 8) {
this.result_fangshi = e.result
}
},
//-
onConfirmCustomerTags(e) {
console.log('多选客户标签', e)
this.show_customer_tags = false
let customer_tags_name_arr = []
let customer_tags_arr = []
e.options.forEach((v, k) => {
customer_tags_arr.push(v.value)
customer_tags_name_arr.push(v.text)
//v.value this.options_customer_tagscheckedtrue
this.options_customer_tags.forEach((v, k) => {
if (v.value == v.value) {
v.checked = true
}
}) })
})
this.formData.customer_tags_name = customer_tags_name_arr.join(',')// this.formData.customer_tags_name = customer_tags_name_arr.join(',')//
this.formData.customer_tags = customer_tags_arr// this.formData.customer_tags = customer_tags_arr//
}, },
// //
changeArea(e){ changeArea(e) {
this.show_area = false this.show_area = false
console.log('地区选择',e) console.log('地区选择', e)
this.formData.province_id = e.value[0] this.formData.province_id = e.value[0]
this.formData.city_id = e.value[1] this.formData.city_id = e.value[1]
this.formData.district_id = e.value[2] this.formData.district_id = e.value[2]
this.formData.full_address = `${e.text[0]}-${e.text[1]}-${e.text[2]}` this.formData.full_address = `${e.text[0]}-${e.text[1]}-${e.text[2]}`
}, },
// //
cancel() { cancel() {
this.show = false this.show = false
}, },
// //
switchChange(e){ switchChange(e) {
if(e.detail.value){ if (e.detail.value) {
this.switchChange_type = 1 this.switchChange_type = 1
}else{ } else {
this.switchChange_type = 2 this.switchChange_type = 2
} }
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

Loading…
Cancel
Save