Browse Source

no message

master
xpz2018 7 months ago
parent
commit
d02e85131f
9 changed files with 108 additions and 21 deletions
  1. 4
      src/api/clue/index.ts
  2. 27
      src/views/components/Profile.vue
  3. 8
      src/views/invite/components/data.ts
  4. 21
      src/views/invite/components/modal.vue
  5. 41
      src/views/invite/inviteInfo/index.vue
  6. 12
      src/views/invite/list/data.ts
  7. 2
      src/views/invite/list/index.vue
  8. 12
      src/views/invite/myList/data.ts
  9. 2
      src/views/invite/myList/index.vue

4
src/api/clue/index.ts

@ -145,4 +145,6 @@ export const getInvitationData = (params: any) => defHttp.get<any>({ url: '/dati
export const getFlowStatic = (params: any) => defHttp.get<any>({ url: '/dating-clue-service/user/count/dating-clue-data/by-team', params})
export const getFlowData = (params: any) => defHttp.get<any>({ url: '/dating-clue-service/user/count/dating-clue-data-item/by-team', params})
export const getFlowData = (params: any) => defHttp.get<any>({ url: '/dating-clue-service/user/count/dating-clue-data-item/by-team', params})
export const intendedCustomer = (params: any) => defHttp.post({ url: '/dating-clue-service/user/mark/dating-clue/intended-customer', params })

27
src/views/components/Profile.vue

@ -6,11 +6,15 @@
<span style="font-size: 12px;color: #fff;">{{info.provinceName}}-{{info.cityName}}</span>
</div>
</div>
<div class="flex-col" style="margin-left: 12px;">
<div class="flex-col" style="margin-left: 12px;flex: 1;">
<div class="flex-row">
<span class="single-line" style="font-size: 14px;color: #333;font-weight: bold;max-width: 160px;">{{info.nickName}}</span>
<span class="single-line" style="font-size: 13px;color: #333;margin-left: 12px;">{{info.genderCode == 1 ? '女' : '男'}}</span>
<span class="single-line" style="font-size: 13px;color: #333;margin-left: 12px;" v-if="info.phone">{{info.phone}}</span>
<div class="flex-row" style="margin-left: 16px;" v-if="star == 1">
<Icon icon="ant-design:star-filled" size="20px" color="#FAA19D" @click.stop="attention(0)" v-if="info.markIntendedCustomer"/>
<Icon icon="ant-design:star-outlined" size="20px" color="#d6d6d6" @click.stop="attention(1)" v-else/>
</div>
</div>
<div class="flex-row">
<span style="font-size: 13px;color: #666;" v-if="info.age">{{info.age}}</span>
@ -29,9 +33,12 @@
<script>
import { educationList, maritalList, incomeList, channelList } from '/@/enums/customerEnum'
import { Avatar, Tag } from 'ant-design-vue'
import Icon from '/@/components/Icon'
import { intendedCustomer } from '/@/api/clue'
export default {
components: { Avatar, Tag },
name: 'Timeline',
components: { Avatar, Tag, Icon },
name: 'Profile',
props: {
info: { //
type: Object,
@ -39,6 +46,10 @@ export default {
return {}
}
},
star: {
type: Number,
default: 0
},
},
data() {
return {
@ -48,5 +59,15 @@ export default {
channelList
};
},
methods: {
async attention(status){
try {
await intendedCustomer({id: this.info.id})
this.info.markIntendedCustomer = status
} catch(e){
}
}
}
}
</script>

8
src/views/invite/components/data.ts

@ -1,5 +1,4 @@
import { FormSchema } from '/@/components/Form'
import { followTypeList } from '/@/enums/customerEnum'
export const modalFormSchema: FormSchema[] = [
// {
@ -28,6 +27,13 @@ export const modalFormSchema: FormSchema[] = [
],
},
},
{
label: '微信截图',
// required: true,
field: 'imageList',
component: 'Upload',
slot: 'imageList',
},
{
field: 'remark',
label: '备注',

21
src/views/invite/components/modal.vue

@ -1,6 +1,10 @@
<template>
<BasicModal v-bind="$attrs" @ok="handleOk" @register="registerModal">
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm" >
<template #imageList="{ model, field }">
<OssUpload v-model="model[field]" />
</template>
</BasicForm>
</BasicModal>
</template>
@ -9,6 +13,7 @@
import { modalFormSchema } from './data'
import { useMessage } from '/@/hooks/web/useMessage'
import { BasicForm, useForm } from '/@/components/Form'
import { OssUpload } from '/@/components/OssUpload'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { recordClueing } from '/@/api/clue'
@ -43,6 +48,20 @@
const values = await validate()
values.datingClueId = id.value
// console.log('values.............', values)
var imageList: any = []
Object.keys(values).forEach((key) => {
const val = values[key]
switch (key) {
case 'imageList':
imageList = val?.map?.((item: any) => {
const { url, response, originFileObj } = item
return typeof item === 'string' ? item : url || item?.photoUrl || response?.url || originFileObj?.url
})
break
}
})
delete values.imageList
values.imageList = imageList
setModalProps({ confirmLoading: true })
await recordClueing(values)
createMessage.success(`上报成功!`)

41
src/views/invite/inviteInfo/index.vue

@ -3,18 +3,28 @@
<div class="flex-row" style="background: white;width: 100%;padding: 10px;">
<CropperAvatar :value="avatar" width="90px" @change="uploadAvatarAfter"/>
<div class="flex-col" style="flex: 1;margin-left: 10px;">
<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;"/> -->
<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="pink">#{{followStageList.find((find) => find.value === details.followStatus)?.label}}</Tag>
<div class="flex-row-center-space">
<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;"/> -->
<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="pink">#{{followStageList.find((find) => find.value === details.followStatus)?.label}}</Tag>
</div>
<div class="flex-row-center-start" style="cursor: pointer;padding-right: 24px" @click.stop="handleIntent(0)" v-if="details.markIntendedCustomer">
<Icon icon="ant-design:star-filled" size="20px" color="#FAA19D" />
<span style="font-size: 14px;color: #FAA19D;margin-left: 4px;">意向客户</span>
</div>
<div class="flex-row-center-start" style="cursor: pointer;padding-right: 24px" @click.stop="handleIntent(1)" v-else>
<Icon icon="ant-design:star-outlined" size="20px" color="#d6d6d6"/>
<span style="font-size: 14px;color: #666;margin-left: 4px;">标记意向</span>
</div>
</div>
<div class="flex-row-center-start" style="margin-top: 5px;">
<div class="flex-row-center-start" style="width: 240px;">
@ -259,7 +269,7 @@
import { useModal } from '/@/components/Modal'
import AppointmentModal from './modal.vue'
import { demandMarriageMoreData, demandMarriageSchema } from '/@/views/clue/components/data'
import { getClueInfo, editClueRecord, recordClueing, getClueRecord, getAppointmentList, getClueContractList } from '/@/api/clue'
import { getClueInfo, editClueRecord, recordClueing, getClueRecord, getAppointmentList, getClueContractList, intendedCustomer } from '/@/api/clue'
import { genderList, channelList, clueStatusList, followTypeList, followStageList } from '/@/enums/customerEnum'
const details = ref<any>()
@ -481,6 +491,11 @@
// },
})
async function handleIntent(status){
await intendedCustomer({id: details.value.id})
details.value.markIntendedCustomer = status
}
</script>
<style scoped lang="less">
::v-deep .ant-input-number {

12
src/views/invite/list/data.ts

@ -70,6 +70,18 @@ export const tableFormSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 6 },
},
{
field: 'markIntendedCustomer',
label: '意向客户',
colProps: { span: 6 },
component: 'Select',
componentProps: {
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',

2
src/views/invite/list/index.vue

@ -19,7 +19,7 @@
</div>
</template>
<template #userinfo="{ text, record }">
<Profile :info="record" />
<Profile :info="record" :star="1"/>
</template>
<template #allocateInfo="{ text, record }">
<Timeline :list="record.datingClueFollowRecordList"/>

12
src/views/invite/myList/data.ts

@ -72,6 +72,18 @@ export const tableFormSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 6 },
},
{
field: 'markIntendedCustomer',
label: '意向客户',
colProps: { span: 6 },
component: 'Select',
componentProps: {
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
},
},
{
field: 'maritalStatusCode',
label: '婚姻状况',

2
src/views/invite/myList/index.vue

@ -16,7 +16,7 @@
</div>
</template> -->
<template #userinfo="{ text, record }">
<Profile :info="record" />
<Profile :info="record" :star="1"/>
</template>
<template #allocateInfo="{ text, record }">
<Timeline :list="record.datingClueFollowRecordList"/>

Loading…
Cancel
Save