1、页面些许优化

This commit is contained in:
Wayne 2024-05-15 08:34:10 +08:00
parent 0de5bce23f
commit bc963f0767
7 changed files with 93 additions and 102 deletions

View File

@ -1,53 +1,53 @@
import request from '@/config/axios' import request from '@/config/axios'
// 企业证件 VO // 企业证件 VO
export interface CredentialManagementVO { export interface CredentialManagementVO {
informationId: string // 企业id informationId: string // 企业id
businessPattern: string // 经营方式 businessPattern: string // 经营方式
usefulLife: string // 有效期限 usefulLife: string // 有效期限
licenceIssuingAuthority: string // 发证机关 licenceIssuingAuthority: string // 发证机关
dateOfIssue: Date // 发证日期 dateOfIssue: Date // 发证日期
status: string // 流程状态 status: string // 流程状态
id: number // id id: number // id
expiryDate: Date // 到期时间 expiryDate: Date // 到期时间
idType: boolean // 证件类型(0安全员证1安全负责人证2危险品证 idType: number // 证件类型(0安全员证1安全负责人证2危险品证
certificateNumber: string // 证书编号 certificateNumber: string // 证书编号
name: string // 姓名 name: string // 姓名
personnelType: string // 人员类型 personnelType: string // 人员类型
sex: boolean // 性别(0男1女) sex: number // 性别(0男1女)
categoryOfEmployment: string // 行业类别 categoryOfEmployment: string // 行业类别
enterpriseName: string // 企业名称 enterpriseName: string // 企业名称
} }
// 企业证件 API // 企业证件 API
export const CredentialManagementApi = { export const CredentialManagementApi = {
// 查询企业证件分页 // 查询企业证件分页
getCredentialManagementPage: async (params: any) => { getCredentialManagementPage: async (params: any) => {
return await request.get({ url: `/fta/credential-management/page`, params }) return await request.get({ url: `/fta/credential-management/page`, params })
}, },
// 查询企业证件详情 // 查询企业证件详情
getCredentialManagement: async (id: number) => { getCredentialManagement: async (id: number) => {
return await request.get({ url: `/fta/credential-management/get?id=` + id }) return await request.get({ url: `/fta/credential-management/get?id=` + id })
}, },
// 新增企业证件 // 新增企业证件
createCredentialManagement: async (data: CredentialManagementVO) => { createCredentialManagement: async (data: CredentialManagementVO) => {
return await request.post({ url: `/fta/credential-management/create`, data }) return await request.post({ url: `/fta/credential-management/create`, data })
}, },
// 修改企业证件 // 修改企业证件
updateCredentialManagement: async (data: CredentialManagementVO) => { updateCredentialManagement: async (data: CredentialManagementVO) => {
return await request.put({ url: `/fta/credential-management/update`, data }) return await request.put({ url: `/fta/credential-management/update`, data })
}, },
// 删除企业证件 // 删除企业证件
deleteCredentialManagement: async (id: number) => { deleteCredentialManagement: async (id: number) => {
return await request.delete({ url: `/fta/credential-management/delete?id=` + id }) return await request.delete({ url: `/fta/credential-management/delete?id=` + id })
}, },
// 导出企业证件 Excel // 导出企业证件 Excel
exportCredentialManagement: async (params) => { exportCredentialManagement: async (params) => {
return await request.download({ url: `/fta/credential-management/export-excel`, params }) return await request.download({ url: `/fta/credential-management/export-excel`, params })
}, },
} }

View File

@ -216,7 +216,6 @@ export enum DICT_TYPE {
ENTERPRISE_IS_SECURITY = 'enterprise_is_secure', //是否涉及危化证 ENTERPRISE_IS_SECURITY = 'enterprise_is_secure', //是否涉及危化证
ENTERPRISE_TYPE = 'enterprise_type', // 企业类型 ENTERPRISE_TYPE = 'enterprise_type', // 企业类型
ENTERPRISE_DOCUMENT_TYPE = 'enterprise_document_type', //企业证件类型 ENTERPRISE_DOCUMENT_TYPE = 'enterprise_document_type', //企业证件类型
TYPES_OF_SECURITY_PERSONNEL = 'types_of_security_personnel', // 安全人员类型
CREDENTIAL_SEX = 'credential_sex', // 证书性别 CREDENTIAL_SEX = 'credential_sex', // 证书性别
CREDENTIAL_PERSONNEL_TYPE = 'credential_personnel_type', // 人员类型 CREDENTIAL_PERSONNEL_TYPE = 'credential_personnel_type', // 人员类型
CREDENTIAL_CATEGORY_OF_EMPLOYMENT = 'credential_category_of_employment', //行业类别 CREDENTIAL_CATEGORY_OF_EMPLOYMENT = 'credential_category_of_employment', //行业类别

View File

@ -49,7 +49,7 @@
class="!w-240px" class="!w-240px"
> >
<el-option <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.TYPES_OF_SECURITY_PERSONNEL)" v-for="dict in getIntDictOptions(DICT_TYPE.CREDENTIAL_PERSONNEL_TYPE)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -67,17 +67,25 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="企业名称" align="center" prop="enterpriseName" /> <el-table-column label="企业名称" align="center" prop="enterpriseName" />
<el-table-column label="证件类型" align="center" prop="idType" /> <el-table-column align="center" label="证件类型" prop="idType">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISE_DOCUMENT_TYPE" :value="scope.row.idType" />
</template>
</el-table-column>
<el-table-column label="证书编号" align="center" prop="certificateNumber" /> <el-table-column label="证书编号" align="center" prop="certificateNumber" />
<el-table-column label="姓名" align="center" prop="name" /> <el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="性别" align="center" prop="sex" /> <el-table-column align="center" label="性别" prop="sex">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CREDENTIAL_SEX" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column label="人员类型" align="center" prop="personnelType" /> <el-table-column label="人员类型" align="center" prop="personnelType" />
<el-table-column label="发证机关" align="center" prop="licenceIssuingAuthority" /> <el-table-column label="发证机关" align="center" prop="licenceIssuingAuthority" />
<el-table-column <el-table-column
label="发证日期" label="发证日期"
align="center" align="center"
prop="dateOfIssue" prop="dateOfIssue"
:formatter="dateFormatter" :formatter="dateFormatter2"
width="180px" width="180px"
/> />
<el-table-column <el-table-column

View File

@ -122,7 +122,7 @@
</el-form> </el-form>
<!-- 选择企业基本信息弹窗 --> <!-- 选择企业基本信息弹窗 -->
<SelectEnterprise ref="selectEnterpriseRef" :getToy="getOldEnterprise" /> <SelectEnterprise ref="selectEnterpriseRef" @setOldEnterprise="getOldEnterprise" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { EnterpriseInformationApi, EnterpriseInformationVO } from '@/api/fta/enterpriseinformation' import { EnterpriseInformationApi, EnterpriseInformationVO } from '@/api/fta/enterpriseinformation'
@ -188,9 +188,10 @@ const selectEnterpriseCom = () => {
selectEnterpriseRef.value.open() selectEnterpriseRef.value.open()
} }
/** 获取变更前的企业信息 */ /** 上传图片成功,设置图片地址 */
function getOldEnterprise(data:EnterpriseInformationVO){ const getOldEnterprise = (data: EnterpriseInformationVO) => {
toy.value = data // id
} }
/** 提交表单 */ /** 提交表单 */

View File

@ -34,7 +34,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="变更前企业名称" prop="oldEnterpriseName"> <el-form-item label="变更前名称" prop="oldEnterpriseName">
<el-input <el-input
v-model="queryParams.oldEnterpriseName" v-model="queryParams.oldEnterpriseName"
placeholder="请输入变更前企业名称" placeholder="请输入变更前企业名称"
@ -43,7 +43,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="变更前企业定代表人" prop="oldLegalPerson"> <el-form-item label="变更前法人" prop="oldLegalPerson">
<el-input <el-input
v-model="queryParams.oldLegalPerson" v-model="queryParams.oldLegalPerson"
placeholder="请输入变更前企业法定代表人" placeholder="请输入变更前企业法定代表人"
@ -61,7 +61,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="企业法定代表人" prop="legalPerson"> <el-form-item label="企业法人" prop="legalPerson">
<el-input <el-input
v-model="queryParams.legalPerson" v-model="queryParams.legalPerson"
placeholder="请输入企业法定代表人" placeholder="请输入企业法定代表人"
@ -70,7 +70,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="统一社会信用代码" prop="unifiedCreditCode"> <el-form-item label="信用代码" prop="unifiedCreditCode">
<el-input <el-input
v-model="queryParams.unifiedCreditCode" v-model="queryParams.unifiedCreditCode"
placeholder="请输入统一社会信用代码" placeholder="请输入统一社会信用代码"
@ -109,7 +109,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业所属行业" prop="enterpriseBelongingToIndustry"> <el-form-item label="所属行业" prop="enterpriseBelongingToIndustry">
<el-input <el-input
v-model="queryParams.enterpriseBelongingToIndustry" v-model="queryParams.enterpriseBelongingToIndustry"
placeholder="请输入企业所属行业" placeholder="请输入企业所属行业"
@ -118,7 +118,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否涉化证" prop="isSecure"> <el-form-item label="是否涉危" prop="isSecure">
<el-select <el-select
v-model="queryParams.isSecure" v-model="queryParams.isSecure"
placeholder="请选择是否涉及危化证" placeholder="请选择是否涉及危化证"
@ -126,7 +126,7 @@
class="!w-240px" class="!w-240px"
> >
<el-option <el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_IS_SECURE)" v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_IS_SECURITY)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -140,15 +140,6 @@
<Icon class="mr-5px" icon="ep:plus" /> <Icon class="mr-5px" icon="ep:plus" />
新增 新增
</el-button> </el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['fta:enterprise-change:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -196,7 +187,7 @@
<el-table-column label="经营许可范围" align="center" prop="operatePermitRange" /> <el-table-column label="经营许可范围" align="center" prop="operatePermitRange" />
<el-table-column label="是否涉及危化证" align="center" prop="isSecure"> <el-table-column label="是否涉及危化证" align="center" prop="isSecure">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURE" :value="scope.row.isSecure" /> <dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURITY" :value="scope.row.isSecure" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
@ -316,21 +307,6 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await EnterpriseChangeApi.exportEnterpriseChange(queryParams)
download.excel(data, '企业信息变更.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(() => { onMounted(() => {
getList() getList()

View File

@ -11,7 +11,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" size="small" @click="getList">搜索</el-button> <el-button type="primary" icon="Search" size="small" @click="getList">搜索</el-button>
<el-button type="primary" icon="Refresh" size="small" @click="resetQuery">确定</el-button> <el-button type="primary" icon="Refresh" size="small" @click="submitFormSuccess">确定</el-button>
<el-button icon="Refresh" size="small" @click="resetQuery">重置</el-button> <el-button icon="Refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -74,6 +74,13 @@ const handleCurrentChange = (val: EnterpriseInformationVO | undefined) => {
currentRow.value = val currentRow.value = val
} // } //
/** 点击确定键提交企业信息 */
const emit = defineEmits(['setOldEnterprise'])
const submitFormSuccess = () => {
emit('setOldEnterprise',currentRow)
dialogVisible.value = false
}
/** 打开弹窗 */ /** 打开弹窗 */
const open = async () => { const open = async () => {
dialogVisible.value = true dialogVisible.value = true

View File

@ -28,7 +28,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="企业法定代表人" prop="legalPerson"> <el-form-item label="企业法人" prop="legalPerson">
<el-input <el-input
v-model="queryParams.legalPerson" v-model="queryParams.legalPerson"
placeholder="请输入企业法定代表人" placeholder="请输入企业法定代表人"
@ -37,7 +37,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="统一信用代码" prop="unifiedCreditCode"> <el-form-item label="信用代码" prop="unifiedCreditCode">
<el-input <el-input
v-model="queryParams.unifiedCreditCode" v-model="queryParams.unifiedCreditCode"
placeholder="请输入统一信用代码" placeholder="请输入统一信用代码"
@ -87,7 +87,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业所属行业" prop="enterpriseBelongingToIndustry"> <el-form-item label="所属行业" prop="enterpriseBelongingToIndustry">
<el-input <el-input
v-model="queryParams.enterpriseBelongingToIndustry" v-model="queryParams.enterpriseBelongingToIndustry"
placeholder="请输入企业所属行业" placeholder="请输入企业所属行业"
@ -105,7 +105,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="经营许可范围" prop="operatePermitRange"> <el-form-item label="经营范围" prop="operatePermitRange">
<el-input <el-input
v-model="queryParams.operatePermitRange" v-model="queryParams.operatePermitRange"
placeholder="请输入经营许可范围" placeholder="请输入经营许可范围"
@ -114,7 +114,7 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="是否涉化证" prop="isSecure"> <el-form-item label="是否涉危" prop="isSecure">
<el-select <el-select
v-model="queryParams.isSecure" v-model="queryParams.isSecure"
placeholder="请选择是否涉及危化证" placeholder="请选择是否涉及危化证"
@ -181,7 +181,7 @@
width="180px" width="180px"
/> />
<el-table-column label="企业名称" align="center" prop="name" /> <el-table-column label="企业名称" align="center" prop="name" />
<el-table-column label="企业法定代表人" align="center" prop="legalPerson" /> <el-table-column label="企业法人" align="center" prop="legalPerson" />
<el-table-column label="统一信用代码" align="center" prop="unifiedCreditCode" /> <el-table-column label="统一信用代码" align="center" prop="unifiedCreditCode" />
<el-table-column label="电话" align="center" prop="telephone" /> <el-table-column label="电话" align="center" prop="telephone" />
<el-table-column label="邮箱" align="center" prop="mailbox" /> <el-table-column label="邮箱" align="center" prop="mailbox" />
@ -205,7 +205,7 @@
<el-table-column label="企业所属行业" align="center" prop="enterpriseBelongingToIndustry" /> <el-table-column label="企业所属行业" align="center" prop="enterpriseBelongingToIndustry" />
<el-table-column label="登记机关" align="center" prop="registerOffice" /> <el-table-column label="登记机关" align="center" prop="registerOffice" />
<el-table-column label="经营许可范围" align="center" prop="operatePermitRange" /> <el-table-column label="经营许可范围" align="center" prop="operatePermitRange" />
<el-table-column label="是否涉化证" align="center" prop="isSecure"> <el-table-column label="是否涉危" align="center" prop="isSecure">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURITY" :value="scope.row.isSecure" /> <dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURITY" :value="scope.row.isSecure" />
</template> </template>