Browse Source

修改成果归档

余思翰 8 months ago
parent
commit
a9328420b6
1 changed files with 24 additions and 7 deletions
  1. 24
    7
      oa-ui/src/views/flowable/form/archiveForm.vue

+ 24
- 7
oa-ui/src/views/flowable/form/archiveForm.vue View File

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-06-21 18:51:51
3
  * @Date: 2024-06-21 18:51:51
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-18 16:56:44
5
+ * @LastEditTime: 2024-09-19 13:57:28
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
105
             <el-input type="textarea" v-model="form.archiveComment" placeholder="请输入技术质量与安全部归档意见"
105
             <el-input type="textarea" v-model="form.archiveComment" placeholder="请输入技术质量与安全部归档意见"
106
               :disabled="taskName != '成果归档'" :autosize="{ minRows: 4 }" />
106
               :disabled="taskName != '成果归档'" :autosize="{ minRows: 4 }" />
107
           </el-form-item>
107
           </el-form-item>
108
-          <auditor-row key="2" :isCurrent="taskName == '成果归档'" :signature="form.archiver" :signTime="form.archiveTime"></auditor-row>
108
+          <auditor-row key="2" :isCurrent="taskName == '成果归档'" :signature="form.archiver"
109
+            :signTime="form.archiveTime"></auditor-row>
109
         </el-form>
110
         </el-form>
110
         <div style="text-align: center;" v-if="isFlow">
111
         <div style="text-align: center;" v-if="isFlow">
111
-          <el-button type="primary" @click="submitForm" :disabled="taskName == '成果归档' && hasArchievement == false">
112
+          <el-button type="primary" @click="submitForm" v-if="taskName == '成果归档'"
113
+            :disabled="taskName == '成果归档' && hasArchievement == false">
112
             提交并结束流程</el-button>
114
             提交并结束流程</el-button>
115
+          <el-button type="primary" @click="submitForm" v-else
116
+            :disabled="taskName == '成果归档' && hasArchievement == false">
117
+            提交</el-button>
113
         </div>
118
         </div>
114
       </el-col>
119
       </el-col>
115
       <el-col :span="6" :xs="24" v-if="isFlow">
120
       <el-col :span="6" :xs="24" v-if="isFlow">
296
     initRules() {
301
     initRules() {
297
       if (this.taskName == '归档发起') {
302
       if (this.taskName == '归档发起') {
298
         this.rules = {
303
         this.rules = {
304
+          projectId: [
305
+            { required: true, message: '请选择项目', trigger: 'blur' }
306
+          ],
299
           submitTime: [
307
           submitTime: [
300
             { required: true, message: '请选择成果提交日期', trigger: 'change' }
308
             { required: true, message: '请选择成果提交日期', trigger: 'change' }
301
           ]
309
           ]
426
             });
434
             });
427
             const params = { taskId: this.taskForm.taskId };
435
             const params = { taskId: this.taskForm.taskId };
428
             getNextFlowNode(params).then(res => {
436
             getNextFlowNode(params).then(res => {
429
-              this.checkSendUser = true;
430
-              this.completeOpen = true;
431
-              this.completeTitle = "流程审批";
437
+              // this.checkSendUser = true;
438
+              // this.completeOpen = true;
439
+              // this.completeTitle = "流程审批";
440
+              getUsersDeptLeaderByDept({ deptId: 109 }).then(res => {
441
+                let userId = res.data.userId;
442
+                this.$set(this.taskForm.variables, "approval", userId);
443
+                complete(this.taskForm).then(response => {
444
+                  this.$modal.msgSuccess(response.msg);
445
+                  this.$emit('goBack')
446
+                });
447
+              });
432
             })
448
             })
433
           }
449
           }
434
         }
450
         }
441
       } else if (val.length == 1) {
457
       } else if (val.length == 1) {
442
         this.chooseProject = val[0]
458
         this.chooseProject = val[0]
443
         this.isSelect = true
459
         this.isSelect = true
444
-        this.form.projectId = val[0].projectId
460
+        this.$set(this.form, 'projectId', val[0].projectId)
461
+        this.$refs.form.validateField('projectId');
445
       }
462
       }
446
       this.openProject = false;
463
       this.openProject = false;
447
       listAchievement({ projectId: this.form.projectId }).then(response => {
464
       listAchievement({ projectId: this.form.projectId }).then(response => {

Loading…
Cancel
Save