yuan
2 天以前 eca77cbce809165ea09fed36b12152c3acaa3db0
feat: 添加进销存数据分析路由跳转
已添加1个文件
已修改10个文件
146 ■■■■■ 文件已修改
src/views/reportAnalysis/PSIDataAnalysis/components/PanelHeader.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/center-center.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/PanelHeader.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/PanelHeader.vue
@@ -1,17 +1,35 @@
<template>
  <div class="panel-header">
  <div
    class="panel-header"
    :class="{ clickable: !!to }"
    @click="handleClick"
  >
    <span class="panel-title">{{ title }}</span>
  </div>
</template>
<script setup>
defineProps({
import { useRouter } from 'vue-router'
const props = defineProps({
  title: {
    type: String,
    required: true,
    default: ''
  },
  to: {
    type: String,
    default: ''
  }
})
const router = useRouter()
const handleClick = () => {
  if (props.to) {
    router.push(props.to)
  }
}
</script>
<style scoped>
@@ -30,4 +48,12 @@
  padding-left: 46px;
  line-height: 36px;
}
.panel-header.clickable {
  cursor: pointer;
}
.panel-header.clickable:hover .panel-title {
  color: #43e8fc;
}
</style>
src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <PanelHeader title="出入库趋势" />
    <PanelHeader title="出入库趋势" to="/inventoryManagement/receiptManagement" />
    <div class="main-panel panel-item-customers">
      <div class="filters-row">
src/views/reportAnalysis/PSIDataAnalysis/components/center-center.vue
@@ -2,7 +2,7 @@
  <div>
    <!-- è®¾å¤‡ç»Ÿè®¡ -->
    <div class="equipment-stats">
      <div class="equipment-header">
      <div class="equipment-header clickable" @click="handleNavigate">
        <img
          src="@/assets/BI/shujutongjiicon@2x.png"
          alt="图标"
@@ -28,8 +28,19 @@
<script setup>
import { ref, onMounted, inject, watch } from 'vue'
import { useRouter } from 'vue-router'
import Echarts from '@/components/Echarts/echarts.vue'
import { productTurnoverDays } from '@/api/viewIndex.js'
import { getPsiRoute } from '../psiNavigation.js'
const router = useRouter()
const handleNavigate = () => {
  const path = getPsiRoute('产品周转天数')
  if (path) {
    router.push(path)
  }
}
const chartStyle = { width: '100%', height: '100%' }
const grid = { left: '3%', right: '4%', bottom: '3%', top: '4%', containLabel: true }
@@ -119,6 +130,14 @@
  padding-bottom: 2px;
}
.equipment-header.clickable {
  cursor: pointer;
}
.equipment-header.clickable:hover .equipment-title {
  opacity: 0.85;
}
.equipment-title {
  font-weight: 500;
  font-size: 18px;
src/views/reportAnalysis/PSIDataAnalysis/components/center-top.vue
@@ -6,6 +6,8 @@
        v-for="item in statItems"
        :key="item.name"
        class="stat-card"
        :class="{ clickable: !!getStatRoute(item.name) }"
        @click="handleStatClick(item.name)"
      >
        <img src="@/assets/BI/icon@2x.png" alt="图标" class="card-icon" />
        <div class="card-content">
@@ -25,9 +27,21 @@
<script setup>
import { ref, onMounted, inject, watch } from 'vue'
import { useRouter } from 'vue-router'
import { salesPurchaseStorageProductCount } from '@/api/viewIndex.js'
import { getPsiRoute } from '../psiNavigation.js'
const router = useRouter()
const statItems = ref([])
const getStatRoute = (name) => getPsiRoute(name)
const handleStatClick = (name) => {
  const path = getStatRoute(name)
  if (path) {
    router.push(path)
  }
}
const formatPercent = (val) => {
  const num = Number(val) || 0
@@ -81,6 +95,14 @@
  height: 142px;
}
.stat-card.clickable {
  cursor: pointer;
}
.stat-card.clickable:hover .card-label {
  color: #43e8fc;
}
.card-icon {
  width: 100px;
  height: 100px;
src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <PanelHeader title="采购品分布" />
    <PanelHeader title="采购品分布" to="/procurementManagement/paymentLedger" />
    <div class="main-panel panel-item-customers">
      <CarouselCards :items="cardItems" :visible-count="3" />
      <div class="pie-chart-wrapper" ref="pieWrapperRef">
src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <PanelHeader title="销售品分布" />
    <PanelHeader title="销售品分布" to="/salesManagement/receiptPaymentLedger" />
    <div class="main-panel panel-item-customers">
      <CarouselCards :items="cardItems" :visible-count="3" />
      <div class="pie-chart-wrapper" ref="pieWrapperRef">
src/views/reportAnalysis/PSIDataAnalysis/index.vue
@@ -34,8 +34,8 @@
      <!-- å³ä¾§åŒºåŸŸ -->
      <div class="right-panel">
        <RightBottom />
        <RightTop />
        <RightBottom header-to="/salesManagement/receiptPaymentLedger" />
        <RightTop header-to="/procurementManagement/paymentLedger" />
      </div>
    </div>
    </div>
src/views/reportAnalysis/PSIDataAnalysis/psiNavigation.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
export const PSI_ROUTE_MAP = {
  é”€å”®å“åˆ†å¸ƒ: '/salesManagement/receiptPaymentLedger',
  é‡‡è´­å“åˆ†å¸ƒ: '/procurementManagement/paymentLedger',
  é”€å”®äº§å“æ•°: '/salesManagement/salesLedger',
  é‡‡è´­äº§å“æ•°: '/procurementManagement/procurementLedger',
  å‚¨å­˜äº§å“æ•°: '/inventoryManagement/stockManagement',
  å®¢æˆ·è´¡çŒ®æŽ’名: '/salesManagement/receiptPaymentLedger',
  ä¾›åº”商采购排名: '/procurementManagement/paymentLedger',
  å‡ºå…¥åº“趋势: '/inventoryManagement/receiptManagement',
  äº§å“å‘¨è½¬å¤©æ•°: '/inventoryManagement/stockManagement',
}
export function getPsiRoute(name) {
  return PSI_ROUTE_MAP[name] || ''
}
src/views/reportAnalysis/dataDashboard/components/PanelHeader.vue
@@ -1,17 +1,35 @@
<template>
  <div class="panel-header">
  <div
    class="panel-header"
    :class="{ clickable: !!to }"
    @click="handleClick"
  >
    <span class="panel-title">{{ title }}</span>
  </div>
</template>
<script setup>
defineProps({
import { useRouter } from 'vue-router'
const props = defineProps({
  title: {
    type: String,
    required: true,
    default: ''
  },
  to: {
    type: String,
    default: ''
  }
})
const router = useRouter()
const handleClick = () => {
  if (props.to) {
    router.push(props.to)
  }
}
</script>
<style scoped>
@@ -30,4 +48,12 @@
  padding-left: 46px;
  line-height: 36px;
}
.panel-header.clickable {
  cursor: pointer;
}
.panel-header.clickable:hover .panel-title {
  color: #43e8fc;
}
</style>
src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <PanelHeader title="客户贡献排名" />
    <PanelHeader title="客户贡献排名" :to="headerTo" />
    <div class="panel-item-customers">
      <div class="switch-container">
        <DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
@@ -28,6 +28,13 @@
import DateTypeSwitch from '../DateTypeSwitch.vue'
import { customerContributionRanking } from '@/api/viewIndex.js'
defineProps({
  headerTo: {
    type: String,
    default: ''
  }
})
const chartStyle = {
  width: '100%',
  height: '100%',
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <PanelHeader title="供应商采购排名" />
    <PanelHeader title="供应商采购排名" :to="headerTo" />
    <div class="panel-item-customers">
      <div class="switch-container">
        <DateTypeSwitch v-model="radio1" @change="handleDateTypeChange" />
@@ -27,6 +27,13 @@
import DateTypeSwitch from '../DateTypeSwitch.vue'
import { supplierPurchaseRanking } from '@/api/viewIndex.js'
defineProps({
  headerTo: {
    type: String,
    default: ''
  }
})
const chartStyle = {
  width: '100%',
  height: '100%',