From 33a6362a6e50684b3652d6ac8bd7a61a9978f11b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 13 六月 2026 14:40:48 +0800
Subject: [PATCH] 君歌 1.对于新增订单需流转协同办公进行审批,审批完成流转生产管控-生产订单 2.客户分类修改为:核心、重要、普通、一般。 3.可对报价多次修改,修改后流转至协同办公-协同审批-报价审批,并对每次报价进行记录。 4.不合格管理字段按照单据进行修改。 5.谁登记的客户只能看见自己的,负责人(维护人)可以转移,操作加一个‘客户交接’按钮选择要交接给的负责人
---
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue | 51 ++++++++++++++++++++++++++++++++++-----------------
1 files changed, 34 insertions(+), 17 deletions(-)
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
index 4c023ff..96e4548 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
@@ -21,11 +21,11 @@
</template>
<script setup>
-import { ref, onMounted, computed } from 'vue'
+import { ref, onMounted, computed, inject, watch } from 'vue'
import Echarts from '@/components/Echarts/echarts.vue'
import PanelHeader from '../PanelHeader.vue'
import DateTypeSwitch from '../DateTypeSwitch.vue'
-import { statisticsReceivablePayable } from '@/api/viewIndex.js'
+import { supplierPurchaseRanking } from '@/api/viewIndex.js'
const chartStyle = {
width: '100%',
@@ -120,7 +120,7 @@
textStyle: { fontSize: '100%' },
formatter: function (params) {
let result = params[0].axisValueLabel + '<br/>'
- result += `<div style="">${params[0].marker}${params[0].value}</div>`
+ result += `<div>${params[0].marker}${params[0].value}鍏�</div>`
return result
},
}
@@ -151,12 +151,21 @@
inverse: false,
data: xdataName.value,
axisLabel: {
- formatter: (params) => {
- return `{a|${params}}`
+ formatter: (value) => {
+ if (!value) return ''
+ const maxLen = 6 // 姣忚鏈�澶氬瓧绗︽暟锛屽彲鎸夐渶璋冩暣
+ if (value.length <= maxLen) return `{a|${value}}`
+
+ const lines = []
+ for (let i = 0; i < value.length; i += maxLen) {
+ lines.push(value.slice(i, i + maxLen))
+ }
+ // 澶氳鏂囨湰锛屾瘡琛岄兘濂楀悓涓�涓� rich 鏍峰紡
+ return lines.map((line) => `{a|${line}}`).join('\n')
},
rich: {
a: {
- width: 160,
+ width: 120,
fontSize: 14,
color: '#fff',
padding: [5, 4, 5, 0],
@@ -242,6 +251,7 @@
z: 6,
type: 'bar',
barWidth: 25,
+ tooltip: { show: false },
itemStyle: {
color: 'rgba(255,255,255,.1)',
barBorderRadius: [0, 20, 20, 0],
@@ -252,6 +262,7 @@
type: 'bar',
barWidth: 25,
barGap: '-100%',
+ tooltip: { show: false },
itemStyle: {
color: {
type: 'linear',
@@ -282,16 +293,15 @@
]
})
-// 搴斾粯搴旀敹缁熻
-const statisticsReceivable = () => {
- statisticsReceivablePayable({ type: radio1.value })
+// 渚涘簲鍟嗛噰璐帓鍚�
+const fetchSupplierRanking = () => {
+ supplierPurchaseRanking({ type: radio1.value })
.then((res) => {
- // 鍋囪 API 杩斿洖鐨勬暟鎹牸寮忎负鏁扮粍锛屽寘鍚� NAME 鍜� NUM 瀛楁
- // 濡傛灉杩斿洖鏍煎紡涓嶅悓锛岄渶瑕佹牴鎹疄闄� API 璋冩暣
- if (res.data && Array.isArray(res.data)) {
- dataArr.value = res.data
- } else if (res.data && res.data.list) {
- dataArr.value = res.data.list
+ if (res.code === 200 && Array.isArray(res.data)) {
+ dataArr.value = res.data.map(item => ({
+ NAME: item.supplierName,
+ NUM: item.totalAmount
+ }))
} else {
// 濡傛灉娌℃湁鏁版嵁锛屼娇鐢ㄦā鎷熸暟鎹�
dataArr.value = [
@@ -318,11 +328,18 @@
// 澶勭悊鏃ユ湡绫诲瀷鍒囨崲
const handleDateTypeChange = (value) => {
- statisticsReceivable()
+ fetchSupplierRanking()
+}
+
+const dataDashboardRefreshTick = inject('dataDashboardRefreshTick', null)
+if (dataDashboardRefreshTick) {
+ watch(dataDashboardRefreshTick, () => {
+ fetchSupplierRanking()
+ })
}
onMounted(() => {
- statisticsReceivable()
+ fetchSupplierRanking()
})
</script>
--
Gitblit v1.9.3