Compare commits

...

2 Commits

Author SHA1 Message Date
liutong f51d362be0 feat(market): 优化线索添加和编辑页面 10 months ago
liutong f545de2a89 refactor(market): 优化客户线索列表展示 10 months ago
  1. 62
      pages/market/clue/add_clues.vue
  2. 64
      pages/market/clue/edit_clues.vue

62
pages/market/clue/add_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style">
<!--来源渠道-->
<!--来源-->
<fui-form-item
label="来源渠道"
label="来源"
asterisk asteriskPosition="right"
labelSize='26'
prop=""
@ -41,14 +41,15 @@
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCicker(`source_channel`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
@click="openCicker(`source`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view>
</view>
</fui-form-item>
<!--来源-->
<!--来源渠道-->
<fui-form-item
label="来源"
v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right"
labelSize='26'
prop=""
@ -60,11 +61,12 @@
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCicker(`source`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }}
@click="openCicker(`source_channel`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view>
</view>
</fui-form-item>
<!--顾问-->
<!--
<fui-form-item
@ -87,6 +89,7 @@
</fui-form-item>
-->
<fui-form-item
v-show="false"
label="顾问"
asterisk asteriskPosition="right"
labelSize='26'
@ -188,6 +191,7 @@
backgroundColor="#434544"
size="26"
color="#fff"
@blur="handlePhoneBlur"
></fui-input>
</view>
</fui-form-item>
@ -448,8 +452,8 @@
<!--数据列表-->
<view class="ul" v-else>
<view class="li" v-for="(v,k) in clientUserList" :key="k">
<view class="left_box" @click="openViewClueInfo(v)">
<view class="li" v-for="(v,k) in clientUserList" :key="k" @click="openViewClueInfo(v)">
<view class="left_box">
<view class="box_1">
<image
class="img"
@ -496,8 +500,8 @@
</view>
</view>
<view class="right_box">
<image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image>
<image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image>
<!-- <image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image>-->
<!-- <image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image>-->
</view>
</view>
</view>
@ -1006,7 +1010,32 @@ export default {
//
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
this.openDuplicateCheck()
},
@ -1110,6 +1139,15 @@ export default {
let input_name = this.picker_input_name
this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线
}else{
this.formData.source_channel = ''//线
}
}
this.cancelCicker()
},
//

64
pages/market/clue/edit_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style">
<!--来源渠道-->
<!--来源-->
<fui-form-item
label="来源渠道"
label="来源"
asterisk asteriskPosition="right"
labelSize='26'
prop=""
@ -41,14 +41,16 @@
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCicker(`source_channel`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
@click="openCicker(`source`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view>
</view>
</fui-form-item>
<!--来源-->
<!--来源渠道-->
<fui-form-item
label="来源"
v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right"
labelSize='26'
prop=""
@ -60,11 +62,12 @@
<view
class="input-title"
style="margin-right:14rpx;"
@click="openCicker(`source`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }}
@click="openCicker(`source_channel`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view>
</view>
</fui-form-item>
<!--顾问-->
<!--
<fui-form-item
@ -188,6 +191,7 @@
backgroundColor="#434544"
size="26"
color="#fff"
@blur="handlePhoneBlur"
></fui-input>
</view>
</fui-form-item>
@ -1075,9 +1079,45 @@ export default {
},
//
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
if(this.clientUserList.length == 1){
if (this.clientUserList[0].id == this.formData.id) {
//,
return
}
}
this.openDuplicateCheck()
},
//-
@ -1180,6 +1220,13 @@ export default {
let input_name = this.picker_input_name
this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线
}else{
this.formData.source_channel = ''//线
}
}
this.cancelCicker()
},
//
@ -1220,6 +1267,7 @@ export default {
},
//
async validatorForm(data) {
console.log('tijiao',data)
//
//

Loading…
Cancel
Save