|
|
|
|
@ -4,7 +4,10 @@
|
|
|
|
|
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
|
<el-card shadow="hover">
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="100px">
|
|
|
|
|
<el-form-item label="呆滞天数(天)">
|
|
|
|
|
<el-input-number v-model="queryParams.stagnantDays" :min="1" :max="3650" :step="30" controls-position="right" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">刷新</el-button>
|
|
|
|
|
@ -39,7 +42,7 @@
|
|
|
|
|
<el-card shadow="hover" class="stat-card">
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
<div class="stat-value text-orange-500">{{ stagnantStats.overSixMonths }}</div>
|
|
|
|
|
<div class="stat-label">超过6个月未出库</div>
|
|
|
|
|
<div class="stat-label">超过{{ queryParams.stagnantDays }}天未出库</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -89,7 +92,7 @@
|
|
|
|
|
</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="呆滞原因" align="center" prop="stagnantReason" />
|
|
|
|
|
<!-- <el-table-column label="呆滞原因" align="center" prop="stagnantReason" /> -->
|
|
|
|
|
<el-table-column label="物料规格" align="center" prop="materialSpec" show-overflow-tooltip />
|
|
|
|
|
<el-table-column label="所在仓库" align="center" prop="warehouseName" />
|
|
|
|
|
</el-table>
|
|
|
|
|
@ -131,7 +134,8 @@ const queryFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
|
|
|
|
const queryParams = ref<ReportQuery>({
|
|
|
|
|
tenantId: undefined,
|
|
|
|
|
materialCategoryId: undefined
|
|
|
|
|
materialCategoryId: undefined,
|
|
|
|
|
stagnantDays: 180
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** 查询呆滞料库存报表列表 */
|
|
|
|
|
@ -152,10 +156,11 @@ const getList = async () => {
|
|
|
|
|
|
|
|
|
|
/** 计算统计数据 */
|
|
|
|
|
const calculateStats = () => {
|
|
|
|
|
const overThresholdLabel = `超过${queryParams.value.stagnantDays ?? 180}天未出库`;
|
|
|
|
|
stagnantStats.value = {
|
|
|
|
|
neverOut: reportList.value.filter(item => item.stagnantReason === '从未出库').length,
|
|
|
|
|
overSixMonths: reportList.value.filter(item => item.stagnantReason === '超过6个月未出库').length,
|
|
|
|
|
totalQty: reportList.value.reduce((sum, item) => sum + (item.stagnantInventoryQty || 0), 0)
|
|
|
|
|
overSixMonths: reportList.value.filter(item => item.stagnantReason === overThresholdLabel).length,
|
|
|
|
|
totalQty: reportList.value.reduce((sum, item) => sum + Number(item.stagnantInventoryQty ?? 0), 0)
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|