From 6f3eccc9f6b9a71d1a0a94c3bf2673b9a09dfaa5 Mon Sep 17 00:00:00 2001
From: zds <2388969634@qq.com>
Date: Fri, 18 Nov 2022 11:47:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/wms/pa/performance/AddDialog.vue | 31 +++++++++++--------
.../views/wms/pa/workloadreview/AddDialog.vue | 7 +++--
2 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/mes/qd/src/views/wms/pa/performance/AddDialog.vue b/mes/qd/src/views/wms/pa/performance/AddDialog.vue
index 35bc400e..c6718fde 100644
--- a/mes/qd/src/views/wms/pa/performance/AddDialog.vue
+++ b/mes/qd/src/views/wms/pa/performance/AddDialog.vue
@@ -13,8 +13,8 @@
- 保存
- 关闭
+ 保存
+ 关闭
@@ -47,7 +47,7 @@
-
+
@@ -64,6 +64,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
+ v-show="crud.status.cu > 0"
:disabled="crud.status.view > 0"
@click="choosePoint"
>
@@ -87,15 +88,7 @@
-
+
@@ -232,9 +225,21 @@ export default {
this.form.num = this.form.tableData.length
},
change(val, row, index) {
+ // 对工作量进行校验
+ const numReg = /^[0-9]*$/
+ const numRe = new RegExp(numReg)
+ if (!numRe.test(val)) {
+ this.crud.notify('请输入不小于0的数字', CRUD.NOTIFICATION_TYPE.INFO)
+ row.workload = 0
+ } else {
+ if (row.workload_audit === '') {
+ row.workload = 0
+ }
+ }
+ row.workload_audit = val
+ this.form.tableData.splice(index, 1, row)
// 将每行的算出来的分值相加
let all = 0
- row.workload_audit = val
this.form.tableData.forEach((item) => {
all = all + parseFloat(item.workload_audit) * parseFloat(item.single_score)
})
diff --git a/mes/qd/src/views/wms/pa/workloadreview/AddDialog.vue b/mes/qd/src/views/wms/pa/workloadreview/AddDialog.vue
index 18644ccc..86c9db6d 100644
--- a/mes/qd/src/views/wms/pa/workloadreview/AddDialog.vue
+++ b/mes/qd/src/views/wms/pa/workloadreview/AddDialog.vue
@@ -13,8 +13,8 @@
- 保存
- 关闭
+ 保存
+ 关闭
@@ -47,7 +47,7 @@
-
+
@@ -64,6 +64,7 @@
icon="el-icon-plus"
size="mini"
:disabled="crud.status.view > 0"
+ v-show="crud.status.cu > 0"
@click="choosePoint"
>
选择项点