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 + }) } +