From 4c6fed9f233aa93aba12bc86c883c749e4786f31 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sat, 11 Oct 2025 13:25:20 +0800 Subject: [PATCH] =?UTF-8?q?2025-10-11=20=E6=8A=A5=E5=B7=A5=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=88=86=E5=8D=B7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/yieldReport/com_separate_roll.vue | 64 +++++++++++++++++-- 1 file changed, 57 insertions(+), 7 deletions(-) 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; +} + + + +