初始化项目

This commit is contained in:
2026-03-21 00:10:20 +08:00
parent bbf84afc8f
commit 52042abcb6
16 changed files with 276 additions and 286 deletions

View File

@@ -0,0 +1,147 @@
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
import { MyCompany, myCompanyListData } from '@jeesite/biz/api/biz/myCompany';
const { t } = useI18n('biz.myCompany');
const modalProps = {
title: t('公司选择'),
};
const searchForm: FormProps<MyCompany> = {
baseColProps: { md: 8, lg: 6 },
labelWidth: 90,
schemas: [
{
label: t('公司全称'),
field: 'companyName',
component: 'Input',
},
{
label: t('信用代码'),
field: 'creditCode',
component: 'Input',
},
{
label: t('数据状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'biz_status',
allowClear: true,
},
},
],
};
const tableColumns: BasicColumn<MyCompany>[] = [
{
title: t('记录时间'),
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 150,
align: 'center',
fixed: 'left',
},
{
title: t('公司全称'),
dataIndex: 'companyName',
key: 'a.company_name',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('公司简称'),
dataIndex: 'shortName',
key: 'a.short_name',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('统一社会信用代码'),
dataIndex: 'creditCode',
key: 'a.credit_code',
sorter: true,
width: 225,
align: 'left',
},
{
title: t('法人姓名'),
dataIndex: 'legalPerson',
key: 'a.legal_person',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('注册资本'),
dataIndex: 'registeredCapital',
key: 'a.registered_capital',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('成立日期'),
dataIndex: 'establishDate',
key: 'a.establish_date',
sorter: true,
width: 150,
align: 'center',
},
{
title: t('经营范围'),
dataIndex: 'businessScope',
key: 'a.business_scope',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('公司电话'),
dataIndex: 'contactPhone',
key: 'a.contact_phone',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('公司邮箱'),
dataIndex: 'contactEmail',
key: 'a.contact_email',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('公司状态'),
dataIndex: 'ustatus',
key: 'a.ustatus',
sorter: true,
width: 130,
align: 'left',
dictType: 'biz_status',
},
];
const tableProps: BasicTableProps = {
api: myCompanyListData,
beforeFetch: (params) => {
params['isAll'] = true;
return params;
},
columns: tableColumns,
formConfig: searchForm,
rowKey: 'companyId',
};
export default {
modalProps,
tableProps,
itemCode: 'companyId',
itemName: 'companyName',
isShowCode: true,
};

View File

@@ -31,25 +31,6 @@ const searchForm: FormProps = {
allowClear: true,
},
},
{
field: 'none',
component: 'None',
},
{
label: t('手机'),
field: 'mobile',
component: 'Input',
},
{
label: t('邮箱'),
field: 'email',
component: 'Input',
},
{
label: t('电话'),
field: 'phone',
component: 'Input',
},
],
};

View File

@@ -25,8 +25,8 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { Avatar } from 'ant-design-vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
import headerImg from '@jeesite/assets/images/header.jpg';
import { useUserStore } from '@jeesite/core/store/modules/user';
const userStore = useUserStore();
const userinfo = computed(() => userStore.getUserInfo);