|
@@ -56,8 +56,13 @@
|
|
|
<a-row class="edit-operation">
|
|
|
<a-col :span="24" style="text-align: right">
|
|
|
<a-button type="primary" html-type="submit" @click='onAdd'>新增</a-button>
|
|
|
- <a-button type="primary" html-type="submit">导入</a-button>
|
|
|
- <a-button type="primary" html-type="submit">导出</a-button>
|
|
|
+ <BImportExcel
|
|
|
+ :options="importOptions"
|
|
|
+ @success="loadData"
|
|
|
+ ></BImportExcel>
|
|
|
+ <BExportExcel :title="'导出'" :filename="'企业信息'"
|
|
|
+ :url="'companyService/company/export'"
|
|
|
+ :params="{...searchParams, isExport: true, rows:10000}"></BExportExcel>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -89,10 +94,11 @@ import type {TableColumnsType, TableProps} from 'ant-design-vue';
|
|
|
import {getList, del} from '@/api/companyService/company';
|
|
|
import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
|
|
|
import {getPaginationTotalTitle} from "@/utils/common";
|
|
|
-import { Modal, SelectProps} from "ant-design-vue";
|
|
|
+import {Modal, SelectProps} from "ant-design-vue";
|
|
|
import dayjs from "dayjs";
|
|
|
import {useTabsViewStore} from '@/store/modules/tabsView';
|
|
|
import {get} from "@/api/common";
|
|
|
+import type { ImportProps } from '@/components/basic/excel/importExcel/ImportProps';
|
|
|
|
|
|
export default defineComponent({
|
|
|
components: {DownOutlined, UpOutlined, BExportExcel},
|
|
@@ -113,6 +119,33 @@ export default defineComponent({
|
|
|
selectedRowKeys: [],
|
|
|
loading: false
|
|
|
});
|
|
|
+ const importOptions = ref<ImportProps>({
|
|
|
+ title: '导入',
|
|
|
+ url: 'companyService/company/importCompany ',
|
|
|
+ columns: [
|
|
|
+ {cnName: '企业名称', enName: 'companyName', width: 100},
|
|
|
+ {cnName: '统一信用代码', enName: 'companyCode', width: 100},
|
|
|
+ {cnName: '所属驿站', enName: 'SiteName', width: 100},
|
|
|
+ {cnName: '所属县区', enName: 'regionName', width: 100},
|
|
|
+ {cnName: '所属街道', enName: 'streetName', width: 100},
|
|
|
+ {cnName: '企业办公地址', enName: 'address', width: 100},
|
|
|
+ {cnName: '用工情况', enName: 'workSituation', width: 100},
|
|
|
+ {cnName: '企业规模', enName: 'companyModel', width: 100},
|
|
|
+ {cnName: '企业分类', enName: 'companyType', width: 100},
|
|
|
+ {cnName: '企业联系人', enName: 'userName', width: 100},
|
|
|
+ {cnName: '企业联系电话', enName: 'userMobile', width: 100},
|
|
|
+ {cnName: '企业邮箱', enName: 'companyEmail', width: 100},
|
|
|
+ {cnName: '法定代表人', enName: 'frName', width: 100},
|
|
|
+ {cnName: '企业状态', enName: 'recordStatus', width: 100},
|
|
|
+ {cnName: '经营范围', enName: 'businScope', width: 100},
|
|
|
+ {cnName: '企业简介', enName: 'companyDesc', width: 100}
|
|
|
+ ],
|
|
|
+ template: {
|
|
|
+ tempFileName: '企业信息导入模板.xlsx',
|
|
|
+ url: '',
|
|
|
+ params: null,
|
|
|
+ },
|
|
|
+ });
|
|
|
const columns: TableColumnsType = [
|
|
|
{
|
|
|
title: '序号',
|
|
@@ -124,11 +157,15 @@ export default defineComponent({
|
|
|
{title: '所属县区', dataIndex: 'regionName', key: 'regionName', width: 120, align: "center"},
|
|
|
{title: '所属街道', dataIndex: 'streetName', key: 'streetName', align: "center"},
|
|
|
{title: '统一信用代码', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
|
|
|
- {title: '企业状态', dataIndex: 'recordStatus', key: 'recordStatus', align: "center"},
|
|
|
+ {
|
|
|
+ title: '企业状态', dataIndex: 'recordStatus', key: 'recordStatus', align: "center", customRender: (item) => {
|
|
|
+ return item.record.recordStatus == 1 ? "在营" : "关闭";
|
|
|
+ }
|
|
|
+ },
|
|
|
{title: '参保人数', dataIndex: 'peopleCount', key: 'peopleCount', align: "center"},
|
|
|
{title: '企业规模', dataIndex: 'companyModel', key: 'companyModel', align: "center"},
|
|
|
{title: '当前岗位数量', dataIndex: 'postCount', key: 'postCount', align: "center"},
|
|
|
- {title: '录入人', dataIndex: 'createUser', key: 'createUser', align: "center"},
|
|
|
+ {title: '录入人', dataIndex: 'createUserName', key: 'createUserName', align: "center"},
|
|
|
{
|
|
|
title: '录入时间 ', dataIndex: 'createTime', key: 'createTime', align: "center", customRender: (item) => {
|
|
|
return item.record.createTime == null ? "" : (dayjs(item.record.createTime).format('YYYY-MM-DD'))
|
|
@@ -211,7 +248,7 @@ export default defineComponent({
|
|
|
tabsViewStore.addTabByPath('/companyService/enterprise/add', null);
|
|
|
};
|
|
|
const onEdit = (item: any) => {
|
|
|
- tabsViewStore.addTabByPath('/companyService/enterprise/edit', { id: item.companyID });
|
|
|
+ tabsViewStore.addTabByPath('/companyService/enterprise/edit', {id: item.companyID});
|
|
|
};
|
|
|
|
|
|
return {
|
|
@@ -230,6 +267,7 @@ export default defineComponent({
|
|
|
onAdd,
|
|
|
onEdit,
|
|
|
loadData,
|
|
|
+ importOptions,
|
|
|
regionList,
|
|
|
streetList
|
|
|
};
|