Browse Source

no message

master
xpz2018 9 months ago
parent
commit
020dd1c77b
7 changed files with 98 additions and 58 deletions
  1. 11
      src/enums/customerEnum.ts
  2. 27
      src/views/clue/clueList/data.ts
  3. 4
      src/views/clue/clueList/index.vue
  4. 49
      src/views/clue/cluePool/data.ts
  5. 5
      src/views/clue/cluePool/index.vue
  6. 28
      src/views/clue/customer/data.ts
  7. 32
      src/views/clue/customer/index.vue

11
src/enums/customerEnum.ts

@ -42,11 +42,22 @@ export const clueStatusList = [
{ label: '有效线索', value: 4 },
]
export const followStatusList = [
{ label: '待跟进', value: 1 },
{ label: '跟进中', value: 2 },
]
export const followTypeList = [
{ label: '电话', value: 1 },
{ label: '微信', value: 2 },
]
export const validStatusList = [
{ label: '未知线索', value: 1 },
{ label: '有效线索', value: 2 },
{ label: '无效线索', value: 3 },
]
export const followStageList = [
{ label: '有效线索', value: 101, color: 'green' },
{ label: '无效线索', value: 102, color: 'red' },

27
src/views/clue/clueList/data.ts

@ -1,5 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { genderList, channelList, clueStatusList } from '/@/enums/customerEnum'
import { genderList, channelList, clueStatusList, followStatusList, validStatusList } from '/@/enums/customerEnum'
import {
getIncomeList,
getNationList,
@ -17,26 +17,31 @@ import {
export const tableColumns: BasicColumn[] = [
{ title: '用户信息', dataIndex: 'userinfo', slots: { customRender: 'userinfo' } },
{ width: 80, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
{ width: 120, title: '手机号码', dataIndex: 'phone' },
{ width: 120, title: '渠道来源', dataIndex: 'channelType',
{ width: 70, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
{ width: 110, title: '手机号码', dataIndex: 'phone' },
{ width: 100, title: '渠道来源', dataIndex: 'channelType',
customRender: ({ text }) => {
return channelList.find((find) => find.value === text)?.label
},
},
{ width: 100, title: '状态', dataIndex: 'validStatus',
customRender: ({ text }) => {
return clueStatusList.find((find) => find.value === text)?.label
},
},
// { width: 80, title: '状态', dataIndex: 'validStatus',
// customRender: ({ text }) => {
// return clueStatusList.find((find) => find.value === text)?.label
// },
// },
{ width: 100, title: '创建人', dataIndex: 'creatorName' },
{ width: 100, title: '核验人', dataIndex: 'verifierName' },
{ width: 120, title: '跟进状态', dataIndex: 'followStatus',
{ width: 100, title: '跟进状态', dataIndex: 'followStatus',
customRender: ({ text }) => {
return clueStatusList.find((find) => find.value === text)?.label
return followStatusList.find((find) => find.value === text)?.label
},
},
{ width: 160, title: '最后跟进时间', dataIndex: 'finalFollowTime' },
{ width: 100, title: '跟进结果', dataIndex: 'validStatus',
customRender: ({ text }) => {
return validStatusList.find((find) => find.value === text)?.label
},
},
{ width: 160, title: '录入时间', dataIndex: 'creatTime' },
]

4
src/views/clue/clueList/index.vue

@ -96,9 +96,9 @@
const router = useRouter()
function toDetail(record: any) {
const { miId } = record
const { id } = record
router.push({
query: { miId },
query: { id },
path: '/clue/customer',
})
}

49
src/views/clue/cluePool/data.ts

@ -3,27 +3,32 @@ import moment from 'moment';
export const tableColumns: BasicColumn[] = [
{ title: '用户信息', dataIndex: 'userinfo', slots: { customRender: 'userinfo' } },
{ width: 80, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
{ width: 60, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
{ width: 120, title: '手机号码', dataIndex: 'phone' },
{ width: 100, title: '渠道来源', dataIndex: 'channelType',
{ width: 90, title: '渠道来源', dataIndex: 'channelType',
customRender: ({ text }) => {
return channelList.find((find) => find.value === text)?.label
},
},
{ width: 100, title: '状态', dataIndex: 'allocationStatus',
{ width: 80, title: '状态', dataIndex: 'allocationStatus',
customRender: ({ text }) => {
return clueStatusList.find((find) => find.value === text)?.label
},
},
{ width: 100, title: '创建人', dataIndex: 'creatorName' },
{ width: 100, title: '核验人', dataIndex: 'verifierName' },
{ width: 100, title: '跟进状态', dataIndex: 'followStatus',
{ width: 90, title: '跟进状态', dataIndex: 'followStatus',
customRender: ({ text }) => {
return clueStatusList.find((find) => find.value === text)?.label
return followStatusList.find((find) => find.value === text)?.label
},
},
{ width: 150, title: '最后跟进时间', dataIndex: 'finalFollowTime' },
{ width: 90, title: '跟进结果', dataIndex: 'validStatus',
customRender: ({ text }) => {
return validStatusList.find((find) => find.value === text)?.label
},
},
{ width: 160, title: '最后跟进时间', dataIndex: 'finalFollowTime' },
{ width: 160, title: '录入时间', dataIndex: 'creatTime' },
{ width: 150, title: '录入时间', dataIndex: 'creatTime' },
]
export const tableFormSchema: FormSchema[] = [
@ -118,7 +123,7 @@ export const tableFormSchema: FormSchema[] = [
import { ref } from 'vue'
import dayjs, { Dayjs } from 'dayjs'
import { genderList, channelList, clueStatusList } from '/@/enums/customerEnum'
import { genderList, channelList, clueStatusList, followStatusList, validStatusList } from '/@/enums/customerEnum'
import { useAddressData } from '/@/hooks/common'
import {
getIncomeList,
@ -229,6 +234,20 @@ export const modalFormSchema: FormSchema[] = [
},
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoData.value.maritalStatusName = v?.label
},
},
},
{
field: 'address',
label: '现居住地',
@ -273,20 +292,6 @@ export const modalFormSchema: FormSchema[] = [
}
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoData.value.maritalStatusName = v?.label
},
},
},
{ field: 'childrenNum', label: '孩子数量', component: 'InputNumber', colProps: { span: 8 }, },
{
field: 'nationCode',

5
src/views/clue/cluePool/index.vue

@ -35,7 +35,7 @@
<Image style="width: 40px;height: 40px;" :src="record.profilePhoto || 'https://dating-agency-test.oss-accelerate.aliyuncs.com/B96BAC02B145C2D.png'" />
<div class="flex-col" style="margin-left: 8px;">
<div class="flex-row">
<span class="single-line" style="font-size: 14px;color: #333;font-weight: bold;max-width: 100px;">{{record.nickName}}</span>
<span class="single-line" style="font-size: 14px;color: #333;font-weight: bold;max-width: 90px;">{{record.nickName}}</span>
<span class="single-line" style="font-size: 13px;color: #666;margin: 0 12px;">(ID{{record.id}})</span>
</div>
<div class="flex-row">
@ -105,8 +105,7 @@
const clueStatusList = [
{ label: '待分配', value: 1 },
{ label: '跟进中', value: 2 },
{ label: '无效线索', value: 3 },
{ label: '有效线索', value: 4 },
{ label: '公海线索', value: 3 },
{ label: '全部', value: '' },
]

28
src/views/clue/customer/data.ts

@ -89,6 +89,20 @@ export const basicSchema: FormSchema[] = [
},
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.maritalStatusName = v?.label
},
},
},
// { field: 'name', label: '姓名', component: 'Input', componentProps: { disabled: true }, colProps: { span: 8 }, },
{
field: 'constellationCode',
@ -163,20 +177,6 @@ export const basicSchema: FormSchema[] = [
// },
// },
// },
{
field: 'maritalStatusCode',
label: '婚姻状况',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.maritalStatusName = v?.label
},
},
},
{
field: 'nationCode',
label: '民族',

32
src/views/clue/customer/index.vue

@ -17,6 +17,7 @@
<Tag color="warning" v-if="details.allocationStatus === 1">待分配</Tag>
<Tag color="green" v-else-if="details.validStatus === 2">#有效线索-0</Tag>
<Tag color="error" v-else-if="details.validStatus === 3">#无效线索-0</Tag>
<Tag color="pink" v-else-if="details.followStatus === 1">#待跟进-0</Tag>
</div>
<div class="flex-row-center-start" style="margin-top: 5px;">
<div class="flex-row-center-start" style="width: 240px;">
@ -29,16 +30,21 @@
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">客户标签</span>
<!-- <Tag color="#f50">无效</Tag> -->
<Button style="height: 22px;line-height: 22px;width: 24px;border: 1px solid #0960bd;">
<template #icon><Icon icon="ant-design:plus-outlined" size="14px" style="color:#0960bd;display: block;"/></template>
</Button>
<Tag color="#f50" closable @close="onLabelClose">无效</Tag>
<Popconfirm placement="bottom" icon="添加标签" @confirm="handleLabel">
<template #title>
<Input placeholder="请输入标签" v-model:value="labelName" style="margin-top: 12px;"/>
</template>
<Button style="height: 22px;line-height: 22px;width: 24px;border: 1px solid #0960bd;">
<template #icon><Icon icon="ant-design:plus-outlined" size="14px" style="color:#0960bd;display: block;"/></template>
</Button>
</Popconfirm>
</div>
</div>
<div class="flex-row-center-start" style="margin-top: 5px;">
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">下次跟进时间</span>
<!-- <span style="color: #333;">{{details.nextFollowTime || '--'}}</span> -->
<span style="color: #333;">{{details.nextFollowTime || '--'}}</span>
</div>
<!-- <div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">创建人</span>
@ -155,7 +161,7 @@
<Result subTitle="暂无数据"></Result>
</TabPane>
<template v-if="activeKey == '1'" #tabBarExtraContent>
<Button type="link" @click="handleSubmit"><template #icon><Icon icon="ant-design:edit-twotone" size="16px" style="margin-right: -4px;"/></template>编辑资料</Button>
<Button type="link" @click="handleSubmit"><template #icon><Icon icon="ant-design:edit-twotone" size="16px" style="margin-right: -4px;"/></template>保存资料</Button>
</template>
</Tabs>
</div>
@ -251,6 +257,7 @@
const activeKey3 = ref<string>('1')
const avatar = ref<string>('')
const nickName = ref<string>('')
const labelName = ref<string>('')
async function handleNickname(){
if(!nickName.value){
createMessage.warning('请输入昵称')
@ -261,6 +268,19 @@
details.value.nickName = nickName.value
nickName.value = ''
}
async function onLabelClose(id){
}
async function handleLabel(){
if(!labelName.value){
createMessage.warning('请输入标签')
return
}
// await editClueRecord({id: details.value.id, nickName: nickName.value})
// createMessage.success('')
// details.value.nickName = nickName.value
labelName.value = ''
}
//
const [registerForm1, { validate: validate1, resetFields: resetFields1, getFieldsValue: getFieldsValue1, setFieldsValue: setFieldsValue1 }] = useForm({
labelWidth: 120,

Loading…
Cancel
Save