From 2369f066544f3228eb60902f0cc2987eed29428c Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 5 Sep 2025 13:16:29 +0800 Subject: [PATCH] fix: crm todo --- apps/web-antd/src/views/crm/business/data.ts | 5 +- apps/web-antd/src/views/crm/contract/data.ts | 10 +++- apps/web-antd/src/views/crm/customer/data.ts | 57 ++++++++++++++++++- .../web-antd/src/views/crm/receivable/data.ts | 7 ++- .../src/views/crm/receivable/plan/data.ts | 3 +- 5 files changed, 76 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/crm/business/data.ts b/apps/web-antd/src/views/crm/business/data.ts index fbba48dcc..24576588f 100644 --- a/apps/web-antd/src/views/crm/business/data.ts +++ b/apps/web-antd/src/views/crm/business/data.ts @@ -149,13 +149,16 @@ export function useFormSchema(): VbenFormSchema[] { } /** 列表的搜索表单 */ -// TODO @xingyu:缺少 placeholder export function useGridFormSchema(): VbenFormSchema[] { return [ { fieldName: 'name', label: '商机名称', component: 'Input', + componentProps: { + placeholder: '请输入商机名称', + allowClear: true, + }, }, ]; } diff --git a/apps/web-antd/src/views/crm/contract/data.ts b/apps/web-antd/src/views/crm/contract/data.ts index 90479ede5..38d1fbfd4 100644 --- a/apps/web-antd/src/views/crm/contract/data.ts +++ b/apps/web-antd/src/views/crm/contract/data.ts @@ -240,18 +240,25 @@ export function useFormSchema(): VbenFormSchema[] { } /** 列表的搜索表单 */ -// TODO @xingyu:缺少 placeholder export function useGridFormSchema(): VbenFormSchema[] { return [ { fieldName: 'no', label: '合同编号', component: 'Input', + componentProps: { + placeholder: '请输入合同编号', + allowClear: true, + }, }, { fieldName: 'name', label: '合同名称', component: 'Input', + componentProps: { + placeholder: '请输入合同名称', + allowClear: true, + }, }, { fieldName: 'customerId', @@ -264,6 +271,7 @@ export function useGridFormSchema(): VbenFormSchema[] { value: 'id', }, placeholder: '请选择客户', + allowClear: true, }, }, ]; diff --git a/apps/web-antd/src/views/crm/customer/data.ts b/apps/web-antd/src/views/crm/customer/data.ts index 2520abc42..b3fcf1b2f 100644 --- a/apps/web-antd/src/views/crm/customer/data.ts +++ b/apps/web-antd/src/views/crm/customer/data.ts @@ -9,8 +9,6 @@ import { getAreaTree } from '#/api/system/area'; import { getSimpleUserList } from '#/api/system/user'; import { getRangePickerDefaultProps } from '#/utils'; -// TODO @xingyu:缺少 placeholder - /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { const userStore = useUserStore(); @@ -28,6 +26,10 @@ export function useFormSchema(): VbenFormSchema[] { label: '客户名称', component: 'Input', rules: 'required', + componentProps: { + placeholder: '请输入客户名称', + allowClear: true, + }, }, { fieldName: 'source', @@ -42,6 +44,10 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'mobile', label: '手机', component: 'Input', + componentProps: { + placeholder: '请输入手机', + allowClear: true, + }, }, { fieldName: 'ownerUserId', @@ -53,6 +59,8 @@ export function useFormSchema(): VbenFormSchema[] { label: 'nickname', value: 'id', }, + placeholder: '请选择负责人', + allowClear: true, }, defaultValue: userStore.userInfo?.id, rules: 'required', @@ -61,21 +69,37 @@ export function useFormSchema(): VbenFormSchema[] { fieldName: 'telephone', label: '电话', component: 'Input', + componentProps: { + placeholder: '请输入电话', + allowClear: true, + }, }, { fieldName: 'email', label: '邮箱', component: 'Input', + componentProps: { + placeholder: '请输入邮箱', + allowClear: true, + }, }, { fieldName: 'wechat', label: '微信', component: 'Input', + componentProps: { + placeholder: '请输入微信', + allowClear: true, + }, }, { fieldName: 'qq', label: 'QQ', component: 'Input', + componentProps: { + placeholder: '请输入QQ', + allowClear: true, + }, }, { fieldName: 'industryId', @@ -83,6 +107,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'Select', componentProps: { options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'), + placeholder: '请选择客户行业', + allowClear: true, }, }, { @@ -91,6 +117,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'Select', componentProps: { options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'), + placeholder: '请选择客户级别', + allowClear: true, }, }, { @@ -100,12 +128,18 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { api: () => getAreaTree(), fieldNames: { label: 'name', value: 'id', children: 'children' }, + placeholder: '请选择地址', + allowClear: true, }, }, { fieldName: 'detailAddress', label: '详细地址', component: 'Input', + componentProps: { + placeholder: '请输入详细地址', + allowClear: true, + }, }, { fieldName: 'contactNextTime', @@ -115,12 +149,18 @@ export function useFormSchema(): VbenFormSchema[] { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', + placeholder: '请选择下次联系时间', + allowClear: true, }, }, { fieldName: 'remark', label: '备注', component: 'Textarea', + componentProps: { + placeholder: '请输入备注', + allowClear: true, + }, }, ]; } @@ -132,16 +172,28 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'name', label: '客户名称', component: 'Input', + componentProps: { + placeholder: '请输入客户名称', + allowClear: true, + }, }, { fieldName: 'mobile', label: '手机号', component: 'Input', + componentProps: { + placeholder: '请输入手机号', + allowClear: true, + }, }, { fieldName: 'telephone', label: '电话', component: 'Input', + componentProps: { + placeholder: '请输入电话', + allowClear: true, + }, }, { fieldName: 'createTime', @@ -149,6 +201,7 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'RangePicker', componentProps: { ...getRangePickerDefaultProps(), + placeholder: '请选择创建时间', allowClear: true, }, }, diff --git a/apps/web-antd/src/views/crm/receivable/data.ts b/apps/web-antd/src/views/crm/receivable/data.ts index 96c4e6ee2..eb6bd3978 100644 --- a/apps/web-antd/src/views/crm/receivable/data.ts +++ b/apps/web-antd/src/views/crm/receivable/data.ts @@ -46,6 +46,7 @@ export function useFormSchema(): VbenFormSchema[] { value: 'id', }, placeholder: '请选择负责人', + allowClear: true, }, defaultValue: userStore.userInfo?.id, }, @@ -164,13 +165,16 @@ export function useFormSchema(): VbenFormSchema[] { } /** 列表的搜索表单 */ -// TODO @xingyu:缺少 placeholder export function useGridFormSchema(): VbenFormSchema[] { return [ { fieldName: 'no', label: '回款编号', component: 'Input', + componentProps: { + placeholder: '请输入回款编号', + allowClear: true, + }, }, { fieldName: 'customerId', @@ -183,6 +187,7 @@ export function useGridFormSchema(): VbenFormSchema[] { value: 'id', }, placeholder: '请选择客户', + allowClear: true, }, }, ]; diff --git a/apps/web-antd/src/views/crm/receivable/plan/data.ts b/apps/web-antd/src/views/crm/receivable/plan/data.ts index 1f7265d68..d878d6092 100644 --- a/apps/web-antd/src/views/crm/receivable/plan/data.ts +++ b/apps/web-antd/src/views/crm/receivable/plan/data.ts @@ -149,7 +149,6 @@ export function useFormSchema(): VbenFormSchema[] { } /** 列表的搜索表单 */ -// TODO @xingyu:缺少 placeholder export function useGridFormSchema(): VbenFormSchema[] { return [ { @@ -163,6 +162,7 @@ export function useGridFormSchema(): VbenFormSchema[] { value: 'id', }, placeholder: '请选择客户', + allowClear: true, }, }, { @@ -171,6 +171,7 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'Input', componentProps: { placeholder: '请输入合同编号', + allowClear: true, }, }, ];