From 745c3f6d0799fc9fbf116cccae70bacefed099c8 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 3 Apr 2026 14:22:45 +0800 Subject: [PATCH] =?UTF-8?q?2026-04-03=20=E5=88=80=E6=A8=A1=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=9C=A8=E5=AE=A1=E6=89=B9=E6=97=B6=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8A=82=E7=82=B9=E7=9A=84=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/tooling/searchToolApply.vue | 113 ++++++++++++------ 1 file changed, 74 insertions(+), 39 deletions(-) diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue index 98791fd..7f0da8a 100644 --- a/src/views/modules/tooling/searchToolApply.vue +++ b/src/views/modules/tooling/searchToolApply.vue @@ -486,33 +486,37 @@ - 报价员 + 报价员 + 报价员 - TP + TP + TP - 采购员 + 采购员 + 采购员 - - CS + + CS + CS - + - + - + @@ -558,7 +562,7 @@
- +
@@ -583,12 +587,12 @@ - + - + @@ -599,38 +603,39 @@ - + - + - - + + - + - CS + CS + CS - + @@ -905,7 +910,7 @@
- +
@@ -1069,7 +1074,8 @@ export default { if (!this.plmChangeApplyDetailArr) { return 'N' } - let arr = this.plmChangeApplyDetailArr.filter(a => a.fieldId === value) + let arr = this.plmChangeApplyDetailArr.filter(a => + a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag } @@ -2323,28 +2329,28 @@ export default { this.$nextTick(() => { let strVal = '' if (val === 2002) { - if (this.changeApplyHeaderFlag('quoter') === 'N' && this.currentRow.status === '审批中') { - this.$alert('没有权限在审批过程中修改!', '错误', { - confirmButtonText: '确定' - }) - return false - } + // if (this.changeApplyHeaderFlag('quoter') === 'N' && this.currentRow.status === '审批中') { + // this.$alert('没有权限在审批过程中修改!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } strVal = this.dataForm.quoter } else if (val === 2042) { - if (this.changeApplyHeaderFlag('tp') === 'N' && this.currentRow.status === '审批中') { - this.$alert('没有权限在审批过程中修改!', '错误', { - confirmButtonText: '确定' - }) - return false - } + // if (this.changeApplyHeaderFlag('tp') === 'N' && this.currentRow.status === '审批中') { + // this.$alert('没有权限在审批过程中修改!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } strVal = this.dataForm.tp } else if (val === 2000) { - if (this.changeApplyHeaderFlag('purchaser') === 'N' && this.currentRow.status === '审批中') { - this.$alert('没有权限在审批过程中修改!', '错误', { - confirmButtonText: '确定' - }) - return false - } + // if (this.changeApplyHeaderFlag('purchaser') === 'N' && this.currentRow.status === '审批中') { + // this.$alert('没有权限在审批过程中修改!', '错误', { + // confirmButtonText: '确定' + // }) + // return false + // } strVal = this.dataForm.purchaser } this.$refs.baseList.init(val, strVal) @@ -2788,7 +2794,6 @@ export default { linkNode.download = fileName // a标签的download属性规定下载文件的名称 linkNode.style.display = 'none' linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL - console.log(linkNode) // if(val == 'Y'){ // this.pdfVisible = true // this.pdfUrl = linkNode.href @@ -2983,6 +2988,36 @@ export default { // 提交 submitData() { + if (this.plmChangeApplyHeaderArr) { + for (let i = 0; i < this.plmChangeApplyHeaderArr.length; i++) { + let fieldId = this.plmChangeApplyHeaderArr[i].fieldId; + let isRequired = this.plmChangeApplyHeaderArr[i].required === 'Y'; + + let val = this.dataForm[fieldId]; + if (val === undefined) { + val = this.modelData[fieldId]; + } + + if (isRequired && (val === undefined || val === null || val === '')) { + this.$message.warning(this.plmChangeApplyHeaderArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.plmChangeApplyDetailArr) { + for (let i = 0; i < this.plmChangeApplyDetailArr.length; i++) { + // 判断集合中的该属性是否都有值 + let val = this.toolData.every(item => { + const value = item[this.plmChangeApplyDetailArr[i].fieldId] + return value !== null && value !== '' + }) + // 如果没有值 且该字段为必填 + if (!val && this.plmChangeApplyDetailArr[i].required === 'Y') { + this.$message.warning(this.plmChangeApplyDetailArr[i].fieldName + '不能为空!') + return + } + } + } this.dataForm.userName = this.$store.state.user.name this.dataForm.menuId = this.$route.meta.menuId this.dataForm.detailList = this.toolData