Sfoglia il codice sorgente

给每个流程加上结束提醒,借款添加保存按钮,预算去掉人员成本

余思翰 6 mesi fa
parent
commit
7fd4363a3c

+ 7
- 5
oa-ui/src/views/flowable/form/archiveForm.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:51
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-19 13:57:28
5
+ * @LastEditTime: 2024-10-08 09:32:30
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -421,10 +421,12 @@ export default {
421 421
                 })
422 422
               }
423 423
               if (this.taskName == '成果归档') {
424
-                complete(this.taskForm).then(response => {
425
-                  this.$modal.msgSuccess(response.msg);
426
-                  this.$emit('goBack')
427
-                });
424
+                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
425
+                  complete(this.taskForm).then(response => {
426
+                    this.$modal.msgSuccess(response.msg);
427
+                    this.$emit('goBack')
428
+                  });
429
+                })
428 430
               }
429 431
             })
430 432
           } else {

+ 10
- 10
oa-ui/src/views/flowable/form/budget/addBudget.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-25 15:05:59
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-20 09:28:33
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 15:47:18
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -123,9 +123,9 @@
123 123
                 <tr>
124 124
                   <td style="width: 80px">姓名</td>
125 125
                   <td style="width: 100px">部门</td>
126
-                  <td style="width: 100px">基础工资</td>
127
-                  <td style="width: 100px">岗位工资</td>
128
-                  <td style="width: 110px">人员成本(元/天)</td>
126
+                  <!-- <td style="width: 100px">基础工资</td> -->
127
+                  <!-- <td style="width: 100px">岗位工资</td> -->
128
+                  <!-- <td style="width: 110px">人员成本(元/天)</td> -->
129 129
                   <!-- <td style="width: 100px">进出场单价</td> -->
130 130
                   <td style="width: 100px">预算天数</td>
131 131
                   <td style="width: 100px">总额</td>
@@ -133,16 +133,16 @@
133 133
                 <tr v-for="user in chooseUser" :key="user.userId">
134 134
                   <td>{{ user.nickName }}</td>
135 135
                   <td>{{ user.dept ? user.dept.deptName : user.deptName }}</td>
136
-                  <td>{{ 1780 }}</td>
137
-                  <td>{{ user.salary.salary }}</td>
138
-                  <td>{{ parseFloat((user.salary.salary + 1780) / 21.75).toFixed(2) }}</td>
136
+                  <!-- <td>{{ 1780 }}</td> -->
137
+                  <!-- <td>{{ user.salary.salary }}</td> -->
138
+                  <!-- <td>{{ parseFloat((user.salary.salary + 1780) / 21.75).toFixed(2) }}</td> -->
139 139
                   <td>
140 140
                     <el-input v-model="user.days" placeholder="请输入天数" @blur="calculateUserTotal(user)"></el-input>
141 141
                   </td>
142 142
                   <td class="staffCost">{{ user.staffCost }}</td>
143 143
                 </tr>
144 144
                 <tr>
145
-                  <td colspan="6">合计</td>
145
+                  <td colspan="3">合计</td>
146 146
                   <td>{{ budgetForm.staffCost }}</td>
147 147
                 </tr>
148 148
               </table>
@@ -192,7 +192,7 @@
192 192
                   <td class="carCost">{{ car.expense }}</td> 
193 193
                 </tr>
194 194
                 <tr>
195
-                  <td colspan="5">合计</td>
195
+                  <td colspan="6">合计</td>
196 196
                   <td>{{ budgetForm.carCost }}</td>
197 197
                 </tr>
198 198
               </table>

+ 1
- 1
oa-ui/src/views/flowable/form/budget/budget.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-08 16:08:33
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-07-10 18:25:25
5
+ * @LastEditTime: 2024-10-08 15:23:50
6 6
 -->
7 7
 <template>
8 8
   <div>

+ 10
- 10
oa-ui/src/views/flowable/form/budget/components/budgetTable.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 15:50:41
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-20 10:23:57
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 15:58:46
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -59,20 +59,20 @@
59 59
           <table border="1" style="width: 100%;">
60 60
             <tr v-if="userLen != 1" style="background-color:#f8f8f9">
61 61
               <td :rowspan="userLen" style="background-color:#f8f8f9">人员</td>
62
-              <td>姓名</td>
63
-              <td>基本工资</td>
64
-              <td>岗位工资</td>
65
-              <td>人员成本(天)</td>
62
+              <td colspan="4">姓名</td>
63
+              <!-- <td>基本工资</td> -->
64
+              <!-- <td>岗位工资</td> -->
65
+              <!-- <td>人员成本(天)</td> -->
66 66
               <td>预算天数</td>
67 67
               <td></td>
68 68
               <td>金额</td>
69 69
               <td>备注</td>
70 70
             </tr>
71 71
             <tr v-for="user in budgetForm.chooseUser" :key="'user' + user.userId">
72
-              <td>{{ user.nickName }}</td>
73
-              <td>1780</td>
74
-              <td>{{ user.salary.salary }}</td>
75
-              <td>{{ parseFloat((user.salary.salary + 1780) / 21.75).toFixed(2) }}</td>
72
+              <td colspan="4">{{ user.nickName }}</td>
73
+              <!-- <td>1780</td> -->
74
+              <!-- <td>{{ user.salary.salary }}</td> -->
75
+              <!-- <td>{{ parseFloat((user.salary.salary + 1780) / 21.75).toFixed(2) }}</td> -->
76 76
               <!-- <td>{{ user.inOutPrice }}</td> -->
77 77
               <td>{{ user.days }}</td>
78 78
               <td></td>

+ 7
- 5
oa-ui/src/views/flowable/form/business/contractForm.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 15:31:57
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-29 11:01:48
5
+ * @LastEditTime: 2024-10-08 09:28:41
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -975,10 +975,12 @@ export default {
975 975
                 });
976 976
               }
977 977
               else if (this.taskName == '合同签订') {
978
-                complete(this.taskForm).then(response => {
979
-                  this.$modal.msgSuccess(response.msg);
980
-                  this.$emit('goBack')
981
-                });
978
+                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
979
+                  complete(this.taskForm).then(response => {
980
+                    this.$modal.msgSuccess(response.msg);
981
+                    this.$emit('goBack')
982
+                  });
983
+                })
982 984
               }
983 985
             })
984 986
           } else {

+ 4
- 2
oa-ui/src/views/flowable/form/business/subContract.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 15:31:57
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-29 11:15:09
5
+ * @LastEditTime: 2024-10-08 09:29:11
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -919,7 +919,9 @@ export default {
919 919
                 handleComplete(this.taskForm);
920 920
               }
921 921
               else if (this.taskName == '合同签订') {
922
-                handleComplete(this.taskForm);
922
+                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
923
+                  handleComplete(this.taskForm);
924
+                })
923 925
               }
924 926
             })
925 927
           } else {

+ 11
- 4
oa-ui/src/views/flowable/form/changeForm.vue Vedi File

@@ -259,11 +259,18 @@ export default {
259 259
             getNextFlowNode(params).then(res => {
260 260
               if (this.taskName == '变更登记') {
261 261
                 this.$set(this.taskForm.variables, "approvalList", this.leaderList);
262
+                complete(this.taskForm).then(response => {
263
+                  this.$modal.msgSuccess(response.msg);
264
+                  this.$emit('goBack')
265
+                });
266
+              } else if (this.taskName == '变更确认') {
267
+                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
268
+                  complete(this.taskForm).then(response => {
269
+                    this.$modal.msgSuccess(response.msg);
270
+                    this.$emit('goBack')
271
+                  });
272
+                })
262 273
               }
263
-              complete(this.taskForm).then(response => {
264
-                this.$modal.msgSuccess(response.msg);
265
-                this.$emit('goBack')
266
-              });
267 274
             })
268 275
           } else {
269 276
             this.form.changeId = this.taskForm.formId;

+ 34
- 3
oa-ui/src/views/flowable/form/finance/borrowForm.vue Vedi File

@@ -274,6 +274,7 @@
274 274
           </el-row>
275 275
         </el-form>
276 276
         <div style="text-align: center;" v-if="taskName != ''">
277
+          <el-button type="warning" @click="saves()">保 存</el-button>
277 278
           <el-button type="primary" @click="submitForm">提 交</el-button>
278 279
         </div>
279 280
       </el-col>
@@ -450,7 +451,13 @@ export default {
450 451
   },
451 452
   methods: {
452 453
     initRules() {
453
-      if (this.taskName == '部门审核') {
454
+      if(this.taskName == '借款申请'){
455
+        this.rules = {
456
+          remark: [
457
+            { required: true, message: '请输入说明', trigger: 'blur' },
458
+          ],
459
+        }
460
+      }else if (this.taskName == '部门审核') {
454 461
         this.rules = {
455 462
           deptComment: [
456 463
             { required: true, message: '请输入部门负责人意见', trigger: 'blur' },
@@ -461,7 +468,7 @@ export default {
461 468
           managerComment: [
462 469
             { required: true, message: '请输入分管领导审核意见', trigger: 'blur' }
463 470
           ],
464
-          managerAmount:[
471
+          managerAmount: [
465 472
             { required: true, message: '请输入核准金额', trigger: 'blur' }
466 473
           ]
467 474
         }
@@ -600,6 +607,28 @@ export default {
600 607
         managerAmount: '',
601 608
       });
602 609
     },
610
+    // 保存
611
+    async saves() {
612
+      if (this.formTotal == 0) {
613
+        this.form.borrowId = this.taskForm.formId;
614
+        await addBorrow(this.form)
615
+        for (let detail of this.detailList) {
616
+          detail.borrowId = this.taskForm.formId;
617
+          await addBorrowDetail(detail);
618
+        }
619
+        this.initForm();
620
+      } else {
621
+        // 更新借款审批表
622
+        await updateBorrow(this.form);
623
+        // 更新借款明细项
624
+        await delBorrowDetail(this.taskForm.formId)
625
+        for (let detail of this.detailList) {
626
+          detail.borrowId = this.taskForm.formId;
627
+          await addBorrowDetail(detail);
628
+        }
629
+      }
630
+      this.$message.success('保存成功')
631
+    },
603 632
     /** 提交按钮 */
604 633
     async submitForm() {
605 634
       if (this.taskName == '借款申请') {
@@ -663,7 +692,9 @@ export default {
663 692
                 this.submitFD(); //提交到财务部审核
664 693
               }
665 694
               else if (this.taskName == '财务处理') {
666
-                this.handleComplete(this.taskForm);
695
+                this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(res => {
696
+                  this.handleComplete(this.taskForm);
697
+                })
667 698
               }
668 699
             })
669 700
           } else {

+ 13
- 11
oa-ui/src/views/flowable/form/oa/carForm.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-25 15:38:52
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 09:51:54
6 6
 -->
7 7
 
8 8
 <template>
@@ -286,7 +286,7 @@ import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate
286 286
 import { getUsersDeptLeader, getUsersManageLeader, getDeptLeaders } from '@/api/system/post.js'
287 287
 import flow from '@/views/flowable/task/todo/detail/flow'
288 288
 import { flowXmlAndNode } from "@/api/flowable/definition";
289
-import { listUser,getUser } from '@/api/system/user';
289
+import { listUser, getUser } from '@/api/system/user';
290 290
 import { getUserByRole } from "@/api/system/role";
291 291
 import chooseUser from "@/views/flowable/form/budget/components/choosePeople.vue";
292 292
 import projectChoose from '@/views/flowable/form/components/chooseProject.vue';
@@ -457,7 +457,7 @@ export default {
457 457
           dispatchComment: [
458 458
             { required: true, message: '请输入安排用车意见', trigger: 'blur' }
459 459
           ],
460
-          returnDate:[
460
+          returnDate: [
461 461
             { required: true, message: '返回日期不能为空', trigger: 'change' }
462 462
           ]
463 463
         }
@@ -499,8 +499,8 @@ export default {
499 499
             }
500 500
             data.drivers = arr
501 501
             this.chooseDriver = [];
502
-            for(let d of arr){
503
-              getUser(Number(d)).then(res=>{
502
+            for (let d of arr) {
503
+              getUser(Number(d)).then(res => {
504 504
                 this.chooseDriver.push(res.data)
505 505
               })
506 506
             }
@@ -558,7 +558,7 @@ export default {
558 558
       let formData = new FormData();
559 559
       let jsonForm = JSON.stringify(this.form);
560 560
       formData.append("form", jsonForm);
561
-      modifyCarApproval(formData).then(res=>{
561
+      modifyCarApproval(formData).then(res => {
562 562
         this.$message.success('保存成功')
563 563
       });
564 564
     },
@@ -649,10 +649,12 @@ export default {
649 649
           })
650 650
         });
651 651
       } else if (this.taskName == '安排用车') {
652
-        complete(this.taskForm).then(response => {
653
-          this.$modal.msgSuccess(response.msg);
654
-          this.$emit('goBack')
655
-        });
652
+        this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
653
+          complete(this.taskForm).then(response => {
654
+            this.$modal.msgSuccess(response.msg);
655
+            this.$emit('goBack')
656
+          });
657
+        })
656 658
       }
657 659
     },
658 660
     getChooseType() {

+ 8
- 7
oa-ui/src/views/flowable/form/oa/deviceForm.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-07 13:44:39
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-08-26 13:44:24
5
+ * @LastEditTime: 2024-10-08 09:53:32
6 6
 -->
7 7
 
8 8
 <template>
@@ -526,13 +526,14 @@ export default {
526 526
             this.$emit('goBack')
527 527
           });
528 528
         });
529
-      } else {
530
-        complete(this.taskForm).then(response => {
531
-          this.$modal.msgSuccess(response.msg);
532
-          this.$emit('goBack')
533
-        });
529
+      } else if (this.taskName == '归还确认') {
530
+        this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
531
+          complete(this.taskForm).then(response => {
532
+            this.$modal.msgSuccess(response.msg);
533
+            this.$emit('goBack')
534
+          });
535
+        })
534 536
       }
535
-
536 537
     },
537 538
     // 查询项目列表
538 539
     getProjectList() {

+ 7
- 7
oa-ui/src/views/flowable/form/procure/procureForm.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-09-19 13:45:43
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-24 15:16:51
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 09:55:20
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -38,15 +38,13 @@
38 38
             <el-input type="textarea" v-model="form.planComment" :autosize="{ minRows: 4 }"
39 39
               :disabled="taskName != '编制计划'"></el-input>
40 40
             <auditor-row ref="zhRef" :isCurrent="taskName == '编制计划'"
41
-              :signature="form.planUserId ? form.planUserId : null"
42
-              :signTime="form.planTime"></auditor-row>
41
+              :signature="form.planUserId ? form.planUserId : null" :signTime="form.planTime"></auditor-row>
43 42
           </el-form-item>
44 43
           <el-form-item label="分管审核意见:" prop="managerComment" label-width="130px">
45 44
             <el-input type="textarea" v-model="form.managerComment" :autosize="{ minRows: 4 }"
46 45
               :disabled="taskName != '分管审核'"></el-input>
47 46
             <auditor-row ref="fgRef" :isCurrent="taskName == '分管审核'"
48
-              :signature="form.managerUserId ? form.managerUserId : null"
49
-              :signTime="form.managerTime"></auditor-row>
47
+              :signature="form.managerUserId ? form.managerUserId : null" :signTime="form.managerTime"></auditor-row>
50 48
           </el-form-item>
51 49
           <el-form-item label="总经理审批意见:" prop="zjlComment" label-width="130px">
52 50
             <el-input type="textarea" v-model="form.zjlComment" :autosize="{ minRows: 4 }"
@@ -232,7 +230,9 @@ export default {
232 230
               this.$set(this.taskForm.variables, "approval", result.data[0].userId);
233 231
               this.successComplete();
234 232
             } else if (this.taskName == '总经理审批') {
235
-              this.successComplete();
233
+              this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
234
+                this.successComplete();
235
+              })
236 236
             }
237 237
           })
238 238
         } else {

+ 9
- 6
oa-ui/src/views/flowable/form/settleForm.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-30 09:03:14
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-18 15:23:24
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 09:34:29
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -404,7 +404,9 @@
404 404
             <el-row>
405 405
               <el-col :span="6" :xs="24" :offset="12">
406 406
                 <el-form-item label="签名:" label-width="120px">
407
-                  <span class="auditor"> {{ form.managerUserName ? form.managerUserName : getUserName(form.managerUserId) }} </span>
407
+                  <span class="auditor"> {{ form.managerUserName ? form.managerUserName :
408
+    getUserName(form.managerUserId) }}
409
+                  </span>
408 410
                 </el-form-item>
409 411
               </el-col>
410 412
               <el-col :span="6">
@@ -673,7 +675,7 @@ export default {
673 675
         if (settleWorkResponse) {
674 676
           this.settleWorkList = settleWorkResponse.rows;
675 677
           for (let work of this.settleWorkList) {
676
-            if(work.priceId)
678
+            if (work.priceId)
677 679
               getPrice(work.priceId).then((settleWorkResponse) => {
678 680
                 if (settleWorkResponse.data) {
679 681
                   this.setValue(work, "scale", settleWorkResponse.data.scaleGrade);
@@ -819,9 +821,10 @@ export default {
819 821
               this.getNextFlowNodeFn();
820 822
             }
821 823
           } else if (this.taskName == "董事长批准") {
822
-            this.getNextFlowNodeFn();
824
+            this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
825
+              this.getNextFlowNodeFn();
826
+            })
823 827
           }
824
-
825 828
         } else {
826 829
           this.$message.error('请完善表单必填项')
827 830
         }

+ 7
- 5
oa-ui/src/views/flowable/form/settleOther.vue Vedi File

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-30 09:03:14
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-02 15:38:34
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-10-08 09:38:18
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -26,7 +26,7 @@
26 26
             <el-col :span="6" :xs="24" :offset="12">
27 27
               <el-form-item label="工作上报人:" prop="reporterName">
28 28
                 <span class="auditor">
29
-                  {{form.reporterName ? "" : getUserName(form.reporter) }}
29
+                  {{ form.reporterName ? "" : getUserName(form.reporter) }}
30 30
                 </span>
31 31
               </el-form-item>
32 32
             </el-col>
@@ -535,14 +535,16 @@ export default {
535 535
       this.$refs["settleForm"].validate((vaild) => {
536 536
         if (vaild) {
537 537
           this.preserve();
538
-          if (this.taskName == "结算发起") {            
538
+          if (this.taskName == "结算发起") {
539 539
             this.getNextFlowNodeFn(null, this.deptId, true);
540 540
           } else if (this.taskName == "分管审核") {
541 541
             getUserByPost({ postName: "总经理" }).then((res) => {
542 542
               this.getNextFlowNodeFn(res.data[0].userId);
543 543
             });
544 544
           } else if (this.taskName == "总经理审批") {
545
-            this.getNextFlowNodeFn();
545
+            this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
546
+              this.getNextFlowNodeFn();
547
+            })
546 548
           }
547 549
 
548 550
         } else {

+ 9
- 7
oa-ui/src/views/flowable/form/work/declareForm.vue Vedi File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-08-16 09:16:36
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-08-21 14:11:13
5
+ * @LastEditTime: 2024-10-08 09:45:17
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -133,7 +133,7 @@ export default {
133 133
     if (this.device == 'mobile') {
134 134
       this.isFlow = false;
135 135
       this.deviceWidth = '450px'
136
-    }else{
136
+    } else {
137 137
       this.deviceWidth = '70%'
138 138
     }
139 139
     if (this.isFlow) {
@@ -262,11 +262,13 @@ export default {
262 262
       }
263 263
     },
264 264
     confirmForm() {
265
-      this.form.confirmStatus = '1';
266
-      updateDeclare(this.form);
267
-      const params = { taskId: this.taskForm.taskId };
268
-      getNextFlowNode(params).then(() => {
269
-        this.handleComplete(this.taskForm);
265
+      this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?').then(() => {
266
+        this.form.confirmStatus = '1';
267
+        updateDeclare(this.form);
268
+        const params = { taskId: this.taskForm.taskId };
269
+        getNextFlowNode(params).then(() => {
270
+          this.handleComplete(this.taskForm);
271
+        })
270 272
       })
271 273
     },
272 274
     handleComplete(taskForm) {

+ 81
- 26
oa-ui/src/views/oa/project/info.vue Vedi File

@@ -182,9 +182,9 @@
182 182
               </template>
183 183
               <div style="display: flex;" class="ml20" v-if="project.undertakingDept">
184 184
                 <div>{{ getDeptNames(project.undertakingDept) }}</div>
185
-                <div>
186
-                  <el-button class="ml20" type="success" plain size="mini" icon="el-icon-refresh"
187
-                    @click="deptOpen = true" v-hasPermi="['oa:project:edit']">
185
+                <div class="ml20">
186
+                  <el-button type="success" plain size="mini" icon="el-icon-refresh" @click="deptOpen = true"
187
+                    v-hasPermi="['oa:project:edit']">
188 188
                     更换部门
189 189
                   </el-button>
190 190
                 </div>
@@ -205,9 +205,9 @@
205 205
               </template>
206 206
               <div style="display: flex;" class="ml20" v-if="project.projectLeader">
207 207
                 <div>{{ project.projectLeaderUser ? project.projectLeaderUser.nickName : "" }}</div>
208
-                <div>
209
-                  <el-button class="ml20" type="success" plain size="mini" icon="el-icon-refresh"
210
-                    @click="prLeaderOpen = true" v-hasPermi="['oa:project:edit']">
208
+                <div class="ml20">
209
+                  <el-button type="success" plain size="mini" icon="el-icon-refresh" @click="prLeaderOpen = true"
210
+                    v-hasPermi="['oa:project:edit']">
211 211
                     更换项目负责人
212 212
                   </el-button>
213 213
                 </div>
@@ -310,20 +310,6 @@
310 310
                 </div>
311 311
               </div>
312 312
             </el-descriptions-item>
313
-            <!-- <el-descriptions-item>
314
-              <template slot="label">
315
-                <svg-icon slot="prefix" icon-class="user" />
316
-                生产部门确认
317
-              </template>
318
-              <div>
319
-                <el-input disabled type="textarea" v-model="projectComment.scComment"></el-input>
320
-                <div class="sign mt10">
321
-                  <div class="mr20">签名:<span class="auditor">{{ projectComment.scApproverName }}</span>
322
-                  </div>
323
-                  <div class="ml20"><span>审核时间:{{ projectComment.scApprovalTime }}</span></div>
324
-                </div>
325
-              </div>
326
-            </el-descriptions-item> -->
327 313
           </el-descriptions>
328 314
         </div>
329 315
       </div>
@@ -339,14 +325,18 @@
339 325
                 <svg-icon slot="prefix" icon-class="form" />
340 326
                 安全交底记录表
341 327
               </template>
342
-              <el-link type="primary" @click="openSafe = true">安全交底记录表</el-link>
328
+              <el-link type="primary" @click="openSafe = true" class="mr20">安全交底记录表</el-link>
329
+              <el-button type="warning" size="mini" plain @click="handleUrge('1')"
330
+                v-if="isSend">发送企业微信消息提醒相关人员</el-button>
343 331
             </el-descriptions-item>
344 332
             <el-descriptions-item :span="2">
345 333
               <template slot="label">
346 334
                 <svg-icon slot="prefix" icon-class="form" />
347 335
                 技术交底记录表
348 336
               </template>
349
-              <el-link type="primary" @click="openTech = true">技术交底记录表</el-link>
337
+              <el-link type="primary" @click="openTech = true" class="mr20">技术交底记录表</el-link>
338
+              <el-button type="warning" size="mini" plain @click="handleUrge('2')"
339
+                v-if="isSend">发送企业微信消息提醒相关人员</el-button>
350 340
             </el-descriptions-item>
351 341
             <el-descriptions-item :span="2">
352 342
               <template slot="label">
@@ -355,7 +345,7 @@
355 345
               </template>
356 346
               <el-select v-model="devices" multiple disabled style="width:100%">
357 347
                 <el-option v-for="item in deviceList" :key="item.deviceId" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
358
-        + (item.code != null ? '(设备编号:' + item.code + ')' : '') " :value="item.deviceId">
348
+        + (item.code != null ? '(设备编号:' + item.code + ')' : '')" :value="item.deviceId">
359 349
                 </el-option>
360 350
               </el-select>
361 351
             </el-descriptions-item>
@@ -548,7 +538,7 @@
548 538
 
549 539
 <script>
550 540
 import { getDept } from "@/api/system/dept";
551
-import { getUsersDeptLeaderByDept } from '@/api/system/post'
541
+import { getUsersDeptLeaderByDept, getUserByPost, getUsersManageLeaderByDept } from '@/api/system/post'
552 542
 import { listUser, getUser } from "@/api/system/user";
553 543
 import { getProject, updateProject } from "@/api/oa/project/project";
554 544
 import { listProjectWork, addProjectWork } from "@/api/oa/project/projectWork";
@@ -573,6 +563,7 @@ import { flowXmlAndNodeByFormId } from "@/api/flowable/definition";
573 563
 import flow from '@/views/flowable/task/todo/detail/flow'
574 564
 import RowDetail from '@/views/flowable/task/myProcess/send/rowDetail.vue';
575 565
 import projectPrint from '@/views/flowable/form/components/print/projectPrint.vue';
566
+import { sendQyMessage } from "@/api/qywx/index"
576 567
 
577 568
 export default {
578 569
   components: { budgetInfo, SafeTab, TechnicalTab, PlanTab, SettleData, BorrowData, BudgetTab, achiData, choosePeople, flow, RowDetail, projectPrint },
@@ -640,6 +631,7 @@ export default {
640 631
       },
641 632
       isProjectLeader: false,
642 633
       printOpen: false,
634
+      isSend: false,
643 635
     }
644 636
   },
645 637
   methods: {
@@ -681,9 +673,29 @@ export default {
681 673
           if (this.project.participates && this.project.participates.trim() !== '') {
682 674
             this.participates = (this.project.participates.split(',')).map(Number)
683 675
           }
676
+          this.getManagerList();
684 677
         }
685 678
       })
686 679
     },
680
+    // 获取该项目的分管领导
681
+    getManagerList() {
682
+      let deptArr = [];
683
+      if (this.project.undertakingDept && this.project.undertakingDept.trim() !== '') {
684
+        deptArr = (this.project.undertakingDept.split(',')).map(Number)
685
+      }
686
+      for (let deptId of deptArr) {
687
+        getUsersManageLeaderByDept({ deptId }).then(resopnse => {
688
+          if (resopnse.data) {
689
+            resopnse.data.forEach(element => {
690
+              if (this.$store.getters.userId == element.userId) {
691
+                this.isSend = true
692
+              }
693
+            });
694
+          }
695
+        })
696
+      }
697
+
698
+    },
687 699
     getProjectChangeList(projectId) {
688 700
       listProjectChange({ pageNum: 1, pageSize: 100, projectId }).then(response => {
689 701
         this.projectChangeList = response.rows;
@@ -832,6 +844,49 @@ export default {
832 844
       let { procInsId, deployId } = resData
833 845
       this.clickRow = { procInsId, deployId }
834 846
       this.recordOpen = true;
847
+    },
848
+    async handleUrge(type) {
849
+      if (!this.project.projectLeader) {
850
+        this.$message.error('项目负责人未选定')
851
+        return
852
+      }
853
+      let message = ''
854
+      let user = []
855
+      let userStirngList = []
856
+      if (type == '1') {
857
+        let { data } = await getUserByPost({ postName: "专职安全员" });
858
+        user.push(data[0].userId)
859
+        message = "<font color='warning'>请尽快进行安全交底:</font>  \n>" +
860
+          "项目编号:" + this.project.projectNumber + "  \n>" +
861
+          "项目名称:" + this.project.projectName + "  \n>"
862
+      } else if (type == '2') {
863
+        message = "<font color='warning'>请尽快进行技术交底:</font>   \n>" +
864
+          "项目编号:" + this.project.projectNumber + "  \n>" +
865
+          "项目名称:" + this.project.projectName + "  \n>"
866
+      }
867
+      let deptList = (this.project.undertakingDept.split(',')).map(Number)
868
+      for (let d of deptList) {
869
+        let { data } = await getUsersDeptLeaderByDept({ deptId: d });
870
+        user.push(data.userId)
871
+      }
872
+      user.push(this.project.projectLeader)
873
+      for (let u of user) {
874
+        let { data } = await getUser(u)
875
+        userStirngList.push(data.pinyin)
876
+      }
877
+      let userString = userStirngList.join('|')
878
+      this.$confirm('是否发送企业微信消息?', '提示', {
879
+        confirmButtonText: '确定',
880
+        cancelButtonText: '取消',
881
+        type: 'warning'
882
+      }).then(() => {
883
+        let formData = new FormData();
884
+        formData.append('message', message)
885
+        formData.append('userString', userString + '|YuSiHan|WangRongHua')
886
+        sendQyMessage(formData).then(() => {
887
+          this.$message.success('消息已发送!')
888
+        })
889
+      })
835 890
     }
836 891
   },
837 892
 }
@@ -949,8 +1004,8 @@ html {
949 1004
   border: 1px solid #cdd0d3;
950 1005
 }
951 1006
 
952
-::v-deep .el-tag.el-tag--info{
1007
+::v-deep .el-tag.el-tag--info {
953 1008
   border-color: #d1d1dc;
954
-  color:#101010
1009
+  color: #101010
955 1010
 }
956 1011
 </style>

Loading…
Annulla
Salva