diff --git a/src/api/clue/index.ts b/src/api/clue/index.ts index 1621be9..e263f8c 100644 --- a/src/api/clue/index.ts +++ b/src/api/clue/index.ts @@ -3,7 +3,7 @@ import { PageResultModel } from '/@/api/model/baseModel' export const getCluePage = (params: any) => defHttp.get>({ - 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({ 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({ 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 }) + diff --git a/src/enums/customerEnum.ts b/src/enums/customerEnum.ts index e2b93a6..baf8a27 100644 --- a/src/enums/customerEnum.ts +++ b/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' }, ] \ No newline at end of file diff --git a/src/views/clue/cluePool/data.ts b/src/views/clue/cluePool/data.ts index b59a2a5..315076a 100644 --- a/src/views/clue/cluePool/data.ts +++ b/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[] = [ diff --git a/src/views/clue/cluePool/index.vue b/src/views/clue/cluePool/index.vue index cc663d2..16f98d8 100644 --- a/src/views/clue/cluePool/index.vue +++ b/src/views/clue/cluePool/index.vue @@ -9,12 +9,13 @@ + @@ -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: 第一行(id为0)的选择框禁用 - return { disabled: record.allocationStatus !== 1 }; - }, + // getCheckboxProps(record: Recordable) { + // // Demo: 第一行(id为0)的选择框禁用 + // 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([]); diff --git a/src/views/clue/cluePool/modal.vue b/src/views/clue/cluePool/modal.vue index 60f9546..0af80f0 100644 --- a/src/views/clue/cluePool/modal.vue +++ b/src/views/clue/cluePool/modal.vue @@ -26,7 +26,7 @@
- + + // import - + diff --git a/src/views/staff/staff/index.vue b/src/views/staff/staff/index.vue index 2e8f0b9..fc174da 100644 --- a/src/views/staff/staff/index.vue +++ b/src/views/staff/staff/index.vue @@ -16,7 +16,7 @@
- | + |
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 18e9435..1a15ee3 100644 --- a/src/views/system/menu/index.vue +++ b/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){ diff --git a/src/views/system/menu/modal.vue b/src/views/system/menu/modal.vue index caebc29..92752d0 100644 --- a/src/views/system/menu/modal.vue +++ b/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 } diff --git a/src/views/system/role/RoleDrawer.vue b/src/views/system/role/RoleDrawer.vue index 48d3088..0967168 100644 --- a/src/views/system/role/RoleDrawer.vue +++ b/src/views/system/role/RoleDrawer.vue @@ -53,7 +53,7 @@ setDrawerProps({ confirmLoading: true }); // 需要在setFieldsValue之前先填充treeData,否则Tree组件可能会报key not exist警告 if (unref(treeData).length === 0) { - treeData.value = await getAllMenuList({appProgramId: '101'}) + treeData.value = await getAllMenuList({}) } isUpdate.value = !!data?.isUpdate;