+
本月退货明细
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatter(scope.row.inventoryStatus,DICT_TYPE.INVENTORY_STATUS) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatter(scope.row.uom,DICT_TYPE.UOM) }}
+
+
+
+
+
+
+ {{ formatDate(scope.row.createTime) }}
+
+
+
-
+
本月索赔明细
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatDate(scope.row.createTime) }}
+
+
+
@@ -111,6 +231,10 @@
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { lineOptions, pieOptions } from '../echarts-data'
+import { formatDate } from '@/utils/formatTime'
+import * as NotifyMessageApi from '@/api/system/notify/message'
+import * as IndexApi from '@/api/home'
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const { t } = useI18n()
const tableData = [
{
@@ -150,60 +274,31 @@ const tableData = [
text: 'No. 189, Grove St, Los Angeles'
}
]
+const supplierData = ref()
+const lineIndex = ref(0)
// 本月发货单趋势
const lineOptionsData = reactive
(lineOptions) as EChartsOption
const getInvoiceCharts = async () => {
- const data = [
- { value: 20, name: '1日' },
- { value: 50, name: '2日' },
- { value: 250, name: '3日' },
- { value: 220, name: '4日' },
- { value: 230, name: '5日' },
- { value: 160, name: '6日' },
- { value: 120, name: '7日' },
- { value: 160, name: '8日' },
- { value: 130, name: '9日' },
- { value: 240, name: '10日' },
- { value: 230, name: '11日' },
- { value: 100, name: '12日' },
- { value: 40, name: '13日' },
- { value: 80, name: '14日' },
- { value: 30, name: '15日' },
- { value: 88, name: '16日' },
- { value: 134, name: '17日' },
- { value: 156, name: '18日' },
- { value: 143, name: '19日' },
- { value: 240, name: '20日' },
- { value: 160, name: '21日' },
- { value: 160, name: '22日' },
- { value: 160, name: '23日' },
- { value: 160, name: '24日' },
- { value: 160, name: '25日' },
- { value: 160, name: '26日' },
- { value: 160, name: '27日' },
- { value: 160, name: '28日' },
- { value: 160, name: '29日' },
- { value: 160, name: '30日' }
- ]
set(
lineOptionsData,
'xAxis.data',
- data.map((v) => t(v.name))
+ supplierData.value.supplierdeliverMonthCount.map((v) => v.date)
)
+ set(lineOptionsData, 'legend.data', ['本月发货单趋势'])
set(lineOptionsData, 'series', [
{
- name: '哈哈',
+ name: '本月发货单趋势',
smooth: true,
type: 'line',
itemStyle: {},
animationDuration: 2800,
animationEasing: 'quadraticOut',
- data: data.map((v) => v.value)
+ data: supplierData.value.supplierdeliverMonthCount.map((v) => v.count)
}
])
+ lineIndex.value++
}
//本月发货零件TOP10
-
const pieOptionsData = reactive(pieOptions) as EChartsOption
const getPartTOPCharts = async () => {
const data = [
@@ -213,21 +308,56 @@ const getPartTOPCharts = async () => {
{ value: 135, name: 'analysis.videoAdvertising' },
{ value: 1548, name: 'analysis.searchEngines' }
]
+ console.log(supplierData.value.supplierdeliverItemMonthTop)
set(
pieOptionsData,
'legend.data',
- data.map((v) => t(v.name))
+ supplierData.value.supplierdeliverItemMonthTop.map((v) => v.itemCode)
)
- pieOptionsData!.series![0].data = data.map((v) => {
+ pieOptionsData!.series![0].data = supplierData.value.supplierdeliverItemMonthTop.map((v) => {
return {
- name: t(v.name),
- value: v.value
+ name: v.itemCode,
+ value: v.qty
}
})
+ lineIndex.value++
+}
+// 获取供应商数据
+const getSupplierData = async () => {
+ IndexApi.getSupplierData().then((res) => {
+ supplierData.value = res
+ getInvoiceCharts()
+ getPartTOPCharts()
+ })
}
-
-getInvoiceCharts()
-getPartTOPCharts()
+// 最新消息
+const notaicList = ref([]) // 列表的数据
+const queryParams = reactive({
+ pageNo: 1,
+ pageSize: 10,
+ userType: undefined,
+ userId: undefined,
+ templateCode: undefined,
+ templateType: undefined,
+ createTime: []
+})
+/** 查询列表 */
+const getList = async () => {
+ try {
+ const data = await NotifyMessageApi.getNotifyMessagePage(queryParams)
+ notaicList.value = data.list
+ } finally {
+ }
+}
+const formatter = (type,dict) => {
+ let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]
+ .label
+ return str
+}
+onMounted(async () => {
+ await getSupplierData()
+ getList()
+})