!7 fix: 计划进度bug

Merge pull request !7 from guopeiyu/guopeiyu
main
guopeiyu 2 years ago committed by Gitee
commit 4c98ce1cb0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -14,49 +14,53 @@
/>
</u-sticky>
<uni-card :is-shadow="false" is-full>
<uni-row>
<uni-col>
<text class="uni-h6" >计划:</text>
<el-text class="mx-1" type="primary">{{planDo.code}}</el-text>
</uni-col>
<uni-col>
<text class="uni-h6">产品:</text>
<el-text class="mx-1" type="warning">{{planDo.productName}}</el-text>
</uni-col>
</uni-row>
<view class="u-flex justify-between">
<view class="u-flex">
<u-image
src="@/static/images/icon/product.png"
width="40rpx"
height="40rpx"
/>
<el-text class="u-m-l-10">{{planDo.productName}}</el-text>
</view>
<el-text type="success">{{planDo.code}}</el-text>
</view>
</uni-card>
<el-table :data="progressList" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="工序" align="center" prop="orgType" >
<template #default="scope">
<text> {{findTextByValue(scope.row.orgType)}}</text>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="totalQualityNumber" width="80px"/>
<el-table-column label="进度" align="center">
<template #default="scope">
<el-progress
:percentage="Number((scope.row.totalQualityNumber/planDo.planNumber)*100).toFixed(2)"
:stroke-width="15"
:striped="true"
:striped-flow="true"
/>
</template>
</el-table-column>
<el-table-column label="废品" align="center" prop="totalWasteNumber" width="60px"/>
<el-table-column label="废品率" align="center" >
<template #default="scope">
<span class="percentage-value">{{Number((scope.row.totalWasteNumber/(scope.row.totalQualityNumber+scope.row.totalWasteNumber))*100 ).toFixed(2)}}%</span>
</template>
</el-table-column>
</el-table>
<uni-table ref="table" stripe emptyText="暂无数据">
<uni-tr>
<uni-th width="60" align="center">工序</uni-th>
<uni-th width="60" align="center">数量</uni-th>
<uni-th width="80" align="center">进度</uni-th>
<uni-th width="60" align="center">废品</uni-th>
<uni-th width="60" align="center">废品率</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in progressList" :key="index">
<uni-td><text> {{ findTextByValue(item.orgType )}}</text></uni-td>
<uni-td>
<view class="name">{{ item.totalQualityNumber }}</view>
</uni-td>
<uni-td align="center">
<u-line-progress
:percentage="Number((item.totalQualityNumber/planDo.planNumber)*100).toFixed(2)"
active-color="#50E0C1"
inactive-color="rgba(139, 237, 215, 0.47)"
/>
</uni-td>
<uni-td>
<view class="name">{{ item.totalWasteNumber }}</view>
</uni-td>
<uni-td>
<view class="name">{{ Number((item.totalWasteNumber/(item.totalQualityNumber + item.totalWasteNumber))*100 ).toFixed(2)}}%</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</template>
<script>
import {processTypes,findTextByValue} from "@/api/system/dict/data";
import {getPlanProgress,getById} from "@/api/mes/plan"
import { processTypes, findTextByValue } from "@/api/system/dict/data";
import { getPlanProgress } from "@/api/mes/plan"
import tab from "@/plugins/tab";
import modal from "@/plugins/modal";
export default {

Loading…
Cancel
Save