feat: 统一 api 组件的调用方法

This commit is contained in:
xingyu4j
2025-10-20 10:41:57 +08:00
parent c6ef77694e
commit 30c7727361
88 changed files with 22772 additions and 554 deletions

View File

@@ -109,7 +109,7 @@ export function useGridFormSchemaMessage(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -12,7 +12,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -93,7 +93,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择引用知识库', placeholder: '请选择引用知识库',
api: getSimpleKnowledgeList, api: () => getSimpleKnowledgeList(),
labelField: 'name', labelField: 'name',
mode: 'multiple', mode: 'multiple',
valueField: 'id', valueField: 'id',
@@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择引用工具', placeholder: '请选择引用工具',
api: getToolSimpleList, api: () => getToolSimpleList(),
mode: 'multiple', mode: 'multiple',
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',

View File

@@ -48,7 +48,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择API 秘钥', placeholder: '请选择API 秘钥',
api: getApiKeySimpleList, api: () => getApiKeySimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '用户编号', label: '用户编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
placeholder: '请选择成员', placeholder: '请选择成员',
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
mode: 'tags', mode: 'tags',

View File

@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
// componentProps: { // componentProps: {
// placeholder: '请选择发起人', // placeholder: '请选择发起人',
// allowClear: true, // allowClear: true,
// api: getSimpleUserList, // api: () => getSimpleUserList(),
// labelField: 'nickname', // labelField: 'nickname',
// valueField: 'id', // valueField: 'id',
// }, // },
@@ -48,7 +48,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: getCategorySimpleList, api: () => getCategorySimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },

View File

@@ -23,7 +23,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请选择发起人', placeholder: '请选择发起人',
allowClear: true, allowClear: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -54,7 +54,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: getCategorySimpleList, api: () => getCategorySimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },

View File

@@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: getCategorySimpleList, api: () => getCategorySimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },

View File

@@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
placeholder: '请输入流程分类', placeholder: '请输入流程分类',
allowClear: true, allowClear: true,
api: getCategorySimpleList, api: () => getCategorySimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'code', valueField: 'code',
}, },

View File

@@ -41,10 +41,8 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true, allowClear: true,
}, },
@@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
}, },
@@ -85,10 +81,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getBusinessStatusTypeSimpleList(), api: () => getBusinessStatusTypeSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择商机状态组', placeholder: '请选择商机状态组',
allowClear: true, allowClear: true,
}, },

View File

@@ -53,7 +53,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -42,10 +42,8 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
}, },
defaultValue: userStore.userInfo?.id, defaultValue: userStore.userInfo?.id,
@@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
}, },
}, },
@@ -139,10 +135,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleContactList(), api: () => getSimpleContactList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择直属上级', placeholder: '请选择直属上级',
}, },
}, },
@@ -195,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
}, },
}, },

View File

@@ -47,10 +47,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
dependencies: { dependencies: {
triggerFields: ['id'], triggerFields: ['id'],
@@ -66,10 +64,8 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
}, },
}, },
@@ -142,10 +138,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
defaultValue: userStore.userInfo?.id, defaultValue: userStore.userInfo?.id,
}, },
@@ -270,10 +264,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
}, },

View File

@@ -61,10 +61,8 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true, allowClear: true,
}, },
@@ -223,10 +221,8 @@ export function useImportFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true, allowClear: true,
class: 'w-full', class: 'w-full',

View File

@@ -28,10 +28,8 @@ export function useDistributeFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
defaultValue: userStore.userInfo?.id, defaultValue: userStore.userInfo?.id,
rules: 'required', rules: 'required',

View File

@@ -34,11 +34,9 @@ export function useFormSchema(confType: LimitConfType): VbenFormSchema[] {
label: '规则适用人群', label: '规则适用人群',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
mode: 'multiple', mode: 'multiple',
allowClear: true, allowClear: true,
placeholder: '请选择规则适用人群', placeholder: '请选择规则适用人群',

View File

@@ -85,8 +85,9 @@ export function useFormSchema(
}); });
return res.list; return res.list;
}, },
labelField: 'name',
valueField: 'id',
mode: 'multiple', mode: 'multiple',
fieldNames: { label: 'name', value: 'id' },
}, },
}, },
{ {
@@ -105,8 +106,9 @@ export function useFormSchema(
}); });
return res.list; return res.list;
}, },
labelField: 'name',
valueField: 'id',
mode: 'multiple', mode: 'multiple',
fieldNames: { label: 'name', value: 'id' },
}, },
}, },
]; ];

View File

@@ -23,7 +23,7 @@ export function useTransferFormSchema(): VbenFormSchema[] {
label: '选择新负责人', label: '选择新负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },
@@ -116,7 +116,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '选择人员', label: '选择人员',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -43,10 +43,8 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true, allowClear: true,
}, },

View File

@@ -45,10 +45,8 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
placeholder: '请选择负责人', placeholder: '请选择负责人',
allowClear: true, allowClear: true,
}, },
@@ -61,10 +59,8 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
}, },
dependencies: { dependencies: {
@@ -193,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
}, },

View File

@@ -29,10 +29,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
dependencies: { dependencies: {
triggerFields: ['id'], triggerFields: ['id'],
@@ -48,11 +46,10 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true,
}, },
}, },
{ {
@@ -63,6 +60,7 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: { componentProps: {
options: [], options: [],
placeholder: '请选择合同', placeholder: '请选择合同',
allowClear: true,
}, },
dependencies: { dependencies: {
triggerFields: ['customerId'], triggerFields: ['customerId'],
@@ -156,10 +154,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getCustomerSimpleList(), api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
}, },

View File

@@ -99,7 +99,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -73,7 +73,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
allowClear: true, allowClear: true,
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',

View File

@@ -64,7 +64,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -68,7 +68,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '员工', label: '员工',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择员工', placeholder: '请选择员工',

View File

@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择付款账户', placeholder: '请选择付款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择付款账户', placeholder: '请选择付款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择收款账户', placeholder: '请选择收款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择财务人员', placeholder: '请选择财务人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择收款账户', placeholder: '请选择收款账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { handleTree } from '@vben/utils';
import { z } from '#/adapter/form'; import { z } from '#/adapter/form';
import { getProductCategorySimpleList } from '#/api/erp/product/category'; import { getProductCategorySimpleList } from '#/api/erp/product/category';
@@ -60,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '单位', label: '单位',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getProductUnitSimpleList, api: () => getProductUnitSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择单位', placeholder: '请选择单位',

View File

@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -176,11 +174,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -399,11 +389,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -542,11 +530,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -142,11 +140,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -265,11 +261,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -289,11 +283,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -304,11 +296,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -175,11 +173,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -526,11 +516,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -157,11 +153,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择结算账户', placeholder: '请选择结算账户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -281,11 +275,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -305,11 +297,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -320,11 +310,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -544,11 +544,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -82,11 +80,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -191,11 +187,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
disabled: true, disabled: true,
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getAccountSimpleList, api: () => getAccountSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -339,11 +333,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -363,11 +355,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择客户', placeholder: '请选择客户',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getCustomerSimpleList, api: () => getCustomerSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -378,7 +368,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -391,11 +381,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -543,11 +531,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -180,11 +180,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -204,11 +202,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -219,11 +215,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -50,11 +50,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
rules: 'required', rules: 'required',
}, },
@@ -189,11 +187,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -213,11 +209,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择供应商', placeholder: '请选择供应商',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSupplierSimpleList, api: () => getSupplierSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -228,11 +222,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -243,11 +235,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -178,11 +178,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -202,11 +200,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择调出仓库', placeholder: '请选择调出仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -217,11 +213,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择调入仓库', placeholder: '请选择调入仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {
@@ -232,11 +226,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择创建人', placeholder: '请选择创建人',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
}, },
}, },
{ {

View File

@@ -19,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -32,7 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择产品', placeholder: '请选择产品',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getProductSimpleList, api: () => getProductSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },
@@ -28,7 +28,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
placeholder: '请选择仓库', placeholder: '请选择仓库',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: getWarehouseSimpleList, api: () => getWarehouseSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '数据源', label: '数据源',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: () => getDataSourceConfigList(),
const data = await getDataSourceConfigList(); labelField: 'name',
return data.map((item) => ({ valueField: 'id',
label: item.name,
value: item.id,
}));
},
autoSelect: 'first', autoSelect: 'first',
placeholder: '请选择数据源', placeholder: '请选择数据源',
}, },

View File

@@ -23,7 +23,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '商品', label: '商品',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSpuSimpleList, api: () => getSpuSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择商品', placeholder: '请选择商品',

View File

@@ -181,7 +181,7 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
label: '运费模板', label: '运费模板',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleTemplateList, api: () => getSimpleTemplateList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -38,7 +38,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '文章分类', label: '文章分类',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleArticleCategoryList, api: () => getSimpleArticleCategoryList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择文章分类', placeholder: '请选择文章分类',
@@ -144,7 +144,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '文章分类', label: '文章分类',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleArticleCategoryList, api: () => getSimpleArticleCategoryList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择文章分类', placeholder: '请选择文章分类',

View File

@@ -10,7 +10,7 @@ import { useUserStore } from '@vben/stores';
import { getSimpleDeliveryPickUpStoreList } from '#/api/mall/trade/delivery/pickUpStore'; import { getSimpleDeliveryPickUpStoreList } from '#/api/mall/trade/delivery/pickUpStore';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 **/ /** 关联数据 */
const userStore = useUserStore(); const userStore = useUserStore();
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.PickUpStore[]>([]); const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.PickUpStore[]>([]);
getSimpleDeliveryPickUpStoreList().then((res) => { getSimpleDeliveryPickUpStoreList().then((res) => {
@@ -40,10 +40,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: pickUpStoreList, options: pickUpStoreList,
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择自提门店', placeholder: '请选择自提门店',
}, },
defaultValue: pickUpStoreList.value[0]?.id, defaultValue: pickUpStoreList.value[0]?.id,

View File

@@ -147,7 +147,8 @@ export function useBindFormSchema(): VbenFormSchema[] {
rules: 'required', rules: 'required',
componentProps: { componentProps: {
api: () => getSimpleUserList(), api: () => getSimpleUserList(),
fieldNames: { label: 'nickname', value: 'id' }, labelField: 'nickname',
valueField: 'id',
mode: 'tags', mode: 'tags',
allowClear: true, allowClear: true,
placeholder: '请选择门店店员', placeholder: '请选择门店店员',

View File

@@ -74,11 +74,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '快递公司', label: '快递公司',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryExpressList, api: () => getSimpleDeliveryExpressList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择快递公司', placeholder: '请选择快递公司',
allowClear: true, allowClear: true,
}, },
@@ -92,11 +90,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '自提门店', label: '自提门店',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryPickUpStoreList, api: () => getSimpleDeliveryPickUpStoreList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择自提门店', placeholder: '请选择自提门店',
allowClear: true, allowClear: true,
}, },
@@ -374,11 +370,9 @@ export function useAddressFormSchema(): VbenFormSchema[] {
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => getAreaTree(), api: () => getAreaTree(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id', childrenField: 'children',
children: 'children',
},
placeholder: '请选择收件人所在地', placeholder: '请选择收件人所在地',
treeDefaultExpandAll: true, treeDefaultExpandAll: true,
}, },
@@ -428,11 +422,9 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
label: '物流公司', label: '物流公司',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryExpressList, api: () => getSimpleDeliveryExpressList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择物流公司', placeholder: '请选择物流公司',
}, },
dependencies: { dependencies: {

View File

@@ -101,7 +101,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleTagList(), api: () => getSimpleTagList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
mode: 'multiple', mode: 'multiple',
placeholder: '请选择用户标签', placeholder: '请选择用户标签',
}, },
@@ -112,7 +113,8 @@ export function useFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleGroupList(), api: () => getSimpleGroupList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
placeholder: '请选择用户分组', placeholder: '请选择用户分组',
}, },
}, },
@@ -172,7 +174,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleTagList(), api: () => getSimpleTagList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
mode: 'multiple', mode: 'multiple',
placeholder: '请选择用户标签', placeholder: '请选择用户标签',
allowClear: true, allowClear: true,
@@ -184,7 +187,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleLevelList(), api: () => getSimpleLevelList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
placeholder: '请选择用户等级', placeholder: '请选择用户等级',
allowClear: true, allowClear: true,
}, },
@@ -195,7 +199,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleGroupList(), api: () => getSimpleGroupList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
placeholder: '请选择用户分组', placeholder: '请选择用户分组',
allowClear: true, allowClear: true,
}, },
@@ -323,7 +328,8 @@ export function useLevelFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: () => getSimpleLevelList(), api: () => getSimpleLevelList(),
fieldNames: { label: 'name', value: 'id' }, labelField: 'name',
valueField: 'id',
placeholder: '请选择用户等级', placeholder: '请选择用户等级',
allowClear: true, allowClear: true,
}, },

View File

@@ -21,13 +21,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '应用编号', label: '应用编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: () => getAppList(),
const data = await getAppList(); labelField: 'name',
return data.map((item) => ({ valueField: 'id',
label: item.name,
value: item.id,
}));
},
autoSelect: 'first', autoSelect: 'first',
placeholder: '请选择应用编号', placeholder: '请选择应用编号',
}, },

View File

@@ -72,7 +72,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',

View File

@@ -187,7 +187,7 @@ export function useDataFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: (values) => { componentProps: (values) => {
return { return {
api: getSimpleDictTypeList, api: () => getSimpleDictTypeList(),
placeholder: '请输入字典类型', placeholder: '请输入字典类型',
labelField: 'name', labelField: 'name',
valueField: 'type', valueField: 'type',

View File

@@ -59,7 +59,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
placeholder: '请选择邮箱账号', placeholder: '请选择邮箱账号',
@@ -185,7 +185,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -195,7 +195,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
label: '接收人', label: '接收人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择接收人', placeholder: '请选择接收人',

View File

@@ -16,11 +16,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '操作人', label: '操作人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
allowClear: true, allowClear: true,
placeholder: '请选择操作人员', placeholder: '请选择操作人员',
}, },

View File

@@ -30,7 +30,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -52,7 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
placeholder: '请选择短信渠道', placeholder: '请选择短信渠道',
@@ -146,7 +146,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
allowClear: true, allowClear: true,

View File

@@ -67,7 +67,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '岗位', label: '岗位',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimplePostList, api: () => getSimplePostList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',
@@ -213,7 +213,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
label: '角色', label: '角色',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleRoleList, api: () => getSimpleRoleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
mode: 'multiple', mode: 'multiple',

View File

@@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '数据源', label: '数据源',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: () => getDataSourceConfigList(),
const data = await getDataSourceConfigList(); labelField: 'name',
return data.map((item) => ({ valueField: 'id',
label: item.name,
value: item.id,
}));
},
autoSelect: 'first', autoSelect: 'first',
placeholder: '请选择数据源', placeholder: '请选择数据源',
}, },

View File

@@ -23,7 +23,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '商品', label: '商品',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSpuSimpleList, api: () => getSpuSimpleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择商品', placeholder: '请选择商品',

View File

@@ -113,7 +113,7 @@ export function useValueFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: (values) => { componentProps: (values) => {
return { return {
api: getPropertySimpleList, api: () => getPropertySimpleList(),
placeholder: '请选择属性', placeholder: '请选择属性',
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
@@ -153,7 +153,7 @@ export function useValueGridFormSchema(): VbenFormSchema[] {
label: '属性项', label: '属性项',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getPropertySimpleList, api: () => getPropertySimpleList(),
placeholder: '请选择属性项', placeholder: '请选择属性项',
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',

View File

@@ -181,7 +181,7 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
label: '运费模板', label: '运费模板',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleTemplateList, api: () => getSimpleTemplateList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -38,7 +38,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '文章分类', label: '文章分类',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleArticleCategoryList, api: () => getSimpleArticleCategoryList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择文章分类', placeholder: '请选择文章分类',
@@ -140,7 +140,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '文章分类', label: '文章分类',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleArticleCategoryList, api: () => getSimpleArticleCategoryList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择文章分类', placeholder: '请选择文章分类',

View File

@@ -74,7 +74,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '快递公司', label: '快递公司',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryExpressList, api: () => getSimpleDeliveryExpressList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择快递公司', placeholder: '请选择快递公司',
@@ -90,11 +90,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '自提门店', label: '自提门店',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryPickUpStoreList, api: () => getSimpleDeliveryPickUpStoreList(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id',
},
placeholder: '请选择自提门店', placeholder: '请选择自提门店',
clearable: true, clearable: true,
}, },
@@ -374,11 +372,9 @@ export function useAddressFormSchema(): VbenFormSchema[] {
component: 'ApiTreeSelect', component: 'ApiTreeSelect',
componentProps: { componentProps: {
api: () => getAreaTree(), api: () => getAreaTree(),
fieldNames: { labelField: 'name',
label: 'name', valueField: 'id',
value: 'id', childrenField: 'children',
children: 'children',
},
placeholder: '请选择收件人所在地', placeholder: '请选择收件人所在地',
treeDefaultExpandAll: true, treeDefaultExpandAll: true,
}, },
@@ -426,7 +422,7 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
label: '物流公司', label: '物流公司',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryExpressList, api: () => getSimpleDeliveryExpressList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '请选择物流公司', placeholder: '请选择物流公司',

View File

@@ -6,7 +6,8 @@ import type { MallOrderApi } from '#/api/mall/trade/order/index';
import { ref } from 'vue'; import { ref } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { DeliveryTypeEnum } from '@vben/constants'; import { DeliveryTypeEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { $t } from '@vben/locales'; import { $t } from '@vben/locales';
import { fenToYuan } from '@vben/utils'; import { fenToYuan } from '@vben/utils';
@@ -17,9 +18,6 @@ import { getSimpleDeliveryExpressList } from '#/api/mall/trade/delivery/express'
import { getSimpleDeliveryPickUpStoreList } from '#/api/mall/trade/delivery/pickUpStore'; import { getSimpleDeliveryPickUpStoreList } from '#/api/mall/trade/delivery/pickUpStore';
import * as OrderApi from '#/api/mall/trade/order/index'; import * as OrderApi from '#/api/mall/trade/order/index';
import { DictTag } from '#/components/dict-tag'; import { DictTag } from '#/components/dict-tag';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getRangePickerDefaultProps } from '#/utils'; import { getRangePickerDefaultProps } from '#/utils';
import { useGridColumns } from '#/views/mall/trade/order/data'; import { useGridColumns } from '#/views/mall/trade/order/data';
@@ -106,7 +104,7 @@ const [Grid] = useVbenVxeGrid({
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
clearable: true, clearable: true,
api: getSimpleDeliveryExpressList, api: () => getSimpleDeliveryExpressList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
placeholder: '全部', placeholder: '全部',
@@ -122,7 +120,7 @@ const [Grid] = useVbenVxeGrid({
label: '自提门店', label: '自提门店',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleDeliveryPickUpStoreList, api: () => getSimpleDeliveryPickUpStoreList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
}, },

View File

@@ -21,13 +21,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '应用编号', label: '应用编号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: () => getAppList(),
const data = await getAppList(); labelField: 'name',
return data.map((item) => ({ valueField: 'id',
label: item.name,
value: item.id,
}));
},
autoSelect: 'first', autoSelect: 'first',
placeholder: '请选择应用编号', placeholder: '请选择应用编号',
}, },

View File

@@ -74,7 +74,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',

View File

@@ -183,7 +183,7 @@ export function useDataFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: (values) => { componentProps: (values) => {
return { return {
api: getSimpleDictTypeList, api: () => getSimpleDictTypeList(),
placeholder: '请输入字典类型', placeholder: '请输入字典类型',
labelField: 'name', labelField: 'name',
valueField: 'type', valueField: 'type',

View File

@@ -59,7 +59,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
placeholder: '请选择邮箱账号', placeholder: '请选择邮箱账号',
@@ -177,7 +177,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -193,7 +193,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
label: '接收人', label: '接收人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择接收人', placeholder: '请选择接收人',

View File

@@ -16,11 +16,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '操作人', label: '操作人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
props: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
clearable: true, clearable: true,
placeholder: '请选择操作人员', placeholder: '请选择操作人员',
}, },

View File

@@ -30,7 +30,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -52,7 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
placeholder: '请选择短信渠道', placeholder: '请选择短信渠道',
@@ -144,7 +144,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -70,7 +70,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '岗位', label: '岗位',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimplePostList, api: () => getSimplePostList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
multiple: true, multiple: true,
@@ -212,7 +212,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
label: '角色', label: '角色',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleRoleList, api: () => getSimpleRoleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
multiple: true, multiple: true,

View File

@@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
label: '数据源', label: '数据源',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => { api: () => getDataSourceConfigList(),
const data = await getDataSourceConfigList(); labelField: 'name',
return data.map((item) => ({ valueField: 'id',
label: item.name,
value: item.id,
}));
},
autoSelect: 'first', autoSelect: 'first',
placeholder: '请选择数据源', placeholder: '请选择数据源',
}, },

View File

@@ -75,7 +75,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '负责人', label: '负责人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择负责人', placeholder: '请选择负责人',

View File

@@ -186,7 +186,7 @@ export function useDataFormSchema(): VbenFormSchema[] {
component: 'ApiSelect', component: 'ApiSelect',
componentProps: (values) => { componentProps: (values) => {
return { return {
api: getSimpleDictTypeList, api: () => getSimpleDictTypeList(),
placeholder: '请输入字典类型', placeholder: '请输入字典类型',
labelField: 'name', labelField: 'name',
valueField: 'type', valueField: 'type',

View File

@@ -59,7 +59,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
placeholder: '请选择邮箱账号', placeholder: '请选择邮箱账号',
@@ -187,7 +187,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '邮箱账号', label: '邮箱账号',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleMailAccountList(), api: () => getSimpleMailAccountList(),
labelField: 'mail', labelField: 'mail',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -196,7 +196,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
label: '接收人', label: '接收人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
labelField: 'nickname', labelField: 'nickname',
valueField: 'id', valueField: 'id',
placeholder: '请选择接收人', placeholder: '请选择接收人',

View File

@@ -16,11 +16,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '操作人', label: '操作人',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleUserList, api: () => getSimpleUserList(),
fieldNames: { labelField: 'nickname',
label: 'nickname', valueField: 'id',
value: 'id',
},
clearable: true, clearable: true,
placeholder: '请选择操作人员', placeholder: '请选择操作人员',
}, },

View File

@@ -30,7 +30,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -52,7 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
placeholder: '请选择短信渠道', placeholder: '请选择短信渠道',
@@ -146,7 +146,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '短信渠道', label: '短信渠道',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: async () => await getSimpleSmsChannelList(), api: () => getSimpleSmsChannelList(),
labelField: 'signature', labelField: 'signature',
valueField: 'id', valueField: 'id',
clearable: true, clearable: true,

View File

@@ -70,7 +70,7 @@ export function useFormSchema(): VbenFormSchema[] {
label: '岗位', label: '岗位',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimplePostList, api: () => getSimplePostList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
tag: true, tag: true,
@@ -216,7 +216,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
label: '角色', label: '角色',
component: 'ApiSelect', component: 'ApiSelect',
componentProps: { componentProps: {
api: getSimpleRoleList, api: () => getSimpleRoleList(),
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
tag: true, tag: true,

22408
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff