From 4c8da7dc4fe848e3eae143540148d25820f76de6 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Thu, 17 Oct 2024 15:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E5=85=89=E6=A0=87=E8=B7=B3=E5=8A=A8bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/login/index.vue | 2 +- .../quality/Materialinspection/index.vue | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 7ddf842..02761ba 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -142,7 +142,7 @@ export default class LoginPage extends BasePage { // console.log('Version////', this.Version); } ///********版本号修改区域********** - version = '0.0.114'; //正式版本号 + version = '0.0.115'; //正式版本号 //version = '0.0.14'; //测试版本号 //***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本**************** //isTest = true; diff --git a/src/pages/quality/Materialinspection/index.vue b/src/pages/quality/Materialinspection/index.vue index 7101e40..64923d7 100644 --- a/src/pages/quality/Materialinspection/index.vue +++ b/src/pages/quality/Materialinspection/index.vue @@ -133,7 +133,7 @@ -
实际值:
+
实际值:
实际值:
@@ -154,8 +154,12 @@
抽样数量: {{ item.itemMethod }}
+ + + + - +
检查结果:
@@ -833,7 +837,7 @@ export default class PurchaseWHSRM extends BasePage { }); this.detaillistdefects.forEach((item) => { if (item.sampleQuality == null) { - item.sampleQuality = 0; + item.sampleQuality = '0'; } }); this.detaillistceshi.forEach((item) => { @@ -881,7 +885,7 @@ export default class PurchaseWHSRM extends BasePage { }); this.detaillistdefects.forEach((item) => { if (item.sampleQuality == null) { - item.sampleQuality = 0; + item.sampleQuality = '0'; } }); this.detaillistceshi.forEach((item) => { @@ -2041,6 +2045,26 @@ export default class PurchaseWHSRM extends BasePage { } this.determine(); } + + validateInput(value, index) { + console.log('sssss', event, value, index); + const isValidNumber = /^\d*$/.test(value); // 只允许输入数字 + if (!isValidNumber) { + const cleanedValue = value.replace(/[^\d]/g, ''); + console.log('处理后数字', cleanedValue); + this.$set(this.detaillistceshi[index], 'sampleQuality', cleanedValue); + //this.detaillistceshi[index].sampleQuality = cleanedValue; + console.log('是否修改了', this.detaillistceshi[index].sampleQuality); // 移除非数字字符 + } + } + changeInput(event, index) { + console.log('获取的输入', event, index); + console.log('获取的输入555', this.detaillistceshi[index].sampleQuality); + //this.detaillistceshi[index].newsampleQuality = event.target.value; + this.detaillistceshi[index].sampleQuality = event.target.value; + //console.log('后面改变了吗',this.detaillistceshi[index].newsampleQuality); + console.log('后面改变了吗', this.detaillistceshi[index].sampleQuality); + } }