|
|
@@ -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 => {
|