|  |  |  | @ -75,11 +75,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |           <el-input v-model="formData.introduction" type="textarea" placeholder="请输入企业介绍" /> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-form-item label="企业照片" prop="fileIds"> | 
			
		
	
		
			
				
					|  |  |  |  |           <UploadImgs v-model="formData.fileIds" :limit="3" height="100px" width="100px" /> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form-item> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         <el-form-item label="企业资质" prop="fileIds"> | 
			
		
	
		
			
				
					|  |  |  |  |           <UploadImgs v-model="formData.fileIds" :limit="3" height="100px" width="100px" /> | 
			
		
	
		
			
				
					|  |  |  |  |           <UploadImgs v-model="fileList" :limit="3" height="100px" width="100px" /> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-form-item>  | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -140,21 +136,59 @@ | 
			
		
	
		
			
				
					|  |  |  |  |     <SelectUser ref="selectUserRef" @select-user="echoUser" /> | 
			
		
	
		
			
				
					|  |  |  |  |   </ContentWrap> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   <ContentWrap title="资质记录" v-if="formType === 'update'"> | 
			
		
	
		
			
				
					|  |  |  |  |   <el-card title="资质记录" v-if="formType === 'update'"> | 
			
		
	
		
			
				
					|  |  |  |  |     <template #header> | 
			
		
	
		
			
				
					|  |  |  |  |       <div class="flex items-center justify-between"> | 
			
		
	
		
			
				
					|  |  |  |  |         <span class="text-16px font-700">资质记录</span> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-button type="primary" @click="openQualForm('create')">新增</el-button> | 
			
		
	
		
			
				
					|  |  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |  |     </template> | 
			
		
	
		
			
				
					|  |  |  |  |     <el-table v-loading="loading" :data="qualificationlist" :stripe="true" :show-overflow-tooltip="true"> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="资质图片" align="center" fixed="left" prop="files" > | 
			
		
	
		
			
				
					|  |  |  |  |         <template #default="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |            | 
			
		
	
		
			
				
					|  |  |  |  |           <UploadImgs :disabled="true"  v-model="scope.row.files" :limit="3" height="100px" width="100px" /> | 
			
		
	
		
			
				
					|  |  |  |  |         </template> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="资质编号" align="center" fixed="left" prop="enterpriseAuth" /> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="资质名称" align="center" fixed="left" prop="qualificationName" /> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="资质描述" align="center" fixed="left" prop="qualificationDescription" /> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="资质名称" align="center" fixed="left" prop="qualificationName" > | 
			
		
	
		
			
				
					|  |  |  |  |         <template #default="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |           <dict-tag :type="DICT_TYPE.ENTERPRISES_QUA" :value="scope.row.qualificationName" /> | 
			
		
	
		
			
				
					|  |  |  |  |         </template> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column | 
			
		
	
		
			
				
					|  |  |  |  |         label="资质到期日期" | 
			
		
	
		
			
				
					|  |  |  |  |         align="center" | 
			
		
	
		
			
				
					|  |  |  |  |         prop="expiryDate" | 
			
		
	
		
			
				
					|  |  |  |  |         :formatter="dateFormatter" | 
			
		
	
		
			
				
					|  |  |  |  |         :formatter="dateFormatter2" | 
			
		
	
		
			
				
					|  |  |  |  |         width="180px" | 
			
		
	
		
			
				
					|  |  |  |  |       /> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |   </ContentWrap> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table-column label="操作" align="center" min-width="120px"> | 
			
		
	
		
			
				
					|  |  |  |  |         <template #default="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button | 
			
		
	
		
			
				
					|  |  |  |  |             link | 
			
		
	
		
			
				
					|  |  |  |  |             type="primary" | 
			
		
	
		
			
				
					|  |  |  |  |             @click="openQualForm('update', scope.row.id)" | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           > | 
			
		
	
		
			
				
					|  |  |  |  |             编辑 | 
			
		
	
		
			
				
					|  |  |  |  |           </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-button | 
			
		
	
		
			
				
					|  |  |  |  |             link | 
			
		
	
		
			
				
					|  |  |  |  |             type="danger" | 
			
		
	
		
			
				
					|  |  |  |  |             @click="handQualDelete(scope.row.id)" | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           > | 
			
		
	
		
			
				
					|  |  |  |  |             删除 | 
			
		
	
		
			
				
					|  |  |  |  |           </el-button> | 
			
		
	
		
			
				
					|  |  |  |  |         </template> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |   </el-card> | 
			
		
	
		
			
				
					|  |  |  |  | <!-- 表单弹窗:添加/修改 --> | 
			
		
	
		
			
				
					|  |  |  |  | <EnterpriseQualificationForm ref="formQualRef" @success="getQualificationList" /> | 
			
		
	
		
			
				
					|  |  |  |  |   <ContentWrap title="执法记录" v-if="formType === 'update'"> | 
			
		
	
		
			
				
					|  |  |  |  |     <div class="demo-collapse"> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-collapse v-model="activeNames" @change="handleChange"> | 
			
		
	
	
		
			
				
					|  |  |  | @ -203,6 +237,7 @@ import { getStrDictOptions, DICT_TYPE } from '@/utils/dict' | 
			
		
	
		
			
				
					|  |  |  |  | import { EnterprisesApi, EnterprisesVO } from '@/api/enterprises' | 
			
		
	
		
			
				
					|  |  |  |  | import { EnterpriseQualificationApi, EnterpriseQualificationVO } from '@/api/qualification' | 
			
		
	
		
			
				
					|  |  |  |  | import { UserVO, getSimpleUserListByUserType } from '@/api/system/user' | 
			
		
	
		
			
				
					|  |  |  |  | import EnterpriseQualificationForm from '@/views/qualification/EnterpriseQualificationForm.vue' | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import { EnterpriseInspectionsApi, EnterpriseInspectionsVO } from '@/api/enterpriseinspections' | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -212,7 +247,7 @@ import { ElMessage } from 'element-plus' | 
			
		
	
		
			
				
					|  |  |  |  | import SelectUser from './components/SelectUser.vue' | 
			
		
	
		
			
				
					|  |  |  |  | import * as UserApi from '@/api/system/user' | 
			
		
	
		
			
				
					|  |  |  |  | import {useTagsViewStore} from "@/store/modules/tagsView"; | 
			
		
	
		
			
				
					|  |  |  |  | import {dateFormatter, formatDate} from "@/utils/formatTime"; | 
			
		
	
		
			
				
					|  |  |  |  | import {dateFormatter,dateFormatter2, formatDate} from "@/utils/formatTime"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | /** 企业 表单 */ | 
			
		
	
		
			
				
					|  |  |  |  | defineOptions({ name: 'UpdateEnterprises' }) | 
			
		
	
	
		
			
				
					|  |  |  | @ -251,10 +286,12 @@ const formData = ref({ | 
			
		
	
		
			
				
					|  |  |  |  |   managerDeptId: undefined, | 
			
		
	
		
			
				
					|  |  |  |  |   ides: undefined, | 
			
		
	
		
			
				
					|  |  |  |  |   startUserSelectAssignees:undefined, | 
			
		
	
		
			
				
					|  |  |  |  |   enterpriseUserId: undefined, | 
			
		
	
		
			
				
					|  |  |  |  |   fileIds:[] | 
			
		
	
		
			
				
					|  |  |  |  |   enterpriseUserId: undefined | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | }) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | const fileList=ref([]) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | const getEnterpriseUserList = async () => { | 
			
		
	
		
			
				
					|  |  |  |  |   const type:number = 2 | 
			
		
	
		
			
				
					|  |  |  |  |   const data = await getSimpleUserListByUserType(type) | 
			
		
	
	
		
			
				
					|  |  |  | @ -279,6 +316,7 @@ function init() { | 
			
		
	
		
			
				
					|  |  |  |  |       EnterprisesApi.getEnterprises(query.id).then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |       selectedUser.value=res.inviterName; | 
			
		
	
		
			
				
					|  |  |  |  |      // formData.value.startUserSelectAssignees=res.userId; | 
			
		
	
		
			
				
					|  |  |  |  |      fileList.value=res.files; | 
			
		
	
		
			
				
					|  |  |  |  |       formData.value = res | 
			
		
	
		
			
				
					|  |  |  |  |     }) | 
			
		
	
		
			
				
					|  |  |  |  |   }else{formType.value = 'create'} | 
			
		
	
	
		
			
				
					|  |  |  | @ -365,6 +403,26 @@ const handleSearch = () => { | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | /** 添加/修改操作 */ | 
			
		
	
		
			
				
					|  |  |  |  | const formQualRef = ref() | 
			
		
	
		
			
				
					|  |  |  |  | const openQualForm = (type: string, id?: number) => { | 
			
		
	
		
			
				
					|  |  |  |  |   formQualRef.value.open(type, id, formData.value.id) | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | /** 删除按钮操作 */ | 
			
		
	
		
			
				
					|  |  |  |  | const handQualDelete = async (id: number) => { | 
			
		
	
		
			
				
					|  |  |  |  |   try { | 
			
		
	
		
			
				
					|  |  |  |  |     // 删除的二次确认 | 
			
		
	
		
			
				
					|  |  |  |  |     await message.delConfirm() | 
			
		
	
		
			
				
					|  |  |  |  |     // 发起删除 | 
			
		
	
		
			
				
					|  |  |  |  |     await EnterpriseQualificationApi.deleteEnterpriseQualification(id) | 
			
		
	
		
			
				
					|  |  |  |  |     message.success(t('common.delSuccess')) | 
			
		
	
		
			
				
					|  |  |  |  |     // 刷新列表 | 
			
		
	
		
			
				
					|  |  |  |  |     await    getQualificationList() | 
			
		
	
		
			
				
					|  |  |  |  |   } catch {} | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | onMounted(() => { | 
			
		
	
		
			
				
					|  |  |  |  |   init() | 
			
		
	
		
			
				
					|  |  |  |  |   //判断是添加删除 | 
			
		
	
	
		
			
				
					|  |  |  | @ -413,11 +471,15 @@ const submitForm = async () => { | 
			
		
	
		
			
				
					|  |  |  |  |   //console.log(formData.value) | 
			
		
	
		
			
				
					|  |  |  |  |   // 校验表单 | 
			
		
	
		
			
				
					|  |  |  |  |   await formRef.value.validate() | 
			
		
	
		
			
				
					|  |  |  |  |   formData.value.enterprisesStatus=1; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   // 提交请求 | 
			
		
	
		
			
				
					|  |  |  |  |   loading.value = true | 
			
		
	
		
			
				
					|  |  |  |  |   try { | 
			
		
	
		
			
				
					|  |  |  |  |     const data = formData.value | 
			
		
	
		
			
				
					|  |  |  |  |     let data = formData.value | 
			
		
	
		
			
				
					|  |  |  |  |     // 设置企业状态为数字类型 1 | 
			
		
	
		
			
				
					|  |  |  |  |     data.enterprisesStatus = 1 as number; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     data.fileIds = (fileList.value || []).map((item: any) => item.id); | 
			
		
	
		
			
				
					|  |  |  |  |     if (formType.value == 'create') { | 
			
		
	
		
			
				
					|  |  |  |  |       await EnterprisesApi.pccreateEnterprises(data) | 
			
		
	
		
			
				
					|  |  |  |  |       message.success(t('common.createSuccess')) | 
			
		
	
	
		
			
				
					|  |  |  | @ -433,6 +495,9 @@ const submitForm = async () => { | 
			
		
	
		
			
				
					|  |  |  |  |     emit('success') | 
			
		
	
		
			
				
					|  |  |  |  |   } finally { | 
			
		
	
		
			
				
					|  |  |  |  |     loading.value = false | 
			
		
	
		
			
				
					|  |  |  |  |       // 关闭当前页面 | 
			
		
	
		
			
				
					|  |  |  |  |       tagView.delView(route) | 
			
		
	
		
			
				
					|  |  |  |  |     router.go(-1) | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -469,7 +534,6 @@ const resetForm = () => { | 
			
		
	
		
			
				
					|  |  |  |  | const uploadList: any = ref([]) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | async function uploadSuccess(res) { | 
			
		
	
		
			
				
					|  |  |  |  |   console.log('1111111111111111111'); | 
			
		
	
		
			
				
					|  |  |  |  |   console.log(res.data.file_id) | 
			
		
	
		
			
				
					|  |  |  |  |   fileIds.value.push(res.data.file_id); | 
			
		
	
		
			
				
					|  |  |  |  |   if (res) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -496,7 +560,7 @@ async function uploadSuccess(res) { | 
			
		
	
		
			
				
					|  |  |  |  | const getQualificationList = async () => { | 
			
		
	
		
			
				
					|  |  |  |  |   loading.value = true | 
			
		
	
		
			
				
					|  |  |  |  |   try { | 
			
		
	
		
			
				
					|  |  |  |  |     const data = await EnterpriseQualificationApi.getEnterpriseQualificationPage({"enterpriseId":query.id}) | 
			
		
	
		
			
				
					|  |  |  |  |     const data = await EnterpriseQualificationApi.getEnterpriseQualificationPageEnterprise({"enterpriseId":query.id}) | 
			
		
	
		
			
				
					|  |  |  |  |     qualificationlist.value = data.list | 
			
		
	
		
			
				
					|  |  |  |  |   } finally { | 
			
		
	
		
			
				
					|  |  |  |  |     loading.value = false | 
			
		
	
	
		
			
				
					|  |  |  | @ -537,12 +601,6 @@ const getInspectionsLogList = async (insprctionsId) => { | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </script> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <style lang="scss" scoped> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |