|
|
@@ -232,6 +232,7 @@ export default {
|
|
232
|
232
|
formTotal: 0,
|
|
233
|
233
|
siteExpenses: 0, //预结算额
|
|
234
|
234
|
exceed: false, //是否超预算
|
|
|
235
|
+ need: true, //是否需要分管审批
|
|
235
|
236
|
hasBorrow: 0, //已申请借款
|
|
236
|
237
|
deptId: undefined,
|
|
237
|
238
|
returnBack: false,
|
|
|
@@ -302,7 +303,9 @@ export default {
|
|
302
|
303
|
getBorrow(this.taskForm.formId).then(async res => {
|
|
303
|
304
|
if (res.data) {
|
|
304
|
305
|
this.formTotal = 1;
|
|
305
|
|
- this.form = res.data;
|
|
|
306
|
+ this.form = res.data;
|
|
|
307
|
+ if (this.form.applyDept == 104) //董事长分管的综合事务部,跳过分管审批
|
|
|
308
|
+ this.need = false;
|
|
306
|
309
|
if (!this.applierUserName) {
|
|
307
|
310
|
this.applierUserName = this.form.applierUser.nickName;
|
|
308
|
311
|
}
|
|
|
@@ -468,16 +471,32 @@ export default {
|
|
468
|
471
|
// 处理借款申请节点
|
|
469
|
472
|
await this.borrowApprovalFun();
|
|
470
|
473
|
} else if (this.taskName == '部门审核') {
|
|
471
|
|
- // 得到分管领导根据部门
|
|
472
|
|
- const res = await getUsersManageLeaderByDept({ deptId: this.form.applyDept });
|
|
473
|
|
- let userIds = [];
|
|
474
|
|
- if (res.data) {
|
|
475
|
|
- res.data.forEach(item => {
|
|
476
|
|
- userIds.push(item.userId)
|
|
477
|
|
- })
|
|
478
|
|
- }
|
|
479
|
|
- this.taskForm.variables.approvalList = userIds;
|
|
480
|
|
- this.handleComplete(this.taskForm);
|
|
|
474
|
+ this.taskForm.variables.need = this.need;
|
|
|
475
|
+ if (this.need) {
|
|
|
476
|
+ // 得到分管领导根据部门
|
|
|
477
|
+ const res = await getUsersManageLeaderByDept({ deptId: this.form.applyDept });
|
|
|
478
|
+ let userIds = [];
|
|
|
479
|
+ if (res.data) {
|
|
|
480
|
+ res.data.forEach(item => {
|
|
|
481
|
+ userIds.push(item.userId)
|
|
|
482
|
+ })
|
|
|
483
|
+ }
|
|
|
484
|
+ this.taskForm.variables.approvalList = userIds;
|
|
|
485
|
+ this.handleComplete(this.taskForm);
|
|
|
486
|
+ }
|
|
|
487
|
+ else {
|
|
|
488
|
+ const res = await getUsersManageLeaderByDept({ deptId: this.form.applyDept });
|
|
|
489
|
+ let userIds = [];
|
|
|
490
|
+ if (res.data) {
|
|
|
491
|
+ res.data.forEach(item => {
|
|
|
492
|
+ userIds.push(item.userId)
|
|
|
493
|
+ })
|
|
|
494
|
+ }
|
|
|
495
|
+ this.taskForm.variables.approvalList = userIds;
|
|
|
496
|
+ const response = await getUserByPost({ postName: '总经理' });
|
|
|
497
|
+ this.taskForm.variables.approval = response.data[0].userId;
|
|
|
498
|
+ this.handleComplete(this.taskForm);
|
|
|
499
|
+ }
|
|
481
|
500
|
} else if (this.taskName == '分管审核') {
|
|
482
|
501
|
// 得到总经理
|
|
483
|
502
|
const res = await getUserByPost({ postName: '总经理' });
|
|
|
@@ -533,7 +552,7 @@ export default {
|
|
533
|
552
|
const res = await getUserByPost({ postName: '党总支书记' });
|
|
534
|
553
|
userId = res.data[0].userId;
|
|
535
|
554
|
} else {
|
|
536
|
|
- const res = await getUserByPost({ postName: '团委书记' });
|
|
|
555
|
+ const res = await getUserByPost({ postName: '团支部书记' });
|
|
537
|
556
|
userId = res.data[0].userId;
|
|
538
|
557
|
}
|
|
539
|
558
|
this.taskForm.variables.dept = this.deptId;
|