From 036ade140b054ca635800c0aeae94dcba4e31dd0 Mon Sep 17 00:00:00 2001 From: yangzhicheng Date: Thu, 18 Jul 2024 15:52:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E7=BB=88=E4=BA=86=20chec?= =?UTF-8?q?k=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectionPlanDetail.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/inspection/inspectionPlanDetail.vue b/src/views/inspection/inspectionPlanDetail.vue index e9f74ec..e52e3bf 100644 --- a/src/views/inspection/inspectionPlanDetail.vue +++ b/src/views/inspection/inspectionPlanDetail.vue @@ -34,8 +34,10 @@ var validateStart = (rule, value, callback) => { if (value === '') { callback(new Error('请输入计划开始时间')); - } else if(value > this.form.endTime) { - callback(new Error('输入的计划起始时间大于计划终了时间')); + } else if(this.form.endTime !== null && this.form.endTime !== '') { + if(value > this.form.endTime) { + callback(new Error('输入的计划起始时间大于计划终了时间')); + } } else { callback(); } @@ -43,8 +45,10 @@ var validateEnd = (rule, value, callback) => { if (value === '') { callback(new Error('请输入计划终了时间')); - } else if(this.form.startTime > value) { - callback(new Error('输入的计划起始时间大于计划终了时间')); + } else if(this.form.startTime !== null && this.form.startTime !== '') { + if(this.form.startTime > value) { + callback(new Error('输入的计划终了时间小于计划起始时间')); + } } else { callback(); } From 9870db3da05ce73175615914f7a2fc6c7f7c8837 Mon Sep 17 00:00:00 2001 From: Dayu <1010@qq.com> Date: Thu, 18 Jul 2024 15:54:37 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=97=A5=E6=9C=9Fcheck=20=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectiontasks.vue | 4 ++++ .../inspection/inspectiontasksDetail.vue | 21 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/views/inspection/inspectiontasks.vue b/src/views/inspection/inspectiontasks.vue index 04fdae2..cff2358 100644 --- a/src/views/inspection/inspectiontasks.vue +++ b/src/views/inspection/inspectiontasks.vue @@ -109,6 +109,10 @@ callback(new Error('请输入任务执行开始时间')); } else if(this.currStartDate > value.replaceAll('/','').slice(0, 8)) { callback(new Error('输入的任务执行开始时间小于任务开始日期')); + }else if(this.resultForm.executeEndDate !== '' && this.resultForm.executeEndDate !== null) { + if(this.resultForm.executeEndDate.trim().replaceAll('/','') < value.trim().replaceAll('/','')) { + callback(new Error('输入的任务执行开始时间大于任务执行结束时间')); + } } else { callback(); } diff --git a/src/views/inspection/inspectiontasksDetail.vue b/src/views/inspection/inspectiontasksDetail.vue index c3c4970..63769ec 100644 --- a/src/views/inspection/inspectiontasksDetail.vue +++ b/src/views/inspection/inspectiontasksDetail.vue @@ -52,7 +52,18 @@ import request from "@/router/axios"; export default { name: "inspectiontasksDetail", data () { - var validateTime = (rule, value, callback) => { + var validateStartTime = (rule, value, callback) => { + if (value === '') { + callback(new Error('请输入任务开始日期')); + } else if(this.information_form.taskEndDate !== '' && this.information_form.taskEndDate !== null) { + if(this.information_form.taskEndDate < value) { + callback(new Error('输入的任务开始日期大于任务完成日期')); + } + } else { + callback(); + } + }; + var validateEndTime = (rule, value, callback) => { if (value === '') { callback(new Error('请输入任务完成日期')); } else if(this.information_form.taskStartDate > value) { @@ -132,11 +143,7 @@ export default { labelWidth: 120, format: 'yyyy年MM月dd日', valueFormat: "yyyyMMdd", - rules: [{ - required: true, - message: "请输入任务开始日期", - trigger: "blur" - }] + rules: [{required: true, validator: validateStartTime, trigger: 'blur' }] }, { label: "任务完成日期", @@ -146,7 +153,7 @@ export default { labelWidth: 120, format: 'yyyy年MM月dd日', valueFormat: "yyyyMMdd", - rules: [{required: true, validator: validateTime, trigger: 'blur' }] + rules: [{required: true, validator: validateEndTime, trigger: 'blur' }] }, { label: "对象编号", From 2b1465e6e39320add3fb20273e08cf27e56a7ceb Mon Sep 17 00:00:00 2001 From: weitingdong <2480899115@qq.com> Date: Thu, 18 Jul 2024 16:13:26 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectionobject.vue | 13 ++++++----- .../inspection/inspectionobjectDetail.vue | 10 ++++----- src/views/leger/equipmentledger.vue | 8 +++++-- src/views/leger/equipmentledgerDetail.vue | 12 +++++----- src/views/leger/toolinventoryrecord.vue | 10 ++++++--- src/views/leger/toolinventoryrecordDetail.vue | 22 +++++++++---------- src/views/smart/workpermit.vue | 12 ++++++---- src/views/smart/workpermitDetail.vue | 12 +++++----- 8 files changed, 57 insertions(+), 42 deletions(-) diff --git a/src/views/inspection/inspectionobject.vue b/src/views/inspection/inspectionobject.vue index 994d6a1..22a2d9f 100644 --- a/src/views/inspection/inspectionobject.vue +++ b/src/views/inspection/inspectionobject.vue @@ -24,36 +24,39 @@ size="small" icon="el-icon-delete" plain - v-if="permission.inspectionroute_delete" + v-if="permission.inspectionobject_delete" @click="handleDelete">批量删除 { - // return this.permission['inspectionroute_col_' + v.prop] + // return this.permission['inspectionobject_col_' + v.prop] // }) return { addBtn: false, diff --git a/src/views/inspection/inspectionobjectDetail.vue b/src/views/inspection/inspectionobjectDetail.vue index ff481a4..3a63578 100644 --- a/src/views/inspection/inspectionobjectDetail.vue +++ b/src/views/inspection/inspectionobjectDetail.vue @@ -9,14 +9,14 @@
+ v-if="addUpdateShowButton && permission.inspectionobject_add"> 确定 + v-if="shouldShowButton && permission.inspectionobject_edit"> 修改
@@ -30,7 +30,7 @@ import {getToken} from "@/util/auth"; import request from "@/router/axios"; export default { - name: "inspectionrouteDetail", + name: "inspectionobjectDetail", data() { return { addUpdateShowButton:{}, @@ -233,7 +233,7 @@ export default { ...mapGetters(["permission"]), permissionList() { // this.option.column = this.option.column.filter(v => { - // return this.permission['inspectionroute_col_' + v.prop] + // return this.permission['inspectionobject_col_' + v.prop] // }) return { addBtn: false, diff --git a/src/views/leger/equipmentledger.vue b/src/views/leger/equipmentledger.vue index 5aef489..9a955d5 100644 --- a/src/views/leger/equipmentledger.vue +++ b/src/views/leger/equipmentledger.vue @@ -32,27 +32,31 @@ 新增 批量审核 批量驳回 导出 diff --git a/src/views/leger/equipmentledgerDetail.vue b/src/views/leger/equipmentledgerDetail.vue index b0b880c..a8f1b9c 100644 --- a/src/views/leger/equipmentledgerDetail.vue +++ b/src/views/leger/equipmentledgerDetail.vue @@ -75,32 +75,32 @@ + v-if="addUpdateShowButton && permission.equipmentledger_add"> 确定 + v-if="addUpdateShowButton "> 取消 + v-if="shouldShowButton && permission.equipmentledger_audit"> 审核 + v-if="shouldShowButton && permission.equipmentledger_reject"> 驳回 + v-if="UpdateShowButton && permission.equipmentledger_edit"> 修改 + v-if="shouldShowButton && permission.equipmentledger_delete"> 删除 diff --git a/src/views/leger/toolinventoryrecord.vue b/src/views/leger/toolinventoryrecord.vue index 78d9cd6..ce9667e 100644 --- a/src/views/leger/toolinventoryrecord.vue +++ b/src/views/leger/toolinventoryrecord.vue @@ -31,27 +31,31 @@ 新增 批量审核 批量驳回 导出 + v-if="permission.toolinventoryrecord_export" + @click="handleExport()">导出 diff --git a/src/views/leger/toolinventoryrecordDetail.vue b/src/views/leger/toolinventoryrecordDetail.vue index 22e5151..fd9ca5b 100644 --- a/src/views/leger/toolinventoryrecordDetail.vue +++ b/src/views/leger/toolinventoryrecordDetail.vue @@ -100,35 +100,35 @@
+ + 确定 + v-if="addUpdateShowButton "> 取消 - - 确定 + v-if="shouldShowButton && permission.toolinventoryrecord_audit"> 审核 + v-if="shouldShowButton && permission.toolinventoryrecord_reject"> 驳回 + v-if="UpdateShowButton && permission.toolinventoryrecord_edit"> 修改 + v-if="shouldShowButton && permission.toolinventoryrecord_delete"> 删除
@@ -173,7 +173,7 @@ import {readonly} from "vue"; import {getToken} from "@/util/auth"; import {getListByTaskNo} from "@/api/inspection/inspectionresult"; export default { - name: "equipmentledgerDetail", + name: "toolinventoryrecordDetail", data () { return { checkStatusValue:{}, diff --git a/src/views/smart/workpermit.vue b/src/views/smart/workpermit.vue index 9cf6a97..945cb31 100644 --- a/src/views/smart/workpermit.vue +++ b/src/views/smart/workpermit.vue @@ -23,7 +23,7 @@ size="small" icon="el-icon-delete" plain - v-if="permission.equipmentledger_delete" + v-if="permission.workpermit_delete" @click="handleDelete">批量删除 @@ -31,28 +31,32 @@ 新增 批量审核 批量驳回 导出 + v-if="addUpdateShowButton && permission.workpermit_add"> 确定 + v-if="shouldShowButton && permission.workpermit_close"> 关票 + v-if="shouldShowButton && permission.workpermit_audit"> 审核 + v-if="shouldShowButton && permission.workpermit_reject"> 驳回 + v-if="UpdateShowButton && permission.workpermit_edit"> 修改 + v-if="shouldShowButton && permission.workorder_delete"> 删除 From 8c63d848645c07ad18ab07e364e3364a76853f62 Mon Sep 17 00:00:00 2001 From: yangzhicheng Date: Thu, 18 Jul 2024 16:15:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E5=A4=84=E7=90=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectionplan.vue | 4 ++-- src/views/inspection/inspectionroute.vue | 4 ++-- src/views/spares/materialDetail.vue | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/views/inspection/inspectionplan.vue b/src/views/inspection/inspectionplan.vue index 96d4a7b..129e7df 100644 --- a/src/views/inspection/inspectionplan.vue +++ b/src/views/inspection/inspectionplan.vue @@ -320,7 +320,7 @@ return; } this.cancelBox = true; - this.$refs.cancelForm.resetForm(); + this.cancelForm.cancelReason = ''; }, handleDetailCancel() { this.$confirm("是否将选择数据改为失效状态?", { @@ -332,7 +332,7 @@ return lapse(this.ids, this.cancelForm.cancelReason); }) .then(() => { - this.$refs.cancelForm.resetForm(); + this.cancelForm.cancelReason = ''; this.cancelBox = false; this.onLoad(this.page); this.$message({ diff --git a/src/views/inspection/inspectionroute.vue b/src/views/inspection/inspectionroute.vue index 89654af..17801cf 100644 --- a/src/views/inspection/inspectionroute.vue +++ b/src/views/inspection/inspectionroute.vue @@ -302,7 +302,7 @@ return; } this.cancelBox = true; - this.$refs.cancelForm.resetForm(); + this.cancelForm.cancelReason = ''; }, handleDetailCancel() { this.$confirm("是否将选择数据改为失效状态?", { @@ -314,7 +314,7 @@ return lapse(this.ids, this.cancelForm.cancelReason); }) .then(() => { - this.$refs.cancelForm.resetForm(); + this.cancelForm.cancelReason = ''; this.cancelBox = false; this.onLoad(this.page); this.$message({ diff --git a/src/views/spares/materialDetail.vue b/src/views/spares/materialDetail.vue index 5db6cb9..be4f991 100644 --- a/src/views/spares/materialDetail.vue +++ b/src/views/spares/materialDetail.vue @@ -442,6 +442,8 @@ }, methods: { test(val) { + this.diaForm.code = ''; + this.diaForm.type = ''; this.dialogVisible = true; }, handleFormSubmit() { @@ -630,7 +632,8 @@ if (valid) { done() codeAdd(this.diaForm).then(() => { - this.$refs.diaForm.resetForm(); + this.diaForm.code = ''; + this.diaForm.type = ''; this.dialogVisible = false; this.SearchClassCode(); this.$message({