diff --git a/src/views/collect/IocCollectOrderCheckCode.vue b/src/views/collect/IocCollectOrderCheckCode.vue index 0178da34..b779a055 100644 --- a/src/views/collect/IocCollectOrderCheckCode.vue +++ b/src/views/collect/IocCollectOrderCheckCode.vue @@ -140,7 +140,7 @@ 单据 {{ orderData.billNo }}-业务详情 @@ -321,17 +321,17 @@ export default { }, methods: { getScanActCountStyle(row) { - const progress = row.scanActCount / row.count; - let color; - if (progress < 0.5) { - color = 'red'; // 进度小于50%为红色 - } else if (progress < 1.0) { - color = 'orange'; // 进度在50%到100%之间为橙色 - } else { - color = 'green'; // 进度达到或超过100%为绿色 - } + // const progress = row.scanActCount / row.count; + // let color; + // if (progress < 0.5) { + // color = 'red'; // 进度小于50%为红色 + // } else if (progress < 1.0) { + // color = 'orange'; // 进度在50%到100%之间为橙色 + // } else { + // color = 'green'; // 进度达到或超过100%为绿色 + // } return { - color, + // color, fontWeight: 'bold', // 字号加粗 }; }, @@ -982,6 +982,20 @@ export default { return rowBackground } }, + rowStyleBiz({row, rowIndex}) { + let rowBackground = {} + const progress = row.scanActCount / row.count; + + if (row.scanActCount == null || row.scanActCount == 0) { + rowBackground.color = 'red'; // 进度小于50%为红色 + } else if (progress < 1.0) { + rowBackground.color = 'orange'; // 进度在50%到100%之间为橙色 + } else { + rowBackground.color = 'green'; // 进度达到或超过100%为绿色 + } + rowBackground.height = '38px' + return rowBackground + }, watch: { resetKey(newVal, oldVal) { this.$refs.inputRef.focus()