diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 316b422..e256187 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -55,7 +55,8 @@ v-model="scope.row.goodQty" @change="handleQtyChange(scope.row)" style="width: 100%" - class="good-qty-input"> + class="good-qty-input" + :style="{'color': '#67c23a', 'font-weight': 'bold'}"> @@ -66,7 +67,8 @@ v-model="scope.row.defectQty" @change="handleQtyChange(scope.row)" style="width: 100%" - class="defect-qty-input"> + class="defect-qty-input" + :style="{'color': '#f56c6c', 'font-weight': 'bold'}"> @@ -372,6 +374,15 @@ export default { return false } + // 检查每一行的良品数必须大于0 + for (let i = 0; i < this.rowDataList.length; i++) { + const row = this.rowDataList[i] + if (row.goodQty === null || row.goodQty === undefined || row.goodQty <= 0) { + this.$message.error(`第 ${i + 1} 排的良品数必须大于0`) + return false + } + } + return true }, @@ -594,24 +605,63 @@ export default { } /* 良品数输入框样式 - 绿色加粗 */ +.good-qty-input >>> .el-input__inner { + font-weight: bold !important; + color: #67c23a !important; + font-size: 12px !important; +} + ::v-deep .good-qty-input .el-input__inner { - font-weight: bold; + font-weight: bold !important; + color: #67c23a !important; + font-size: 12px !important; +} + +/deep/ .good-qty-input .el-input__inner { + font-weight: bold !important; color: #67c23a !important; - font-size: 16px; + font-size: 12px !important; } /* 不良数输入框样式 - 红色加粗 */ +.defect-qty-input >>> .el-input__inner { + font-weight: bold !important; + color: #f56c6c !important; + font-size: 12px !important; +} + ::v-deep .defect-qty-input .el-input__inner { - font-weight: bold; + font-weight: bold !important; + color: #f56c6c !important; + font-size: 12px !important; +} + +/deep/ .defect-qty-input .el-input__inner { + font-weight: bold !important; color: #f56c6c !important; - font-size: 16px; + font-size: 12px !important; } /* 总数显示样式 */ .total-display { font-weight: bold; color: #303133; - font-size: 14px; + font-size: 12px; +} + + + +