feat:【antd】【crm】优化整体的 allowClear
This commit is contained in:
@@ -37,6 +37,7 @@ export namespace CrmCustomerApi {
|
|||||||
updateTime: Date; // 更新时间
|
updateTime: Date; // 更新时间
|
||||||
poolDay?: number; // 距离进入公海天数
|
poolDay?: number; // 距离进入公海天数
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CustomerImport {
|
export interface CustomerImport {
|
||||||
ownerUserId: number;
|
ownerUserId: number;
|
||||||
file: File;
|
file: File;
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
import { defineAsyncComponent } from 'vue';
|
|
||||||
|
|
||||||
// TODO @xingyu:我直接引入,貌似没问题呀。
|
|
||||||
// TODO @xingyu:apps/web-antd/src/views/crm/followup/index.ts 走的异步组件,不过名字是 FollowUp 没 Async。可能要一起讨论怎么保持相对的一致性
|
|
||||||
export const AsyncOperateLog = defineAsyncComponent(
|
|
||||||
() => import('./operate-log.vue'),
|
|
||||||
);
|
|
||||||
|
|
||||||
export { default as OperateLog } from './operate-log.vue';
|
export { default as OperateLog } from './operate-log.vue';
|
||||||
|
|
||||||
export type { OperateLogProps } from './typing';
|
export type { OperateLogProps } from './typing';
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
rules: 'required',
|
rules: 'required',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入联系人姓名',
|
placeholder: '请输入联系人姓名',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'ownerUserId',
|
fieldName: 'ownerUserId',
|
||||||
@@ -66,7 +66,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入手机号',
|
placeholder: '请输入手机号',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'telephone',
|
fieldName: 'telephone',
|
||||||
@@ -74,7 +74,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入电话',
|
placeholder: '请输入电话',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'email',
|
fieldName: 'email',
|
||||||
@@ -82,7 +82,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入邮箱',
|
placeholder: '请输入邮箱',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'wechat',
|
fieldName: 'wechat',
|
||||||
@@ -90,7 +90,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入微信',
|
placeholder: '请输入微信',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'qq',
|
fieldName: 'qq',
|
||||||
@@ -98,7 +98,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入QQ',
|
placeholder: '请输入QQ',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'post',
|
fieldName: 'post',
|
||||||
@@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入职位',
|
placeholder: '请输入职位',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'master',
|
fieldName: 'master',
|
||||||
@@ -115,7 +115,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
|
options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
|
||||||
placeholder: '请选择是否关键决策人',
|
placeholder: '请选择是否关键决策人',
|
||||||
buttonStyle: 'solid',
|
buttonStyle: 'solid',
|
||||||
optionType: 'button',
|
optionType: 'button',
|
||||||
},
|
},
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
@@ -127,7 +127,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number'),
|
options: getDictOptions(DICT_TYPE.SYSTEM_USER_SEX, 'number'),
|
||||||
placeholder: '请选择性别',
|
placeholder: '请选择性别',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'parentId',
|
fieldName: 'parentId',
|
||||||
@@ -158,7 +158,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入详细地址',
|
placeholder: '请输入详细地址',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'contactNextTime',
|
fieldName: 'contactNextTime',
|
||||||
@@ -169,7 +169,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||||||
valueFormat: 'x',
|
valueFormat: 'x',
|
||||||
placeholder: '请选择下次联系时间',
|
placeholder: '请选择下次联系时间',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'remark',
|
fieldName: 'remark',
|
||||||
@@ -177,7 +177,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Textarea',
|
component: 'Textarea',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入备注',
|
placeholder: '请输入备注',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -196,8 +196,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
placeholder: '请选择客户',
|
placeholder: '请选择客户',
|
||||||
allowClear: true,
|
},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'name',
|
fieldName: 'name',
|
||||||
@@ -206,7 +205,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入联系人姓名',
|
placeholder: '请输入联系人姓名',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'mobile',
|
fieldName: 'mobile',
|
||||||
@@ -215,7 +214,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入手机号',
|
placeholder: '请输入手机号',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'telephone',
|
fieldName: 'telephone',
|
||||||
@@ -224,7 +223,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入电话',
|
placeholder: '请输入电话',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'wechat',
|
fieldName: 'wechat',
|
||||||
@@ -233,7 +232,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入微信',
|
placeholder: '请输入微信',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'email',
|
fieldName: 'email',
|
||||||
@@ -242,7 +241,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入电子邮箱',
|
placeholder: '请输入电子邮箱',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||||||
title: '距离进入公海天数',
|
title: '距离进入公海天数',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
formatter: ({ cellValue }) =>
|
formatter: ({ cellValue }) =>
|
||||||
cellValue == null ? '-' : `${cellValue} 天`,
|
cellValue === null ? '-' : `${cellValue} 天`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'ownerUserName',
|
field: 'ownerUserName',
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入客户名称',
|
placeholder: '请输入客户名称',
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -21,6 +22,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
placeholder: '请输入手机',
|
placeholder: '请输入手机',
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -30,6 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'),
|
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'),
|
||||||
placeholder: '请选择所属行业',
|
placeholder: '请选择所属行业',
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -39,6 +42,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'),
|
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'),
|
||||||
placeholder: '请选择客户级别',
|
placeholder: '请选择客户级别',
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -48,6 +52,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_SOURCE, 'number'),
|
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_SOURCE, 'number'),
|
||||||
placeholder: '请选择客户来源',
|
placeholder: '请选择客户来源',
|
||||||
|
allowClear: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const props = defineProps<{
|
|||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
|
|
||||||
/** 刷新表格 */
|
/** 刷新表格 */
|
||||||
function onRefresh() {
|
function handleRefresh() {
|
||||||
gridApi.query();
|
gridApi.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,10 +48,8 @@ async function handleDelete(row: CrmFollowUpApi.FollowUpRecord) {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await deleteFollowUpRecord(row.id);
|
await deleteFollowUpRecord(row.id);
|
||||||
message.success({
|
message.success($t('ui.actionMessage.deleteSuccess', [row.id]));
|
||||||
content: $t('ui.actionMessage.deleteSuccess', [row.id]),
|
handleRefresh();
|
||||||
});
|
|
||||||
onRefresh();
|
|
||||||
} catch {
|
} catch {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
@@ -129,6 +127,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
},
|
},
|
||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
|
isHover: true,
|
||||||
},
|
},
|
||||||
toolbarConfig: {
|
toolbarConfig: {
|
||||||
refresh: true,
|
refresh: true,
|
||||||
@@ -146,7 +145,7 @@ watch(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<FormModal @success="onRefresh" />
|
<FormModal @success="handleRefresh" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<TableAction
|
<TableAction
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { getOperateLogPage } from '#/api/crm/operateLog';
|
|||||||
import { BizTypeEnum } from '#/api/crm/permission';
|
import { BizTypeEnum } from '#/api/crm/permission';
|
||||||
import { getProduct } from '#/api/crm/product';
|
import { getProduct } from '#/api/crm/product';
|
||||||
import { useDescription } from '#/components/description';
|
import { useDescription } from '#/components/description';
|
||||||
import { AsyncOperateLog } from '#/components/operate-log';
|
import { OperateLog } from '#/components/operate-log';
|
||||||
|
|
||||||
import { useDetailSchema } from './data';
|
import { useDetailSchema } from './data';
|
||||||
import Info from './modules/info.vue';
|
import Info from './modules/info.vue';
|
||||||
@@ -83,7 +83,7 @@ onMounted(() => {
|
|||||||
<Info :product="product" />
|
<Info :product="product" />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane tab="操作日志" key="2" :force-render="true">
|
<Tabs.TabPane tab="操作日志" key="2" :force-render="true">
|
||||||
<AsyncOperateLog :log-list="logList" />
|
<OperateLog :log-list="logList" />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { getOperateLogPage } from '#/api/crm/operateLog';
|
|||||||
import { BizTypeEnum } from '#/api/crm/permission';
|
import { BizTypeEnum } from '#/api/crm/permission';
|
||||||
import { getReceivablePlan } from '#/api/crm/receivable/plan';
|
import { getReceivablePlan } from '#/api/crm/receivable/plan';
|
||||||
import { useDescription } from '#/components/description';
|
import { useDescription } from '#/components/description';
|
||||||
import { AsyncOperateLog } from '#/components/operate-log';
|
import { OperateLog } from '#/components/operate-log';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
import { PermissionList } from '#/views/crm/permission';
|
import { PermissionList } from '#/views/crm/permission';
|
||||||
import { ReceivablePlanDetailsInfo } from '#/views/crm/receivable/plan/components';
|
import { ReceivablePlanDetailsInfo } from '#/views/crm/receivable/plan/components';
|
||||||
@@ -131,7 +131,7 @@ onMounted(() => {
|
|||||||
/>
|
/>
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane tab="操作日志" key="3" :force-render="true">
|
<Tabs.TabPane tab="操作日志" key="3" :force-render="true">
|
||||||
<AsyncOperateLog :log-list="logList" />
|
<OperateLog :log-list="logList" />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user