Browse Source

no message

master
xpz2018 9 months ago
parent
commit
85bcd3fd0a
11 changed files with 149 additions and 99 deletions
  1. 7
      src/api/clue/index.ts
  2. 18
      src/enums/customerEnum.ts
  3. 53
      src/views/clue/cluePool/data.ts
  4. 90
      src/views/clue/cluePool/index.vue
  5. 41
      src/views/clue/cluePool/modal.vue
  6. 5
      src/views/clue/customer/index.vue
  7. 8
      src/views/staff/auth/index.vue
  8. 2
      src/views/staff/staff/index.vue
  9. 3
      src/views/system/menu/index.vue
  10. 19
      src/views/system/menu/modal.vue
  11. 2
      src/views/system/role/RoleDrawer.vue

7
src/api/clue/index.ts

@ -3,7 +3,7 @@ import { PageResultModel } from '/@/api/model/baseModel'
export const getCluePage = (params: any) =>
defHttp.get<PageResultModel<any>>({
url: '/dating-clue-service/user/page/dating-clue-pool',
url: '/dating-clue-service/user/page/dating-clue-pool/by/clue-team',
params,
})
@ -19,10 +19,13 @@ export const editClueRecord = (params: any) => defHttp.post({ url: '/dating-clue
export const importClueRecord = (params: any) => defHttp.post({ url: '/dating-clue-service/user/import/dating-clue', params })
export const allocateCluing = (params: any) => defHttp.post({ url: '/dating-clue-service/user/batch-allocate/dating-clue', params })
export const allocateCluing = (params: any) => defHttp.post({ url: '/dating-clue-service/user/batch-allocate/dating-clue/verifier', params })
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 }})
export const deleteCluingList = (params: any) => defHttp.post({ url: '/dating-clue-service/user/batch-delete/dating-clue', params })

18
src/enums/customerEnum.ts

@ -58,13 +58,13 @@ export const validStatusList = [
]
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' },
{ label: '联系不上', value: -2, color: 'green' },
{ label: '放弃线索', value: -1, color: 'red' },
{ label: '未接通,待跟进', value: 1, color: 'red' },
{ label: '已接通,未详细沟通', value: 2, color: 'green' },
{ label: '已接通,已详细沟通', value: 3, color: 'gray' },
{ label: '确定到店时间', value: 4, color: 'gray' },
{ label: '未到店', value: 5, color: 'gray' },
{ label: '已到店,未成单', value: 6, color: 'gray' },
{ label: '已成单', value: 7, color: 'gray' },
]

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

@ -3,32 +3,33 @@ import moment from 'moment';
export const tableColumns: BasicColumn[] = [
{ title: '用户信息', dataIndex: 'userinfo', slots: { customRender: 'userinfo' } },
{ width: 60, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
{ width: 120, title: '手机号码', dataIndex: 'phone' },
{ width: 90, title: '渠道来源', dataIndex: 'channelType',
customRender: ({ text }) => {
return channelList.find((find) => find.value === text)?.label
},
},
{ 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: 90, title: '跟进状态', dataIndex: 'followStatus',
customRender: ({ text }) => {
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: 150, title: '录入时间', dataIndex: 'createTime' },
// { width: 60, title: '性别', dataIndex: 'genderCode', customRender: ({ text }) => { return genderList.find((find) => find.value === text)?.label} },
// { width: 120, title: '手机号码', dataIndex: 'phone' },
// { width: 90, title: '渠道来源', dataIndex: 'channelType',
// customRender: ({ text }) => {
// return channelList.find((find) => find.value === text)?.label
// },
// },
{ title: '录入信息', dataIndex: 'recordInfo', slots: { customRender: 'recordInfo' } },
// { 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: 90, title: '跟进状态', dataIndex: 'followStatus',
// customRender: ({ text }) => {
// 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: 150, title: '录入时间', dataIndex: 'createTime' },
]
export const tableFormSchema: FormSchema[] = [

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

@ -9,12 +9,13 @@
</div>
</template>
<template #toolbar>
<div style="width: 100%; padding: 2px" class="flex-row-center-space">
<RadioGroup button-style="solid" v-model:value="radioVal" @change="handleRadioChange">
<div style="width: 100%; padding: 2px" class="flex-row-center-end">
<!-- <RadioGroup button-style="solid" v-model:value="radioVal" @change="handleRadioChange">
<RadioButton v-for="item in clueStatusList" :key="item.value" :value="item.value">{{item.label}}</RadioButton>
</RadioGroup>
</RadioGroup> -->
<div class="flex-row-center-start">
<Popconfirm placement="bottom" icon="分配线索" :disabled="datingClueIdList.length == 0" @confirm="allocateList(null)">
<Button type="primary" danger :disabled="datingClueIdList.length == 0" @click="handleDelete(null)">删除</Button>
<!-- <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)">
@ -23,15 +24,15 @@
</Checkbox>
</div>
</template>
<Button type="primary" danger :disabled="datingClueIdList.length == 0">分配</Button>
</Popconfirm>
<Button type="primary" danger style="margin-left: 16px;" :disabled="datingClueIdList.length == 0">分配</Button>
</Popconfirm> -->
<Button style="margin-left: 16px;" @click="handleAdd(true)">批量导入</Button>
<Button :type="'primary'" style="margin-left: 16px;" @click="handleAdd(false)">新增</Button>
</div>
</div>
</template>
<template #userinfo="{ text, record }">
<div class="flex-row">
<div class="flex-row" style="padding-left: 12px;">
<Image style="width: 40px;height: 40px;" :src="record.profilePhoto || 'https://dating-agency-prod.oss-cn-shenzhen.aliyuncs.com/827036501B11.png'" />
<div class="flex-col" style="margin-left: 8px;">
<div class="flex-row">
@ -47,19 +48,21 @@
</div>
</div>
</template>
<template #recordInfo="{ text, record }">
<div class="flex-col">
<div class="flex-row">
<span class="single-line" style="font-size: 14px;color: #333;font-weight: bold;max-width: 160px;">{{record.creatorName}}</span>
<!-- <span style="font-size: 13px;color: #666;margin-left: 12px;">{{record.orgName}}</span> -->
</div>
<div class="flex-row">
<span style="font-size: 13px;color: #666;">{{record.createTime}}</span>
</div>
</div>
</template>
<template #action="{ record }">
<!-- <TableAction
:actions="[
{
label: '详情',
onClick: toDetail.bind(null, record),
},
]"
/> -->
<div class="flex-row-center-start">
<Button type="link" @click="toDetail(record)">详情</Button>
<span style="color: #999;">|</span>
<Popconfirm placement="topRight" :icon="record.allocationStatus == 1 ? '分配' : '重新分配'" @confirm="allocateList(record.id)">
<div class="flex-col-center-start">
<Button style="width: 100px;" @click.stop="toDetail(record)">编辑</Button>
<!-- <Popconfirm placement="topRight" :icon="record.allocationStatus == 1 ? '分配' : '重新分配'" @confirm="allocateList(record.id)">
<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)">
@ -68,8 +71,9 @@
</Checkbox>
</div>
</template>
<Button type="link" danger >{{record.allocationStatus == 1 ? '分配' : '重新分配'}}</Button>
</Popconfirm>
<Button danger style="width: 100px;margin-top: 8px;">{{record.allocationStatus == 1 ? '分配' : '重新分配'}}</Button>
</Popconfirm> -->
<Button danger style="width: 100px;margin-top: 8px;" @click.stop="handleDelete(record.id)">删除</Button>
</div>
</template>
</BasicTable>
@ -95,7 +99,7 @@
import { useModal } from '/@/components/Modal'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import ClueModal from './modal.vue'
import { getCluePage, allocateCluing } from '/@/api/clue'
import { getCluePage, allocateCluing, deleteCluingList } from '/@/api/clue'
import { pageOrganizationMember } from '/@/api/staff/staff'
import { educationList, maritalList } from '/@/enums/customerEnum'
@ -122,20 +126,20 @@
})
const [registerTable, { reload, setPagination, getSelectRowKeys, clearSelectedRowKeys }] = useTable({
bordered: true,
bordered: false,
useSearchForm: true,
columns: tableColumns,
showIndexColumn: true,
showIndexColumn: false,
showTableSetting: false,
api: getCluePage,
rowKey: 'id',
rowSelection: {
type: 'checkbox',
onChange,
getCheckboxProps(record: Recordable) {
// Demo: id0
return { disabled: record.allocationStatus !== 1 };
},
// getCheckboxProps(record: Recordable) {
// // Demo: id0
// return { disabled: record.allocationStatus !== 1 };
// },
},
formConfig: {
labelWidth: 120,
@ -184,10 +188,32 @@
const { createMessage } = useMessage()
const router = useRouter()
function toDetail(record: any) {
const { id } = record
router.push({
query: { id },
path: '/clue/customer',
openModal(true, {record, ifUpdate: false})
// const { id } = record
// router.push({
// query: { id },
// path: '/clue/customer',
// })
}
async function handleDelete(id){
const { createConfirm } = useMessage()
createConfirm({
title: '提示',
iconType: 'warning',
content: `是否确定删除?`,
onOk: () => {
var datingClueIdList: string[] = []
if(id){
datingClueIdList = [id]
} else {
datingClueIdList = getSelectRowKeys()
}
deleteCluingList({datingClueIdList}).then(() => {
createMessage.success('删除成功')
clearSelectedRowKeys()
reload()
})
},
})
}
const datingClueIdList = ref<string[]>([]);

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

@ -26,7 +26,7 @@
</div>
<div class="flex-col" v-else>
<Tabs tab-position="left" v-model:activeKey="activeKey2" :animated="false">
<Tabs tab-position="left" v-model:activeKey="activeKey2" :animated="false" @change="onInfoChange">
<TabPane key="1" tab="个人资料">
<BasicForm @register="registerForm" style="padding: 16px 48px 0px 0px;" >
<template #profilePhoto="{ model, field }">
@ -77,7 +77,7 @@
</template>
<script setup lang="ts">
import { ref, unref } from 'vue'
import { ref, unref, nextTick } from 'vue'
import { Tabs, TabPane, Button, Result, InputNumber } from 'ant-design-vue'
import Icon from '/@/components/Icon'
import { modalFormSchema, basicInfoData, demandMarriageSchema, demandMarriageMoreData } from './data'
@ -87,7 +87,7 @@
import { BasicForm, useForm } from '/@/components/Form'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { CropperAvatar } from '/@/components/Cropper';
import { createClueRecord, importClueRecord } from '/@/api/clue'
import { createClueRecord, importClueRecord, getClueInfo, editClueRecord } from '/@/api/clue'
const activeKey2 = ref<string>('1')
@ -100,11 +100,23 @@
})
const ifUpdate = ref<boolean>(false)
const details = ref<any>()
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
ifUpdate.value = !!data.ifUpdate
const { record } = data
if(ifUpdate.value){
tableListRef.value = [];
} else if(record && record.id){
details.value = await getClueInfo(`${record.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] : []
await nextTick()
await setFieldsValue({ ...details.value, domicilePlace, address })
activeKey2.value = '1'
} else {
details.value = {}
demandMarriageMoreData.value = {}
basicInfoData.value = {}
activeKey2.value = '1'
@ -119,7 +131,7 @@
})
//
const [registerForm3, { getFieldsValue: getFieldsValue3, resetFields: resetFields3 }] =
const [registerForm3, { getFieldsValue: getFieldsValue3, setFieldsValue: setFieldsValue3, resetFields: resetFields3 }] =
useForm({
labelWidth: 100,
schemas: demandMarriageSchema,
@ -138,6 +150,17 @@
});
}
async function onInfoChange(){
if(activeKey2.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 { createMessage } = useMessage()
const emits = defineEmits(['success'])
async function handleOk() {
@ -178,8 +201,14 @@
domicilePlaceCityCode: domicilePlace?.[1],
domicilePlaceProvinceCode: domicilePlace?.[0]
}
await createClueRecord(param)
createMessage.success(`新增成功!`)
if(details.value && details.value.id){
param.id = details.value.id
await editClueRecord(param)
createMessage.success(`编辑成功!`)
} else {
await createClueRecord(param)
createMessage.success(`新增成功!`)
}
emits('success')
} finally {
setModalProps({ confirmLoading: false })

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

@ -311,13 +311,14 @@
baseInfo.districtCode = address1?.[2]
const domicilePlace1 = baseInfo.domicilePlace
baseInfo.domicilePlaceProvinceCode = domicilePlace1?.[0]
baseInfo.domicilePlaceCityCode = domicilePlace1?.[1]
baseInfo.phone = details.value.phone || ''
baseInfo.weChatId = details.value.weChatId || ''
const demandInfo: any = getFieldsValue3()
const { domicilePlace, address } = demandInfo || {}
baseInfo.datingClueDemand = {
...demandInfo,
...demandMarriageMoreData.value,
...demandMarriageMoreData.value,
cityCode: address?.[1],
provinceCode: address?.[0],
districtCode: address?.[2],

8
src/views/staff/auth/index.vue

@ -1,9 +1,11 @@
<template>
<Card :bordered="false"> 123 </Card>
<Card :bordered="false">
</Card>
</template>
<script setup lang="ts">
import { Card } from 'ant-design-vue'
</script>
// import
<style scoped lang="less"></style>
</script>

2
src/views/staff/staff/index.vue

@ -16,7 +16,7 @@
</div>
<div class="flex-row-center-start">
<Button type="link" @click.stop="handleEdit1(item)">编辑</Button>
<span style="color: #999;">|</span>
<span style="color: #eee;">|</span>
<Button type="link" danger @click.stop="handleRemove1(item)">删除</Button>
</div>
</div>

3
src/views/system/menu/index.vue

@ -42,9 +42,6 @@
const [registerTable, { reload, expandAll }] = useTable({
title: '菜单列表',
api: getAllMenuList,
beforeFetch: (arg) => {
arg.appProgramId = '101'
},
afterFetch: (arg) => {
arg.forEach((item: any) => {
if(item.children && item.children.length){

19
src/views/system/menu/modal.vue

@ -30,20 +30,11 @@
ifUpdate.value = !!data.ifUpdate
id.value = record?.id
setModalProps({
minHeight: 50,
confirmLoading: false,
title: ifUpdate.value ? '编辑' : '新增',
})
const treeData = await getAllMenuList({appProgramId: '101'});
updateSchema({
field: 'parentId',
componentProps: { treeData },
});
setModalProps({ minHeight: 50, confirmLoading: false, title: ifUpdate.value ? '编辑' : '新增'})
const treeData = await getAllMenuList({});
updateSchema({ field: 'parentId', componentProps: { treeData } });
if (unref(ifUpdate)) {
await setFieldsValue({
...data.record,
})
await setFieldsValue({ ...data.record })
}
})
@ -53,7 +44,7 @@
try {
await validate()
const values: any = getFieldsValue()
values.appProgramId = '101'
// values.appProgramId = '101'
if(!values.parentId){
values.parentId = 0
}

2
src/views/system/role/RoleDrawer.vue

@ -53,7 +53,7 @@
setDrawerProps({ confirmLoading: true });
// setFieldsValuetreeDataTreekey not exist
if (unref(treeData).length === 0) {
treeData.value = await getAllMenuList({appProgramId: '101'})
treeData.value = await getAllMenuList({})
}
isUpdate.value = !!data?.isUpdate;

Loading…
Cancel
Save