From 78c2849dea796d0b088dc354b44bd35ea1c80260 Mon Sep 17 00:00:00 2001
From: yuejiayang <146344614+YangLei105@users.noreply.github.com>
Date: Thu, 19 Sep 2024 12:51:56 +0800
Subject: [PATCH] =?UTF-8?q?2024.9.18=20=E4=B8=80=E3=80=81=E7=89=A9?=
=?UTF-8?q?=E6=96=99=E6=88=90=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4?=
=?UTF-8?q?=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88=EF=BC=89=20=E4=BA=8C?=
=?UTF-8?q?=E3=80=81=E5=8A=A0=E5=B7=A5=E4=B8=AD=E5=BF=83=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E6=94=B9=E9=80=A0=20=E4=B8=89=E3=80=81=E6=A0=87=E5=87=86?=
=?UTF-8?q?=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88=EF=BC=89?=
=?UTF-8?q?=20=E5=9B=9B=E3=80=81=E5=95=86=E5=93=81=E7=BB=84=20-=20?=
=?UTF-8?q?=E6=A0=87=E5=87=86=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=BA=8C?=
=?UTF-8?q?=E7=89=88=EF=BC=89=20=E4=BA=94=E3=80=81=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=BB=84=20-=20Process=20Time=20Matrix=EF=BC=88=E7=AC=AC?=
=?UTF-8?q?=E4=B8=80=E7=89=88=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../part/partProductGroupInformation.vue | 4 +-
.../modules/part/standardRoutingOperation.vue | 41 ++++++++++++++-----
2 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/src/views/modules/part/partProductGroupInformation.vue b/src/views/modules/part/partProductGroupInformation.vue
index 05424c4..ba3f4aa 100644
--- a/src/views/modules/part/partProductGroupInformation.vue
+++ b/src/views/modules/part/partProductGroupInformation.vue
@@ -378,10 +378,10 @@
-
+
-
+
diff --git a/src/views/modules/part/standardRoutingOperation.vue b/src/views/modules/part/standardRoutingOperation.vue
index 60eb18f..23349e3 100644
--- a/src/views/modules/part/standardRoutingOperation.vue
+++ b/src/views/modules/part/standardRoutingOperation.vue
@@ -715,7 +715,10 @@ export default {
/**
* 分类信息新增/编辑
*/
- saveData () {
+ async saveData () {
+ await this.workCenterBlur(216)
+ await this.laborClassBlur(217)
+ await this.setupLaborClassBlur(217)
if (this.modalData.bu === '' || this.modalData.bu == null) {
this.$message.warning('请选择BU!')
return
@@ -825,13 +828,14 @@ export default {
},
// 加工中心输入校验
- workCenterBlur (tagNo) {
+ async workCenterBlur (tagNo) {
if (this.modalData.workCenterNo != null && this.modalData.workCenterNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
- verifyData(tempData).then(({data}) => {
+ // 返回 Promise
+ return verifyData(tempData).then(({ data }) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.workCenterDesc = data.baseListData[0].work_center_desc
@@ -842,20 +846,26 @@ export default {
this.$message.warning(data.msg)
this.modalData.workCenterDesc = ''
}
- })
+ }).catch(error => {
+ console.error(error);
+ this.$message.error('校验失败,请重试');
+ this.modalData.workCenterDesc = '';
+ });
} else {
this.modalData.workCenterDesc = ''
+ return Promise.resolve(); // 如果 itemNo 为空,直接返回 resolved Promise
}
},
// 人员等级描述
- setupLaborClassBlur (tagNo) {
+ async setupLaborClassBlur (tagNo) {
if (this.modalData.setupLaborClassNo != null && this.modalData.setupLaborClassNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
- verifyData(tempData).then(({data}) => {
+ // 返回 Promise
+ return verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.setupLaborClassDesc = data.baseListData[0].class_desc
@@ -864,23 +874,27 @@ export default {
}
} else {
this.$message.warning(data.msg)
- this.modalData.setupLaborClassNo = ''
this.modalData.setupLaborClassDesc = ''
}
- })
+ }).catch(error => {
+ console.error(error);
+ this.$message.error('校验失败,请重试');
+ this.modalData.setupLaborClassDesc = '';
+ });
} else {
this.modalData.setupLaborClassDesc = ''
+ return Promise.resolve(); // 如果 itemNo 为空,直接返回 resolved Promise
}
},
// 人员等级描述
- laborClassBlur (tagNo) {
+ async laborClassBlur (tagNo) {
if (this.modalData.laborClassNo != null && this.modalData.laborClassNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
- verifyData(tempData).then(({data}) => {
+ return verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.laborClassDesc = data.baseListData[0].class_desc
@@ -891,9 +905,14 @@ export default {
this.$message.warning(data.msg)
this.modalData.laborClassDesc = ''
}
- })
+ }).catch(error => {
+ console.error(error);
+ this.$message.error('校验失败,请重试');
+ this.modalData.laborClassDesc = '';
+ });
}else {
this.modalData.laborClassDesc = ''
+ return Promise.resolve(); // 如果 itemNo 为空,直接返回 resolved Promise
}
},