|
|
@@ -1,8 +1,8 @@
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { ref , reactive} from 'vue'
|
|
|
-import { ElMessage, type FormInstance, type FormProps, type FormRules } from 'element-plus'
|
|
|
-import { delImgById, saveSelfReport } from '@/views/creditServices/type'
|
|
|
+import { ElMessage, type FormInstance, type FormProps, type FormRules, type UploadRawFile } from 'element-plus'
|
|
|
+import { delImgById, getCompanyDetailByUnicode, saveSelfReport } from '@/views/creditServices/type'
|
|
|
import SmallSearch from '@/components/SmallSearch.vue'
|
|
|
import NewDynamics from '@/components/NewDynamics.vue'
|
|
|
import { downloadFile } from '@/utils/request'
|
|
|
@@ -96,24 +96,52 @@ const handleRemove = async (uploadFile:any) => {
|
|
|
}
|
|
|
|
|
|
const handleFileSuccess = (q:any)=>{
|
|
|
+ isloading.value = false;
|
|
|
+ if(q.code == 500){
|
|
|
+ ElMessage.error('文件大于了30M')
|
|
|
+ return;
|
|
|
+ }
|
|
|
ElMessage.success('上传成功');
|
|
|
uploadFilesList.value.push(q.data);
|
|
|
}
|
|
|
const fileList = ref([]);
|
|
|
const canSelfReport = ref<boolean>(true);
|
|
|
const BASE_URL = import.meta.env.VITE_APP_BASE_URL;
|
|
|
-
|
|
|
+const isloading = ref<boolean>(false)
|
|
|
+const beforeUpload = (q:UploadRawFile)=>{
|
|
|
+ if(q.size > 1024*1024*30){
|
|
|
+ ElMessage.error('文件大于了30M')
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ isloading.value = true
|
|
|
+}
|
|
|
+const checkInformation = async (unicode:string)=>{
|
|
|
+ const res = await getCompanyDetailByUnicode(unicode);
|
|
|
+ if(res.code == 200){
|
|
|
+ res.data.forEach((q:any)=>{
|
|
|
+ q.createTime = q.createTime.split('T')[0];
|
|
|
+ q.files = q.files.map((w:FileType)=>w.fileOriginalName+"<br>").join("<br>");
|
|
|
+ if(!q.files){
|
|
|
+ q.files = '没有上传文件';
|
|
|
+ }
|
|
|
+ })
|
|
|
+ companyUploadInformationList.value = res.data;
|
|
|
+ dialogVisible.value = true;
|
|
|
+ }
|
|
|
+}
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const companyUploadInformationList = ref<any>([]);
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="serviceContainer">
|
|
|
+ <div class="serviceContainer" v-loading="isloading">
|
|
|
<div class="w-912px ml-auto mr-auto pt-20px mb-20px text-14px">
|
|
|
你所在的位置:<span class="cursor-pointer">首页</span> > <span class="color-#006eff">企业自主上报</span>
|
|
|
</div>
|
|
|
<div class="flex justify-between w-912px mr-a ml-a">
|
|
|
<div class="w-603px pl-24px pr-24px pt-30px text-black bg-white">
|
|
|
<div>
|
|
|
- <el-button class="float-right" @click="downloadFile(BASE_URL+'/owSelfReporting/downloadTemplateWord','企业自主上报模版.doc')" type="success">下载上报模版</el-button>
|
|
|
+ <el-button class="float-right" @click="downloadFile(BASE_URL+'/owSelfReporting/downloadTemplateWord','企业自主上报模版.xlsx')" type="success">下载上报模版</el-button>
|
|
|
<div>企业自主上报信息</div>
|
|
|
<div>
|
|
|
<!-- <el-radio-group v-model="labelPosition" aria-label="label position">-->
|
|
|
@@ -143,7 +171,8 @@ const BASE_URL = import.meta.env.VITE_APP_BASE_URL;
|
|
|
<el-input v-model="selfReportForm.enterpriseName" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="统一社会信用代码" prop="unifiedSocialCreditCode">
|
|
|
- <el-input v-model="selfReportForm.unifiedSocialCreditCode" />
|
|
|
+ <el-input v-model="selfReportForm.unifiedSocialCreditCode" style="width: 290px;" />
|
|
|
+ <el-button :disabled="!/^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/.test(selfReportForm.unifiedSocialCreditCode)" type="primary" style="margin-left: 10px" @click="checkInformation(selfReportForm.unifiedSocialCreditCode)">查询上报信息</el-button>
|
|
|
</el-form-item>
|
|
|
<el-upload
|
|
|
ref="uploadRef"
|
|
|
@@ -151,14 +180,21 @@ const BASE_URL = import.meta.env.VITE_APP_BASE_URL;
|
|
|
:action="upload.url"
|
|
|
:on-remove="handleRemove"
|
|
|
:multiple="true"
|
|
|
- accept=".doc, .docx, .png, .jpg, .pdf"
|
|
|
+ accept=".doc, .docx, .png, .jpg, .pdf, .xls, .xlsx "
|
|
|
:on-success="handleFileSuccess"
|
|
|
:data="{moduleName:'上报模块'}"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
>
|
|
|
<el-button type="primary">上传附件</el-button>
|
|
|
<template #tip>
|
|
|
<div class="el-upload__tip">
|
|
|
- 只能上传doc docx png jpg pdf文件
|
|
|
+ <span style="color: #fd2626">请同时上传信息盖章扫描件和EXCLE电子档</span>
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ 只能上传doc docx png jpg pdf xls xlsx文件
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ 且大小控制在30M内
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-upload>
|
|
|
@@ -173,6 +209,24 @@ const BASE_URL = import.meta.env.VITE_APP_BASE_URL;
|
|
|
<NewDynamics />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <el-dialog v-model="dialogVisible" title="企业上报情况" width="500" draggable>
|
|
|
+ <el-table :data="companyUploadInformationList" max-height="300">
|
|
|
+ <el-table-column prop="contacts" label="联系人" />
|
|
|
+ <el-table-column prop="createTime" label="上报时间" width="150" />
|
|
|
+ <el-table-column prop="files" label="上报文件名" width="200">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-html="scope.row.files"></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">
|
|
|
+ 了解
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|