From da245c6f1995c5668866184d8068794c27622f62 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 24 九月 2025 11:05:20 +0800
Subject: [PATCH] 首检,巡检,入库检的数值判断
---
pages/QC/SJ/detail.vue | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/pages/QC/SJ/detail.vue b/pages/QC/SJ/detail.vue
index 366942d..3aa38be 100644
--- a/pages/QC/SJ/detail.vue
+++ b/pages/QC/SJ/detail.vue
@@ -76,7 +76,7 @@
<view class="info-value">{{ formData.result }}</view>
</view>
<view v-if="formData.remarks" class="info-item">
- <view class="info-label">涓嶅悎鏍兼弿杩�</view>
+ <view class="info-label">澶囨敞</view>
<view class="info-value danger">{{ formData.remarks }}</view>
</view>
</view>
@@ -104,7 +104,7 @@
</button>
<button class="btn upload-btn" @click="saveRemarks">
<uni-icons color="#fff" size="16" type="compose"></uni-icons>
- 涓嶅悎鏍兼弿杩�
+ 澶囨敞
</button>
</view>
</view>
@@ -118,7 +118,7 @@
</button>
<button class="btn upload-btn" @click="saveRemarks">
<uni-icons color="#fff" size="16" type="compose"></uni-icons>
- 涓嶅悎鏍兼弿杩�
+ 澶囨敞
</button>
</view>
<view class="input-wrapper" style="margin-top: 15px;">
@@ -181,13 +181,13 @@
</view>
</view>
- <!-- 寮瑰嚭灞� - 涓嶅悎鏍兼弿杩� -->
+ <!-- 寮瑰嚭灞� - 澶囨敞 -->
<view v-if="remarksPopup" class="overlay">
<view class="popup">
- <h3>淇敼涓嶅悎鏍兼弿杩�</h3>
+ <h3>淇敼澶囨敞</h3>
<form>
<view class="form-group">
- <label class="form-label">涓嶅悎鏍兼弿杩�:</label>
+ <label class="form-label">澶囨敞:</label>
<input v-model="remarks" class="form-input" type="text"/>
</view>
<view class="popup-buttons">
@@ -299,7 +299,16 @@
return;
}
- if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData.maxValue) {
+ let checkValue = Number(this.formData.fcheckResu);
+ let minValue = Number(this.formData.minValue);
+ let maxValue = Number(this.formData.maxValue);
+
+ if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
+ this.$showMessage("妫�楠屽�兼垨鑼冨洿鍊兼牸寮忎笉姝g‘锛岃妫�鏌ヨ緭鍏�");
+ return;
+ }
+
+ if (checkValue >= minValue && checkValue <= maxValue) {
fstand = "鈭�"
} else {
fstand = "脳";
@@ -393,7 +402,16 @@
return;
}
- if (this.editData.fcheckResu >= this.formData.minValue && this.editData.fcheckResu <= this.formData.maxValue) {
+ let checkValue = Number(this.editData.fcheckResu);
+ let minValue = Number(this.formData.minValue);
+ let maxValue = Number(this.formData.maxValue);
+
+ if (isNaN(checkValue) || isNaN(minValue) || isNaN(maxValue)) {
+ this.$showMessage("妫�楠屽�兼垨鑼冨洿鍊兼牸寮忎笉姝g‘锛岃妫�鏌ヨ緭鍏�");
+ return;
+ }
+
+ if (checkValue >= minValue && checkValue <= maxValue) {
this.editData.isPass = 1
} else {
this.editData.isPass = 0
--
Gitblit v1.9.3