企业库
This commit is contained in:
parent
2328ab1158
commit
244a9d2c8b
|
|
@ -0,0 +1,46 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 主体库->查询列表
|
||||||
|
export function listAPI(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/mainDatabase/enterprise/getList',
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主体库->新增主体库 */
|
||||||
|
export function addDataAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/mainDatabase/enterprise/addData',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主体库->修改主体库 */
|
||||||
|
export function editDataAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/mainDatabase/enterprise/editData',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主体库->删除主体库 */
|
||||||
|
export function delDataAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/mainDatabase/enterprise/delData',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主体库->查询详情 */
|
||||||
|
export function getDetailDataAPI(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartBid/mainDatabase/enterprise/getDetailData',
|
||||||
|
method: 'GET',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -164,7 +164,7 @@ export const dynamicRoutes = [
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/enterpriseForm',
|
path: '/enterpriseAdd',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
permissions: ['enterpriseLibrary:enterprise:add'],
|
permissions: ['enterpriseLibrary:enterprise:add'],
|
||||||
|
|
@ -177,6 +177,20 @@ export const dynamicRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/enterpriseEdit',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['enterpriseLibrary:enterprise:edit'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index',
|
||||||
|
component: () => import('@/views/enterpriseLibrary/enterprise/components/EnterpriseForm'),
|
||||||
|
name: 'EnterpriseForm',
|
||||||
|
meta: { title: '编辑主体信息', activeMenu: '/enterpriseLibrary/enterprise', noCache: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/enterpriseDetail',
|
path: '/enterpriseDetail',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { uploadSmallFileByOcr,uploadLargeFileByOcr } from '@/api/common/uploadFile.js'
|
import { uploadSmallFileByOcr, uploadLargeFileByOcr } from '@/api/common/uploadFile.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadFile',
|
name: 'UploadFile',
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -206,7 +206,7 @@ export default {
|
||||||
this.updateFileStatus(file.uid, 'success', '', res.data, 100);
|
this.updateFileStatus(file.uid, 'success', '', res.data, 100);
|
||||||
console.log('上传成功后的文件列表:', this.files);
|
console.log('上传成功后的文件列表:', this.files);
|
||||||
// 触发文件变化事件,传递当前的文件列表
|
// 触发文件变化事件,传递当前的文件列表
|
||||||
this.$emit('file-change', this.getCurrentFiles(),this.type);
|
this.$emit('file-change', this.getCurrentFiles(), this.type);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.$bus.$emit('endUpload');
|
this.$bus.$emit('endUpload');
|
||||||
// 上传失败,移除文件
|
// 上传失败,移除文件
|
||||||
|
|
@ -230,7 +230,7 @@ export default {
|
||||||
this.clearPreview();
|
this.clearPreview();
|
||||||
|
|
||||||
// 触发文件变化事件
|
// 触发文件变化事件
|
||||||
this.$emit('file-change', this.getCurrentFiles(),this.type);
|
this.$emit('file-change', this.getCurrentFiles(), this.type);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -312,7 +312,7 @@ export default {
|
||||||
|
|
||||||
// 处理文件超出限制
|
// 处理文件超出限制
|
||||||
handleExceed(files, fileList) {
|
handleExceed(files, fileList) {
|
||||||
console.log('文件超出限制处理',files,fileList);
|
console.log('文件超出限制处理', files, fileList);
|
||||||
// 当文件数量超出限制时,用新文件替换旧文件
|
// 当文件数量超出限制时,用新文件替换旧文件
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
// 触发文件删除事件
|
// 触发文件删除事件
|
||||||
|
|
@ -397,13 +397,13 @@ export default {
|
||||||
|
|
||||||
// 判断是否为图片文件
|
// 判断是否为图片文件
|
||||||
isImageFile(file) {
|
isImageFile(file) {
|
||||||
return file && file.type && file.type.startsWith('image/');
|
return (file && file.type && file.type.startsWith('image/')) || (file && file.fileType === '1');
|
||||||
},
|
},
|
||||||
// 判断是否为文档文件
|
// 判断是否为文档文件
|
||||||
isDocumentFile(file) {
|
isDocumentFile(file) {
|
||||||
if (!file || !file.name) return false;
|
if (!file || !file.name) return false;
|
||||||
const fileExtension = file.name.split('.').pop().toLowerCase();
|
const fileExtension = file.name.split('.').pop().toLowerCase();
|
||||||
return ['pdf', 'doc', 'docx', 'xls', 'xlsx'].includes(fileExtension);
|
return ['pdf', 'doc', 'docx', 'xls', 'xlsx'].includes(fileExtension) || (file && file.fileType === '2');
|
||||||
},
|
},
|
||||||
// 生成图片预览
|
// 生成图片预览
|
||||||
generateImagePreview(file) {
|
generateImagePreview(file) {
|
||||||
|
|
@ -417,6 +417,15 @@ export default {
|
||||||
};
|
};
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
},
|
},
|
||||||
|
// 修改回显生成图片预览
|
||||||
|
generateImagePreviewFromPath(file) {
|
||||||
|
console.log(file.lsFilePath);
|
||||||
|
this.previewImageUrl = file.lsFilePath;
|
||||||
|
this.previewImageName = file.name;
|
||||||
|
// 清除文档预览
|
||||||
|
this.previewFileName = '';
|
||||||
|
this.previewFileType = '';
|
||||||
|
},
|
||||||
// 生成文档预览
|
// 生成文档预览
|
||||||
generateDocumentPreview(file) {
|
generateDocumentPreview(file) {
|
||||||
const fileExtension = file.name.split('.').pop().toLowerCase();
|
const fileExtension = file.name.split('.').pop().toLowerCase();
|
||||||
|
|
@ -455,19 +464,13 @@ export default {
|
||||||
// 是否显示图片预览
|
// 是否显示图片预览
|
||||||
showImagePreview() {
|
showImagePreview() {
|
||||||
return this.previewImageUrl &&
|
return this.previewImageUrl &&
|
||||||
this.files.length === 1 &&
|
this.files.length === 1 ;
|
||||||
this.files[0] &&
|
|
||||||
this.files[0].raw &&
|
|
||||||
this.isImageFile(this.files[0].raw);
|
|
||||||
},
|
},
|
||||||
// 是否显示文件预览
|
// 是否显示文件预览
|
||||||
showFilePreview() {
|
showFilePreview() {
|
||||||
return this.previewFileName &&
|
return this.previewFileName &&
|
||||||
this.previewFileType &&
|
this.previewFileType &&
|
||||||
this.files.length === 1 &&
|
this.files.length === 1;
|
||||||
this.files[0] &&
|
|
||||||
this.files[0].raw &&
|
|
||||||
this.isDocumentFile(this.files[0].raw);
|
|
||||||
},
|
},
|
||||||
accept() {
|
accept() {
|
||||||
return this.uploadType.split('、').map(type => `.${type}`).join(',');
|
return this.uploadType.split('、').map(type => `.${type}`).join(',');
|
||||||
|
|
@ -506,22 +509,40 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
fileList: {
|
fileList: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
// console.log('fileList 变化:', newVal);
|
|
||||||
// 使用格式化方法而不是深拷贝
|
|
||||||
this.files = this.formatFileList(newVal);
|
this.files = this.formatFileList(newVal);
|
||||||
// 如果外部传入文件列表,也尝试生成预览
|
|
||||||
if (newVal.length === 1 && newVal[0] && newVal[0].raw) {
|
// 如果外部传入文件列表,从 lsFilePath 生成预览
|
||||||
if (this.isImageFile(newVal[0].raw)) {
|
if (newVal.length > 0) {
|
||||||
this.generateImagePreview(newVal[0].raw);
|
|
||||||
} else if (this.isDocumentFile(newVal[0].raw)) {
|
const firstFile = newVal[0];
|
||||||
this.generateDocumentPreview(newVal[0].raw);
|
console.log("firstFile", firstFile);
|
||||||
|
|
||||||
|
if (firstFile && firstFile.lsFilePath) {
|
||||||
|
// 根据文件类型生成预览
|
||||||
|
if (this.isImageFile(firstFile)) {
|
||||||
|
this.generateImagePreviewFromPath(firstFile);
|
||||||
|
} else if (this.isDocumentFile(firstFile)) {
|
||||||
|
this.generateDocumentPreview(firstFile);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果没有 lsFilePath,回退到原始逻辑
|
||||||
|
if (firstFile && firstFile.raw) {
|
||||||
|
if (this.isImageFile(firstFile.raw)) {
|
||||||
|
this.generateImagePreview(firstFile.raw);
|
||||||
|
} else if (this.isDocumentFile(firstFile.raw)) {
|
||||||
|
this.generateDocumentPreview(firstFile.raw);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.clearPreview();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.clearPreview();
|
this.clearPreview();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,15 @@
|
||||||
<el-row :gutter="24" class="content-row">
|
<el-row :gutter="24" class="content-row">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<el-col :span="6" class="pane-left">
|
<el-col :span="6" class="pane-left">
|
||||||
<BasicInfoDetail ref="basicInfoDetail" />
|
<BasicInfoDetail ref="basicInfoDetail" :detailData="detailData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 法人信息 -->
|
<!-- 法人信息 -->
|
||||||
<el-col :span="6" class="pane-center">
|
<el-col :span="6" class="pane-center">
|
||||||
<LegalPersonDetail ref="legalPersonDetail" />
|
<LegalPersonDetail ref="legalPersonDetail" :detailData="detailData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 开户证明 -->
|
<!-- 开户证明 -->
|
||||||
<el-col :span="6" class="pane-right">
|
<el-col :span="6" class="pane-right">
|
||||||
<AccountOpeningCertificateDetail ref="accountOpeningCertificateDetail" />
|
<AccountOpeningCertificateDetail ref="accountOpeningCertificateDetail" :detailData="detailData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -28,6 +28,7 @@ import { decryptWithSM4 } from '@/utils/sm'
|
||||||
import BasicInfoDetail from './child/BasicInfoDetail.vue'
|
import BasicInfoDetail from './child/BasicInfoDetail.vue'
|
||||||
import LegalPersonDetail from './child/LegalPersonDetail.vue'
|
import LegalPersonDetail from './child/LegalPersonDetail.vue'
|
||||||
import AccountOpeningCertificateDetail from './child/AccountOpeningCertificateDetail.vue'
|
import AccountOpeningCertificateDetail from './child/AccountOpeningCertificateDetail.vue'
|
||||||
|
import { getDetailDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseDetail',
|
name: 'EnterpriseDetail',
|
||||||
|
|
@ -38,44 +39,25 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: decryptWithSM4(this.$route.query.id),
|
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
|
||||||
type: decryptWithSM4(this.$route.query.type),
|
type: decryptWithSM4(this.$route.query.type),
|
||||||
|
detailData: {} // 详情数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 返回
|
// 返回
|
||||||
handleClose() {
|
handleClose() {
|
||||||
const obj = { path: "/enterpriseLibrary/enterprise" }
|
const obj = { path: "/enterpriseLibrary/enterprise" }
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
// 保存
|
// 获取详情
|
||||||
async handleSave() {
|
async getDetail() {
|
||||||
try {
|
const res = await getDetailDataAPI({ enterpriseId: this.enterpriseId })
|
||||||
// 并行校验所有表单
|
this.detailData = res.data;
|
||||||
const [basicInfoData, legalPersonData, accountData] = await Promise.all([
|
},
|
||||||
this.$refs.basicInfo.validate(),
|
|
||||||
this.$refs.legalPerson.validate(),
|
|
||||||
this.$refs.accountOpeningCertificate.validate()
|
|
||||||
])
|
|
||||||
|
|
||||||
// 所有校验通过,组装完整数据
|
|
||||||
const formData = {
|
|
||||||
...basicInfoData,
|
|
||||||
...legalPersonData,
|
|
||||||
...accountData
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('所有表单校验通过,完整数据:', formData)
|
|
||||||
|
|
||||||
// 这里可以调用保存接口
|
|
||||||
// await this.saveEnterprise(formData)
|
|
||||||
this.$message.success('保存成功')
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
// console.error('表单校验失败:', error)
|
|
||||||
this.$message.error(error.message || '请完善表单信息')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,15 @@
|
||||||
<el-row :gutter="24" class="content-row">
|
<el-row :gutter="24" class="content-row">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<el-col :span="6" class="pane-left">
|
<el-col :span="6" class="pane-left">
|
||||||
<BasicInfo ref="basicInfo" />
|
<BasicInfo ref="basicInfo" :detailData="detailData" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 法人信息 -->
|
<!-- 法人信息 -->
|
||||||
<el-col :span="6" class="pane-center">
|
<el-col :span="6" class="pane-center">
|
||||||
<LegalPerson ref="legalPerson" />
|
<LegalPerson ref="legalPerson" :detailData="detailData" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- 开户证明 -->
|
<!-- 开户证明 -->
|
||||||
<el-col :span="6" class="pane-right">
|
<el-col :span="6" class="pane-right">
|
||||||
<AccountOpeningCertificate ref="accountOpeningCertificate" />
|
<AccountOpeningCertificate ref="accountOpeningCertificate" :detailData="detailData" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,6 +49,7 @@ import { decryptWithSM4 } from '@/utils/sm'
|
||||||
import BasicInfo from './child/BasicInfo.vue'
|
import BasicInfo from './child/BasicInfo.vue'
|
||||||
import LegalPerson from './child/LegalPerson.vue'
|
import LegalPerson from './child/LegalPerson.vue'
|
||||||
import AccountOpeningCertificate from './child/AccountOpeningCertificate.vue'
|
import AccountOpeningCertificate from './child/AccountOpeningCertificate.vue'
|
||||||
|
import { addDataAPI, editDataAPI, getDetailDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EnterpriseForm',
|
name: 'EnterpriseForm',
|
||||||
|
|
@ -59,16 +60,19 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: decryptWithSM4(this.$route.query.id),
|
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
|
||||||
type: decryptWithSM4(this.$route.query.type),
|
type: decryptWithSM4(this.$route.query.type),
|
||||||
showUploadAnimation: false,
|
showUploadAnimation: false,
|
||||||
showSaveAnimation: false, // 新增:保存动画状态
|
showSaveAnimation: false, // 新增:保存动画状态
|
||||||
uploadQueue: 0, // 上传队列计数器
|
uploadQueue: 0, // 上传队列计数器
|
||||||
animationText: '识别中',
|
animationText: '识别中',
|
||||||
isSaving: false // 新增:保存按钮loading状态
|
isSaving: false, // 新增:保存按钮loading状态
|
||||||
|
detailData: {} // 详情数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
|
|
@ -76,6 +80,12 @@ export default {
|
||||||
const obj = { path: "/enterpriseLibrary/enterprise" }
|
const obj = { path: "/enterpriseLibrary/enterprise" }
|
||||||
this.$tab.closeOpenPage(obj)
|
this.$tab.closeOpenPage(obj)
|
||||||
},
|
},
|
||||||
|
// 获取详情
|
||||||
|
async getDetail() {
|
||||||
|
const res = await getDetailDataAPI({ enterpriseId: this.enterpriseId })
|
||||||
|
console.log('res:', res);
|
||||||
|
this.detailData = res.data;
|
||||||
|
},
|
||||||
// 保存
|
// 保存
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
// 如果正在保存中,直接返回
|
// 如果正在保存中,直接返回
|
||||||
|
|
@ -99,46 +109,65 @@ export default {
|
||||||
...basicInfoData,
|
...basicInfoData,
|
||||||
...legalPersonData,
|
...legalPersonData,
|
||||||
...accountData,
|
...accountData,
|
||||||
allFiles: [...basicInfoData.fileList, ...legalPersonData.fileList, ...legalPersonData.fileList2, ...accountData.fileList],
|
allFiles: [
|
||||||
allFiles: [...basicInfoData.delFileList, ...legalPersonData.delFileList, ...accountData.delFileList]
|
...basicInfoData.fileList.map(file => JSON.parse(JSON.stringify(file))),
|
||||||
|
...legalPersonData.fileList.map(file => JSON.parse(JSON.stringify(file))),
|
||||||
|
...legalPersonData.fileList2.map(file => JSON.parse(JSON.stringify(file))),
|
||||||
|
...accountData.fileList.map(file => JSON.parse(JSON.stringify(file)))
|
||||||
|
],
|
||||||
|
delFiles: [
|
||||||
|
...basicInfoData.delFileList,
|
||||||
|
...legalPersonData.delFileList,
|
||||||
|
...accountData.delFileList
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('所有表单校验通过,完整数据:', formData)
|
console.log('所有表单校验通过,完整数据:', formData)
|
||||||
|
|
||||||
|
let allFiles = formData.allFiles.map(file => {
|
||||||
|
return file?.response?.fileRes ? {
|
||||||
|
...file.response.fileRes,
|
||||||
|
} : null;
|
||||||
|
}).filter(item => item !== null);
|
||||||
|
formData.files = allFiles;
|
||||||
// 删除不必要的属性
|
// 删除不必要的属性
|
||||||
delete formData.fileList;
|
delete formData.fileList;
|
||||||
delete formData.delFileList;
|
delete formData.delFileList;
|
||||||
let allFiles = formData.allFiles.map(file => {
|
delete formData.allFiles;
|
||||||
return {
|
delete formData.fileList2;
|
||||||
...file.obj,
|
// 保存请求
|
||||||
}
|
const res = await this.saveEnterprise(formData)
|
||||||
});
|
console.log('res:', res);
|
||||||
formData.allFiles = allFiles;
|
if (res.code === 200) {
|
||||||
// 模拟保存请求(这里替换为您的实际保存接口)
|
|
||||||
await this.saveEnterprise(formData)
|
|
||||||
|
|
||||||
this.$message.success('保存成功')
|
this.$message.success('保存成功')
|
||||||
|
|
||||||
// 保存成功后返回列表页
|
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('保存失败:', error)
|
console.error('保存失败:', error)
|
||||||
this.$message.error(error.message || '保存失败,请重试')
|
|
||||||
} finally {
|
} finally {
|
||||||
// 无论成功失败,都关闭动画
|
// 无论成功失败,都关闭动画
|
||||||
this.isSaving = false
|
this.isSaving = false
|
||||||
this.showSaveAnimation = false
|
this.showSaveAnimation = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 模拟保存接口
|
// 保存接口
|
||||||
async saveEnterprise(formData) {
|
async saveEnterprise(formData) {
|
||||||
// 这里替换为您的实际保存接口
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
setTimeout(() => {
|
if (this.type === 'add') { // 新增
|
||||||
// 模拟保存成功
|
addDataAPI(formData).then(res => {
|
||||||
// 如果模拟失败,可以使用 reject(new Error('保存失败'))
|
resolve(res)
|
||||||
resolve({ code: 200, message: '保存成功' })
|
}).catch(error => {
|
||||||
}, 2000) // 模拟2秒的保存时间
|
reject(error)
|
||||||
|
})
|
||||||
|
} else { // 修改
|
||||||
|
formData.enterpriseId = this.enterpriseId;
|
||||||
|
editDataAPI(formData).then(res => {
|
||||||
|
resolve(res)
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 开始上传
|
// 开始上传
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@ export default {
|
||||||
name: 'AccountOpeningCertificate',
|
name: 'AccountOpeningCertificate',
|
||||||
components:{UploadFile},
|
components:{UploadFile},
|
||||||
dicts: ['identification_tag'],
|
dicts: ['identification_tag'],
|
||||||
|
props:{
|
||||||
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
|
|
@ -45,7 +51,7 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileList:[
|
fileList:[
|
||||||
{ required: true, message: '请上传开户许可证', trigger: 'blur' }
|
{ required: true, message: '请上传开户许可证', trigger: 'change' }
|
||||||
],
|
],
|
||||||
openingBank: [
|
openingBank: [
|
||||||
{ required: true, message: '请输入开户银行', trigger: 'blur' }
|
{ required: true, message: '请输入开户银行', trigger: 'blur' }
|
||||||
|
|
@ -114,6 +120,25 @@ export default {
|
||||||
handleDelFile(file) {
|
handleDelFile(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
||||||
|
},
|
||||||
|
setFormData(){
|
||||||
|
const fileList = this.getFileList('account_opening_license');
|
||||||
|
this.form = {
|
||||||
|
fileList: fileList,
|
||||||
|
openingBank: this.detailData.openingBank || '',
|
||||||
|
openingAccount: this.detailData.openingAccount || '',
|
||||||
|
delFileList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -130,8 +155,18 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true // 立即执行一次
|
immediate: true // 立即执行一次
|
||||||
|
},
|
||||||
|
detailData:{
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setFormData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">开户许可证</div>
|
<div class="item-label">开户许可证</div>
|
||||||
<div class="item-value">
|
<div class="item-value">
|
||||||
<el-image :src="url" :preview-src-list="srcList" class="license-image">
|
<el-image :src="form.url" class="license-image">
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
<!-- 开户银行 -->
|
<!-- 开户银行 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">开户银行</div>
|
<div class="item-label">开户银行</div>
|
||||||
<div class="item-value">{{ enterpriseName || '中讯科技股份有限公司' }}</div>
|
<div class="item-value">{{ form.openingBank || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 开户账号 -->
|
<!-- 开户账号 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">开户账号</div>
|
<div class="item-label">开户账号</div>
|
||||||
<div class="item-value">{{ enterpriseCode || '12345678901313132390' }}</div>
|
<div class="item-value">{{ form.openingAccount || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -33,25 +33,55 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/views/common/UploadFile.vue'
|
|
||||||
import basicInfo from '@/assets/enterpriseLibrary/basic-info.png'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountOpeningCertificateDetail',
|
name: 'AccountOpeningCertificateDetail',
|
||||||
components: {
|
props: {
|
||||||
UploadFile
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: '',
|
form:{
|
||||||
enterpriseName: '',
|
openingBank:'',
|
||||||
url: basicInfo,
|
openingAccount:'',
|
||||||
srcList: [basicInfo],
|
url:null,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 校验规则
|
setDetailData() {
|
||||||
|
const fileList = this.getFileList('account_opening_license')
|
||||||
|
this.form = {
|
||||||
|
openingBank: this.detailData.openingBank,
|
||||||
|
openingAccount: this.detailData.openingAccount,
|
||||||
|
url:fileList[0].lsFilePath,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
detailData: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setDetailData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,12 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
UploadFile
|
UploadFile
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
dicts: ['identification_tag'],
|
dicts: ['identification_tag'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -79,7 +85,7 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileList: [
|
fileList: [
|
||||||
{ required: true, message: '请上传营业执照', trigger: 'blur' }
|
{ required: true, message: '请上传营业执照', trigger: 'change' }
|
||||||
],
|
],
|
||||||
enterpriseName: [
|
enterpriseName: [
|
||||||
{ required: true, message: '请输入企业名称', trigger: 'blur' }
|
{ required: true, message: '请输入企业名称', trigger: 'blur' }
|
||||||
|
|
@ -139,6 +145,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 文件变化
|
// 文件变化
|
||||||
handleFileChange(file) {
|
handleFileChange(file) {
|
||||||
|
console.log(file);
|
||||||
|
|
||||||
this.form.fileList = file;
|
this.form.fileList = file;
|
||||||
if (file instanceof Array && file.length > 0 && file[0].response) {
|
if (file instanceof Array && file.length > 0 && file[0].response) {
|
||||||
const response = file[0].response;
|
const response = file[0].response;
|
||||||
|
|
@ -167,8 +175,34 @@ export default {
|
||||||
handleDelFile(file) {
|
handleDelFile(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
||||||
|
},
|
||||||
|
setFormData(){
|
||||||
|
const fileList = this.getFileList('business_license');
|
||||||
|
|
||||||
|
this.form = {
|
||||||
|
enterpriseName: this.detailData.enterpriseName || '',
|
||||||
|
enterpriseCode: this.detailData.enterpriseCode || '',
|
||||||
|
registeredCapital: this.detailData.registeredCapital || '',
|
||||||
|
establishedDate: this.detailData.establishedDate || null,
|
||||||
|
businessTerm: this.detailData.businessTerm || '',
|
||||||
|
residence: this.detailData.residence || '',
|
||||||
|
businessScope: this.detailData.businessScope || '',
|
||||||
|
fileList: fileList,
|
||||||
|
delFileList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
fileUploadRule() {
|
fileUploadRule() {
|
||||||
return this.fileUploadList[0] || {};
|
return this.fileUploadList[0] || {};
|
||||||
|
|
@ -183,6 +217,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true // 立即执行一次
|
immediate: true // 立即执行一次
|
||||||
|
},
|
||||||
|
detailData:{
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setFormData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,75 +10,113 @@
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">营业执照</div>
|
<div class="item-label">营业执照</div>
|
||||||
<div class="item-value">
|
<div class="item-value">
|
||||||
<el-image :src="url" :preview-src-list="srcList" class="license-image">
|
<el-image :src="form.url" class="license-image"></el-image>
|
||||||
</el-image>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 企业名称 -->
|
<!-- 企业名称 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">企业名称</div>
|
<div class="item-label">企业名称</div>
|
||||||
<div class="item-value">{{ enterpriseName || '中讯科技股份有限公司' }}</div>
|
<div class="item-value">{{ form.enterpriseName || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 统一社会信用代码 -->
|
<!-- 统一社会信用代码 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">统一社会信用代码</div>
|
<div class="item-label">统一社会信用代码</div>
|
||||||
<div class="item-value">{{ enterpriseCode || '12345678901313132390' }}</div>
|
<div class="item-value">{{ form.enterpriseCode || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 注册资本 -->
|
<!-- 注册资本 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">注册资本</div>
|
<div class="item-label">注册资本</div>
|
||||||
<div class="item-value">{{ registeredCapital || '11000.00' }}</div>
|
<div class="item-value">{{ form.registeredCapital || '--' }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 成立日期 -->
|
||||||
|
<div class="detail-item">
|
||||||
|
<div class="item-label">成立日期</div>
|
||||||
|
<div class="item-value">{{ form.establishedDate || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 营业期限 -->
|
<!-- 营业期限 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">营业期限</div>
|
<div class="item-label">营业期限</div>
|
||||||
<div class="item-value">{{ businessTerm || '2015/01/01-2035/01/01' }}</div>
|
<div class="item-value">{{ form.businessTerm || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 住所 -->
|
<!-- 住所 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">住所</div>
|
<div class="item-label">住所</div>
|
||||||
<div class="item-value">{{ residence || '安徽省合肥市蜀山区望江西路100号' }}</div>
|
<div class="item-value">{{ form.residence || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 经营范围 -->
|
<!-- 经营范围 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">经营范围</div>
|
<div class="item-label">经营范围</div>
|
||||||
<div class="item-value">{{ businessScope || '软件开发、技术服务、电子商务' }}</div>
|
<div class="item-value">{{ form.businessScope || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="营业执照" :visible.sync="showPhoto" width="60%" append-to-body>
|
|
||||||
<view-photo :images="images" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicInfo from '@/assets/enterpriseLibrary/basic-info.png'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BasicInfoDetail',
|
name: 'BasicInfoDetail',
|
||||||
components: {
|
props: {
|
||||||
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: '',
|
form: {
|
||||||
url: basicInfo,
|
|
||||||
srcList: [basicInfo],
|
|
||||||
enterpriseName: '',
|
enterpriseName: '',
|
||||||
enterpriseCode: '',
|
enterpriseCode: '',
|
||||||
registeredCapital: '',
|
registeredCapital: '',
|
||||||
|
establishedDate:'',
|
||||||
businessTerm: '',
|
businessTerm: '',
|
||||||
residence: '',
|
residence: '',
|
||||||
businessScope: '',
|
businessScope: '',
|
||||||
fileList: [],
|
url:null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setDetailData() {
|
||||||
|
const fileList = this.getFileList('business_license');
|
||||||
|
this.form = {
|
||||||
|
enterpriseName: this.detailData.enterpriseName,
|
||||||
|
enterpriseCode: this.detailData.enterpriseCode,
|
||||||
|
registeredCapital: this.detailData.registeredCapital,
|
||||||
|
establishedDate: this.detailData.establishedDate,
|
||||||
|
businessTerm: this.detailData.businessTerm,
|
||||||
|
residence: this.detailData.residence,
|
||||||
|
businessScope: this.detailData.businessScope,
|
||||||
|
url:fileList[0].lsFilePath
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
detailData: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setDetailData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,12 @@ export default {
|
||||||
name: 'LegalPerson',
|
name: 'LegalPerson',
|
||||||
components: { UploadFile },
|
components: { UploadFile },
|
||||||
dicts: ['identification_tag'],
|
dicts: ['identification_tag'],
|
||||||
|
props:{
|
||||||
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
|
|
@ -63,10 +69,10 @@ export default {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileList: [
|
fileList: [
|
||||||
{ required: true, message: '请上传身份证人像面', trigger: 'blur' }
|
{ required: true, message: '请上传身份证人像面', trigger: 'change' }
|
||||||
],
|
],
|
||||||
fileList2: [
|
fileList2: [
|
||||||
{ required: true, message: '请上传身份证国徽面', trigger: 'blur' }
|
{ required: true, message: '请上传身份证国徽面', trigger: 'change' }
|
||||||
],
|
],
|
||||||
legalPersonName: [
|
legalPersonName: [
|
||||||
{ required: true, message: '请输入法人姓名', trigger: 'blur' }
|
{ required: true, message: '请输入法人姓名', trigger: 'blur' }
|
||||||
|
|
@ -143,6 +149,30 @@ export default {
|
||||||
handleDelFile(file) {
|
handleDelFile(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath);
|
||||||
|
},
|
||||||
|
setFormData(){
|
||||||
|
const fileList = this.getFileList('face_id_card_portrait')
|
||||||
|
const fileList2 = this.getFileList('national_emblem_id_card')
|
||||||
|
this.form = {
|
||||||
|
legalPersonName: this.detailData.legalPersonName || '',
|
||||||
|
legalPersonIdCard: this.detailData.legalPersonIdCard || '',
|
||||||
|
idCardStartDate: this.detailData.idCardStartDate || '',
|
||||||
|
legalPersonPosition: this.detailData.legalPersonPosition || '',
|
||||||
|
legalPersonPhone: this.detailData.legalPersonPhone || '',
|
||||||
|
fileList: fileList,
|
||||||
|
fileList2: fileList2,
|
||||||
|
delFileList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -162,6 +192,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true // 立即执行一次
|
immediate: true // 立即执行一次
|
||||||
|
},
|
||||||
|
detailData:{
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setFormData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">身份证人像面</div>
|
<div class="item-label">身份证人像面</div>
|
||||||
<div class="item-value">
|
<div class="item-value">
|
||||||
<el-image :src="url" :preview-src-list="srcList" class="license-image">
|
<el-image :src="form.url" class="license-image">
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -18,38 +18,38 @@
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">身份证国徽面</div>
|
<div class="item-label">身份证国徽面</div>
|
||||||
<div class="item-value">
|
<div class="item-value">
|
||||||
<el-image :src="url" :preview-src-list="srcList" class="license-image">
|
<el-image :src="form.url2" class="license-image">
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 法人姓名 -->
|
<!-- 法人姓名 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">法人姓名</div>
|
<div class="item-label">法人姓名</div>
|
||||||
<div class="item-value">{{ enterpriseName || '中讯科技股份有限公司' }}</div>
|
<div class="item-value">{{ form.legalPersonName || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 法人身份证号 -->
|
<!-- 法人身份证号 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">法人身份证号</div>
|
<div class="item-label">法人身份证号</div>
|
||||||
<div class="item-value">{{ enterpriseCode || '12345678901313132390' }}</div>
|
<div class="item-value">{{ form.legalPersonIdCard || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 身份证有效期 -->
|
<!-- 身份证有效期 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">身份证有效期</div>
|
<div class="item-label">身份证有效期</div>
|
||||||
<div class="item-value">{{ registeredCapital || '11000.00' }}</div>
|
<div class="item-value">{{ form.idCardStartDate || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 法人职务 -->
|
<!-- 法人职务 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">法人职务</div>
|
<div class="item-label">法人职务</div>
|
||||||
<div class="item-value">{{ businessTerm || '2015/01/01-2035/01/01' }}</div>
|
<div class="item-value">{{ form.legalPersonPosition || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 法人联系方式 -->
|
<!-- 法人联系方式 -->
|
||||||
<div class="detail-item">
|
<div class="detail-item">
|
||||||
<div class="item-label">法人联系方式</div>
|
<div class="item-label">法人联系方式</div>
|
||||||
<div class="item-value">{{ residence || '安徽省合肥市蜀山区望江西路100号' }}</div>
|
<div class="item-value">{{ form.legalPersonPhone || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,29 +57,62 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/views/common/UploadFile.vue'
|
|
||||||
import basicInfo from '@/assets/enterpriseLibrary/basic-info.png'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LegalPersonDetail',
|
name: 'LegalPersonDetail',
|
||||||
components: {
|
props: {
|
||||||
UploadFile
|
detailData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: '',
|
form:{
|
||||||
enterpriseName: '',
|
legalPersonName:'',
|
||||||
enterpriseCode: '',
|
legalPersonIdCard:'',
|
||||||
registeredCapital: '',
|
idCardStartDate:'',
|
||||||
businessTerm: '',
|
legalPersonPosition:'',
|
||||||
residence: '',
|
legalPersonPhone:'',
|
||||||
businessScope: '',
|
url:null,
|
||||||
fileList: [],
|
url2:null,
|
||||||
url: basicInfo,
|
}
|
||||||
srcList: [basicInfo],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setDetailData() {
|
||||||
|
const fileList = this.getFileList('face_id_card_portrait')
|
||||||
|
const fileList2 = this.getFileList('national_emblem_id_card')
|
||||||
|
this.form = {
|
||||||
|
legalPersonName: this.detailData.legalPersonName,
|
||||||
|
legalPersonIdCard: this.detailData.legalPersonIdCard,
|
||||||
|
idCardStartDate: this.detailData.idCardStartDate,
|
||||||
|
legalPersonPosition: this.detailData.legalPersonPosition,
|
||||||
|
legalPersonPhone: this.detailData.legalPersonPhone,
|
||||||
|
url:fileList[0].lsFilePath,
|
||||||
|
url2:fileList2[0].lsFilePath,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getFileList(businessType){
|
||||||
|
return this.detailData.fileList.filter(item => item.businessType === businessType).map(item => {
|
||||||
|
return {
|
||||||
|
name: item.fileName,
|
||||||
|
filePath: item.filePath,
|
||||||
|
lsFilePath:item.lsFilePath,
|
||||||
|
fileType:item.fileType
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
detailData: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (Object.keys(newVal).length > 0) {
|
||||||
|
this.setDetailData();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true, // 立即执行一次
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -34,66 +34,59 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 企业信息卡片 -->
|
<!-- 企业信息卡片 -->
|
||||||
<div class="enterprise-card" v-for="(enterprise, index) in enterpriseList" :key="index">
|
<div class="enterprise-card" v-for="item in enterpriseList" :key="item.enterpriseId">
|
||||||
<div class="enterprise-header">
|
<div class="enterprise-header">
|
||||||
<h3 class="enterprise-name">{{ enterprise.name }}</h3>
|
<h3 class="enterprise-name">{{ item.enterpriseName }}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="enterprise-info">
|
<div class="enterprise-info">
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="label">法定代表人:</span>
|
<span class="label">法定代表人:</span>
|
||||||
<span class="value">{{ enterprise.legalRepresentative }}</span>
|
<span class="value">{{ item.legalPersonName }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="label">统一信用代码:</span>
|
<span class="label">统一信用代码:</span>
|
||||||
<span class="value">{{ enterprise.creditCode }}</span>
|
<span class="value">{{ item.enterpriseCode }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 过期文档标签 -->
|
<!-- 过期文档标签 -->
|
||||||
<div class="expired-tags" v-if="enterprise.expiredDocs && enterprise.expiredDocs.length > 0">
|
<div class="expired-tags" v-if="item.errorInfos && item.errorInfos.length > 0">
|
||||||
<span class="expired-tag" v-for="doc in enterprise.expiredDocs" :key="doc">{{ doc }}</span>
|
<span class="expired-tag" v-for="doc in item.errorInfos" :key="doc">{{ doc }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 数据统计 -->
|
<!-- 数据统计 -->
|
||||||
<div class="data-stats">
|
<div class="data-stats">
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<span class="stat-label">资质库</span>
|
<span class="stat-label">资质库</span>
|
||||||
<span class="stat-value">10</span>
|
<span class="stat-value">{{ item.qualificationNum }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<span class="stat-label">业绩库</span>
|
<span class="stat-label">业绩库</span>
|
||||||
<span class="stat-value">23</span>
|
<span class="stat-value">{{ item.performanceNum }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<span class="stat-label">人员库</span>
|
<span class="stat-label">人员库</span>
|
||||||
<span class="stat-value">55</span>
|
<span class="stat-value">{{ item.personnelNum }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<span class="stat-label">财务库</span>
|
<span class="stat-label">财务库</span>
|
||||||
<span class="stat-value">88</span>
|
<span class="stat-value">{{ item.financeNum }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="stat-item">
|
|
||||||
<span class="stat-label">技术方案库</span>
|
|
||||||
<span class="stat-value">88</span>
|
|
||||||
</div>
|
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">工器具库</span>
|
|
||||||
<span class="stat-value">88</span>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<div class="enterprise-actions">
|
<div class="enterprise-actions">
|
||||||
<div @click="handleEnterpriseKnowledge(enterprise)">
|
<div @click="handleEnterpriseKnowledge(item)">
|
||||||
<img :src="EnterpriseKnowledge" alt="企业知识库" />
|
<img :src="EnterpriseKnowledge" alt="企业知识库" />
|
||||||
<span>企业知识库</span>
|
<span>企业知识库</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-hasPermi="['enterpriseLibrary:enterprise:detail']" @click="handleDetail(enterprise)">
|
<div v-hasPermi="['enterpriseLibrary:enterprise:detail']" @click="handleDetail(item)">
|
||||||
<img :src="EnterpriseDetail" alt="详情" />
|
<img :src="EnterpriseDetail" alt="详情" />
|
||||||
<span>详情</span>
|
<span>详情</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-hasPermi="['enterpriseLibrary:enterprise:edit']">
|
<div v-hasPermi="['enterpriseLibrary:enterprise:edit']" @click="handleEdit(item)">
|
||||||
<img :src="EnterpriseEdit" alt="编辑" />
|
<img :src="EnterpriseEdit" alt="编辑" />
|
||||||
<span>编辑</span>
|
<span>编辑</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -121,6 +114,7 @@ import EnterpriseDetail from '@/assets/enterpriseLibrary/enterprise/enterprise-d
|
||||||
import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png';
|
import EnterpriseEdit from '@/assets/enterpriseLibrary/enterprise/enterprise-edit.png';
|
||||||
import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png';
|
import EnterpriseDelete from '@/assets/enterpriseLibrary/enterprise/enterprise-delete.png';
|
||||||
import { encryptWithSM4 } from '@/utils/sm'
|
import { encryptWithSM4 } from '@/utils/sm'
|
||||||
|
import { listAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
|
||||||
export default {
|
export default {
|
||||||
name: 'Enterprise',
|
name: 'Enterprise',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -139,86 +133,8 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
||||||
},
|
},
|
||||||
total: 1000,
|
total: 0,
|
||||||
enterpriseList: [
|
enterpriseList: []
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: ['【身份证】已过期', '【营业执照】已过期']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中电鸿信信息科技有限公司',
|
|
||||||
legalRepresentative: '沈宇',
|
|
||||||
creditCode: '91320000668382125',
|
|
||||||
rating: 'D',
|
|
||||||
expiredDocs: []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -229,8 +145,12 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 获取企业列表
|
// 获取企业列表
|
||||||
getList() {
|
getList() {
|
||||||
// 这里可以调用API获取数据
|
listAPI(this.queryParams).then(res => {
|
||||||
console.log('获取企业列表')
|
if(res.code === 200){
|
||||||
|
this.enterpriseList = res.rows;
|
||||||
|
this.total = res.total;
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询
|
// 查询
|
||||||
|
|
@ -251,7 +171,27 @@ export default {
|
||||||
name: 'EnterpriseForm',
|
name: 'EnterpriseForm',
|
||||||
query: {
|
query: {
|
||||||
type: encryptWithSM4('add'),
|
type: encryptWithSM4('add'),
|
||||||
id: encryptWithSM4(''),
|
enterpriseId: encryptWithSM4(''),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 编辑企业
|
||||||
|
handleEdit(item){
|
||||||
|
this.$router.push({
|
||||||
|
name: 'EnterpriseForm',
|
||||||
|
query: {
|
||||||
|
type: encryptWithSM4('edit'),
|
||||||
|
enterpriseId: encryptWithSM4(item.enterpriseId + '' || '0'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 详情
|
||||||
|
handleDetail(enterprise){
|
||||||
|
this.$router.push({
|
||||||
|
name: 'EnterpriseDetail',
|
||||||
|
query: {
|
||||||
|
type: encryptWithSM4('detail'),
|
||||||
|
enterpriseId: encryptWithSM4(enterprise.enterpriseId + '' || '0'),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -266,16 +206,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 详情
|
|
||||||
handleDetail(enterprise){
|
|
||||||
this.$router.push({
|
|
||||||
name: 'EnterpriseDetail',
|
|
||||||
query: {
|
|
||||||
type: encryptWithSM4('detail'),
|
|
||||||
id: encryptWithSM4(enterprise.id ?? '0'),
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 分页大小改变
|
// 分页大小改变
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue