index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. <template>
  2. <div class="company-info-container">
  3. <!-- 顶部企业头部信息 + Tab导航 -->
  4. <div class="company-header-card">
  5. <div class="company-header">
  6. <div class="header-left">
  7. <div class="company-logo">
  8. <el-icon :size="40" color="#e60012"><OfficeBuilding /></el-icon>
  9. </div>
  10. <div class="company-basic">
  11. <div class="company-name">
  12. <span class="name">{{ companyData.companyName }}</span>
  13. <el-tag type="danger" size="small">{{ companyData.customerType }}</el-tag>
  14. </div>
  15. <div class="company-code">企业编码: {{ companyData.companyCode }}</div>
  16. </div>
  17. </div>
  18. <div class="header-right">
  19. <div class="amount-item">
  20. <div class="amount-value">¥{{ companyData.availableAmount }}</div>
  21. <div class="amount-label">可用额度</div>
  22. </div>
  23. <div class="amount-item">
  24. <div class="amount-value highlight">¥{{ companyData.creditAmount }}</div>
  25. <div class="amount-label">授信额度</div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="tab-nav">
  30. <div v-for="tab in tabs" :key="tab.key" :class="['tab-item', { active: activeTab === tab.key }]"
  31. @click="handleTabClick(tab.key)">
  32. <el-icon><Grid /></el-icon>
  33. <span>{{ tab.label }}</span>
  34. <el-icon><ArrowRight /></el-icon>
  35. </div>
  36. </div>
  37. </div>
  38. <!-- 主内容区域 -->
  39. <div class="main-content">
  40. <!-- 左侧:企业信息 -->
  41. <div class="info-card">
  42. <div class="card-header">
  43. <span class="title"><i class="title-bar"></i>企业信息</span>
  44. <el-button type="primary" link @click="handleUpdateInfo">
  45. <el-icon><Edit /></el-icon>更新企业信息
  46. </el-button>
  47. </div>
  48. <div class="info-table">
  49. <div class="info-row">
  50. <div class="info-label">企业名称</div>
  51. <div class="info-value">{{ companyData.companyName }}</div>
  52. </div>
  53. <div class="info-row">
  54. <div class="info-label">统一社会信用代码</div>
  55. <div class="info-value">{{ companyData.creditCode }}</div>
  56. </div>
  57. <div class="info-row">
  58. <div class="info-label">所属行业</div>
  59. <div class="info-value">{{ companyData.industry || '-' }}</div>
  60. </div>
  61. <div class="info-row">
  62. <div class="info-label">企业规模</div>
  63. <div class="info-value">{{ companyData.scale }}</div>
  64. </div>
  65. <div class="info-row">
  66. <div class="info-label">办公电话</div>
  67. <div class="info-value">{{ companyData.phone }}</div>
  68. </div>
  69. <div class="info-row">
  70. <div class="info-label">企业邮箱</div>
  71. <div class="info-value">{{ companyData.email }}</div>
  72. </div>
  73. <div class="info-row">
  74. <div class="info-label">企业地址</div>
  75. <div class="info-value">{{ companyData.address }}</div>
  76. </div>
  77. </div>
  78. </div>
  79. <!-- 右侧:专属平台采购公告 -->
  80. <div class="notice-card">
  81. <div class="card-header">
  82. <span class="title"><i class="title-bar"></i>专属平台采购公告</span>
  83. <el-button type="primary" link>更多</el-button>
  84. </div>
  85. <div class="notice-list">
  86. <div v-for="(item, index) in noticeList" :key="index" class="notice-item">
  87. <el-icon color="#e60012"><Bell /></el-icon>
  88. <div class="notice-content">
  89. <div class="notice-title">{{ item.title }}</div>
  90. <div class="notice-desc">{{ item.description }}</div>
  91. </div>
  92. <div class="notice-date">{{ item.date }}</div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <!-- 专属服务人员 -->
  98. <div class="service-section">
  99. <div class="section-title"><i class="title-bar"></i>专属服务人员</div>
  100. <div class="service-list">
  101. <div v-for="(person, index) in servicePersons" :key="index" class="service-card">
  102. <el-avatar :size="50" :src="person.avatar">
  103. <el-icon :size="30"><User /></el-icon>
  104. </el-avatar>
  105. <div class="person-info">
  106. <div class="person-name">
  107. {{ person.name }}
  108. <el-tag :type="person.type === '专属采购顾问' ? 'danger' : 'primary'" size="small">{{ person.type }}</el-tag>
  109. </div>
  110. <div class="person-contact">{{ person.department }} {{ person.phone }}</div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <!-- 企业特权 -->
  116. <div class="privilege-section">
  117. <div class="section-title"><i class="title-bar"></i>企业特权</div>
  118. <div class="privilege-grid">
  119. <div v-for="(item, index) in privileges" :key="index" class="privilege-card">
  120. <el-icon :size="24" color="#e60012"><Ticket /></el-icon>
  121. <div class="privilege-name">{{ item.name }}</div>
  122. <div class="privilege-desc">{{ item.description }}</div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </template>
  128. <script setup lang="ts">
  129. import { ref, reactive } from 'vue'
  130. import { useRouter } from 'vue-router'
  131. import { OfficeBuilding, Grid, ArrowRight, Edit, Bell, User, Ticket } from '@element-plus/icons-vue'
  132. const router = useRouter()
  133. const activeTab = ref('companyInfo')
  134. const tabs = [
  135. { key: 'companyInfo', label: '企业信息' },
  136. { key: 'purchaseHabit', label: '采购习惯' },
  137. { key: 'security', label: '安全设置' },
  138. { key: 'invoice', label: '开票信息' },
  139. { key: 'creditApply', label: '额度申请' },
  140. { key: 'changePerson', label: '更换负责人' }
  141. ]
  142. const companyData = reactive({
  143. companyName: '中国南方电网有限责任公司',
  144. companyCode: '123456789',
  145. customerType: '品牌客户',
  146. availableAmount: '0.00',
  147. creditAmount: '29000.88',
  148. creditCode: '内容内容',
  149. industry: '-',
  150. scale: '5000人以上',
  151. phone: '020-22222222',
  152. email: '2222222@163.com',
  153. address: '内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容'
  154. })
  155. const noticeList = ref([
  156. { title: '主标题主标题', description: '副标题副标题副标题副标题副标题副标题副标题', date: '08.27' },
  157. { title: '主标题主标题主标题主标题', description: '副标题副标题副标题副标题副标题副标题', date: '08.27' },
  158. { title: '主标题主标题主标题主标题主标题主标...', description: '副标题副标题副标题', date: '08.27' },
  159. { title: '主标题主标题主标题主标题主标题主标题', description: '副标题副标题副标题副标题副标题', date: '08.27' }
  160. ])
  161. const servicePersons = ref([
  162. { name: '刘洋', type: '专属采购顾问', department: '品牌中心', phone: '15783782783', avatar: '' },
  163. { name: '刘洋', type: '客服人员', department: '027-5233893', phone: '15783782783', avatar: '' }
  164. ])
  165. const privileges = ref([
  166. { name: '满免运费', description: '会员购买商品订单总金额达到标准后可免运费。' },
  167. { name: '协议供货', description: '会员购买商品订单总金额达到标准后可免运费。' },
  168. { name: '账期采购', description: '会员购买商品订单总金额达到标准后可免运费。' },
  169. { name: '专属方案', description: '会员购买商品订单总金额达到标准后可免运费。' },
  170. { name: '专属采购顾问', description: '会员购买商品订单总金额达到标准后可免运费。' },
  171. { name: '维保服务', description: '会员购买商品订单总金额达到标准后可免运费。' },
  172. { name: '专属库存', description: '会员购买商品订单总金额达到标准后可免运费。' }
  173. ])
  174. const handleUpdateInfo = () => { router.push('/enterprise/companyInfo/edit') }
  175. const handleTabClick = (tabKey: string) => {
  176. activeTab.value = tabKey
  177. if (tabKey === 'security') router.push('/enterprise/securitySetting')
  178. else if (tabKey === 'purchaseHabit') router.push('/enterprise/purchaseHabit')
  179. else if (tabKey === 'invoice') router.push('/enterprise/invoiceManage')
  180. else if (tabKey === 'creditApply') router.push('/cost/quotaControl/apply')
  181. }
  182. </script>
  183. <style scoped lang="scss">
  184. .company-info-container {
  185. padding: 0;
  186. background: #f5f5f5;
  187. min-height: 100%;
  188. }
  189. .company-header-card {
  190. background: #fff;
  191. border-radius: 8px;
  192. margin-bottom: 16px;
  193. }
  194. .company-header {
  195. display: flex;
  196. justify-content: space-between;
  197. align-items: center;
  198. padding: 24px;
  199. .header-left {
  200. display: flex;
  201. align-items: center;
  202. gap: 16px;
  203. .company-logo {
  204. width: 70px;
  205. height: 70px;
  206. border-radius: 50%;
  207. background: #fff5f5;
  208. display: flex;
  209. align-items: center;
  210. justify-content: center;
  211. flex-shrink: 0;
  212. }
  213. .company-basic {
  214. .company-name {
  215. display: flex;
  216. align-items: center;
  217. gap: 12px;
  218. margin-bottom: 8px;
  219. .name {
  220. font-size: 20px;
  221. font-weight: bold;
  222. color: #333;
  223. }
  224. }
  225. .company-code {
  226. color: #999;
  227. font-size: 14px;
  228. }
  229. }
  230. }
  231. .header-right {
  232. display: flex;
  233. gap: 60px;
  234. .amount-item {
  235. text-align: center;
  236. .amount-value {
  237. font-size: 24px;
  238. font-weight: bold;
  239. color: #333;
  240. &.highlight {
  241. color: #e60012;
  242. }
  243. }
  244. .amount-label {
  245. font-size: 13px;
  246. color: #999;
  247. margin-top: 6px;
  248. }
  249. }
  250. }
  251. }
  252. .tab-nav {
  253. display: flex;
  254. padding: 0 24px 16px;
  255. gap: 8px;
  256. flex-wrap: wrap;
  257. .tab-item {
  258. display: flex;
  259. align-items: center;
  260. gap: 6px;
  261. padding: 12px 20px;
  262. cursor: pointer;
  263. color: #666;
  264. font-size: 14px;
  265. border-bottom: 2px solid transparent;
  266. transition: all 0.2s;
  267. &:hover, &.active {
  268. color: #e60012;
  269. }
  270. &.active {
  271. border-bottom-color: #e60012;
  272. }
  273. }
  274. }
  275. .main-content {
  276. display: flex;
  277. gap: 16px;
  278. margin-bottom: 16px;
  279. }
  280. .info-card {
  281. flex: 1;
  282. background: #fff;
  283. border-radius: 8px;
  284. padding: 24px;
  285. min-width: 0;
  286. }
  287. .notice-card {
  288. width: 380px;
  289. flex-shrink: 0;
  290. background: #fff;
  291. border-radius: 8px;
  292. padding: 24px;
  293. }
  294. .card-header {
  295. display: flex;
  296. justify-content: space-between;
  297. align-items: center;
  298. margin-bottom: 20px;
  299. .title {
  300. font-size: 16px;
  301. font-weight: bold;
  302. display: flex;
  303. align-items: center;
  304. gap: 8px;
  305. }
  306. }
  307. .title-bar {
  308. display: inline-block;
  309. width: 3px;
  310. height: 16px;
  311. background: #e60012;
  312. border-radius: 2px;
  313. }
  314. .info-table {
  315. .info-row {
  316. display: flex;
  317. border-bottom: 1px solid #f0f0f0;
  318. padding: 14px 0;
  319. &:last-child {
  320. border-bottom: none;
  321. }
  322. .info-label {
  323. width: 140px;
  324. color: #999;
  325. flex-shrink: 0;
  326. font-size: 14px;
  327. }
  328. .info-value {
  329. flex: 1;
  330. color: #333;
  331. font-size: 14px;
  332. word-break: break-all;
  333. }
  334. }
  335. }
  336. .notice-list {
  337. .notice-item {
  338. display: flex;
  339. align-items: flex-start;
  340. gap: 12px;
  341. padding: 14px 0;
  342. border-bottom: 1px solid #f0f0f0;
  343. &:last-child {
  344. border-bottom: none;
  345. }
  346. .notice-content {
  347. flex: 1;
  348. min-width: 0;
  349. .notice-title {
  350. font-size: 14px;
  351. color: #333;
  352. margin-bottom: 6px;
  353. overflow: hidden;
  354. text-overflow: ellipsis;
  355. white-space: nowrap;
  356. }
  357. .notice-desc {
  358. font-size: 12px;
  359. color: #999;
  360. overflow: hidden;
  361. text-overflow: ellipsis;
  362. white-space: nowrap;
  363. }
  364. }
  365. .notice-date {
  366. color: #999;
  367. font-size: 12px;
  368. flex-shrink: 0;
  369. }
  370. }
  371. }
  372. .service-section, .privilege-section {
  373. background: #fff;
  374. border-radius: 8px;
  375. padding: 24px;
  376. margin-bottom: 16px;
  377. .section-title {
  378. font-size: 16px;
  379. font-weight: bold;
  380. margin-bottom: 20px;
  381. display: flex;
  382. align-items: center;
  383. gap: 8px;
  384. }
  385. }
  386. .service-list {
  387. display: flex;
  388. gap: 24px;
  389. flex-wrap: wrap;
  390. .service-card {
  391. display: flex;
  392. align-items: center;
  393. gap: 16px;
  394. padding: 20px 24px;
  395. background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  396. border-radius: 8px;
  397. min-width: 300px;
  398. .person-info {
  399. .person-name {
  400. display: flex;
  401. align-items: center;
  402. gap: 10px;
  403. font-size: 15px;
  404. font-weight: 500;
  405. margin-bottom: 8px;
  406. }
  407. .person-contact {
  408. font-size: 13px;
  409. color: #666;
  410. }
  411. }
  412. }
  413. }
  414. .privilege-grid {
  415. display: grid;
  416. grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  417. gap: 16px;
  418. .privilege-card {
  419. padding: 20px;
  420. background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  421. border-radius: 8px;
  422. .privilege-name {
  423. font-size: 15px;
  424. font-weight: 500;
  425. margin: 12px 0 10px;
  426. }
  427. .privilege-desc {
  428. font-size: 13px;
  429. color: #999;
  430. line-height: 1.6;
  431. }
  432. }
  433. }
  434. </style>