Bladeren bron

feat(@six/smart-pharmacy): 智慧药事系统第一版企业管理-企业类型下拉框接口对接

cmj 1 maand geleden
bovenliggende
commit
8dd842110c

+ 5 - 0
apps/smart-pharmacy/src/api/method/dict.ts

@@ -38,3 +38,8 @@ export function listDictByCodeMethod(dictCode: string) {
 export function listDeptTypeDictMethod() {
   return listDictByCodeMethod('dept_type');
 }
+
+/** 企业类型字典(enterprise_type) */
+export function listEnterpriseTypeDictMethod() {
+  return listDictByCodeMethod('enterprise_type');
+}

+ 8 - 9
apps/smart-pharmacy/src/views/system/enterprise/data.ts

@@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
 import type { VbenFormSchema } from '#/adapter/form';
 import type { SystemModel } from '#/api/method/system';
 
+import { listEnterpriseTypeDictMethod } from '#/api';
 import { $t } from '#/locales';
 
 export function useEnterpriseSearchFormSchema(): VbenFormSchema[] {
@@ -13,18 +14,16 @@ export function useEnterpriseSearchFormSchema(): VbenFormSchema[] {
       label: $t('system.enterprise.name'),
     },
     {
-      component: 'Select',
+      component: 'ApiSelect',
+      fieldName: 'enterpriseType',
+      label: $t('system.enterprise.type'),
       componentProps: {
         allowClear: true,
-        options: [
-          { label: $t('common.all'), value: null },
-          { label: '煎药企业', value: 1 },
-          { label: '饮片供应商', value: 2 },
-          { label: '物流公司', value: 3 },
-        ],
+        api: listEnterpriseTypeDictMethod,
+        class: 'w-full',
+        labelField: 'dictName',
+        valueField: 'dictValue',
       },
-      fieldName: 'enterpriseType',
-      label: $t('system.enterprise.type'),
     },
   ];
 }