feat: 统一 api 组件的调用方法
This commit is contained in:
@@ -109,7 +109,7 @@ export function useGridFormSchemaMessage(): VbenFormSchema[] {
|
||||
label: '用户编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '用户编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '用户编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -93,7 +93,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择引用知识库',
|
||||
api: getSimpleKnowledgeList,
|
||||
api: () => getSimpleKnowledgeList(),
|
||||
labelField: 'name',
|
||||
mode: 'multiple',
|
||||
valueField: 'id',
|
||||
@@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择引用工具',
|
||||
api: getToolSimpleList,
|
||||
api: () => getToolSimpleList(),
|
||||
mode: 'multiple',
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
|
||||
@@ -48,7 +48,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择API 秘钥',
|
||||
api: getApiKeySimpleList,
|
||||
api: () => getApiKeySimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '用户编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '用户编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择成员',
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
mode: 'tags',
|
||||
|
||||
@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
// componentProps: {
|
||||
// placeholder: '请选择发起人',
|
||||
// allowClear: true,
|
||||
// api: getSimpleUserList,
|
||||
// api: () => getSimpleUserList(),
|
||||
// labelField: 'nickname',
|
||||
// valueField: 'id',
|
||||
// },
|
||||
@@ -48,7 +48,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: getCategorySimpleList,
|
||||
api: () => getCategorySimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请选择发起人',
|
||||
allowClear: true,
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -54,7 +54,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: getCategorySimpleList,
|
||||
api: () => getCategorySimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: getCategorySimpleList,
|
||||
api: () => getCategorySimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入流程分类',
|
||||
allowClear: true,
|
||||
api: getCategorySimpleList,
|
||||
api: () => getCategorySimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'code',
|
||||
},
|
||||
|
||||
@@ -41,10 +41,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -85,10 +81,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getBusinessStatusTypeSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择商机状态组',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '负责人',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -42,10 +42,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
},
|
||||
defaultValue: userStore.userInfo?.id,
|
||||
@@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
},
|
||||
},
|
||||
@@ -139,10 +135,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleContactList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择直属上级',
|
||||
},
|
||||
},
|
||||
@@ -195,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -47,10 +47,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
dependencies: {
|
||||
triggerFields: ['id'],
|
||||
@@ -66,10 +64,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
},
|
||||
},
|
||||
@@ -142,10 +138,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
defaultValue: userStore.userInfo?.id,
|
||||
},
|
||||
@@ -270,10 +264,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -61,10 +61,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -223,10 +221,8 @@ export function useImportFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
allowClear: true,
|
||||
class: 'w-full',
|
||||
|
||||
@@ -28,10 +28,8 @@ export function useDistributeFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
defaultValue: userStore.userInfo?.id,
|
||||
rules: 'required',
|
||||
|
||||
@@ -34,11 +34,9 @@ export function useFormSchema(confType: LimitConfType): VbenFormSchema[] {
|
||||
label: '规则适用人群',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
allowClear: true,
|
||||
placeholder: '请选择规则适用人群',
|
||||
|
||||
@@ -85,8 +85,9 @@ export function useFormSchema(
|
||||
});
|
||||
return res.list;
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -105,8 +106,9 @@ export function useFormSchema(
|
||||
});
|
||||
return res.list;
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -23,7 +23,7 @@ export function useTransferFormSchema(): VbenFormSchema[] {
|
||||
label: '选择新负责人',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -116,7 +116,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '选择人员',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -43,10 +43,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -45,10 +45,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -61,10 +59,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
},
|
||||
dependencies: {
|
||||
@@ -193,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -29,10 +29,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
dependencies: {
|
||||
triggerFields: ['id'],
|
||||
@@ -48,11 +46,10 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -63,6 +60,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
options: [],
|
||||
placeholder: '请选择合同',
|
||||
allowClear: true,
|
||||
},
|
||||
dependencies: {
|
||||
triggerFields: ['customerId'],
|
||||
@@ -156,10 +154,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getCustomerSimpleList(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -99,7 +99,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '员工',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择员工',
|
||||
|
||||
@@ -73,7 +73,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '员工',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
allowClear: true,
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
|
||||
@@ -64,7 +64,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '员工',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择员工',
|
||||
|
||||
@@ -68,7 +68,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '员工',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择员工',
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择付款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择付款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择收款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择财务人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择收款账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
|
||||
import { getDictOptions } from '@vben/hooks';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getProductCategorySimpleList } from '#/api/erp/product/category';
|
||||
@@ -60,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '单位',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getProductUnitSimpleList,
|
||||
api: () => getProductUnitSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择单位',
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -176,11 +174,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -399,11 +389,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -542,11 +530,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -142,11 +140,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -265,11 +261,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -289,11 +283,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -304,11 +296,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -175,11 +173,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -526,11 +516,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择销售人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -157,11 +153,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择结算账户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -281,11 +275,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -305,11 +297,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -320,11 +310,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -544,11 +544,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -82,11 +80,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择销售人员',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -191,11 +187,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
disabled: true,
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getAccountSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getAccountSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -339,11 +333,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -363,11 +355,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择客户',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getCustomerSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getCustomerSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -378,7 +368,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -391,11 +381,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -543,11 +531,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -180,11 +180,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -204,11 +202,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -219,11 +215,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -50,11 +50,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
@@ -189,11 +187,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -213,11 +209,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择供应商',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSupplierSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSupplierSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -228,11 +222,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -243,11 +235,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -178,11 +178,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -202,11 +200,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择调出仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -217,11 +213,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择调入仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -232,11 +226,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择创建人',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -32,7 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择产品',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getProductSimpleList,
|
||||
api: () => getProductSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
@@ -28,7 +28,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
placeholder: '请选择仓库',
|
||||
allowClear: true,
|
||||
showSearch: true,
|
||||
api: getWarehouseSimpleList,
|
||||
api: () => getWarehouseSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] {
|
||||
label: '数据源',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const data = await getDataSourceConfigList();
|
||||
return data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
api: () => getDataSourceConfigList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
autoSelect: 'first',
|
||||
placeholder: '请选择数据源',
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '商品',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSpuSimpleList,
|
||||
api: () => getSpuSimpleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择商品',
|
||||
|
||||
@@ -181,7 +181,7 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
|
||||
label: '运费模板',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleTemplateList,
|
||||
api: () => getSimpleTemplateList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '文章分类',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleArticleCategoryList,
|
||||
api: () => getSimpleArticleCategoryList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择文章分类',
|
||||
@@ -144,7 +144,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '文章分类',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleArticleCategoryList,
|
||||
api: () => getSimpleArticleCategoryList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择文章分类',
|
||||
|
||||
@@ -10,7 +10,7 @@ import { useUserStore } from '@vben/stores';
|
||||
import { getSimpleDeliveryPickUpStoreList } from '#/api/mall/trade/delivery/pickUpStore';
|
||||
import { getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
/** 关联数据 **/
|
||||
/** 关联数据 */
|
||||
const userStore = useUserStore();
|
||||
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.PickUpStore[]>([]);
|
||||
getSimpleDeliveryPickUpStoreList().then((res) => {
|
||||
@@ -40,10 +40,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: pickUpStoreList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择自提门店',
|
||||
},
|
||||
defaultValue: pickUpStoreList.value[0]?.id,
|
||||
|
||||
@@ -147,7 +147,8 @@ export function useBindFormSchema(): VbenFormSchema[] {
|
||||
rules: 'required',
|
||||
componentProps: {
|
||||
api: () => getSimpleUserList(),
|
||||
fieldNames: { label: 'nickname', value: 'id' },
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
mode: 'tags',
|
||||
allowClear: true,
|
||||
placeholder: '请选择门店店员',
|
||||
|
||||
@@ -74,11 +74,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '快递公司',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleDeliveryExpressList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleDeliveryExpressList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择快递公司',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -92,11 +90,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '自提门店',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleDeliveryPickUpStoreList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleDeliveryPickUpStoreList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择自提门店',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -374,11 +370,9 @@ export function useAddressFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiTreeSelect',
|
||||
componentProps: {
|
||||
api: () => getAreaTree(),
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
children: 'children',
|
||||
},
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
childrenField: 'children',
|
||||
placeholder: '请选择收件人所在地',
|
||||
treeDefaultExpandAll: true,
|
||||
},
|
||||
@@ -428,11 +422,9 @@ export function useDeliveryFormSchema(): VbenFormSchema[] {
|
||||
label: '物流公司',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleDeliveryExpressList,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleDeliveryExpressList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择物流公司',
|
||||
},
|
||||
dependencies: {
|
||||
|
||||
@@ -101,7 +101,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleTagList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择用户标签',
|
||||
},
|
||||
@@ -112,7 +113,8 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleGroupList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择用户分组',
|
||||
},
|
||||
},
|
||||
@@ -172,7 +174,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleTagList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
placeholder: '请选择用户标签',
|
||||
allowClear: true,
|
||||
@@ -184,7 +187,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleLevelList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择用户等级',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -195,7 +199,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleGroupList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择用户分组',
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -323,7 +328,8 @@ export function useLevelFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: () => getSimpleLevelList(),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择用户等级',
|
||||
allowClear: true,
|
||||
},
|
||||
|
||||
@@ -21,13 +21,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '应用编号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => {
|
||||
const data = await getAppList();
|
||||
return data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
api: () => getAppList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
autoSelect: 'first',
|
||||
placeholder: '请选择应用编号',
|
||||
},
|
||||
|
||||
@@ -72,7 +72,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '负责人',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择负责人',
|
||||
|
||||
@@ -187,7 +187,7 @@ export function useDataFormSchema(): VbenFormSchema[] {
|
||||
component: 'ApiSelect',
|
||||
componentProps: (values) => {
|
||||
return {
|
||||
api: getSimpleDictTypeList,
|
||||
api: () => getSimpleDictTypeList(),
|
||||
placeholder: '请输入字典类型',
|
||||
labelField: 'name',
|
||||
valueField: 'type',
|
||||
|
||||
@@ -59,7 +59,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '邮箱账号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleMailAccountList(),
|
||||
api: () => getSimpleMailAccountList(),
|
||||
labelField: 'mail',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '邮箱账号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleMailAccountList(),
|
||||
api: () => getSimpleMailAccountList(),
|
||||
labelField: 'mail',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择邮箱账号',
|
||||
@@ -185,7 +185,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '邮箱账号',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleMailAccountList(),
|
||||
api: () => getSimpleMailAccountList(),
|
||||
labelField: 'mail',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -195,7 +195,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
|
||||
label: '接收人',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择接收人',
|
||||
|
||||
@@ -16,11 +16,9 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '操作人',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleUserList,
|
||||
fieldNames: {
|
||||
label: 'nickname',
|
||||
value: 'id',
|
||||
},
|
||||
api: () => getSimpleUserList(),
|
||||
labelField: 'nickname',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
placeholder: '请选择操作人员',
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '短信渠道',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleSmsChannelList(),
|
||||
api: () => getSimpleSmsChannelList(),
|
||||
labelField: 'signature',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -52,7 +52,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '短信渠道',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleSmsChannelList(),
|
||||
api: () => getSimpleSmsChannelList(),
|
||||
labelField: 'signature',
|
||||
valueField: 'id',
|
||||
placeholder: '请选择短信渠道',
|
||||
@@ -146,7 +146,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
||||
label: '短信渠道',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: async () => await getSimpleSmsChannelList(),
|
||||
api: () => getSimpleSmsChannelList(),
|
||||
labelField: 'signature',
|
||||
valueField: 'id',
|
||||
allowClear: true,
|
||||
|
||||
@@ -67,7 +67,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
label: '岗位',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimplePostList,
|
||||
api: () => getSimplePostList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
@@ -213,7 +213,7 @@ export function useAssignRoleFormSchema(): VbenFormSchema[] {
|
||||
label: '角色',
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
api: getSimpleRoleList,
|
||||
api: () => getSimpleRoleList(),
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
mode: 'multiple',
|
||||
|
||||
Reference in New Issue
Block a user