|
@@ -2,12 +2,12 @@
|
2
|
2
|
* @Author: ysh
|
3
|
3
|
* @Date: 2024-04-08 13:56:14
|
4
|
4
|
* @LastEditors: Please set LastEditors
|
5
|
|
- * @LastEditTime: 2024-04-12 14:17:37
|
|
5
|
+ * @LastEditTime: 2024-04-12 17:32:47
|
6
|
6
|
-->
|
7
|
7
|
<template>
|
8
|
8
|
<div class="app-container">
|
9
|
9
|
<h2 style="text-align:center;">生产确认</h2>
|
10
|
|
- <el-form :model="form" :rules="rules" label-width="100px" :disabled="disabled">
|
|
10
|
+ <el-form ref="scConfirm" :model="form" :rules="rules" label-width="100px" :disabled="disabled">
|
11
|
11
|
<el-form-item label="确认信息:" prop="scComment">
|
12
|
12
|
<el-input type="textarea" :rows="4" placeholder="请输入确认信息" v-model="form.scComment">
|
13
|
13
|
</el-input>
|
|
@@ -82,10 +82,12 @@ export default {
|
82
|
82
|
initForm() {
|
83
|
83
|
getProjectComment(this.taskForm.formId).then(res => {
|
84
|
84
|
if (res.data) {
|
|
85
|
+ debugger
|
85
|
86
|
this.form = res.data
|
86
|
|
- // if (res.data.scApproverName) {
|
87
|
|
- // this.form.scApproverName = res.data.scApproverName
|
88
|
|
- // }
|
|
87
|
+ this.form.scApprover = '';
|
|
88
|
+ if (res.data.scApproverName) {
|
|
89
|
+ this.form.scApproverName = res.data.scApproverName
|
|
90
|
+ }
|
89
|
91
|
} else {
|
90
|
92
|
this.form.scApprover = '';
|
91
|
93
|
this.form.scApproverName = '';
|
|
@@ -137,21 +139,33 @@ export default {
|
137
|
139
|
} else {
|
138
|
140
|
this.form.scApproverName = this.$store.state.user.name;
|
139
|
141
|
}
|
140
|
|
-
|
|
142
|
+ this.form.scApprovalTime = parseTime(new Date(), '{y}-{m}-{d}')
|
141
|
143
|
},
|
142
|
144
|
confirm() {
|
143
|
|
- this.form.projectId = this.taskForm.formId
|
144
|
|
- console.log(this.form);
|
145
|
|
- updateProjectComment(this.form)
|
146
|
|
- const params = { taskId: this.taskForm.taskId };
|
147
|
|
- // 获取下一个流程节点
|
148
|
|
- getNextFlowNode(params).then(res => {
|
149
|
|
- this.$set(this.taskForm.variables, "approval", this.deptLeaderList);
|
150
|
|
- complete(this.taskForm).then(response => {
|
151
|
|
- this.$modal.msgSuccess(response.msg);
|
152
|
|
- this.$emit("goBack");
|
153
|
|
- });
|
154
|
|
- });
|
|
145
|
+ this.$refs['scConfirm'].validate((valid) => {
|
|
146
|
+ if (valid) {
|
|
147
|
+ this.form.projectId = this.taskForm.formId
|
|
148
|
+ debugger
|
|
149
|
+ if (this.form.scApprover == '' || this.form.scApprover == null) {
|
|
150
|
+ this.$modal.msgError('请签名');
|
|
151
|
+ return
|
|
152
|
+ }
|
|
153
|
+ updateProjectComment(this.form)
|
|
154
|
+ const params = { taskId: this.taskForm.taskId };
|
|
155
|
+ // 获取下一个流程节点
|
|
156
|
+ getNextFlowNode(params).then(res => {
|
|
157
|
+ this.$set(this.taskForm.variables, "approval", this.deptLeaderList);
|
|
158
|
+ complete(this.taskForm).then(response => {
|
|
159
|
+ this.$modal.msgSuccess(response.msg);
|
|
160
|
+ this.$emit("goBack");
|
|
161
|
+ });
|
|
162
|
+ });
|
|
163
|
+ } else {
|
|
164
|
+ this.$modal.msgError('必填项未写');
|
|
165
|
+ return false;
|
|
166
|
+ }
|
|
167
|
+ })
|
|
168
|
+
|
155
|
169
|
},
|
156
|
170
|
|
157
|
171
|
},
|