|
|
|
@ -9,11 +9,31 @@
|
|
|
|
|
:width="650"
|
|
|
|
|
@cancel="handleClose"
|
|
|
|
|
>
|
|
|
|
|
<div v-if="formModel">
|
|
|
|
|
<a-form :model="formModel" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
<a-form-item v-for="(item, index) in formModel.extraData" :key="index" :label="item.key">
|
|
|
|
|
<a-form-item label="渠道名称">
|
|
|
|
|
{{ formModel.originName }}
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="渠道类型">
|
|
|
|
|
{{ statusComparison('channelType', formModel.channelType) }}
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item v-if="formModel.channelIdentifying!.length" label="渠道标识">
|
|
|
|
|
<a-tag
|
|
|
|
|
v-for="(item, index) in formModel.channelIdentifying"
|
|
|
|
|
:key="index"
|
|
|
|
|
color="blue"
|
|
|
|
|
style="margin-right: 5px"
|
|
|
|
|
>{{ item }}</a-tag
|
|
|
|
|
>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="跟进员">
|
|
|
|
|
{{ formModel.assignedName }}
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item v-for="(item, index) in formModel!.extraData" :key="index" :label="item.key">
|
|
|
|
|
{{ item.value }}
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button key="submit" type="primary" @click="handleSubmit">确认</a-button>
|
|
|
|
|
</template>
|
|
|
|
@ -25,7 +45,7 @@ import { reactive, ref } from 'vue'
|
|
|
|
|
import { useModal } from '@/hooks/modal'
|
|
|
|
|
import { useFormAction, FormAction } from '@/hooks/form'
|
|
|
|
|
import type { ColProps } from 'ant-design-vue'
|
|
|
|
|
import type { CustomerListRecord, detailForm } from '@/api/customermanagement/customerList/types'
|
|
|
|
|
import type { CustomerListRecord } from '@/api/customermanagement/customerList/types'
|
|
|
|
|
// import { pageAccessLogs } from '@/api/salesmanagement/labelRule'
|
|
|
|
|
|
|
|
|
|
// const activeKey = ref('1')
|
|
|
|
@ -41,9 +61,7 @@ const { formAction } = useFormAction()
|
|
|
|
|
const submitLoading = ref(false)
|
|
|
|
|
|
|
|
|
|
// 表单模型
|
|
|
|
|
const formModel = reactive<detailForm>({
|
|
|
|
|
extraData: []
|
|
|
|
|
})
|
|
|
|
|
const formModel = ref<CustomerListRecord>()
|
|
|
|
|
|
|
|
|
|
//表单提交处理
|
|
|
|
|
const handleSubmit = () => {
|
|
|
|
@ -64,9 +82,46 @@ interface clueStageItem {
|
|
|
|
|
// const labelGroupReloadTable = () => {
|
|
|
|
|
// pageAccessLogs({ size: 10, page: 1 })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
const stateGroup = {
|
|
|
|
|
channelType: [
|
|
|
|
|
{
|
|
|
|
|
label: '手动创建',
|
|
|
|
|
value: 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '文件上传',
|
|
|
|
|
value: 2
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '飞鱼回传',
|
|
|
|
|
value: 3
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '外呼接入',
|
|
|
|
|
value: 4
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: 'API回传',
|
|
|
|
|
value: 5
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
sex: [
|
|
|
|
|
{
|
|
|
|
|
label: '男',
|
|
|
|
|
value: 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '女',
|
|
|
|
|
value: 1
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
//资源id
|
|
|
|
|
const resourcesId = ref<number>()
|
|
|
|
|
|
|
|
|
|
const statusComparison = (name: string, val: any) => {
|
|
|
|
|
return (stateGroup as any)[name].filter((item: any) => item.value == val)[0]?.label
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
open(newFormAction: FormAction, record: CustomerListRecord, tabIndex: string) {
|
|
|
|
|
// activeKey.value = tabIndex
|
|
|
|
@ -75,14 +130,14 @@ defineExpose({
|
|
|
|
|
title.value = '详情'
|
|
|
|
|
resourcesId.value = record.clueId
|
|
|
|
|
// labelGroupReloadTable()
|
|
|
|
|
const data = JSON.parse(JSON.stringify(record))
|
|
|
|
|
if (record.otherClue) {
|
|
|
|
|
JSON.parse(record.otherClue)
|
|
|
|
|
formModel.extraData = []
|
|
|
|
|
for (const key in JSON.parse(record.otherClue)) {
|
|
|
|
|
formModel.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] })
|
|
|
|
|
data.extraData = []
|
|
|
|
|
for (const key in JSON.parse(data.otherClue)) {
|
|
|
|
|
data.extraData.push({ key: key, value: JSON.parse(record.otherClue)[key] })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
formModel.value = data
|
|
|
|
|
formAction.value = newFormAction
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|