Parcourir la source

修改项目流转

余思翰 il y a 11 mois
Parent
révision
8ee8fe439c

+ 5
- 4
oa-back/sql/sql.sql
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 11
- 27
oa-ui/src/views/flowable/form/projectProcess/addproject.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-18 11:00:04
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-05 15:04:22
5
+ * @LastEditTime: 2024-07-05 18:13:54
6 6
 -->
7 7
 <template>
8 8
   <div class="project-wrapper">
@@ -148,7 +148,7 @@ import { parseTime } from "@/utils/ruoyi";
148 148
 import { mapGetters } from "vuex";
149 149
 import { listProject, getProject, addProject, updateProject, delProject } from "@/api/oa/project/project";
150 150
 import { getUser } from "@/api/system/user";
151
-import { getUsersDeptLeaderByDept,getDeptLeadersByDeptId } from "@/api/system/post";
151
+import { getUsersDeptLeaderByDept, getDeptLeadersByDeptId } from "@/api/system/post";
152 152
 import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm } from "@/api/flowable/todo";
153 153
 import { listProjectWork, addProjectWork, delProjectWork } from "@/api/oa/project/projectWork";
154 154
 import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
@@ -297,6 +297,7 @@ export default {
297 297
     },
298 298
     // 暂存
299 299
     async save() {
300
+      // 新增数据
300 301
       if (this.formTotal == 0) {
301 302
         this.$refs['projectAdd'].validate((vaild) => {
302 303
           if (vaild) {
@@ -308,7 +309,7 @@ export default {
308 309
             let addLog = addProject(this.addForm).then(response => {
309 310
               this.$modal.msgSuccess("新增成功");
310 311
               this.getList();
311
-              this.$refs.arrange.save()
312
+              this.$refs.arrange.save();
312 313
             });
313 314
             if (addLog.code == 200) {
314 315
               this.$refs.arrange.save()
@@ -321,7 +322,6 @@ export default {
321 322
               })
322 323
             }
323 324
           } else {
324
-            // this.$refs.scrollToMe.scrollIntoView({ behavior: 'smooth' }); 
325 325
             let dom = document.getElementById('scrollToMe')
326 326
             dom.scrollIntoView({ behavior: 'smooth' });
327 327
           }
@@ -333,43 +333,24 @@ export default {
333 333
         if (updateLog.code == 200) {
334 334
           this.$refs.arrange.save()
335 335
         }
336
-        delProjectWork(this.taskForm.formId).then(res => {
336
+        await delProjectWork(this.taskForm.formId).then(res => {
337 337
           this.workList.forEach(work => {
338 338
             work.projectId = this.taskForm.formId;
339 339
             addProjectWork(work);
340 340
           })
341
-
342 341
         })
343 342
       }
344
-
345 343
     },
346 344
     async confirmAddForm() {
347 345
       let leaderData = await getDeptLeadersByDeptId({ deptId: 105 })
348 346
       let approvalId = [];
349 347
       if (leaderData.data) {
350
-        leaderData.data.forEach(item =>{
348
+        leaderData.data.forEach(item => {
351 349
           approvalId.push(item.userId)
352 350
         })
353 351
       }
354
-      console.log(approvalId);
355 352
       this.$set(this.taskForm.variables, "approvalList", approvalId);
356
-      // this.addForm.projectId = this.taskForm.formId;
357
-      // for (let work of this.workList) {
358
-      //   work.projectId = this.taskForm.formId;
359
-      //   addProjectWork(work);
360
-      // }
361
-      // addProject(this.addForm).then(response => {
362
-      //   this.$modal.msgSuccess("新增成功");
363
-      //   this.getList();
364
-      // });
365
-      // let contractId = this.chooseContractInfo.contractId ? this.chooseContractInfo.contractId : ''
366
-      // let pcobj = { projectId: this.taskForm.formId, contractId }
367
-      // if (contractId != '') {
368
-      //   addProjectContract(pcobj).then(response => {
369
-      //     this.$modal.msgSuccess("合同关联成功");
370
-      //   })
371
-      // }
372
-      this.save();
353
+      this.save()
373 354
       this.$confirm('项目安排之后会自动发起预算编制、技术方案、技术交底、安全交底四个子流程,将无法进行撤回操作,是否继续提交?', '提示', {
374 355
         confirmButtonText: '确定',
375 356
         cancelButtonText: '取消',
@@ -381,9 +362,12 @@ export default {
381 362
         } else {
382 363
           budgetInitiator = this.$refs.arrange.peopleForm.userId
383 364
         }
365
+        if(budgetInitiator == '' || budgetInitiator == null || budgetInitiator == undefined){
366
+          return this.$message.error('请选择项目负责人!')
367
+        }
368
+        console.log(budgetInitiator);
384 369
         this.$set(this.taskForm.variables, "formId", this.taskForm.formId);
385 370
         this.$set(this.taskForm.variables, "budgetInitiator", budgetInitiator);
386
-        // return
387 371
         const params = { taskId: this.taskForm.taskId };
388 372
         // 获取下一个流程节点
389 373
         getNextFlowNode(params).then(res => {

+ 16
- 10
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue Voir le fichier

@@ -2,15 +2,15 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-19 09:24:06
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-05 09:31:26
5
+ * @LastEditTime: 2024-07-05 18:04:35
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="120px" :disabled="disabled">
10
+    <el-form ref="arrangeForm" :model="form" :rules="rules" label-width="120px" :disabled="disabled">
11 11
       <el-row :gutter="20">
12 12
         <el-col :span="12" :xs="24">
13
-          <el-form-item label="承担部门:" prop="undertakingDept">
13
+          <el-form-item label="承担部门:" prop="deptId">
14 14
             <el-select v-model="form.deptId" multiple clearable style="width:100%" @change="getDeptLeader">
15 15
               <el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName" :value="item.deptId"
16 16
                 v-if="item.deptName != '四川中水成勘院测绘工程有限责任公司'">
@@ -118,7 +118,7 @@ export default {
118 118
       type: Object,
119 119
       required: true
120 120
     },
121
-    taskName:{
121
+    taskName: {
122 122
       type: String,
123 123
       required: true
124 124
     }
@@ -127,7 +127,11 @@ export default {
127 127
     return {
128 128
       baseUrl: process.env.VUE_APP_BASE_API,
129 129
       form: {},
130
-      rules: {},
130
+      rules: {
131
+        deptId: [
132
+          { required: true, message: "请选择承担部门", trigger: "change" }
133
+        ],
134
+      },
131 135
       deptList: [],
132 136
       deptLeaderList: [],
133 137
       file: {
@@ -228,9 +232,13 @@ export default {
228 232
       this.peopleVisible = false;
229 233
     },
230 234
     save() {
231
-      this.form.projectId = this.taskForm.formId;
232
-      this.form.undertakingDept = this.form.deptId.join(',');
233
-      updateProject(this.form)
235
+      this.$refs['arrangeForm'].validate((vaild) => {
236
+        if (vaild) {
237
+          this.form.projectId = this.taskForm.formId;
238
+          this.form.undertakingDept = this.form.deptId.join(',');
239
+          updateProject(this.form)
240
+        }
241
+      })
234 242
     },
235 243
     confirmPlanForm() {
236 244
       this.$confirm('项目安排之后会自动发起预算编制、技术方案、技术交底、安全交底四个子流程,将无法进行撤回操作,是否继续提交?', '提示', {
@@ -238,8 +246,6 @@ export default {
238 246
         cancelButtonText: '取消',
239 247
         type: 'warning'
240 248
       }).then(() => {
241
-        // this.form.undertakingDept = this.form.deptId.join(',');
242
-        // updateProject(this.form)
243 249
         this.save();
244 250
         const params = { taskId: this.taskForm.taskId };
245 251
         // 获取下一个流程节点

+ 5
- 2
oa-ui/src/views/flowable/form/projectProcess/businessReview.vue Voir le fichier

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-08 13:56:14
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-05 14:33:37
5
+ * @LastEditTime: 2024-07-05 15:28:33
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -98,10 +98,13 @@ export default {
98 98
       getProject(this.taskForm.formId).then(res => {
99 99
         let deptId = res.data.undertakingDept.split(',');
100 100
         this.$store.commit('SET_UNDERDEPTID', deptId);
101
+        this.managerList = []
101 102
         for (let d of deptId) {
102 103
           getUsersManageLeaderByDept({ deptId: Number(d) }).then(resopnse => {
103 104
             if (resopnse.data) {
104
-              this.managerList.push(resopnse.data.userId)
105
+              resopnse.data.forEach(element => {
106
+                this.managerList.push(element.userId)
107
+              });
105 108
             }
106 109
           })
107 110
         }

+ 8
- 1
oa-ui/src/views/flowable/form/projectProcess/safeTab.vue Voir le fichier

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="app-container">
2
+  <div class="app-container" v-loading="loading">
3 3
     <el-empty description="未进行安全交底" v-if="isEmpty"></el-empty>
4 4
     <div v-if="!isEmpty">
5 5
       <h3 class="text-center"><b>{{ form.projectNumber + '-' + form.projectName + ' 安全交底' }}</b></h3>
@@ -88,7 +88,12 @@ export default {
88 88
     },
89 89
     projectName(newval) {
90 90
       this.$set(this.form, "projectName", newval);
91
+    },
92
+    'taskForm.formId'(){
93
+      this.loading = true;
94
+      this.initForm();
91 95
     }
96
+
92 97
   },
93 98
   data() {
94 99
     return {
@@ -96,6 +101,7 @@ export default {
96 101
       form: {},
97 102
       rules: {},
98 103
       userList: [],
104
+      loading:false
99 105
     }
100 106
   },
101 107
   mounted() {
@@ -117,6 +123,7 @@ export default {
117 123
               if (res.data) {
118 124
                 this.$set(this.form, "projectNumber", res.data.projectNumber);
119 125
                 this.$set(this.form, "projectName", res.data.projectName);
126
+                this.loading = false
120 127
               }
121 128
             })
122 129
           }

+ 7
- 1
oa-ui/src/views/flowable/form/projectProcess/technicalTab.vue Voir le fichier

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="app-container">
2
+  <div class="app-container" v-loading="loading">
3 3
     <el-empty description="未进行技术交底" v-if="isEmpty"></el-empty>
4 4
     <div v-if="!isEmpty">
5 5
       <h3 class="text-center"><b>{{ form.projectNumber + '-' + form.projectName + ' 技术交底' }}</b></h3>
@@ -85,6 +85,10 @@ export default {
85 85
     },
86 86
     projectName(newval) {
87 87
       this.$set(this.form, "projectName", newval);
88
+    },
89
+    'taskForm.formId'(){
90
+      this.loading = true;
91
+      this.initForm();
88 92
     }
89 93
   },
90 94
   data() {
@@ -93,6 +97,7 @@ export default {
93 97
       form: {},
94 98
       rules: {},
95 99
       userList: [],
100
+      loading:false,
96 101
     }
97 102
   },
98 103
   mounted() {
@@ -114,6 +119,7 @@ export default {
114 119
               if (res.data) {
115 120
                 this.$set(this.form, "projectNumber", res.data.projectNumber);
116 121
                 this.$set(this.form, "projectName", res.data.projectName);
122
+                this.loading = false;
117 123
               }
118 124
             })
119 125
           }

+ 6
- 5
oa-ui/src/views/flowable/form/technicalPlan.vue Voir le fichier

@@ -188,7 +188,7 @@
188 188
 
189 189
 <script>
190 190
 import { parseTime } from "@/utils/ruoyi";
191
-import { listTechnical, getTechnical, delTechnical, addTechnical, updateTechnical } from "@/api/oa/technical/technicalPlan";
191
+import { listTechnicalPlan, getTechnicalPlan, delTechnicalPlan, addTechnicalPlan, updateTechnicalPlan } from "@/api/oa/technical/technicalPlan";
192 192
 import { getProject } from "@/api/oa/project/project";
193 193
 import { listUser } from '@/api/system/user';
194 194
 import flow from '@/views/flowable/task/todo/detail/flow';
@@ -331,7 +331,7 @@ export default {
331 331
       }
332 332
     },
333 333
     initForm() {
334
-      getTechnical(this.taskForm.formId).then(res => {
334
+      getTechnicalPlan(this.taskForm.formId).then(res => {
335 335
         if (this.isEmptyObject(res.data)) {
336 336
           this.formTotal = 0;
337 337
           this.form.technicalPlanner = this.$store.getters.userId;
@@ -369,7 +369,7 @@ export default {
369 369
     /** 查询cmc技术方案列表 */
370 370
     getList() {
371 371
       this.loading = true;
372
-      listTechnical(this.queryParams).then(response => {
372
+      listTechnicalPlan(this.queryParams).then(response => {
373 373
         this.technicalList = response.rows;
374 374
         this.total = response.total;
375 375
         this.loading = false;
@@ -428,7 +428,7 @@ export default {
428 428
         if (valid) {
429 429
           if (this.formTotal != 0) {
430 430
             this.form.qualityInspector = this.form.qualityInspector.join(',');
431
-            updateTechnical(this.form).then(response => {
431
+            updateTechnicalPlan(this.form).then(response => {
432 432
               this.$modal.msgSuccess("修改成功");
433 433
               this.open = false;
434 434
               this.getList();
@@ -463,7 +463,7 @@ export default {
463 463
             this.form.qualityInspector = this.form.qualityInspector.join(',');
464 464
             this.form.technicalPlanId = this.taskForm.formId;
465 465
             this.form.projectId = this.taskForm.formId;
466
-            addTechnical(this.form).then(response => {
466
+            addTechnicalPlan(this.form).then(response => {
467 467
               this.$modal.msgSuccess("新增成功");
468 468
               this.open = false;
469 469
               this.getList();
@@ -471,6 +471,7 @@ export default {
471 471
             const params = { taskId: this.taskForm.taskId };
472 472
             getNextFlowNode(params).then(res => {
473 473
               this.$set(this.taskForm.variables, "formId", this.taskForm.formId);
474
+              this.$set(this.taskForm.variables, "techInitiator", this.form.technicalDirector);
474 475
               this.$set(this.taskForm.variables, "approval", this.form.technicalDesigner);
475 476
               complete(this.taskForm).then(response => {
476 477
                 this.$modal.msgSuccess(response.msg);

Loading…
Annuler
Enregistrer