Compare commits
No commits in common. "f44c42e7aff4897801b29ff7937b4eb0edd06a3c" and "2f07a300e67cf1130b31690d50a96b08331b85be" have entirely different histories.
f44c42e7af
...
2f07a300e6
|
@ -1,57 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// 企业信息变更 VO
|
||||
export interface EnterpriseChangeVO {
|
||||
id: number // 编号
|
||||
oldEnterpriseJson: string // 变更前企业信息Json字符串
|
||||
oldEnterpriseName: string // 变更前企业名称
|
||||
oldLegalPerson: string // 变更前企业法定代表人
|
||||
name: string // 企业名称
|
||||
legalPerson: string // 企业法定代表人
|
||||
unifiedCreditCode: string // 统一社会信用代码
|
||||
telephone: string // 电话
|
||||
mailbox: string // 邮箱
|
||||
registerAddress: string // 注册地址
|
||||
communicationAddress: string // 通信地址
|
||||
operateState: number // 经营状态
|
||||
establishDate: Date // 成立日期
|
||||
enterpriseType: number // 企业类型
|
||||
enterpriseBelongingToRegion: string // 企业所属地区
|
||||
enterpriseBelongingToIndustry: string // 企业所属行业
|
||||
registerOffice: string // 登记机关
|
||||
operatePermitRange: string // 经营许可范围
|
||||
isSecure: number // 是否涉及危化证
|
||||
}
|
||||
|
||||
// 企业信息变更 API
|
||||
export const EnterpriseChangeApi = {
|
||||
// 查询企业信息变更分页
|
||||
getEnterpriseChangePage: async (params: any) => {
|
||||
return await request.get({ url: `/fta/enterprise-change/page`, params })
|
||||
},
|
||||
|
||||
// 查询企业信息变更详情
|
||||
getEnterpriseChange: async (id: number) => {
|
||||
return await request.get({ url: `/fta/enterprise-change/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增企业信息变更
|
||||
createEnterpriseChange: async (data: EnterpriseChangeVO) => {
|
||||
return await request.post({ url: `/fta/enterprise-change/create`, data })
|
||||
},
|
||||
|
||||
// 修改企业信息变更
|
||||
updateEnterpriseChange: async (data: EnterpriseChangeVO) => {
|
||||
return await request.put({ url: `/fta/enterprise-change/update`, data })
|
||||
},
|
||||
|
||||
// 删除企业信息变更
|
||||
deleteEnterpriseChange: async (id: number) => {
|
||||
return await request.delete({ url: `/fta/enterprise-change/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出企业信息变更 Excel
|
||||
exportEnterpriseChange: async (params) => {
|
||||
return await request.download({ url: `/fta/enterprise-change/export-excel`, params })
|
||||
},
|
||||
}
|
|
@ -18,29 +18,6 @@ export interface EnterpriseInformationVO {
|
|||
enterpriseBelongingToIndustry: string // 企业所属行业
|
||||
registerOffice: string // 登记机关
|
||||
operatePermitRange: string // 经营许可范围
|
||||
principalImageUrl: undefined // 主要负责人证图片
|
||||
securityImageUrl: undefined // 安全员证图片
|
||||
dangerImageUrl: undefined // 危化证图片
|
||||
principalCertificateNumber: undefined // 负责人证号
|
||||
principalName: undefined // 负责人姓名
|
||||
principalPersonnelType: undefined // 负责人员类型
|
||||
principalSex: undefined // 负责人性别
|
||||
principalCategoryOfEmployment: undefined // 负责人行业类别
|
||||
principalDateOfIssue: undefined // 负责人证初领日期
|
||||
principalExpiryDate: undefined // 负责人证到期日期
|
||||
principalLicenceIssuingAuthority: undefined // 负责人证签发机关
|
||||
securityCertificateNumber: undefined // 安全员证号
|
||||
securityName: undefined // 安全员姓名
|
||||
securityPersonnelType: undefined // 安全员人员类型
|
||||
securitySex: undefined // 安全员性别
|
||||
securityCategoryOfEmployment: undefined // 安全员行业类别
|
||||
securityDateOfIssue: undefined // 安全员初领日期
|
||||
securityExpiryDate: undefined // 安全员证到期日期
|
||||
securityLicenceIssuingAuthority: undefined // 安全员证签发机关
|
||||
dangerBusinessPattern: undefined // 危化证经营方式
|
||||
dangerLicenceIssuingAuthority: undefined // 危化证发证机关
|
||||
dangerDateOfIssue: undefined // 危化证初领日期
|
||||
dangerExpiryDate: undefined // 危化证到期日期
|
||||
}
|
||||
|
||||
// 企业信息 API
|
||||
|
@ -50,11 +27,6 @@ export const EnterpriseInformationApi = {
|
|||
return await request.get({ url: `/fta/enterprise-information/page`, params })
|
||||
},
|
||||
|
||||
// 查询已经通过审核的企业信息分页
|
||||
getEnterpriseInformationPassPage: async (params: any) => {
|
||||
return await request.get({ url: `/fta/enterprise-information/passPage`, params })
|
||||
},
|
||||
|
||||
// 查询企业信息详情
|
||||
getEnterpriseInformation: async (id: number) => {
|
||||
return await request.get({ url: `/fta/enterprise-information/get?id=` + id })
|
||||
|
|
|
@ -333,7 +333,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
title: '发起 企业信息 填报',
|
||||
title: '发起 企业信息填报 请假',
|
||||
activeMenu: '/enterpriseInformation/enterprise-information'
|
||||
}
|
||||
},
|
||||
|
@ -345,33 +345,9 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
title: '查看 企业信息 填报',
|
||||
title: '查看 企业信息填报 请假',
|
||||
activeMenu: '/enterpriseInformation/enterprise-information'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fta/enterprisechange/create',
|
||||
component: () => import('@/views/fta/enterprisechange/create.vue'),
|
||||
name: 'FtaEnterpriseChangeCreate',
|
||||
meta: {
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
title: '发起 企业信息 变更',
|
||||
activeMenu: '/enterpriseInformation/enterprise-change'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'fta/enterprisechange/detail',
|
||||
component: () => import('@/views/fta/enterprisechange/detail.vue'),
|
||||
name: 'FtaEnterpriseChangeDetail',
|
||||
meta: {
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
title: '查看 企业信息 变更',
|
||||
activeMenu: '/enterpriseInformation/enterprise-change'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -217,11 +217,4 @@ export enum DICT_TYPE {
|
|||
ENTERPRISE_TYPE = 'enterprise_type', // 企业类型
|
||||
ENTERPRISE_DOCUMENT_TYPE = 'enterprise_document_type', //企业证件类型
|
||||
TYPES_OF_SECURITY_PERSONNEL = 'types_of_security_personnel', // 安全人员类型
|
||||
ENTERPRISE_TYPE = 'enterprise_type', // 企业类型
|
||||
CREDENTIAL_SEX = 'credential_sex', // 证书性别
|
||||
CREDENTIAL_PERSONNEL_TYPE = 'credential_personnel_type', // 人员类型
|
||||
CREDENTIAL_CATEGORY_OF_EMPLOYMENT = 'credential_category_of_employment', //行业类别
|
||||
CREDENTIAL_BUSINESS_PATTERN = 'credential_business_pattern', // 经营方式
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,221 +0,0 @@
|
|||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="变更前企业信息Json字符串" prop="oldEnterpriseJson">
|
||||
<el-input v-model="formData.oldEnterpriseJson" placeholder="请输入变更前企业信息Json字符串" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变更前企业名称" prop="oldEnterpriseName">
|
||||
<el-input v-model="formData.oldEnterpriseName" placeholder="请输入变更前企业名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变更前企业法定代表人" prop="oldLegalPerson">
|
||||
<el-input v-model="formData.oldLegalPerson" placeholder="请输入变更前企业法定代表人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入企业名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业法定代表人" prop="legalPerson">
|
||||
<el-input v-model="formData.legalPerson" placeholder="请输入企业法定代表人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="统一社会信用代码" prop="unifiedCreditCode">
|
||||
<el-input v-model="formData.unifiedCreditCode" placeholder="请输入统一社会信用代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="telephone">
|
||||
<el-input v-model="formData.telephone" placeholder="请输入电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="mailbox">
|
||||
<el-input v-model="formData.mailbox" placeholder="请输入邮箱" />
|
||||
</el-form-item>
|
||||
<el-form-item label="注册地址" prop="registerAddress">
|
||||
<el-input v-model="formData.registerAddress" placeholder="请输入注册地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信地址" prop="communicationAddress">
|
||||
<el-input v-model="formData.communicationAddress" placeholder="请输入通信地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="经营状态" prop="operateState">
|
||||
<el-select v-model="formData.operateState" placeholder="请选择经营状态">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_OPERATE_STATE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="成立日期" prop="establishDate">
|
||||
<el-date-picker
|
||||
v-model="formData.establishDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="选择成立日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业类型" prop="enterpriseType">
|
||||
<el-select v-model="formData.enterpriseType" placeholder="请选择企业类型">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业所属地区" prop="enterpriseBelongingToRegion">
|
||||
<el-input v-model="formData.enterpriseBelongingToRegion" placeholder="请输入企业所属地区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业所属行业" prop="enterpriseBelongingToIndustry">
|
||||
<el-input v-model="formData.enterpriseBelongingToIndustry" placeholder="请输入企业所属行业" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记机关" prop="registerOffice">
|
||||
<el-input v-model="formData.registerOffice" placeholder="请输入登记机关" />
|
||||
</el-form-item>
|
||||
<el-form-item label="经营许可范围" prop="operatePermitRange">
|
||||
<el-input v-model="formData.operatePermitRange" placeholder="请输入经营许可范围" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否涉及危化证" prop="isSecure">
|
||||
<el-select v-model="formData.isSecure" placeholder="请选择是否涉及危化证">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_IS_SECURE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { EnterpriseChangeApi, EnterpriseChangeVO } from '@/api/fta/enterprisechange'
|
||||
|
||||
/** 企业信息变更 表单 */
|
||||
defineOptions({ name: 'EnterpriseChangeForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
oldEnterpriseJson: undefined,
|
||||
oldEnterpriseName: undefined,
|
||||
oldLegalPerson: undefined,
|
||||
name: undefined,
|
||||
legalPerson: undefined,
|
||||
unifiedCreditCode: undefined,
|
||||
telephone: undefined,
|
||||
mailbox: undefined,
|
||||
registerAddress: undefined,
|
||||
communicationAddress: undefined,
|
||||
operateState: undefined,
|
||||
establishDate: undefined,
|
||||
enterpriseType: undefined,
|
||||
enterpriseBelongingToRegion: undefined,
|
||||
enterpriseBelongingToIndustry: undefined,
|
||||
registerOffice: undefined,
|
||||
operatePermitRange: undefined,
|
||||
isSecure: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
oldEnterpriseJson: [{ required: true, message: '变更前企业信息Json字符串不能为空', trigger: 'blur' }],
|
||||
oldEnterpriseName: [{ required: true, message: '变更前企业名称不能为空', trigger: 'blur' }],
|
||||
oldLegalPerson: [{ required: true, message: '变更前企业法定代表人不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
|
||||
legalPerson: [{ required: true, message: '企业法定代表人不能为空', trigger: 'blur' }],
|
||||
unifiedCreditCode: [{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }],
|
||||
telephone: [{ required: true, message: '电话不能为空', trigger: 'blur' }],
|
||||
mailbox: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
||||
registerAddress: [{ required: true, message: '注册地址不能为空', trigger: 'blur' }],
|
||||
communicationAddress: [{ required: true, message: '通信地址不能为空', trigger: 'blur' }],
|
||||
operateState: [{ required: true, message: '经营状态不能为空', trigger: 'change' }],
|
||||
establishDate: [{ required: true, message: '成立日期不能为空', trigger: 'blur' }],
|
||||
enterpriseType: [{ required: true, message: '企业类型不能为空', trigger: 'change' }],
|
||||
enterpriseBelongingToRegion: [{ required: true, message: '企业所属地区不能为空', trigger: 'blur' }],
|
||||
enterpriseBelongingToIndustry: [{ required: true, message: '企业所属行业不能为空', trigger: 'blur' }],
|
||||
registerOffice: [{ required: true, message: '登记机关不能为空', trigger: 'blur' }],
|
||||
operatePermitRange: [{ required: true, message: '经营许可范围不能为空', trigger: 'blur' }],
|
||||
isSecure: [{ required: true, message: '是否涉及危化证不能为空', trigger: 'change' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await EnterpriseChangeApi.getEnterpriseChange(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as EnterpriseChangeVO
|
||||
if (formType.value === 'create') {
|
||||
await EnterpriseChangeApi.createEnterpriseChange(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await EnterpriseChangeApi.updateEnterpriseChange(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
oldEnterpriseJson: undefined,
|
||||
oldEnterpriseName: undefined,
|
||||
oldLegalPerson: undefined,
|
||||
name: undefined,
|
||||
legalPerson: undefined,
|
||||
unifiedCreditCode: undefined,
|
||||
telephone: undefined,
|
||||
mailbox: undefined,
|
||||
registerAddress: undefined,
|
||||
communicationAddress: undefined,
|
||||
operateState: undefined,
|
||||
establishDate: undefined,
|
||||
enterpriseType: undefined,
|
||||
enterpriseBelongingToRegion: undefined,
|
||||
enterpriseBelongingToIndustry: undefined,
|
||||
registerOffice: undefined,
|
||||
operatePermitRange: undefined,
|
||||
isSecure: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
|
@ -1,249 +0,0 @@
|
|||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="formLoading"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-card class="mb-10px">
|
||||
<template #header>企业信息变更</template>
|
||||
<el-row>
|
||||
<el-col :span="22">
|
||||
<el-form-item label="原企业信息名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请选择企业信息名称" disabled />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button :style="{width: 'calc(100% - 10px)', marginLeft: '10px'}" :disabled="formLoading" type="primary" @click="selectEnterpriseCom">选 择</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="原企业法定代表人" prop="legalPerson">
|
||||
<el-input v-model="formData.legalPerson" placeholder="请选择企业法定代表人" disabled />
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-card class="mb-10px">
|
||||
<template #header>原企业信息</template>
|
||||
<el-form
|
||||
:model="startUserSelectAssignees"
|
||||
:rules="startUserSelectAssigneesFormRules"
|
||||
ref="startUserSelectAssigneesFormRef"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="userTask in startUserSelectTasks"
|
||||
:key="userTask.id"
|
||||
:label="`任务【${userTask.name}】`"
|
||||
:prop="userTask.id"
|
||||
>
|
||||
<el-select
|
||||
v-model="startUserSelectAssignees[userTask.id]"
|
||||
multiple
|
||||
placeholder="请选择审批人"
|
||||
>
|
||||
<el-option
|
||||
v-for="user in userList"
|
||||
:key="user.id"
|
||||
:label="user.nickname"
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card class="mb-10px">
|
||||
<template #header>变更后企业信息</template>
|
||||
<el-form
|
||||
:model="startUserSelectAssignees"
|
||||
:rules="startUserSelectAssigneesFormRules"
|
||||
ref="startUserSelectAssigneesFormRef"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="userTask in startUserSelectTasks"
|
||||
:key="userTask.id"
|
||||
:label="`任务【${userTask.name}】`"
|
||||
:prop="userTask.id"
|
||||
>
|
||||
<el-select
|
||||
v-model="startUserSelectAssignees[userTask.id]"
|
||||
multiple
|
||||
placeholder="请选择审批人"
|
||||
>
|
||||
<el-option
|
||||
v-for="user in userList"
|
||||
:key="user.id"
|
||||
:label="user.nickname"
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-col v-if="startUserSelectTasks.length > 0">
|
||||
<el-card class="mb-10px">
|
||||
<template #header>指定审批人</template>
|
||||
<el-form
|
||||
:model="startUserSelectAssignees"
|
||||
:rules="startUserSelectAssigneesFormRules"
|
||||
ref="startUserSelectAssigneesFormRef"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="userTask in startUserSelectTasks"
|
||||
:key="userTask.id"
|
||||
:label="`任务【${userTask.name}】`"
|
||||
:prop="userTask.id"
|
||||
>
|
||||
<el-select
|
||||
v-model="startUserSelectAssignees[userTask.id]"
|
||||
multiple
|
||||
placeholder="请选择审批人"
|
||||
>
|
||||
<el-option
|
||||
v-for="user in userList"
|
||||
:key="user.id"
|
||||
:label="user.nickname"
|
||||
:value="user.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 选择企业基本信息弹窗 -->
|
||||
<SelectEnterprise ref="selectEnterpriseRef" :getToy="getOldEnterprise" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { EnterpriseInformationApi, EnterpriseInformationVO } from '@/api/fta/enterpriseinformation'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import * as DefinitionApi from '@/api/bpm/definition'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import SelectEnterprise from './selectEnterprise.vue'
|
||||
defineOptions({ name: 'EnterpriseInformationCreate' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { delView } = useTagsViewStore() // 视图操作
|
||||
const { push, currentRoute } = useRouter() // 路由
|
||||
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
legalPerson: undefined,
|
||||
unifiedCreditCode: undefined,
|
||||
telephone: undefined,
|
||||
mailbox: undefined,
|
||||
registerAddress: undefined,
|
||||
communicationAddress: undefined,
|
||||
operateState: undefined,
|
||||
isSecure: undefined,
|
||||
establishDate: undefined,
|
||||
enterpriseType: undefined,
|
||||
enterpriseBelongingToRegion: undefined,
|
||||
enterpriseBelongingToIndustry: undefined,
|
||||
registerOffice: undefined,
|
||||
operatePermitRange: undefined,
|
||||
})
|
||||
const formRules = reactive({
|
||||
name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
|
||||
legalPerson: [{ required: true, message: '企业法定代表人不能为空', trigger: 'blur' }],
|
||||
unifiedCreditCode: [{ required: true, message: '统一信用代码不能为空', trigger: 'blur' }],
|
||||
telephone: [{ required: true, message: '电话不能为空', trigger: 'blur' }],
|
||||
mailbox: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
||||
registerAddress: [{ required: true, message: '注册地址不能为空', trigger: 'blur' }],
|
||||
communicationAddress: [{ required: true, message: '通信地址不能为空', trigger: 'blur' }],
|
||||
operateState: [{ required: true, message: '经营状态不能为空', trigger: 'change' }],
|
||||
establishDate: [{ required: true, message: '成立日期不能为空', trigger: 'blur' }],
|
||||
enterpriseType: [{ required: true, message: '企业类型不能为空', trigger: 'change' }],
|
||||
enterpriseBelongingToRegion: [{ required: true, message: '企业所属地区不能为空', trigger: 'blur' }],
|
||||
enterpriseBelongingToIndustry: [{ required: true, message: '企业所属行业不能为空', trigger: 'blur' }],
|
||||
registerOffice: [{ required: true, message: '登记机关不能为空', trigger: 'blur' }],
|
||||
operatePermitRange: [{ required: true, message: '经营许可范围不能为空', trigger: 'blur' }],
|
||||
isSecure: [{ required: true, message: '是否涉及危化证不能为空', trigger: 'blur' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
// 指定审批人
|
||||
const processDefineKey = 'fta_enterprise' // 流程定义 Key
|
||||
const startUserSelectTasks = ref([]) // 发起人需要选择审批人的用户任务列表
|
||||
const startUserSelectAssignees = ref({}) // 发起人选择审批人的数据
|
||||
const startUserSelectAssigneesFormRef = ref() // 发起人选择审批人的表单 Ref
|
||||
const startUserSelectAssigneesFormRules = ref({}) // 发起人选择审批人的表单 Rules
|
||||
const userList = ref<any[]>([]) // 用户列表
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const selectEnterpriseRef = ref()
|
||||
const selectEnterpriseCom = () => {
|
||||
selectEnterpriseRef.value.open()
|
||||
}
|
||||
|
||||
/** 获取变更前的企业信息 */
|
||||
function getOldEnterprise(data:EnterpriseInformationVO){
|
||||
toy.value = data
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
if (!formRef) return
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
// 校验指定审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
await startUserSelectAssigneesFormRef.value.validate()
|
||||
}
|
||||
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = { ...formData.value } as unknown as EnterpriseInformationVO
|
||||
// 设置指定审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
data.startUserSelectAssignees = startUserSelectAssignees.value
|
||||
}
|
||||
await EnterpriseInformationApi.createEnterpriseInformation(data)
|
||||
message.success('发起成功')
|
||||
// 关闭当前 Tab
|
||||
delView(unref(currentRoute))
|
||||
await push({ name: 'EnterpriseInformation' })
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
const processDefinitionDetail = await DefinitionApi.getProcessDefinition(
|
||||
undefined,
|
||||
processDefineKey
|
||||
)
|
||||
if (!processDefinitionDetail) {
|
||||
message.error('创建企业信息的流程模型未配置,请检查!')
|
||||
return
|
||||
}
|
||||
startUserSelectTasks.value = processDefinitionDetail.startUserSelectTasks
|
||||
// 设置指定审批人
|
||||
if (startUserSelectTasks.value?.length > 0) {
|
||||
// 设置校验规则
|
||||
for (const userTask of startUserSelectTasks.value) {
|
||||
startUserSelectAssignees.value[userTask.id] = []
|
||||
startUserSelectAssigneesFormRules.value[userTask.id] = [
|
||||
{ required: true, message: '请选择审批人', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
// 加载用户列表
|
||||
userList.value = await UserApi.getSimpleUserList()
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -1,84 +0,0 @@
|
|||
<template>
|
||||
<ContentWrap>
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="企业名称">
|
||||
{{ detailData.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业法定代表人">
|
||||
{{ detailData.legalPerson }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="统一信用代码">
|
||||
{{ detailData.unifiedCreditCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电话">
|
||||
{{ detailData.telephone }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="邮箱">
|
||||
{{ detailData.mailbox }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="注册地址">
|
||||
{{ detailData.registerAddress }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="通信地址">
|
||||
{{ detailData.communicationAddress }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经营状态">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_OPERATE_STATE" :value="detailData.operateState" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="成立日期">
|
||||
{{ formatDate(detailData.establishDate, 'YYYY-MM-DD') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业类型">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_TYPE" :value="detailData.enterpriseType" />
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业所属地区">
|
||||
{{ detailData.enterpriseBelongingToRegion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="企业所属行业">
|
||||
{{ detailData.enterpriseBelongingToIndustry }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="登记机关">
|
||||
{{ detailData.registerOffice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经营许可范围">
|
||||
{{ detailData.operatePermitRange }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否涉及危化证">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURITY" :value="detailData.isSecure" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { EnterpriseInformationApi } from '@/api/fta/enterpriseinformation'
|
||||
|
||||
defineOptions({ name: 'FtaEnterpriseDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
|
||||
const props = defineProps({
|
||||
id: propTypes.number.def(undefined)
|
||||
})
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as number // 从 URL 传递过来的 id 编号
|
||||
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
try {
|
||||
detailData.value = await EnterpriseInformationApi.getEnterpriseInformation(props.id || queryId)
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
})
|
||||
</script>
|
|
@ -1,338 +0,0 @@
|
|||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批结果" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择审批结果"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更前企业名称" prop="oldEnterpriseName">
|
||||
<el-input
|
||||
v-model="queryParams.oldEnterpriseName"
|
||||
placeholder="请输入变更前企业名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变更前企业法定代表人" prop="oldLegalPerson">
|
||||
<el-input
|
||||
v-model="queryParams.oldLegalPerson"
|
||||
placeholder="请输入变更前企业法定代表人"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入企业名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业法定代表人" prop="legalPerson">
|
||||
<el-input
|
||||
v-model="queryParams.legalPerson"
|
||||
placeholder="请输入企业法定代表人"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统一社会信用代码" prop="unifiedCreditCode">
|
||||
<el-input
|
||||
v-model="queryParams.unifiedCreditCode"
|
||||
placeholder="请输入统一社会信用代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="经营状态" prop="operateState">
|
||||
<el-select
|
||||
v-model="queryParams.operateState"
|
||||
placeholder="请选择经营状态"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_OPERATE_STATE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业类型" prop="enterpriseType">
|
||||
<el-select
|
||||
v-model="queryParams.enterpriseType"
|
||||
placeholder="请选择企业类型"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业所属行业" prop="enterpriseBelongingToIndustry">
|
||||
<el-input
|
||||
v-model="queryParams.enterpriseBelongingToIndustry"
|
||||
placeholder="请输入企业所属行业"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否涉及危化证" prop="isSecure">
|
||||
<el-select
|
||||
v-model="queryParams.isSecure"
|
||||
placeholder="请选择是否涉及危化证"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.ENTERPRISE_IS_SECURE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button plain type="primary" @click="handleCreate()">
|
||||
<Icon class="mr-5px" icon="ep:plus" />
|
||||
新增
|
||||
</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>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="流程实例编号" align="center" prop="processInstanceId" />
|
||||
<el-table-column label="审批结果" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更前企业名称" align="center" prop="oldEnterpriseName" />
|
||||
<el-table-column label="变更前企业法定代表人" align="center" prop="oldLegalPerson" />
|
||||
<el-table-column label="企业名称" align="center" prop="name" />
|
||||
<el-table-column label="企业法定代表人" align="center" prop="legalPerson" />
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="unifiedCreditCode" />
|
||||
<el-table-column label="电话" align="center" prop="telephone" />
|
||||
<el-table-column label="邮箱" align="center" prop="mailbox" />
|
||||
<el-table-column label="注册地址" align="center" prop="registerAddress" />
|
||||
<el-table-column label="通信地址" align="center" prop="communicationAddress" />
|
||||
<el-table-column label="经营状态" align="center" prop="operateState">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_OPERATE_STATE" :value="scope.row.operateState" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成立日期" align="center" prop="establishDate" />
|
||||
<el-table-column label="企业类型" align="center" prop="enterpriseType">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_TYPE" :value="scope.row.enterpriseType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业所属地区" align="center" prop="enterpriseBelongingToRegion" />
|
||||
<el-table-column label="企业所属行业" align="center" prop="enterpriseBelongingToIndustry" />
|
||||
<el-table-column label="登记机关" align="center" prop="registerOffice" />
|
||||
<el-table-column label="经营许可范围" align="center" prop="operatePermitRange" />
|
||||
<el-table-column label="是否涉及危化证" align="center" prop="isSecure">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.ENTERPRISE_IS_SECURE" :value="scope.row.isSecure" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['fta:enterprise-change:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['fta:enterprise-change:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<EnterpriseChangeForm ref="formRef" @success="getList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import { EnterpriseChangeApi, EnterpriseChangeVO } from '@/api/fta/enterprisechange'
|
||||
import EnterpriseChangeForm from './EnterpriseChangeForm.vue'
|
||||
|
||||
/** 企业信息变更 列表 */
|
||||
defineOptions({ name: 'EnterpriseChange' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const router = useRouter() // 路由
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref<EnterpriseChangeVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
status: undefined,
|
||||
oldEnterpriseName: undefined,
|
||||
oldLegalPerson: undefined,
|
||||
name: undefined,
|
||||
legalPerson: undefined,
|
||||
unifiedCreditCode: undefined,
|
||||
operateState: undefined,
|
||||
enterpriseType: undefined,
|
||||
enterpriseBelongingToIndustry: undefined,
|
||||
isSecure: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await EnterpriseChangeApi.getEnterpriseChangePage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 添加操作 */
|
||||
const handleCreate = () => {
|
||||
router.push({ name: 'FtaEnterpriseChangeCreate' })
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await EnterpriseChangeApi.deleteEnterpriseChange(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} 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(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
|
@ -1,113 +0,0 @@
|
|||
<template>
|
||||
<Dialog title="选择企业信息" v-model="dialogVisible">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form ref="queryRef" :inline="true" label-width="68px" :model="params">
|
||||
<el-form-item label="企业名称" prop="name">
|
||||
<el-input v-model="params.name" placeholder="请输入企业名称" clearable size="small" style="width: 200px" @keyup.enter="handleCurrentChange" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业法人" prop="legalPerson">
|
||||
<el-input v-model="params.legalPerson" placeholder="请输入企业法人代表名称" clearable size="small" style="width: 200px" @keyup.enter="handleCurrentChange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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 icon="Refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="list" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange" >
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column align="center" label="状态" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="企业名称" align="center" prop="name" />
|
||||
<el-table-column label="企业法定代表人" align="center" prop="legalPerson" />
|
||||
<el-table-column label="统一信用代码" align="center" prop="unifiedCreditCode" />
|
||||
<el-table-column label="电话" align="center" prop="telephone" />
|
||||
<el-table-column label="邮箱" align="center" prop="mailbox" />
|
||||
</el-table>
|
||||
<el-row>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="params.pageNo"
|
||||
v-model:limit="params.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-row>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {DICT_TYPE} from '@/utils/dict'
|
||||
import {EnterpriseInformationApi, EnterpriseInformationVO} from "@/api/fta/enterpriseinformation";
|
||||
import {dateFormatter} from "@/utils/formatTime";
|
||||
|
||||
/** 选择已经通过审核的企业基本信息 */
|
||||
defineOptions({ name: 'SelectEnterprise' })
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const list = ref<EnterpriseInformationVO[]>([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const currentRow = ref() //选中的行数据
|
||||
const queryRef = ref() // 搜索的表单
|
||||
const params = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
legalPerson: undefined,
|
||||
})
|
||||
|
||||
const handleCurrentChange = (val: EnterpriseInformationVO | undefined) => {
|
||||
currentRow.value = val
|
||||
} //选择后触发的方法
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async () => {
|
||||
dialogVisible.value = true
|
||||
params.name = undefined
|
||||
params.legalPerson = undefined
|
||||
params.pageNo = 1
|
||||
// 获取已通过审核的企业信息列表数据
|
||||
await getList()
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
params.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 获取已经办结的表单数据 */
|
||||
const getList = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = await EnterpriseInformationApi.getEnterpriseInformationPassPage(params)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
formLoading.value = true
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
</script>
|
|
@ -1,106 +0,0 @@
|
|||
<template>
|
||||
<Dialog v-model="dialogVisible" title="上传文件">
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
v-model:file-list="fileList"
|
||||
:action="uploadUrl"
|
||||
:auto-upload="false"
|
||||
:data="data"
|
||||
:disabled="formLoading"
|
||||
:limit="1"
|
||||
:on-change="handleFileChange"
|
||||
:on-error="submitFormError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="submitFormSuccess"
|
||||
:http-request="httpRequest"
|
||||
accept=".jpg, .png, .gif"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text"> 将文件拖到此处,或 <em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip" style="color: red">
|
||||
提示:仅允许导入 jpg、png、gif 格式文件!
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<el-button :disabled="formLoading" type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useUpload } from '@/components/UploadFile/src/useUpload'
|
||||
|
||||
defineOptions({ name: 'ImageFileForm' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
const fileList = ref([]) // 文件列表
|
||||
const data = ref({ path: '' })
|
||||
const uploadRef = ref()
|
||||
|
||||
const { uploadUrl, httpRequest } = useUpload()
|
||||
|
||||
const props = defineProps({
|
||||
imageType: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async () => {
|
||||
dialogVisible.value = true
|
||||
resetForm()
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 处理上传的文件发生变化 */
|
||||
const handleFileChange = (file) => {
|
||||
data.value.path = file.name
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const submitFileForm = () => {
|
||||
if (fileList.value.length == 0) {
|
||||
message.error('请上传文件')
|
||||
return
|
||||
}
|
||||
unref(uploadRef)?.submit()
|
||||
}
|
||||
|
||||
/** 文件上传成功处理 */
|
||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitFormSuccess = (data) => {
|
||||
// 清理
|
||||
dialogVisible.value = false
|
||||
formLoading.value = false
|
||||
unref(uploadRef)?.clearFiles()
|
||||
// 提示成功,并刷新
|
||||
message.success(t('common.createSuccess'))
|
||||
emit('success',data.data,props.imageType)
|
||||
}
|
||||
|
||||
/** 上传错误提示 */
|
||||
const submitFormError = (): void => {
|
||||
message.error('上传失败,请您重新上传!')
|
||||
formLoading.value = false
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
// 重置上传状态和文件
|
||||
formLoading.value = false
|
||||
uploadRef.value?.clearFiles()
|
||||
}
|
||||
|
||||
/** 文件数超出提示 */
|
||||
const handleExceed = (): void => {
|
||||
message.error('最多只能上传一个文件!')
|
||||
}
|
||||
</script>
|
|
@ -6,8 +6,6 @@
|
|||
:rules="formRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-card class="mb-10px">
|
||||
<template #header>企业基本信息</template>
|
||||
<el-form-item label="企业名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入企业名称" />
|
||||
</el-form-item>
|
||||
|
@ -79,140 +77,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card class="mb-10px">
|
||||
<template #header>主要负责人证</template>
|
||||
<el-form-item label="证号" prop="principalCertificateNumber">
|
||||
<el-input v-model="formData.principalCertificateNumber" placeholder="请输入负责人证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="principalName">
|
||||
<el-input v-model="formData.principalName" placeholder="请输入负责人证姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="principalPersonnelType">
|
||||
<el-select v-model="formData.principalPersonnelType" placeholder="请选择人员类型">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CREDENTIAL_PERSONNEL_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="principalSex">
|
||||
<el-select v-model="formData.principalSex" placeholder="请选择性别">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.CREDENTIAL_SEX)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业类别" prop="principalCategoryOfEmployment">
|
||||
<el-select v-model="formData.principalCategoryOfEmployment" placeholder="请选择行业类别">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CREDENTIAL_CATEGORY_OF_EMPLOYMENT)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="初领日期" prop="principalDateOfIssue">
|
||||
<el-date-picker v-model="formData.principalDateOfIssue" type="date" value-format="YYYY-MM-DD" placeholder="请选择证件初领日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="到期日期" prop="principalExpiryDate">
|
||||
<el-date-picker v-model="formData.principalExpiryDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择证件初领日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="签发机关" prop="principalLicenceIssuingAuthority">
|
||||
<el-input v-model="formData.principalLicenceIssuingAuthority" placeholder="请输入证件签发机关" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="principalImageUrl">
|
||||
<el-button v-if="formData.principalImageUrl == undefined" type="primary" plain @click="fileOpenForm(1)"><Icon icon="ep:upload" class="mr-5px" /> 上传文件</el-button>
|
||||
<el-image v-if="formData.principalImageUrl != undefined" style="width: 100px; height: 100px" :src="formData.principalImageUrl" :preview-src-list="[formData.principalImageUrl]" fit="fill" />
|
||||
<el-button v-if="formData.principalImageUrl != undefined" type="danger" plain @click="deletedImageUrl(1)">删除图片</el-button>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card class="mb-10px">
|
||||
<template #header>安全员证</template>
|
||||
<el-form-item label="证号" prop="securityCertificateNumber">
|
||||
<el-input v-model="formData.securityCertificateNumber" placeholder="请输入安全员证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="securityName">
|
||||
<el-input v-model="formData.securityName" placeholder="请输入安全员姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="securityPersonnelType">
|
||||
<el-select v-model="formData.securityPersonnelType" placeholder="请选择人员类型">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CREDENTIAL_PERSONNEL_TYPE)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="securitySex">
|
||||
<el-select v-model="formData.securitySex" placeholder="请选择性别">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.CREDENTIAL_SEX)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="行业类别" prop="securityCategoryOfEmployment">
|
||||
<el-select v-model="formData.securityCategoryOfEmployment" placeholder="请选择行业类别">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CREDENTIAL_CATEGORY_OF_EMPLOYMENT)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="初领日期" prop="securityDateOfIssue">
|
||||
<el-date-picker v-model="formData.securityDateOfIssue" type="date" value-format="YYYY-MM-DD" placeholder="请选择证件初领日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="到期日期" prop="securityExpiryDate">
|
||||
<el-date-picker v-model="formData.securityExpiryDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择证件到期日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="签发机关" prop="securityLicenceIssuingAuthority">
|
||||
<el-input v-model="formData.securityLicenceIssuingAuthority" placeholder="请输入签发机关" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="securityImageUrl">
|
||||
<el-button v-if="formData.securityImageUrl == undefined" type="primary" plain @click="fileOpenForm(2)"><Icon icon="ep:upload" class="mr-5px" /> 上传文件</el-button>
|
||||
<el-image v-if="formData.securityImageUrl != undefined" style="width: 100px; height: 100px" :src="formData.securityImageUrl" :preview-src-list="[formData.securityImageUrl]" fit="fill" />
|
||||
<el-button v-if="formData.securityImageUrl != undefined" type="danger" plain @click="deletedImageUrl(2)">删除图片</el-button>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card class="mb-10px" v-if="formData.isSecure == 1">
|
||||
<template #header>危化证</template>
|
||||
<el-form-item label="经营方式" prop="dangerBusinessPattern">
|
||||
<el-select v-model="formData.dangerBusinessPattern" placeholder="请选择行业类别">
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CREDENTIAL_BUSINESS_PATTERN)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发证机关" prop="dangerLicenceIssuingAuthority">
|
||||
<el-input v-model="formData.dangerLicenceIssuingAuthority" placeholder="请输入发证机关" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发证日期" prop="dangerDateOfIssue">
|
||||
<el-date-picker v-model="formData.dangerDateOfIssue" type="date" value-format="YYYY-MM-DD" placeholder="请选择发证日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="到期日期" prop="dangerExpiryDate">
|
||||
<el-date-picker v-model="formData.dangerExpiryDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择到期日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="principalImageUrl">
|
||||
<el-button v-if="formData.dangerImageUrl == undefined" type="primary" plain @click="fileOpenForm(3)"><Icon icon="ep:upload" class="mr-5px" /> 上传文件</el-button>
|
||||
<el-image v-if="formData.dangerImageUrl != undefined" style="width: 100px; height: 100px" :src="formData.dangerImageUrl" :preview-src-list="[formData.dangerImageUrl]" fit="fill" />
|
||||
<el-button v-if="formData.dangerImageUrl != undefined" type="danger" plain @click="deletedImageUrl(3)">删除图片</el-button>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-col v-if="startUserSelectTasks.length > 0">
|
||||
<el-card class="mb-10px">
|
||||
<template #header>指定审批人</template>
|
||||
|
@ -247,16 +111,13 @@
|
|||
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 上传文件弹窗 -->
|
||||
<ImageFileForm ref="fileFormRef" :imageType="imageType" @success="setImageUrl" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from '@/utils/dict'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { EnterpriseInformationApi, EnterpriseInformationVO } from '@/api/fta/enterpriseinformation'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import * as DefinitionApi from '@/api/bpm/definition'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import ImageFileForm from "@/views/fta/enterpriseinformation/ImageFileForm.vue";
|
||||
|
||||
defineOptions({ name: 'EnterpriseInformationCreate' })
|
||||
|
||||
|
@ -282,29 +143,6 @@ const formData = ref({
|
|||
enterpriseBelongingToIndustry: undefined,
|
||||
registerOffice: undefined,
|
||||
operatePermitRange: undefined,
|
||||
principalImageUrl: undefined,
|
||||
securityImageUrl: undefined,
|
||||
dangerImageUrl: undefined,
|
||||
principalCertificateNumber: undefined,
|
||||
principalName: undefined,
|
||||
principalPersonnelType: undefined,
|
||||
principalSex: undefined,
|
||||
principalCategoryOfEmployment: undefined,
|
||||
principalDateOfIssue: undefined,
|
||||
principalExpiryDate: undefined,
|
||||
principalLicenceIssuingAuthority: undefined,
|
||||
securityCertificateNumber: undefined,
|
||||
securityName: undefined,
|
||||
securityPersonnelType: undefined,
|
||||
securitySex: undefined,
|
||||
securityCategoryOfEmployment: undefined,
|
||||
securityDateOfIssue: undefined,
|
||||
securityExpiryDate: undefined,
|
||||
securityLicenceIssuingAuthority: undefined,
|
||||
dangerBusinessPattern: undefined,
|
||||
dangerLicenceIssuingAuthority: undefined,
|
||||
dangerDateOfIssue: undefined,
|
||||
dangerExpiryDate: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
|
||||
|
@ -321,30 +159,7 @@ const formRules = reactive({
|
|||
enterpriseBelongingToIndustry: [{ required: true, message: '企业所属行业不能为空', trigger: 'blur' }],
|
||||
registerOffice: [{ required: true, message: '登记机关不能为空', trigger: 'blur' }],
|
||||
operatePermitRange: [{ required: true, message: '经营许可范围不能为空', trigger: 'blur' }],
|
||||
isSecure: [{ required: true, message: '是否涉及危化证不能为空', trigger: 'blur' }],
|
||||
principalImageUrl: [{ required: true, message: '请上传主要负责人证图片', trigger: 'blur' }],
|
||||
principalCertificateNumber: [{ required: true, message: '请输入负责人证号', trigger: 'blur' }],
|
||||
principalName: [{ required: true, message: '请输入负责人证姓名', trigger: 'blur' }],
|
||||
principalPersonnelType: [{ required: true, message: '请选择人员类型', trigger: 'blur' }],
|
||||
principalSex: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
||||
principalCategoryOfEmployment: [{ required: true, message: '请选择行业类别', trigger: 'blur' }],
|
||||
principalDateOfIssue: [{ required: true, message: '请选择初领日期', trigger: 'blur' }],
|
||||
principalExpiryDate: [{ required: true, message: '请选择证件到期日期', trigger: 'blur' }],
|
||||
principalLicenceIssuingAuthority: [{ required: true, message: '请输入证件签发机关', trigger: 'blur' }],
|
||||
securityCertificateNumber: [{ required: true, message: '请输入安全员证号', trigger: 'blur' }],
|
||||
securityName: [{ required: true, message: '请输入安全员姓名', trigger: 'blur' }],
|
||||
securityPersonnelType: [{ required: true, message: '请选择人员类型', trigger: 'blur' }],
|
||||
securitySex: [{ required: true, message: '请选择性别', trigger: 'blur' }],
|
||||
securityCategoryOfEmployment: [{ required: true, message: '请选择行业类别', trigger: 'blur' }],
|
||||
securityDateOfIssue: [{ required: true, message: '请选择初领日期', trigger: 'blur' }],
|
||||
securityExpiryDate: [{ required: true, message: '请选择到期日期', trigger: 'blur' }],
|
||||
securityLicenceIssuingAuthority: [{ required: true, message: '请填写证件签发机关', trigger: 'blur' }],
|
||||
securityImageUrl: [{ required: true, message: '请上传安全员证图片', trigger: 'blur' }],
|
||||
dangerBusinessPattern: [{ required: true, message: '请选择经营方式', trigger: 'blur' }],
|
||||
dangerLicenceIssuingAuthority: [{ required: true, message: '请输入发证机关', trigger: 'blur' }],
|
||||
dangerDateOfIssue: [{ required: true, message: '请选择发证日期', trigger: 'blur' }],
|
||||
dangerExpiryDate: [{ required: true, message: '请选择证件到期日期', trigger: 'blur' }],
|
||||
dangerImageUrl: [{ required: true, message: '请上传危化证图片', trigger: 'blur' }]
|
||||
isSecure: [{ required: true, message: '是否涉及危化证不能为空', trigger: 'blur' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
|
@ -356,36 +171,6 @@ const startUserSelectAssigneesFormRef = ref() // 发起人选择审批人的表
|
|||
const startUserSelectAssigneesFormRules = ref({}) // 发起人选择审批人的表单 Rules
|
||||
const userList = ref<any[]>([]) // 用户列表
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const fileFormRef = ref()
|
||||
const imageType = ref() //打开弹框上传的图片类型 1主要负责人证图片 2安全员证图片 3危化证图片
|
||||
const fileOpenForm = (type: Number) => {
|
||||
imageType.value = type
|
||||
fileFormRef.value.open()
|
||||
}
|
||||
|
||||
/** 删除图片 */
|
||||
const deletedImageUrl = (imageType: Number) => {
|
||||
if (imageType == 1){
|
||||
formData.value.principalImageUrl = undefined
|
||||
}else if(imageType == 2){
|
||||
formData.value.securityImageUrl = undefined
|
||||
}else if(imageType == 3){
|
||||
formData.value.dangerImageUrl = undefined
|
||||
}
|
||||
}
|
||||
|
||||
/** 上传图片成功,设置图片地址 */
|
||||
const setImageUrl = (value: String,imageType: Number) => {
|
||||
if (imageType == 1){
|
||||
formData.value.principalImageUrl = value
|
||||
}else if(imageType == 2){
|
||||
formData.value.securityImageUrl = value
|
||||
}else if(imageType == 3){
|
||||
formData.value.dangerImageUrl = value
|
||||
}
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
|
|
Loading…
Reference in New Issue