瀏覽代碼

修改项目流转

余思翰 11 月之前
父節點
當前提交
8ee8fe439c

+ 5
- 4
oa-back/sql/sql.sql
文件差異過大導致無法顯示
查看文件


+ 11
- 27
oa-ui/src/views/flowable/form/projectProcess/addproject.vue 查看文件

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

+ 16
- 10
oa-ui/src/views/flowable/form/projectProcess/arrangeProject.vue 查看文件

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

+ 5
- 2
oa-ui/src/views/flowable/form/projectProcess/businessReview.vue 查看文件

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-04-08 13:56:14
3
  * @Date: 2024-04-08 13:56:14
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-05 14:33:37
5
+ * @LastEditTime: 2024-07-05 15:28:33
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
98
       getProject(this.taskForm.formId).then(res => {
98
       getProject(this.taskForm.formId).then(res => {
99
         let deptId = res.data.undertakingDept.split(',');
99
         let deptId = res.data.undertakingDept.split(',');
100
         this.$store.commit('SET_UNDERDEPTID', deptId);
100
         this.$store.commit('SET_UNDERDEPTID', deptId);
101
+        this.managerList = []
101
         for (let d of deptId) {
102
         for (let d of deptId) {
102
           getUsersManageLeaderByDept({ deptId: Number(d) }).then(resopnse => {
103
           getUsersManageLeaderByDept({ deptId: Number(d) }).then(resopnse => {
103
             if (resopnse.data) {
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 查看文件

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

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

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

Loading…
取消
儲存