From 664648ab615a68b3ef84c5bfa072ef65943bbb41 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 5 Jun 2024 08:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=A1=A8=E6=A0=BC=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/components/material.vue | 72 +++++++++++----- src/views/home/components/produce.vue | 91 ++++++++++++++++++++- src/views/home/components/supplierIndex.vue | 63 +++++++++++++- 3 files changed, 200 insertions(+), 26 deletions(-) diff --git a/src/views/home/components/material.vue b/src/views/home/components/material.vue index efe37218d..03aac634b 100644 --- a/src/views/home/components/material.vue +++ b/src/views/home/components/material.vue @@ -36,10 +36,11 @@
{{ t('home.slack_stock_warning')}}
@@ -88,7 +89,7 @@ - + @size-change="getStagnantBalance" + @current-change="getStagnantBalance" + />
{{ t('home.overstock_warning') }}
@@ -155,7 +158,7 @@ - + @size-change="getOverdueBalance" + @current-change="getOverdueBalance" + />
@@ -172,7 +176,7 @@
{{ t('home.high_and_low_storage_warning') }}
- + @size-change="getWarningBalance" + @current-change="getWarningBalance" + />
@@ -262,6 +267,7 @@ const getMaterialData = () => { getJobCharts() }) } + const formatter = (type, dict) => { let str = getStrDictOptions(dict).filter((item) => type == item.value)[0]?.label return str @@ -285,32 +291,58 @@ const getJobCharts = async () => { lineIndex.value++ } onMounted(() => { - // getMaterialData() + getMaterialData() + //呆滞库存预警 超期库存预警 + Promise.all([ getStagnantBalance(),getOverdueBalance(),getWarningBalance()]) }) // 呆滞库存预警 const currentPage_stagnantBalance = ref(1) const pageSize_stagnantBalance = ref(10) const total_stagnantBalance= ref(100) -const handleCurrentChange_stagnantBalance = (val)=>{ - console.log('呆滞库存预警',val) +const stagnantBalanceList = ref([]) +const getStagnantBalance = ()=>{ + IndexApi.getStagnantBalance({ + pageNo: currentPage_stagnantBalance.value, + pageSize: pageSize_stagnantBalance.value + }).then((res) => { + console.log('getStagnantBalance',res) + stagnantBalanceList.value = res.list + total_stagnantBalance.value = res.total + }) } - // 超期库存预警 const currentPage_overdueBalance = ref(1) const pageSize_overdueBalance = ref(10) const total_overdueBalance= ref(100) -const handleCurrentChange_overdueBalance = (val)=>{ - console.log('超期库存预警',val) +const overdueBalanceList = ref([]) +const getOverdueBalance = ()=>{ + IndexApi.getOverdueBalance({ + pageNo: currentPage_overdueBalance.value, + pageSize: pageSize_overdueBalance.value + }).then((res) => { + console.log('getOverdueBalance',res) + overdueBalanceList.value = res.list + total_overdueBalance.value = res.total + }) } // 高低储预警 const currentPage_warningBalance = ref(1) const pageSize_warningBalance = ref(10) const total_warningBalance= ref(100) -const handleCurrentChange_warningBalance = (val)=>{ - console.log('高低储预警',val) +const warningBalanceList = ref([]) +const getWarningBalance = ()=>{ + IndexApi.getWarningBalance({ + pageNo: currentPage_warningBalance.value, + pageSize: pageSize_warningBalance.value + }).then((res) => { + console.log('getWarningBalance',res) + warningBalanceList.value = res.list + total_warningBalance.value = res.total + }) } +