fix:有时出现加工-发货合格率有数,但发货数为0的情况问题修改为当有发货数的时候再计算两个合格率

This commit is contained in:
shijing 2026-03-26 16:26:14 +08:00
parent a035cf979b
commit 17b4a16def
1 changed files with 2 additions and 2 deletions

View File

@ -525,13 +525,13 @@
</el-table-column>
<el-table-column label="6号领取加工-发货合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data&&((scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0)+(scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))>0">
<span v-if="scope.row.data.销售发货_count&&scope.row.data&&((scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0)+(scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))>0">
{{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0+scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0))*100).toFixed(2)}}%</span>
</template>
</el-table-column>
<el-table-column label="7号生产-发货合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="(scope.row.data&&scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0)>0">
<span v-if="scope.row.data.销售发货_count&&(scope.row.data&&scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0)>0">
{{ (((scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/(scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0))*100).toFixed(2)}}%</span>
</template>
</el-table-column>