企业库

This commit is contained in:
cwchen 2025-10-23 17:04:04 +08:00
parent 2328ab1158
commit 244a9d2c8b
12 changed files with 511 additions and 270 deletions

View File

@ -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
})
}

View File

@ -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,

View File

@ -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>

View File

@ -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 || '请完善表单信息')
}
}
} }
} }

View File

@ -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) {
// this.$message.success('保存成功')
await this.saveEnterprise(formData) this.handleClose()
}
this.$message.success('保存成功')
//
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)
})
}
}) })
}, },
// //

View File

@ -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>

View File

@ -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>

View File

@ -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,7 +175,33 @@ 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() {
@ -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
} }
}, },
} }

View File

@ -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, enterpriseName: '',
srcList: [basicInfo], enterpriseCode: '',
enterpriseName: '', registeredCapital: '',
enterpriseCode: '', establishedDate:'',
registeredCapital: '', businessTerm: '',
businessTerm: '', residence: '',
residence: '', businessScope: '',
businessScope: '', url:null
fileList: [], }
} }
}, },
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>

View File

@ -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
} }
}, },
} }

View File

@ -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>

View File

@ -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) {