fix: crm todo

pull/210/head
xingyu4j 2025-09-05 13:16:29 +08:00
parent 2daebde092
commit 2369f06654
5 changed files with 76 additions and 6 deletions

View File

@ -149,13 +149,16 @@ export function useFormSchema(): VbenFormSchema[] {
} }
/** 列表的搜索表单 */ /** 列表的搜索表单 */
// TODO @xingyu缺少 placeholder
export function useGridFormSchema(): VbenFormSchema[] { export function useGridFormSchema(): VbenFormSchema[] {
return [ return [
{ {
fieldName: 'name', fieldName: 'name',
label: '商机名称', label: '商机名称',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入商机名称',
allowClear: true,
},
}, },
]; ];
} }

View File

@ -240,18 +240,25 @@ export function useFormSchema(): VbenFormSchema[] {
} }
/** 列表的搜索表单 */ /** 列表的搜索表单 */
// TODO @xingyu缺少 placeholder
export function useGridFormSchema(): VbenFormSchema[] { export function useGridFormSchema(): VbenFormSchema[] {
return [ return [
{ {
fieldName: 'no', fieldName: 'no',
label: '合同编号', label: '合同编号',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入合同编号',
allowClear: true,
},
}, },
{ {
fieldName: 'name', fieldName: 'name',
label: '合同名称', label: '合同名称',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入合同名称',
allowClear: true,
},
}, },
{ {
fieldName: 'customerId', fieldName: 'customerId',
@ -264,6 +271,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
value: 'id', value: 'id',
}, },
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true,
}, },
}, },
]; ];

View File

@ -9,8 +9,6 @@ import { getAreaTree } from '#/api/system/area';
import { getSimpleUserList } from '#/api/system/user'; import { getSimpleUserList } from '#/api/system/user';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
// TODO @xingyu缺少 placeholder
/** 新增/修改的表单 */ /** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] { export function useFormSchema(): VbenFormSchema[] {
const userStore = useUserStore(); const userStore = useUserStore();
@ -28,6 +26,10 @@ export function useFormSchema(): VbenFormSchema[] {
label: '客户名称', label: '客户名称',
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
componentProps: {
placeholder: '请输入客户名称',
allowClear: true,
},
}, },
{ {
fieldName: 'source', fieldName: 'source',
@ -42,6 +44,10 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'mobile', fieldName: 'mobile',
label: '手机', label: '手机',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入手机',
allowClear: true,
},
}, },
{ {
fieldName: 'ownerUserId', fieldName: 'ownerUserId',
@ -53,6 +59,8 @@ export function useFormSchema(): VbenFormSchema[] {
label: 'nickname', label: 'nickname',
value: 'id', value: 'id',
}, },
placeholder: '请选择负责人',
allowClear: true,
}, },
defaultValue: userStore.userInfo?.id, defaultValue: userStore.userInfo?.id,
rules: 'required', rules: 'required',
@ -61,21 +69,37 @@ export function useFormSchema(): VbenFormSchema[] {
fieldName: 'telephone', fieldName: 'telephone',
label: '电话', label: '电话',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入电话',
allowClear: true,
},
}, },
{ {
fieldName: 'email', fieldName: 'email',
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入邮箱',
allowClear: true,
},
}, },
{ {
fieldName: 'wechat', fieldName: 'wechat',
label: '微信', label: '微信',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入微信',
allowClear: true,
},
}, },
{ {
fieldName: 'qq', fieldName: 'qq',
label: 'QQ', label: 'QQ',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入QQ',
allowClear: true,
},
}, },
{ {
fieldName: 'industryId', fieldName: 'industryId',
@ -83,6 +107,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'), options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_INDUSTRY, 'number'),
placeholder: '请选择客户行业',
allowClear: true,
}, },
}, },
{ {
@ -91,6 +117,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'), options: getDictOptions(DICT_TYPE.CRM_CUSTOMER_LEVEL, 'number'),
placeholder: '请选择客户级别',
allowClear: true,
}, },
}, },
{ {
@ -100,12 +128,18 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
api: () => getAreaTree(), api: () => getAreaTree(),
fieldNames: { label: 'name', value: 'id', children: 'children' }, fieldNames: { label: 'name', value: 'id', children: 'children' },
placeholder: '请选择地址',
allowClear: true,
}, },
}, },
{ {
fieldName: 'detailAddress', fieldName: 'detailAddress',
label: '详细地址', label: '详细地址',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入详细地址',
allowClear: true,
},
}, },
{ {
fieldName: 'contactNextTime', fieldName: 'contactNextTime',
@ -115,12 +149,18 @@ export function useFormSchema(): VbenFormSchema[] {
showTime: true, showTime: true,
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
placeholder: '请选择下次联系时间',
allowClear: true,
}, },
}, },
{ {
fieldName: 'remark', fieldName: 'remark',
label: '备注', label: '备注',
component: 'Textarea', component: 'Textarea',
componentProps: {
placeholder: '请输入备注',
allowClear: true,
},
}, },
]; ];
} }
@ -132,16 +172,28 @@ export function useGridFormSchema(): VbenFormSchema[] {
fieldName: 'name', fieldName: 'name',
label: '客户名称', label: '客户名称',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入客户名称',
allowClear: true,
},
}, },
{ {
fieldName: 'mobile', fieldName: 'mobile',
label: '手机号', label: '手机号',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入手机号',
allowClear: true,
},
}, },
{ {
fieldName: 'telephone', fieldName: 'telephone',
label: '电话', label: '电话',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入电话',
allowClear: true,
},
}, },
{ {
fieldName: 'createTime', fieldName: 'createTime',
@ -149,6 +201,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'RangePicker', component: 'RangePicker',
componentProps: { componentProps: {
...getRangePickerDefaultProps(), ...getRangePickerDefaultProps(),
placeholder: '请选择创建时间',
allowClear: true, allowClear: true,
}, },
}, },

View File

@ -46,6 +46,7 @@ export function useFormSchema(): VbenFormSchema[] {
value: 'id', value: 'id',
}, },
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true,
}, },
defaultValue: userStore.userInfo?.id, defaultValue: userStore.userInfo?.id,
}, },
@ -164,13 +165,16 @@ export function useFormSchema(): VbenFormSchema[] {
} }
/** 列表的搜索表单 */ /** 列表的搜索表单 */
// TODO @xingyu缺少 placeholder
export function useGridFormSchema(): VbenFormSchema[] { export function useGridFormSchema(): VbenFormSchema[] {
return [ return [
{ {
fieldName: 'no', fieldName: 'no',
label: '回款编号', label: '回款编号',
component: 'Input', component: 'Input',
componentProps: {
placeholder: '请输入回款编号',
allowClear: true,
},
}, },
{ {
fieldName: 'customerId', fieldName: 'customerId',
@ -183,6 +187,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
value: 'id', value: 'id',
}, },
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true,
}, },
}, },
]; ];

View File

@ -149,7 +149,6 @@ export function useFormSchema(): VbenFormSchema[] {
} }
/** 列表的搜索表单 */ /** 列表的搜索表单 */
// TODO @xingyu缺少 placeholder
export function useGridFormSchema(): VbenFormSchema[] { export function useGridFormSchema(): VbenFormSchema[] {
return [ return [
{ {
@ -163,6 +162,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
value: 'id', value: 'id',
}, },
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true,
}, },
}, },
{ {
@ -171,6 +171,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '请输入合同编号', placeholder: '请输入合同编号',
allowClear: true,
}, },
}, },
]; ];