From eef733f850f311d36dca0c24acd68c6bbfecf836 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 9 Dec 2025 09:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E6=98=8E=E7=BB=86=E6=97=A0rolls?= =?UTF-8?q?=E6=89=8D=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/ecss/codelnotifyConfirm.vue | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index aa29302..468dab9 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -365,8 +365,13 @@ - - + + @@ -1938,6 +1943,23 @@ }) }, + computed: { + /** + * 判断是否禁用总Rolls输入框 + * 逻辑:只有当所有明细的rolls都是空或0时,才允许修改总rolls + * @returns {boolean} true=禁用,false=启用 + */ + isTotalRollsDisabled() { + // 检查是否有任何明细的 rolls 不为空且大于 0 + const hasValidRolls = this.dataList8.some(item => { + const rollsValue = parseFloat(item.rolls); + return !isNaN(rollsValue) && rollsValue > 0; + }); + // 如果有任何明细有有效的rolls值,则禁用总rolls输入框 + return hasValidRolls; + } + }, + methods: { // 动态列开始 获取 用户保存的 格式列 async getTableUserColumn (tableId, columnId) {