Browse Source

no message

master
xpz2018 9 months ago
parent
commit
2408fedef6
10 changed files with 605 additions and 352 deletions
  1. 3
      src/api/clue/index.ts
  2. 17
      src/enums/customerEnum.ts
  3. 2
      src/layouts/default/header/index.vue
  4. 14
      src/views/clue/clueList/data.ts
  5. 63
      src/views/clue/clueList/index.vue
  6. 261
      src/views/clue/cluePool/data.ts
  7. 13
      src/views/clue/cluePool/index.vue
  8. 54
      src/views/clue/cluePool/modal.vue
  9. 243
      src/views/clue/customer/data.ts
  10. 287
      src/views/clue/customer/index.vue

3
src/api/clue/index.ts

@ -21,3 +21,6 @@ export const allocateCluing = (params: any) => defHttp.post({ url: '/dating-clue
export const getClueInfo = (id: string) => defHttp.get<any>({ url: '/dating-clue-service/user/get/dating-clue-detail', params: { id } })
export const recordClueing = (params: any) => defHttp.post({ url: '/dating-clue-service/user/create/dating-clue-follow-record', params })
export const getClueRecord = (id: string) => defHttp.get<any>({ url: '/dating-clue-service/user/list/dating-clue-follow-record', params: { id }})

17
src/enums/customerEnum.ts

@ -40,4 +40,21 @@ export const clueStatusList = [
{ label: '跟进中', value: 2 },
{ label: '无效线索', value: 3 },
{ label: '有效线索', value: 4 },
]
export const followTypeList = [
{ label: '电话', value: 1 },
{ label: '微信', value: 2 },
]
export const followStageList = [
{ label: '有效线索', value: 101, color: 'green' },
{ label: '无效线索', value: 102, color: 'red' },
{ label: '进入公海', value: 103, color: 'red' },
{ label: '1呼', value: 201, color: 'green' },
{ label: '2呼', value: 202, color: 'gray' },
{ label: '3呼', value: 203, color: 'gray' },
{ label: '4呼', value: 204, color: 'gray' },
{ label: '5呼', value: 205, color: 'gray' },
{ label: '6呼', value: 206, color: 'gray' },
]

2
src/layouts/default/header/index.vue

@ -47,7 +47,7 @@
/> -->
<div class="flex-row-center-start" style="padding-right: 8px;">
<span style="color: #333;font-size: 20px;font-weight: bold;">{{orgName}}</span>
<span style="background: #999;height: 24px;width: 2px;margin-top: 6px;margin-left: 18px;"></span>
<span style="background: #999;height: 20px;width: 2px;margin-top: 4px;margin-left: 18px;"></span>
</div>
<UserDropDown :theme="getHeaderTheme" />

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

@ -15,12 +15,6 @@ import {
getCarPurchaseSituation,
} from '/@/api/essentialData'
const userTypeList = [
{ label: '正常用户', value: 1 },
{ label: '录入用户', value: 2},
{ label: '红娘', value: 3 },
]
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} },
@ -35,11 +29,11 @@ export const tableColumns: BasicColumn[] = [
return clueStatusList.find((find) => find.value === text)?.label
},
},
{ width: 120, title: '创建人', dataIndex: 'creatorName' },
{ width: 120, title: '核验人', dataIndex: 'verifierName' },
{ width: 120, title: '跟进状态', dataIndex: 'userMarriageInformationType',
{ width: 100, title: '创建人', dataIndex: 'creatorName' },
{ width: 100, title: '核验人', dataIndex: 'verifierName' },
{ width: 120, title: '跟进状态', dataIndex: 'followStatus',
customRender: ({ text }) => {
return userTypeList.find((find) => find.value === text)?.label
return clueStatusList.find((find) => find.value === text)?.label
},
},
{ width: 160, title: '最后跟进时间', dataIndex: 'finalFollowTime' },

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

@ -1,6 +1,30 @@
<template>
<div class="order-list">
<BasicTable @register="registerTable">
<template #form-age>
<div class="flex-row">
<InputNumber placeholder="请输入" style="width: 46%" v-model:value="ageModel.minAge" />
<div style="width: 8%" class="flex-row-center-center">-</div>
<InputNumber placeholder="请输入" style="width: 46%" v-model:value="ageModel.maxAge" />
</div>
</template>
<template #userinfo="{ text, record }">
<div class="flex-row">
<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: 13px;color: #666;margin: 0 12px;">(ID{{record.id}})</span>
</div>
<div class="flex-row">
<span style="font-size: 13px;color: #666;">{{record.age}}</span>
<span style="font-size: 13px;color: #666;margin-left: 12px;">{{educationList.find((find) => find.value === record.educationCode)?.label}}</span>
<span style="font-size: 13px;color: #666;margin-left: 12px;">{{maritalList.find((find) => find.value === record.maritalStatusCode)?.label}}</span>
<span style="font-size: 13px;color: #666;margin-left: 12px;" v-if="record.occupation">{{record.occupation}}</span>
</div>
</div>
</div>
</template>
<template #action="{ record }">
<TableAction
:actions="[
@ -22,12 +46,13 @@
</script>
<script setup lang="ts">
import moment from 'moment/moment'
import { computed, ref } from 'vue'
import { Card } from 'ant-design-vue'
import { computed, ref, reactive } from 'vue'
import { Card, Image, InputNumber } from 'ant-design-vue'
import { useRouter } from 'vue-router'
import { tableColumns, tableFormSchema } from './data'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { getClueList } from '/@/api/clue'
import { educationList, maritalList } from '/@/enums/customerEnum'
const [registerTable] = useTable({
bordered: true,
@ -40,14 +65,21 @@
labelWidth: 120,
schemas: tableFormSchema,
},
// beforeFetch: (arg) => {
// const { orderTime } = arg
// if (orderTime) {
// arg.orderTimeFrom = moment(orderTime[0]).format('YYYY-MM-DD 00:00:00')
// arg.orderTimeTo = moment(orderTime[1]).format('YYYY-MM-DD 23:59:59')
// delete arg.orderTime
// }
// },
beforeFetch: (arg) => {
const { createTime, followTime } = arg
if (createTime) {
arg.creatTimeFrom = moment(createTime[0]).format('YYYY-MM-DD 00:00:00')
arg.creatTimeTo = moment(createTime[1]).format('YYYY-MM-DD 23:59:59')
delete arg.createTime
}
if (followTime) {
arg.finalFollowTimeFrom = moment(followTime[0]).format('YYYY-MM-DD 00:00:00')
arg.finalFollowTimeTo = moment(followTime[1]).format('YYYY-MM-DD 23:59:59')
delete arg.followTime
}
arg.minimumAge = ageModel.minAge
arg.maximumAge = ageModel.maxAge
},
actionColumn: {
width: 160,
title: '操作',
@ -57,6 +89,11 @@
},
})
const ageModel = reactive({
minAge: '',
maxAge: '',
})
const router = useRouter()
function toDetail(record: any) {
const { miId } = record
@ -67,5 +104,9 @@
}
</script>
<style scoped lang="less">
.single-line {
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap; /* 文本不换行 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
</style>

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

@ -1,12 +1,6 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import moment from 'moment';
const userTypeList = [
{ label: '正常用户', value: 1 },
{ label: '录入用户', value: 2},
{ label: '红娘', value: 3 },
]
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} },
@ -21,11 +15,11 @@ export const tableColumns: BasicColumn[] = [
return clueStatusList.find((find) => find.value === text)?.label
},
},
{ width: 120, title: '创建人', dataIndex: 'creatorName' },
{ width: 120, title: '核验人', dataIndex: 'verifierName' },
{ width: 100, title: '创建人', dataIndex: 'creatorName' },
{ width: 100, title: '核验人', dataIndex: 'verifierName' },
{ width: 100, title: '跟进状态', dataIndex: 'followStatus',
customRender: ({ text }) => {
return userTypeList.find((find) => find.value === text)?.label
return clueStatusList.find((find) => find.value === text)?.label
},
},
{ width: 160, title: '最后跟进时间', dataIndex: 'finalFollowTime' },
@ -172,6 +166,7 @@ export const modalFormSchema: FormSchema[] = [
label: '性别',
colProps: { span: 8 },
component: 'Select',
required: true,
componentProps: ({ formModel }) => {
return {
options: genderList,
@ -182,39 +177,12 @@ export const modalFormSchema: FormSchema[] = [
}
},
},
{ field: 'age', label: '年龄', component: 'InputNumber', colProps: { span: 8 }, },
{ field: 'nickName', label: '昵称', component: 'Input', colProps: { span: 8 }, },
{ field: 'phone', label: '电话号码', component: 'Input', colProps: { span: 8 }, },
{ field: 'age', label: '年龄', component: 'InputNumber', colProps: { span: 8 }, required: true,},
{ field: 'nickName', label: '昵称', component: 'Input', colProps: { span: 8 }, required: true,},
{ field: 'phone', label: '电话号码', component: 'Input', colProps: { span: 8 }, required: true,},
{ field: 'weChatId', label: '微信号', component: 'Input', colProps: { span: 8 }, },
{
field: 'address',
label: '居住地',
colProps: { span: 8 },
component: 'Cascader',
componentProps: {
options: addressList,
onChange: (_: any, v: any) => {
basicInfoData.value.provinceName = v?.[0]?.label
basicInfoData.value.cityName = v?.[1]?.label
basicInfoData.value.districtName = v?.[2]?.label
},
},
},
{
field: 'domicilePlace',
label: '户口所在地',
colProps: { span: 8 },
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
basicInfoData.value.domicilePlaceProvinceName = v?.[0]?.label
basicInfoData.value.domicilePlaceCityName = v?.[1]?.label
},
}
},
},
{ field: 'height', label: '身高(cm)', component: 'InputNumber', colProps: { span: 8 }, },
{ field: 'weight', label: '体重(kg)', component: 'InputNumber', colProps: { span: 8 }, },
// {
// field: 'birthDate',
// label: '出生日期',
@ -232,7 +200,7 @@ export const modalFormSchema: FormSchema[] = [
// }
// },
// },
{ field: 'height', label: '身高(cm)', component: 'InputNumber', colProps: { span: 8 }, },
{
field: 'educationCode',
label: '学历',
@ -261,21 +229,50 @@ export const modalFormSchema: FormSchema[] = [
},
},
},
// {
// field: 'hometown',
// label: '家乡',
// colProps: { span: 8 },
// component: 'Cascader',
// componentProps: () => {
// return {
// options: domicilePlaceList.value,
// onChange: (_: any, v: any) => {
// basicInfoData.value.hometownProvinceName = v?.[0]?.label
// basicInfoData.value.hometownCityName = v?.[1]?.label
// },
// }
// },
// },
{
field: 'address',
label: '现居住地',
colProps: { span: 8 },
component: 'Cascader',
componentProps: {
options: addressList,
onChange: (_: any, v: any) => {
basicInfoData.value.provinceName = v?.[0]?.label
basicInfoData.value.cityName = v?.[1]?.label
basicInfoData.value.districtName = v?.[2]?.label
},
},
},
{
field: 'domicilePlace',
label: '户口所在地',
colProps: { span: 8 },
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
basicInfoData.value.domicilePlaceProvinceName = v?.[0]?.label
basicInfoData.value.domicilePlaceCityName = v?.[1]?.label
},
}
},
},
{
field: 'hometown',
label: '家乡',
colProps: { span: 8 },
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
basicInfoData.value.hometownProvinceName = v?.[0]?.label
basicInfoData.value.hometownCityName = v?.[1]?.label
},
}
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',
@ -306,20 +303,20 @@ export const modalFormSchema: FormSchema[] = [
},
},
},
// {
// field: 'bodilyFormCode',
// label: '体型',
// colProps: { span: 8 },
// component: 'ApiSelect',
// componentProps: {
// labelField: 'desc',
// api: getBodilyFormList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// basicInfoData.value.bodilyForm = v?.label
// },
// },
// },
{
field: 'bodilyFormCode',
label: '体型',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getBodilyFormList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoData.value.bodilyForm = v?.label
},
},
},
// {
// field: 'accountTypeCode',
// label: '户口',
@ -447,15 +444,16 @@ export const demandMarriageMoreData = ref<any>({})
// 择偶标准
export const demandMarriageSchema: FormSchema[] = [
{
field: 'domicilePlace',
label: '户口所在地',
field: 'maritalStatusCode',
label: '婚姻状况',
colProps: { span: 8 },
component: 'Cascader',
component: 'ApiSelect',
componentProps: {
options: domicilePlaceList,
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.domicilePlaceProvinceName = v?.[0]?.label
demandMarriageMoreData.value.domicilePlaceCityName = v?.[1]?.label
demandMarriageMoreData.value.maritalStatusName = v?.label
},
},
},
@ -502,76 +500,105 @@ export const demandMarriageSchema: FormSchema[] = [
},
},
{
field: 'minIncome',
field: 'minimumIncome',
label: '月收入',
colProps: { span: 8 },
component: 'InputNumber',
slot: 'income',
},
{
field: 'maxIncome',
field: 'maximumIncome',
label: '月收入',
colProps: { span: 8 },
component: 'InputNumber',
ifShow: false,
},
{ field: 'childrenNum', label: '孩子数量', component: 'InputNumber', colProps: { span: 8 }, },
{
field: 'maritalStatusCode',
label: '婚姻状况',
field: 'address',
label: '现居住地',
colProps: { span: 8 },
component: 'ApiSelect',
component: 'Cascader',
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
getPopupContainer: () => document.body,
options: addressList,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.maritalStatusName = v?.label
demandMarriageMoreData.value.provinceName = v?.[0]?.label
demandMarriageMoreData.value.cityName = v?.[1]?.label
demandMarriageMoreData.value.districtName = v?.[2]?.label
},
},
},
{
field: 'nationCode',
label: '民族',
field: 'domicilePlace',
label: '户口所在地',
colProps: { span: 8 },
component: 'ApiSelect',
component: 'Cascader',
componentProps: {
labelField: 'cn',
valueField: 'id',
api: getNationList,
getPopupContainer: () => document.body,
options: domicilePlaceList,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.nation = v?.label
demandMarriageMoreData.value.domicilePlaceProvinceName = v?.[0]?.label
demandMarriageMoreData.value.domicilePlaceCityName = v?.[1]?.label
},
},
},
{
field: 'bodilyFormCode',
label: '体型',
field: 'hometown',
label: '家乡',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getBodilyFormList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.bodilyForm = v?.label
},
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.hometownProvinceName = v?.[0]?.label
demandMarriageMoreData.value.hometownCityName = v?.[1]?.label
},
}
},
},
{
field: 'accountTypeCode',
label: '户口',
field: 'nationCode',
label: '民族',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getAccountTypeList,
labelField: 'cn',
valueField: 'id',
api: getNationList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.accountTypeName = v?.label
demandMarriageMoreData.value.nation = v?.label
},
},
},
// {
// field: 'bodilyFormCode',
// label: '体型',
// colProps: { span: 8 },
// component: 'ApiSelect',
// componentProps: {
// labelField: 'desc',
// api: getBodilyFormList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// demandMarriageMoreData.value.bodilyForm = v?.label
// },
// },
// },
// {
// field: 'accountTypeCode',
// label: '户口',
// colProps: { span: 8 },
// component: 'ApiSelect',
// componentProps: {
// labelField: 'desc',
// api: getAccountTypeList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// demandMarriageMoreData.value.accountTypeName = v?.label
// },
// },
// },
{
field: 'nativePlaceCode',
label: '籍贯',
@ -643,21 +670,7 @@ export const demandMarriageSchema: FormSchema[] = [
},
},
},
{
field: 'hometown',
label: '家乡',
colProps: { span: 8 },
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
demandMarriageMoreData.value.hometownProvinceName = v?.[0]?.label
demandMarriageMoreData.value.hometownCityName = v?.[1]?.label
},
}
},
},
{
field: 'constellationCode',
label: '星座',

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

@ -14,7 +14,7 @@
<RadioButton v-for="item in clueStatusList" :key="item.value" :value="item.value">{{item.label}}</RadioButton>
</RadioGroup>
<div class="flex-row-center-start">
<Popconfirm placement="bottom" icon="分配线索" :disabled="datingClueIdList.length == 0" @confirm="allocateList">
<Popconfirm placement="bottom" icon="分配线索" :disabled="datingClueIdList.length == 0" @confirm="allocateList(null)">
<template #title>
<div class="flex-row-center-start" style="padding: 8px 8px 8px 0px;border-bottom: 1px solid #ddd;" v-for="item in memberList" :key="item.userId">
<Checkbox :checked="verifier == item.userId" @change="e => onCheckChange(e, item)">
@ -35,8 +35,8 @@
<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 style="font-size: 14px;color: #333;font-weight: bold;">{{record.nickName}}</span>
<span style="font-size: 13px;color: #666;margin: 0 12px;">(ID{{record.id}})</span>
<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: 13px;color: #666;margin: 0 12px;">(ID{{record.id}})</span>
</div>
<div class="flex-row">
<span style="font-size: 13px;color: #666;">{{record.age}}</span>
@ -156,6 +156,7 @@
}
arg.minimumAge = ageModel.minAge
arg.maximumAge = ageModel.maxAge
arg.allocationStatus = radioVal.value
},
actionColumn: {
width: 160,
@ -168,6 +169,7 @@
function handleRadioChange() {
setPagination({ current: 1 })
datingClueIdList.value = []
reload()
}
@ -219,4 +221,9 @@
}
</script>
<style scoped lang="less">
.single-line {
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap; /* 文本不换行 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
</style>

54
src/views/clue/cluePool/modal.vue

@ -2,7 +2,7 @@
<BasicModal v-bind="$attrs" :width="960" @ok="handleOk" @register="registerModal">
<template v-if="!ifUpdate" #title>
<span style="margin: 0 5px">-</span>
<span>新增线索</span>
</template>
<div v-if="ifUpdate">
@ -26,7 +26,7 @@
</div>
<div class="flex-col" v-else>
<Tabs v-model:activeKey="activeKey2" :animated="false">
<Tabs tab-position="left" v-model:activeKey="activeKey2" :animated="false">
<TabPane key="1" tab="个人资料">
<BasicForm @register="registerForm" style="padding: 16px 48px 0px 0px;" >
<template #profilePhoto="{ model, field }">
@ -52,9 +52,9 @@
</template>
<template #income="{ model }">
<div class="flex-row-center-start">
<InputNumber placeholder="请输入" :min="0" v-model:value="model['minIncome']" />
<InputNumber placeholder="请输入" :min="0" v-model:value="model['minimumIncome']" />
<span style="margin: 0 5px">-</span>
<InputNumber placeholder="请输入" :min="0" v-model:value="model['maxIncome']" />
<InputNumber placeholder="请输入" :min="0" v-model:value="model['maximumIncome']" />
</div>
</template>
</BasicForm>
@ -93,7 +93,7 @@
const [registerForm, { setFieldsValue, resetFields, validate, getFieldsValue, updateSchema }] =
useForm({
labelWidth: 120,
labelWidth: 108,
schemas: modalFormSchema,
baseColProps: { span: 22 },
showActionButtonGroup: false,
@ -109,7 +109,7 @@
basicInfoData.value = {}
activeKey2.value = '1'
await resetFields()
// await setFieldsValue3()
await resetFields3()
}
setModalProps({
minHeight: 50,
@ -130,7 +130,7 @@
})
//
const [registerForm3, { getFieldsValue: getFieldsValue3, setFieldsValue: setFieldsValue3 }] =
const [registerForm3, { getFieldsValue: getFieldsValue3, resetFields: resetFields3 }] =
useForm({
labelWidth: 100,
schemas: demandMarriageSchema,
@ -155,11 +155,37 @@
try {
await validate()
const values: any = getFieldsValue()
console.log({...values, ...basicInfoData.value})
// console.log({...values, ...basicInfoData.value})
setModalProps({ confirmLoading: true })
const { domicilePlace, address } = values || {}
const demandInfo: any = getFieldsValue3()
if(demandInfo){
const address1 = demandInfo.address
demandInfo.cityCode = address1?.[1]
demandInfo.provinceCode = address1?.[0]
demandInfo.districtCode = address1?.[2]
const domicilePlace1 = demandInfo.domicilePlace
demandInfo.domicilePlaceCityCode = domicilePlace1?.[1]
demandInfo.domicilePlaceProvinceCode = domicilePlace1?.[0]
}
const datingClueDemand = { ...demandInfo, ...demandMarriageMoreData.value }
const param = {
...values,
channelType: 1,
datingClueDemand,
cityCode: address?.[1],
provinceCode: address?.[0],
districtCode: address?.[2],
domicilePlaceCityCode: domicilePlace?.[1],
domicilePlaceProvinceCode: domicilePlace?.[0]
}
const fun = unref(ifUpdate) ? editClueRecord : createClueRecord
await fun({...values, ...basicInfoData.value, channelType: 1})
await fun(param)
createMessage.success(`${unref(ifUpdate) ? '编辑' : '新增'}成功!`)
emits('success')
} finally {
@ -173,11 +199,7 @@
tableListRef.value = [];
console.log(excelDataList);
for (const excelData of excelDataList) {
const {
header,
results,
meta: { sheetName },
} = excelData;
const { header, results, meta: { sheetName }, } = excelData;
const columns: BasicColumn[] = [];
for (const title of header) {
columns.push({ title, dataIndex: title });
@ -189,7 +211,7 @@
<style scoped lang="less">
::v-deep .ant-input-number {
min-width: 80px;
min-width: 60px;
width: 100% !important;
max-width: 100%;
}

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

@ -2,7 +2,7 @@ import { useAddressData } from '/@/hooks/common'
import { ref } from 'vue'
import dayjs, { Dayjs } from 'dayjs'
import { FormSchema } from '/@/components/Form'
import { genderList } from '/@/enums/customerEnum'
import { genderList, followTypeList, followStageList } from '/@/enums/customerEnum'
import {
getIncomeList,
getNationList,
@ -43,38 +43,11 @@ function handleOccupationList(data: any, ifFirst = true) {
// 基本信息
export const basicSchema: FormSchema[] = [
{ field: 'nickName', label: '昵称', component: 'Input' },
{
field: 'address',
label: '居住地',
component: 'Cascader',
componentProps: {
options: addressList,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.provinceName = v?.[0]?.label
basicInfoMoreData.value.cityName = v?.[1]?.label
basicInfoMoreData.value.districtName = v?.[2]?.label
},
},
},
{
field: 'domicilePlace',
label: '户口所在地',
component: 'Cascader',
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.domicilePlaceProvinceName = v?.[0]?.label
basicInfoMoreData.value.domicilePlaceCityName = v?.[1]?.label
},
}
},
},
{
field: 'genderCode',
label: '性别',
component: 'Select',
colProps: { span: 8 },
componentProps: ({ formModel }) => {
return {
options: genderList,
@ -85,26 +58,14 @@ export const basicSchema: FormSchema[] = [
}
},
},
{
field: 'birthDate',
label: '出生日期',
component: 'DatePicker',
componentProps: ({ formModel }) => {
return {
style: { width: '100%' },
disabled: !!formModel.name && formModel.name !== -1,
disabledDate: (current: Dayjs) => {
const date: Dayjs = dayjs().subtract(18, 'year')
return current && current > date.endOf('year')
},
}
},
},
{ field: 'height', label: '身高', component: 'InputNumber' },
{ field: 'age', label: '年龄', component: 'InputNumber', colProps: { span: 8 }, },
{ field: 'height', label: '身高(cm)', component: 'InputNumber', colProps: { span: 8 }, },
{ field: 'weight', label: '体重(kg)', component: 'InputNumber', colProps: { span: 8 }, },
{
field: 'educationCode',
label: '学历',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getEducationList,
@ -118,6 +79,7 @@ export const basicSchema: FormSchema[] = [
field: 'incomeCode',
label: '月收入',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getIncomeList,
@ -127,11 +89,56 @@ export const basicSchema: FormSchema[] = [
},
},
},
{ field: 'name', label: '姓名', component: 'Input', componentProps: { disabled: true } },
// { field: 'name', label: '姓名', component: 'Input', componentProps: { disabled: true }, colProps: { span: 8 }, },
{
field: 'constellationCode',
label: '星座',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getConstellationList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.constellation = v?.label
},
},
},
{ field: 'childrenNum', label: '孩子数量', component: 'InputNumber', colProps: { span: 8 }, },
{
field: 'address',
label: '居住地',
component: 'Cascader',
colProps: { span: 8 },
componentProps: {
options: addressList,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.provinceName = v?.[0]?.label
basicInfoMoreData.value.cityName = v?.[1]?.label
basicInfoMoreData.value.districtName = v?.[2]?.label
},
},
},
{
field: 'domicilePlace',
label: '户口所在地',
component: 'Cascader',
colProps: { span: 8 },
componentProps: () => {
return {
options: domicilePlaceList.value,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.domicilePlaceProvinceName = v?.[0]?.label
basicInfoMoreData.value.domicilePlaceCityName = v?.[1]?.label
},
}
},
},
{
field: 'hometown',
label: '家乡',
component: 'Cascader',
colProps: { span: 8 },
componentProps: () => {
return {
options: domicilePlaceList.value,
@ -142,23 +149,25 @@ export const basicSchema: FormSchema[] = [
}
},
},
{
field: 'identityType',
label: '身份',
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getIdentityTypeList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.identityTypeName = v?.label
},
},
},
// {
// field: 'identityType',
// label: '身份',
// component: 'ApiSelect',
// colProps: { span: 8 },
// componentProps: {
// labelField: 'desc',
// api: getIdentityTypeList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// basicInfoMoreData.value.identityTypeName = v?.label
// },
// },
// },
{
field: 'maritalStatusCode',
label: '婚姻状况',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getMaritalStatusList,
@ -172,6 +181,7 @@ export const basicSchema: FormSchema[] = [
field: 'nationCode',
label: '民族',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'cn',
valueField: 'id',
@ -182,36 +192,39 @@ export const basicSchema: FormSchema[] = [
},
},
},
{
field: 'bodilyFormCode',
label: '体型',
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getBodilyFormList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.bodilyForm = v?.label
},
},
},
{
field: 'accountTypeCode',
label: '户口',
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getAccountTypeList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.accountTypeName = v?.label
},
},
},
// {
// field: 'bodilyFormCode',
// label: '体型',
// component: 'ApiSelect',
// colProps: { span: 8 },
// componentProps: {
// labelField: 'desc',
// api: getBodilyFormList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// basicInfoMoreData.value.bodilyForm = v?.label
// },
// },
// },
// {
// field: 'accountTypeCode',
// label: '户口',
// component: 'ApiSelect',
// colProps: { span: 8 },
// componentProps: {
// labelField: 'desc',
// api: getAccountTypeList,
// getPopupContainer: () => document.body,
// onChange: (_: any, v: any) => {
// basicInfoMoreData.value.accountTypeName = v?.label
// },
// },
// },
{
field: 'nativePlaceCode',
label: '籍贯',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: domicilePlaceList,
getPopupContainer: () => document.body,
@ -224,6 +237,7 @@ export const basicSchema: FormSchema[] = [
label: '职业',
field: 'occupationList',
component: 'Cascader',
colProps: { span: 8 },
componentProps: {
options: occupationList,
getPopupContainer: () => document.body,
@ -241,6 +255,7 @@ export const basicSchema: FormSchema[] = [
field: 'onlyChild',
label: '是否独生子女',
component: 'Select',
colProps: { span: 8 },
componentProps: {
options: [
{ label: '是', value: 1 },
@ -249,9 +264,10 @@ export const basicSchema: FormSchema[] = [
},
},
{
field: 'propertyPermitsCode',
field: 'housePurchase',
label: '购房情况',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getPropertyPermits,
@ -262,9 +278,10 @@ export const basicSchema: FormSchema[] = [
},
},
{
field: 'carPurchaseSituationCode',
field: 'carPurchase',
label: '购车情况',
component: 'ApiSelect',
colProps: { span: 8 },
componentProps: {
labelField: 'desc',
api: getCarPurchaseSituation,
@ -274,19 +291,7 @@ export const basicSchema: FormSchema[] = [
},
},
},
{
field: 'constellationCode',
label: '星座',
component: 'ApiSelect',
componentProps: {
labelField: 'desc',
api: getConstellationList,
getPopupContainer: () => document.body,
onChange: (_: any, v: any) => {
basicInfoMoreData.value.constellation = v?.label
},
},
},
{
field: 'describeInfo',
label: '个人描述',
@ -303,28 +308,38 @@ export const basicSchema: FormSchema[] = [
},
{ field: 'empty1', label: '', slot: 'empty1', component: 'Input' },
]
basicSchema.forEach((schema) => {
!['photoList', 'name', 'avatar', 'empty1'].includes(schema.field) && (schema.required = true)
!schema.colProps && (schema.colProps = { span: 8 })
})
const dateComProps = {
showTime: true,
style: { width: '100%' },
}
export const modalFormSchema: FormSchema[] = [
{
field: 'onlyChild',
label: '跟进方式',
field: 'datingClueFollowType',
label: '线索跟进方式',
component: 'Select',
required: true,
componentProps: {
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
options: followTypeList,
},
},
{
field: 'datingClueFollowStage',
label: '线索跟进阶段',
required: true,
field: 'storeName',
label: '门店名称',
component: 'Input',
component: 'Select',
componentProps: {
options: followStageList,
},
},
{
label: '下次跟进时间',
component: 'DatePicker',
field: 'nextFollowTime',
componentProps: {
...dateComProps,
},
},
{
field: 'remark',
@ -333,7 +348,7 @@ export const modalFormSchema: FormSchema[] = [
component: 'InputTextArea',
componentProps: {
autosize: {
minRows: 3,
minRows: 4,
},
},
},

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

@ -6,11 +6,19 @@
<div class="flex-row-center-start">
<span style="font-size: 18px;font-weight: bold;">{{details.nickName}}</span>
<!-- <Icon icon="ant-design:edit-twotone" size="18px" style="margin-left: 12px;color:#0960bd;"/> -->
<Button type="link"><template #icon><Icon icon="ant-design:edit-twotone" size="16px" style="margin-left: 12px;color:#0960bd;"/></template></Button>
<Popconfirm placement="bottom" icon="修改昵称" @confirm="handleNickname">
<template #title>
<Input placeholder="请输入昵称" v-model:value="nickName" style="margin-top: 12px;"/>
</template>
<Button type="link"><template #icon><Icon icon="ant-design:edit-twotone" size="16px" style="margin-left: 12px;color:#0960bd;"/></template></Button>
</Popconfirm>
<span style="color: #666;margin: 0 12px;">(ID{{details.id}} | 渠道来源{{channelList.find((find) => find.value === details.channelType)?.label}})</span>
<Tag color="#d5d5d5">#线索阶段-0</Tag>
<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>
</div>
<div class="flex-row-center-start" style="margin-top: 8px;">
<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;font-weight: bold;">{{details.phone}}</span>
@ -21,14 +29,16 @@
</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">无效</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>
</div>
</div>
<div class="flex-row-center-start" style="margin-top: 8px;">
<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>
@ -44,41 +54,57 @@
</div>
</div>
</div>
<div class="flex-col" style="background: white;width: 100%;margin-top: 16px;padding: 12px 40px 12px 40px;">
<div class="flex-col" style="background: white;width: 100%;margin-top: 16px;padding: 10px 40px;">
<div class="flex-row-center-space">
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">签约销售</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">服务红娘</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">红娘</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">店邀人</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">核验人</span>
<span style="color: #333;font-weight: bold;">{{details.verifierName || '--'}}</span>
</div>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">录入人</span>
<span style="color: #333;font-weight: bold;">{{details.creatorName || '--'}}</span>
</div>
</div>
<div class="flex-row-center-space" style="margin-top: 8px;">
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-space" style="margin-top: 4px;">
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">签约时间</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">服务次数</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">约见次数</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">店邀时间</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="width: 240px;">
<span style="color: #666;">签约红娘</span>
<span style="color: #333;font-weight: bold;">--dddd</span>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">核验时间</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
<div class="flex-row-center-start" style="flex: 1;">
<span style="color: #666;">录入时间</span>
<span style="color: #333;font-weight: bold;">--</span>
</div>
</div>
</div>
@ -86,14 +112,41 @@
<div style="flex: 1;background: white;padding: 0px 10px 10px 10px;">
<Tabs v-model:activeKey="activeKey" :animated="false">
<TabPane key="1" tab="客户资料">
<div class="flex-col" style="padding-right: 48px; flex:1;padding-top: 16px;">
<BasicForm @register="registerForm1"></BasicForm>
<div class="flex-col" style="flex:1;padding-top: 16px;">
<Tabs tab-position="left" v-model:activeKey="activeKey3" :animated="false" @change="onInfoChange">
<TabPane key="1" tab="个人资料">
<BasicForm @register="registerForm1" style="padding-right: 48px;"></BasicForm>
</TabPane>
<TabPane key="2" tab="择偶要求">
<BasicForm @register="registerForm3" style="padding-right: 48px;">
<template #age="{ model }">
<div class="flex-row-center-start">
<InputNumber placeholder="请输入" :min="0" v-model:value="model['minAge']" />
<span style="margin: 0 5px">-</span>
<InputNumber placeholder="请输入" :min="0" v-model:value="model['maxAge']" />
</div>
</template>
<template #height="{ model }">
<div class="flex-row-center-start">
<InputNumber placeholder="请输入" :min="0" v-model:value="model['minHeight']" />
<span style="margin: 0 5px">-</span>
<InputNumber placeholder="请输入" :min="0" v-model:value="model['maxHeight']" />
</div>
</template>
<template #income="{ model }">
<div class="flex-row-center-start">
<InputNumber placeholder="请输入" :min="0" v-model:value="model['minimumIncome']" />
<span style="margin: 0 5px">-</span>
<InputNumber placeholder="请输入" :min="0" v-model:value="model['maximumIncome']" />
</div>
</template>
</BasicForm>
</TabPane>
</Tabs>
</div>
</TabPane>
<TabPane key="2" tab="邀约进店">
<Spin :spinning="spinning">
<Result subTitle="暂无数据"></Result>
</Spin>
<Result subTitle="暂无数据"></Result>
</TabPane>
<TabPane key="3" tab="合同">
<Result subTitle="暂无数据"></Result>
@ -102,40 +155,41 @@
<Result subTitle="暂无数据"></Result>
</TabPane>
<template v-if="activeKey == '1'" #tabBarExtraContent>
<Button type="link"><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>
<div style="width: 480px;background: white;margin-left: 16px;padding: 0px 10px 10px 10px;">
<Tabs v-model:activeKey="activeKey2" :animated="false">
<div style="width: 480px;background: white;margin-left: 16px;padding: 0px 10px 10px 10px;" v-ifan class="s">="details.allocationStatus !== 1">
<Tabs v-model:activeKey="activeKey2" :animated="false" @change="onReportChange">
<TabPane key="1" tab="跟进小计">
<div class="flex-col-center-center" style="flex:1;padding-top: 16px;">
<div class="flex-col-center-start" style="flex:1;padding-top: 16px;">
<BasicForm @register="registerForm"></BasicForm>
<Button type="primary" style="width: 160px;margin-top: 48px;">保存</Button>
<div class="flex-row-center-end" style="width: 100%;padding-right: 40px;">
<Button type="primary" style="width: 120px;margin-top: 36px;" @click="handleReport">保存</Button>
</div>
</div>
</TabPane>
<TabPane key="2" tab="跟进记录" style="flex:1;padding: 16px 16px 0px 16px;">
<Timeline>
<TimelineItem color="green">Create a services site 2015-09-01</TimelineItem>
<TimelineItem color="red">
<p>Solve initial network problems 1</p>
<p>Solve initial network problems 2</p>
<p>Solve initial network problems 3 2015-09-01</p>
</TimelineItem>
<TimelineItem>
<p>Technical testing 1</p>
<p>Technical testing 3 2015-09-01</p>
</TimelineItem>
<TimelineItem color="gray">
<p>Technical testing 1</p>
<p>Technical testing 2</p>
<p>Technical testing 3 2015-09-01</p>
</TimelineItem>
<TimelineItem color="gray">
<p>Technical testing 1</p>
<p>Technical testing 3 2015-09-01</p>
</TimelineItem>
</Timeline>
<Spin :spinning="spinning">
<Timeline>
<TimelineItem :color="followStageList.find((find) => find.value === item.datingClueFollowStage)?.color" v-for="(item, index) in reportList" :key="index">
<div class="flex-row-center-space">
<div class="flex-row-center-start">
<span style="color: #333;">{{item.operatorName || item.operator}}</span>
<span style="color: #666;margin-left: 8px;">[{{followTypeList.find((find) => find.value === item.datingClueFollowType)?.label}}]</span>
<span style="color: #999;margin-left: 8px;">{{item.nextFollowTime}}</span>
</div>
<span style="color: #333;">[{{followStageList.find((find) => find.value === item.datingClueFollowStage)?.label}}]</span>
</div>
<div class="flex-row-center-start" v-if="item.nextFollowTime">
<span style="color: #0960bd;">下次跟进时间{{item.nextFollowTime}}</span>
</div>
<div class="flex-row-center-start" v-if="item.remark">
<span style="color: #333;">备注{{item.remark || "--"}}</span>
</div>
</TimelineItem>
</Timeline>
</Spin>
</TabPane>
</Tabs>
</div>
@ -145,15 +199,18 @@
<script setup lang="ts">
import { useRoute } from 'vue-router'
import { onMounted, ref } from 'vue'
import { Tabs, Card, Table, Button, TabPane, Tag, Timeline, TimelineItem, Result, Spin } from 'ant-design-vue'
import { onMounted, ref, nextTick } from 'vue'
import { Tabs, Input, Popconfirm, Button, TabPane, Tag, Timeline, TimelineItem, Result, Spin, InputNumber } from 'ant-design-vue'
import { Icon } from '/@/components/Icon'
import { useMessage } from '/@/hooks/web/useMessage'
import { CropperAvatar } from '/@/components/Cropper';
import BasicForm from '/@/components/Form/src/BasicForm.vue'
import { useForm } from '/@/components/Form'
import { formatToDateTime } from '/@/utils/dateUtil'
import { basicSchema, modalFormSchema } from './data'
import { getClueInfo } from '/@/api/clue'
import { genderList, channelList, clueStatusList } from '/@/enums/customerEnum'
import { demandMarriageMoreData, demandMarriageSchema } from '/@/views/clue/cluePool/data'
import { getClueInfo, editClueRecord, recordClueing, getClueRecord } from '/@/api/clue'
import { genderList, channelList, clueStatusList, followTypeList, followStageList } from '/@/enums/customerEnum'
const details = ref<any>()
onMounted(() => {
@ -161,42 +218,126 @@
})
async function initFetch() {
demandMarriageMoreData.value = {}
const { query } = useRoute()
const { id } = query || {}
if (!id) return
details.value = await getClueInfo(`${id}`)
const { domicilePlaceProvinceCode, domicilePlaceCityCode } = details.value || {}
const domicilePlace = domicilePlaceCityCode && domicilePlaceProvinceCode ? [domicilePlaceProvinceCode, domicilePlaceCityCode] : []
const { provinceCode, cityCode, districtCode } = details.value || {}
const address = provinceCode && cityCode && districtCode ? [provinceCode, cityCode, districtCode] : []
avatar.value = details.value.profilePhoto
await nextTick()
await resetFields1()
await setFieldsValue1({ ...details.value, domicilePlace, address })
activeKey.value = '1'
}
async function onInfoChange(){
if(activeKey3.value == '2' && details.value.datingClueDemand){
await nextTick()
const { domicilePlaceProvinceCode, domicilePlaceCityCode } = details.value.datingClueDemand || {}
const domicilePlace = domicilePlaceCityCode && domicilePlaceProvinceCode ? [domicilePlaceProvinceCode, domicilePlaceCityCode] : []
const { provinceCode, cityCode, districtCode } = details.value.datingClueDemand || {}
const address = provinceCode && cityCode && districtCode ? [provinceCode, cityCode, districtCode] : []
await setFieldsValue3({ ...details.value.datingClueDemand, domicilePlace, address })
}
}
const activeKey = ref<string>('1')
const activeKey2 = ref<string>('1')
const activeKey3 = ref<string>('1')
const avatar = ref<string>('')
const nickName = ref<string>('')
async function handleNickname(){
if(!nickName.value){
createMessage.warning('请输入昵称')
return
}
await editClueRecord({id: details.value.id, nickName: nickName.value})
createMessage.success('修改昵称成功')
details.value.nickName = nickName.value
nickName.value = ''
}
//
const [registerForm1, { validate: validate1, setFieldsValue: setFieldsValue1 }] = useForm({
const [registerForm1, { validate: validate1, resetFields: resetFields1, getFieldsValue: getFieldsValue1, setFieldsValue: setFieldsValue1 }] = useForm({
labelWidth: 120,
schemas: basicSchema,
baseColProps: { span: 22 },
showActionButtonGroup: false,
})
//
function uploadAvatarAfter(value) {
//
// setFieldsValue1({
// avatar: value,
// });
async function uploadAvatarAfter(value) {
await editClueRecord({id: details.value.id, profilePhoto: value})
details.value.profilePhoto = value
}
//
const [registerForm3, { getFieldsValue: getFieldsValue3, setFieldsValue: setFieldsValue3 }] =
useForm({
labelWidth: 120,
schemas: demandMarriageSchema,
baseColProps: { span: 22 },
showActionButtonGroup: false,
})
async function handleSubmit() {
await validate1()
const baseInfo: any = getFieldsValue1()
const address1 = baseInfo.address
baseInfo.provinceCode = address1?.[0]
baseInfo.cityCode = address1?.[1]
baseInfo.districtCode = address1?.[2]
const domicilePlace1 = baseInfo.domicilePlace
baseInfo.domicilePlaceProvinceCode = domicilePlace1?.[0]
baseInfo.domicilePlaceCityCode = domicilePlace1?.[1]
const [registerForm, { setFieldsValue, resetFields, validate, getFieldsValue, updateSchema }] =
const demandInfo: any = getFieldsValue3()
const { domicilePlace, address } = demandInfo || {}
baseInfo.datingClueDemand = {
...demandInfo,
...demandMarriageMoreData.value,
cityCode: address?.[1],
provinceCode: address?.[0],
districtCode: address?.[2],
domicilePlaceCityCode: domicilePlace?.[1],
domicilePlaceProvinceCode: domicilePlace?.[0]
}
await editClueRecord({id: details.value.id, ...baseInfo})
createMessage.success('保存成功')
}
const { createMessage } = useMessage()
const [registerForm, { resetFields, validate, getFieldsValue }] =
useForm({
labelWidth: 90,
labelWidth: 120,
schemas: modalFormSchema,
baseColProps: { span: 22 },
showActionButtonGroup: false,
})
async function handleReport() {
await validate()
const values: any = getFieldsValue()
const { nextFollowTime } = values
values.nextFollowTime = formatToDateTime(nextFollowTime)
values.datingClueId = details.value.id
await recordClueing(values)
createMessage.success('提交成功')
resetFields()
}
const spinning = ref<boolean>(false)
const reportList = ref<any[]>([]);
async function onReportChange(){
if(activeKey2.value == '2'){
spinning.value = true
reportList.value = await getClueRecord(details.value.id)
spinning.value = false
}
}
</script>
<style scoped lang="less">
::v-deep .ant-input-number {
min-width: 90px;
width: 100% !important;
max-width: 100%;
}
</style>
Loading…
Cancel
Save