smart-bid-web/src/views/enterpriseLibrary/enterprise/components/EnterpriseDetail.vue

172 lines
4.5 KiB
Vue
Raw Normal View History

2025-10-20 18:29:12 +08:00
<!-- 企业主体库表单 -->
<template>
<div class="app-container">
<div class="content-header">
<el-button class="reset-btn" @click="handleClose()">返回</el-button>
2025-11-03 14:27:21 +08:00
<el-button class="edit-btn" @click="handleEdit()">编辑</el-button>
2025-10-20 18:29:12 +08:00
</div>
<div class="content-body">
<el-row :gutter="24" class="content-row">
<!-- 基本信息 -->
<el-col :span="6" class="pane-left">
2025-11-03 14:27:21 +08:00
<BasicInfoDetail ref="basicInfoDetail" :detailData="detailData" />
2025-10-20 18:29:12 +08:00
</el-col>
2025-11-14 14:20:53 +08:00
</el-row>
<el-row :gutter="24" class="content-row">
2025-10-20 18:29:12 +08:00
<!-- 法人信息 -->
<el-col :span="6" class="pane-center">
2025-11-03 14:27:21 +08:00
<LegalPersonDetail ref="legalPersonDetail" :detailData="detailData" />
2025-10-20 18:29:12 +08:00
</el-col>
2025-11-14 14:20:53 +08:00
</el-row>
<el-row :gutter="24" class="content-row">
2025-10-20 18:29:12 +08:00
<!-- 开户证明 -->
<el-col :span="6" class="pane-right">
2025-11-03 14:27:21 +08:00
<AccountOpeningCertificateDetail ref="accountOpeningCertificateDetail" :detailData="detailData" />
2025-10-20 18:29:12 +08:00
</el-col>
</el-row>
</div>
</div>
</template>
<script>
2025-11-03 14:27:21 +08:00
import { encryptWithSM4, decryptWithSM4 } from '@/utils/sm'
2025-10-20 18:29:12 +08:00
import BasicInfoDetail from './child/BasicInfoDetail.vue'
import LegalPersonDetail from './child/LegalPersonDetail.vue'
import AccountOpeningCertificateDetail from './child/AccountOpeningCertificateDetail.vue'
2025-10-23 17:04:04 +08:00
import { getDetailDataAPI } from '@/api/enterpriseLibrary/enterprise/enterprise'
2025-10-20 18:29:12 +08:00
export default {
name: 'EnterpriseDetail',
components: {
BasicInfoDetail,
LegalPersonDetail,
AccountOpeningCertificateDetail
},
data() {
return {
2025-10-23 17:04:04 +08:00
enterpriseId: decryptWithSM4(this.$route.query.enterpriseId),
2025-10-20 18:29:12 +08:00
type: decryptWithSM4(this.$route.query.type),
2025-10-23 17:04:04 +08:00
detailData: {} // 详情数据
2025-10-20 18:29:12 +08:00
}
},
2025-10-23 17:04:04 +08:00
created() {
this.getDetail()
},
2025-10-20 18:29:12 +08:00
methods: {
// 返回
handleClose() {
const obj = { path: "/enterpriseLibrary/enterprise" }
this.$tab.closeOpenPage(obj)
},
2025-10-23 17:04:04 +08:00
// 获取详情
async getDetail() {
const res = await getDetailDataAPI({ enterpriseId: this.enterpriseId })
this.detailData = res.data;
},
2025-11-03 14:27:21 +08:00
// 编辑
handleEdit() {
this.$router.push({
name: 'EnterpriseEditForm',
query: {
type: encryptWithSM4('edit'),
enterpriseId: encryptWithSM4(this.detailData.enterpriseId + '' || '0'),
}
})
}
2025-10-20 18:29:12 +08:00
}
}
</script>
<style scoped lang="scss">
.app-container {
2025-11-14 14:20:53 +08:00
height: calc(100vh - 84px);
width: 100%;
2025-10-20 18:29:12 +08:00
padding: 24px;
2025-11-14 14:20:53 +08:00
box-sizing: border-box;
2025-11-05 14:21:39 +08:00
background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
2025-11-14 14:20:53 +08:00
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
margin: 0;
2025-10-20 18:29:12 +08:00
}
.content-body {
2025-11-14 14:20:53 +08:00
flex: 1;
overflow-y: auto;
overflow-x: hidden;
2025-10-20 18:29:12 +08:00
margin-top: 20px;
2025-11-14 14:20:53 +08:00
min-height: 0; // 确保 flex 子元素可以正确收缩
2025-10-20 18:29:12 +08:00
}
.content-row {
margin: 0;
display: flex;
flex-wrap: nowrap;
gap: 16px;
}
.pane-left,
.pane-center,
.pane-right {
background: #fff;
border-radius: 16px 16px 16px 16px;
2025-11-14 14:20:53 +08:00
min-height: 300px;
2025-10-20 18:29:12 +08:00
box-shadow: 0px 4px 20px 0px rgba(31, 35, 55, 0.1);
// border: 1px solid #e8f4ff;
padding: 0;
2025-11-14 14:20:53 +08:00
margin-bottom: 10px;
2025-10-20 18:29:12 +08:00
flex: 1;
min-width: 0;
}
.content-header {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 12px;
2025-11-14 14:20:53 +08:00
flex-shrink: 0;
2025-10-20 18:29:12 +08:00
}
2025-11-03 14:27:21 +08:00
.edit-btn {
width: 98px;
height: 36px;
background: #EAA819;
2025-11-14 14:20:53 +08:00
box-shadow: 0px 4px 8px 0px rgba(255, 156, 51, 0.5);
2025-11-03 14:27:21 +08:00
border-radius: 4px 4px 4px 4px;
border-color: #EAA819;
2025-10-20 18:29:12 +08:00
color: #fff;
font-weight: 600;
letter-spacing: 0.5px;
font-size: 14px;
transition: all 0.3s ease;
&:hover {
2025-11-03 14:27:21 +08:00
background: #ffb733;
border-color: #ffb733;
2025-11-14 14:20:53 +08:00
box-shadow: 0px 6px 12px 0px rgba(255, 156, 51, 0.6);
2025-10-20 18:29:12 +08:00
transform: translateY(-1px);
}
}
.reset-btn {
2025-10-23 18:39:01 +08:00
width: 98px;
height: 36px;
background: #FFFFFF;
box-shadow: 0px 4px 8px 0px rgba(76, 76, 76, 0.2);
border-radius: 4px;
border: none;
2025-10-20 18:29:12 +08:00
color: #606266;
font-weight: 600;
font-size: 14px;
transition: all 0.3s ease;
&:hover {
background: #f5f7fa;
color: #409EFF;
2025-10-23 18:39:01 +08:00
box-shadow: 0px 6px 12px 0px rgba(76, 76, 76, 0.3);
2025-10-20 18:29:12 +08:00
}
}
</style>