|
@@ -36,8 +36,10 @@
|
|
|
type="circle"
|
|
|
v-for="(row, index) in item.productionOrderScheduleVoList"
|
|
|
:key="index"
|
|
|
- :percentage="Math.round((row.productionQuantity / row.completeQuantity) * 100)"
|
|
|
- :status="Math.round((row.productionQuantity / row.completeQuantity) * 100) == 100 ? 'success' : ''" />
|
|
|
+ :percentage="computePercent(row)"
|
|
|
+ :status="computePercent(row) === 100 ? 'success' : ''"
|
|
|
+ :width="80"
|
|
|
+ style="margin-right: 10px;" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -482,6 +484,13 @@ const submitForm = () => {
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
+const computePercent = (item) => {
|
|
|
+ let num = 0;
|
|
|
+ if (item.productionQuantity && item.completeQuantity) {
|
|
|
+ num = Number(Math.round((item.completeQuantity / item.productionQuantity) * 100));
|
|
|
+ }
|
|
|
+ return num;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|