|
|
@@ -1,13 +1,11 @@
|
|
|
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
|
|
|
|
|
|
import type { VbenFormSchema } from '#/adapter/form';
|
|
|
-import type { OnActionClickFn } from '#/adapter/vxe-table';
|
|
|
import type { SystemModel } from '#/api/method/system';
|
|
|
|
|
|
-import { listOrganizationsMethodAll } from '#/api/method/system';
|
|
|
import { $t } from '#/locales';
|
|
|
|
|
|
-export function useUserSearchFormSchema(): VbenFormSchema[] {
|
|
|
+export function useEnterpriseSearchFormSchema(): VbenFormSchema[] {
|
|
|
return [
|
|
|
{
|
|
|
component: 'Input',
|
|
|
@@ -16,37 +14,28 @@ export function useUserSearchFormSchema(): VbenFormSchema[] {
|
|
|
},
|
|
|
{
|
|
|
component: 'Select',
|
|
|
- fieldName: 'status',
|
|
|
- label: $t('system.enterprise.type'),
|
|
|
componentProps: {
|
|
|
+ allowClear: true,
|
|
|
options: [
|
|
|
- {
|
|
|
- label: '煎药企业',
|
|
|
- value: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '饮片供应商',
|
|
|
- value: 0,
|
|
|
- },
|
|
|
- {
|
|
|
- label: '物流公司',
|
|
|
- value: 2,
|
|
|
- },
|
|
|
+ { label: $t('common.all'), value: null },
|
|
|
+ { label: '煎药企业', value: 1 },
|
|
|
+ { label: '饮片供应商', value: 2 },
|
|
|
+ { label: '物流公司', value: 3 },
|
|
|
],
|
|
|
},
|
|
|
+ fieldName: 'enterpriseType',
|
|
|
+ label: $t('system.enterprise.type'),
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
|
|
|
-export function useUserTableColumns<T = SystemModel.Organization>(
|
|
|
- onActionClick?: OnActionClickFn<T>,
|
|
|
-): VxeTableGridOptions<T>['columns'] {
|
|
|
+export function useEnterpriseTableColumns(): VxeTableGridOptions<SystemModel.Enterprise>['columns'] {
|
|
|
return [
|
|
|
{ type: 'seq', title: $t('table.column.seq'), width: 50 },
|
|
|
{
|
|
|
field: 'name',
|
|
|
title: $t('system.enterprise.name'),
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 120,
|
|
|
},
|
|
|
{
|
|
|
field: 'code',
|
|
|
@@ -56,7 +45,7 @@ export function useUserTableColumns<T = SystemModel.Organization>(
|
|
|
{
|
|
|
field: 'type',
|
|
|
title: $t('system.enterprise.type'),
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 120,
|
|
|
},
|
|
|
{
|
|
|
field: 'remark',
|
|
|
@@ -65,34 +54,17 @@ export function useUserTableColumns<T = SystemModel.Organization>(
|
|
|
},
|
|
|
{
|
|
|
field: 'createTime',
|
|
|
- title: $t('system.organization.createTime'),
|
|
|
- minWidth: 100,
|
|
|
+ title: $t('system.enterprise.createTime'),
|
|
|
+ minWidth: 160,
|
|
|
},
|
|
|
{
|
|
|
field: 'createUser',
|
|
|
- title: $t('system.organization.createUser'),
|
|
|
+ title: $t('system.enterprise.createUser'),
|
|
|
minWidth: 100,
|
|
|
},
|
|
|
- {
|
|
|
- align: 'center',
|
|
|
- // cellRender: {
|
|
|
- // attrs: {
|
|
|
- // nameField: 'name',
|
|
|
- // nameTitle: $t('system.user._'),
|
|
|
- // onClick: onActionClick,
|
|
|
- // },
|
|
|
- // name: 'CellOperation',
|
|
|
- // },
|
|
|
- field: 'operation',
|
|
|
- fixed: 'right',
|
|
|
- title: $t('table.column.operation'),
|
|
|
- width: 130,
|
|
|
- },
|
|
|
];
|
|
|
}
|
|
|
|
|
|
-export function useUserFormSchema(
|
|
|
- current?: Pick<SystemModel.Organization, 'id' | 'name'>,
|
|
|
-): VbenFormSchema[] {
|
|
|
+export function useEnterpriseFormSchema(): VbenFormSchema[] {
|
|
|
return [];
|
|
|
}
|