Browse Source

修改预算审核

余思翰 1 year ago
parent
commit
50854db68f

+ 1
- 1
oa-ui/src/views/flowable/form/budget/budget.vue View 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-05-10 16:16:04
5
+ * @LastEditTime: 2024-05-27 15:13:37
6 6
 -->
7 7
 <template>
8 8
   <div>

+ 24
- 2
oa-ui/src/views/flowable/form/budget/budgetInfo.vue View File

@@ -2,12 +2,12 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-03 16:28:09
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-23 11:21:44
5
+ * @LastEditTime: 2024-05-27 15:25:58
6 6
 -->
7 7
 <template>
8 8
   <div class="main">
9 9
     <h2 style="text-align: center">项目直接生产成本预算表</h2>
10
-    <p style="text-align: right;padding-right:80px;">编制人:{{ budgetForm.compilerUser? budgetForm.compilerUser.nickName: '' }}</p>
10
+    <p style="text-align: center;">编制人:{{ budgetForm.compilerUser ? budgetForm.compilerUser.nickName : '' }}</p>
11 11
     <table border="1" class="table">
12 12
       <tr>
13 13
         <td style="width: 100px;">项目名称</td>
@@ -140,6 +140,9 @@
140 140
         <td colspan="1" class="head">{{ contract.contractId ? contract.amount : '' }}</td>
141 141
       </tr>
142 142
     </table>
143
+    <el-row v-if="taskName == '预算审核'" class="text-center mt20 mb20">
144
+      <el-button type="success" size="mini" @click="confirmSucess">审批通过</el-button>
145
+    </el-row>
143 146
   </div>
144 147
 </template>
145 148
 
@@ -153,6 +156,9 @@ import { listProjectWork } from "@/api/oa/project/projectWork";
153 156
 import { mapGetters } from 'vuex';
154 157
 import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
155 158
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
159
+import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm } from "@/api/flowable/todo";
160
+import { getUser } from '@/api/system/user'
161
+import { getUsersManageLeader } from "@/api/system/post";
156 162
 export default {
157 163
   computed: {
158 164
     ...mapGetters(["name", "userId"]),
@@ -161,6 +167,9 @@ export default {
161 167
     taskForm: {
162 168
       type: Object,
163 169
       require: true
170
+    },
171
+    taskName: {
172
+      type: String,
164 173
     }
165 174
   },
166 175
   data() {
@@ -240,6 +249,19 @@ export default {
240 249
         this.workContentList = res.rows;
241 250
       })
242 251
     },
252
+    confirmSucess() {
253
+      const params = { taskId: this.taskForm.taskId };
254
+      getNextFlowNode(params).then(res => {
255
+        getUsersManageLeader({ userId: this.budgetForm.compiler }).then(res => {
256
+          let userId = res.data.userId;
257
+          this.$set(this.taskForm.variables, "approval", userId);
258
+          complete(this.taskForm).then(response => {
259
+            this.$modal.msgSuccess(response.msg);
260
+            this.$emit("goBack");
261
+          });
262
+        });
263
+      });
264
+    }
243 265
   },
244 266
 };
245 267
 </script>

+ 23
- 2
oa-ui/src/views/flowable/form/components/choosePrice.vue View File

@@ -42,11 +42,19 @@
42 42
       <el-button type="primary" @click="$emit('getPrice', work)">确定</el-button>
43 43
       <el-button @click="$emit('cancel')">取消</el-button>
44 44
     </el-row>
45
+    <div class="mt20">
46
+      <el-alert :closable="false" title="系数备注" type="success">
47
+        <h2 v-html="priceRemark"></h2>
48
+      </el-alert>
49
+      
50
+    </div>
51
+
45 52
   </div>
46 53
 </template>
47 54
 
48 55
 <script>
49 56
 import { getWorkTypeList, getWorkItemList, getSubItemList, getScaleGradeList, getUnitPrice, getPrice } from '@/api/oa/price/price'
57
+import { getPriceRemarkByWorkType } from '@/api/oa/price/price'
50 58
 export default {
51 59
   props: {
52 60
     row: {
@@ -57,6 +65,11 @@ export default {
57 65
   watch: {
58 66
     row(val) {
59 67
       this.getPriceById()
68
+    },
69
+    'work.workType'(val) {
70
+      getPriceRemarkByWorkType({ workType: val }).then(res => {
71
+        this.priceRemark = res.msg
72
+      })
60 73
     }
61 74
   },
62 75
   data() {
@@ -66,7 +79,8 @@ export default {
66 79
         workTypeList: [],
67 80
         workItemList: [],
68 81
         scaleGradeList: []
69
-      }
82
+      },
83
+      priceRemark: ""
70 84
     }
71 85
   },
72 86
   mounted() {
@@ -95,6 +109,9 @@ export default {
95 109
               let scaleGradeList = this.setArray(res);
96 110
               this.workSelect.scaleGradeList = scaleGradeList;
97 111
             })
112
+            getPriceRemarkByWorkType({ workType: res.data.workType }).then(res => {
113
+              this.priceRemark = res.msg
114
+            })
98 115
           }
99 116
         })
100 117
       } else {
@@ -184,4 +201,8 @@ export default {
184 201
 }
185 202
 </script>
186 203
 
187
-<style lang="scss" scoped></style>
204
+<style lang="scss" scoped>
205
+.remark {
206
+  color: #409EFF;
207
+}
208
+</style>

+ 25
- 28
oa-ui/src/views/flowable/form/projectProcess/inProgress.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-15 09:35:41
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-24 11:49:20
5
+ * @LastEditTime: 2024-05-27 09:34:12
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -23,8 +23,7 @@
23 23
           <div v-if="participates.length == 0" style="color:#F56C6C">tips:请选择参与人员</div>
24 24
         </el-form-item>
25 25
         <el-form-item label="驾驶员:">
26
-          <el-tooltip :disabled="form.drivers.length == 0" class="item" effect="dark"
27
-            content="直接获取用车申请中的驾驶员,若无驾驶员,则需要先提交项目的用车申请" placement="top-end">
26
+          <el-tooltip class="item" effect="dark" content="直接获取用车申请中的驾驶员,若无驾驶员,则需要先提交项目的用车申请" placement="top-end">
28 27
             <el-select v-model="form.drivers" multiple disabled style="width:90%">
29 28
               <el-option v-for="item in userList" :label="item.nickName" :value="item.userId" :key="item.userId">
30 29
               </el-option>
@@ -34,8 +33,7 @@
34 33
           <el-button class="ml10" @click="openDriver = true" type="primary" size="mini" icon="el-icon-plus"></el-button> -->
35 34
         </el-form-item>
36 35
         <el-form-item label="使用车辆:">
37
-          <el-tooltip :disabled="form.cars.length == 0" class="item" effect="dark"
38
-            content="直接获取用车申请中的车辆,若无车辆,则需要先提交项目的用车申请" placement="top-end">
36
+          <el-tooltip class="item" effect="dark" content="直接获取用车申请中的车辆,若无车辆,则需要先提交项目的用车申请" placement="top-end">
39 37
             <el-select v-model="form.cars" multiple disabled style="width:90%">
40 38
               <el-option v-for="item in carList" :label="item.licensePlate + item.brand" :value="item.carId"
41 39
                 :key="item.carId">
@@ -176,7 +174,7 @@ export default {
176 174
         licensePlate: "",
177 175
         drivers: [],
178 176
         cars: [],
179
-        participates:[],
177
+        participates: [],
180 178
         staff: "",
181 179
         entryTime: "",
182 180
         exitTime: "",
@@ -339,29 +337,28 @@ export default {
339 337
       })
340 338
     },
341 339
     submitNextFlow() {
342
-      this.preserve();
343
-      const params = { taskId: this.taskForm.taskId };
344
-      // this.$confirm('结束后流程不可再修改,请问是否确定结束?', '提示', {
345
-      //     confirmButtonText: '确定',
346
-      //     cancelButtonText: '取消',
347
-      //     type: 'warning'
348
-      //   }).then(() => {
349
-
350
-      //   }).catch(() => { });
351
-      // 获取下一个流程节点
352
-      getNextFlowNode(params).then(res => {
353
-        getProject(this.taskForm.formId).then(res => {
354
-          if (res.data) {
355
-            this.$set(this.taskForm.variables, "formId", this.taskForm.formId);
356
-            this.$set(this.taskForm.variables, "archiveInitiator", res.data.projectLeader);
357
-            this.$set(this.taskForm.variables, "settleInitiator", res.data.projectLeader);
358
-            complete(this.taskForm).then(response => {
359
-              this.$modal.msgSuccess(response.msg);
360
-              this.$emit('goBack');
361
-            });
362
-          }
340
+      this.$confirm('项目结束后不可再修改,请问是否确定结束?', '提示', {
341
+        confirmButtonText: '确定',
342
+        cancelButtonText: '取消',
343
+        type: 'warning'
344
+      }).then(() => {
345
+        this.preserve();
346
+        const params = { taskId: this.taskForm.taskId };// 获取下一个流程节点
347
+        getNextFlowNode(params).then(res => {
348
+          getProject(this.taskForm.formId).then(res => {
349
+            if (res.data) {
350
+              this.$set(this.taskForm.variables, "formId", this.taskForm.formId);
351
+              this.$set(this.taskForm.variables, "archiveInitiator", res.data.projectLeader);
352
+              this.$set(this.taskForm.variables, "settleInitiator", res.data.projectLeader);
353
+              complete(this.taskForm).then(response => {
354
+                this.$modal.msgSuccess(response.msg);
355
+                this.$emit('goBack');
356
+              });
357
+            }
358
+          })
363 359
         })
364
-      })
360
+      }).catch(() => { });
361
+
365 362
     },
366 363
   },
367 364
 };

+ 1
- 1
oa-ui/src/views/flowable/task/myProcess/index.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-22 18:18:31
5
+ * @LastEditTime: 2024-05-27 14:08:00
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">

+ 2
- 2
oa-ui/src/views/flowable/task/todo/detail/index.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-10 15:14:21
5
+ * @LastEditTime: 2024-05-27 14:54:08
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -478,7 +478,7 @@ export default {
478 478
     // 是否显示审批通过
479 479
     isShowApprove() {
480 480
       if (this.taskName == '员工填报' || this.taskForm.procDefName == '用车审批' || this.taskForm.procDefName == '设备审批' || this.taskForm.procDefName == '项目流转'
481
-        || this.taskForm.procDefName == '项目预算' || this.taskForm.procDefName == '借款审批' || this.taskForm.procDefName == '安全交底' || this.taskForm.procDefName == '技术交底'
481
+        || (this.taskForm.procDefName == '项目预算' && this.taskName != '预算审核') || this.taskForm.procDefName == '借款审批' || this.taskForm.procDefName == '安全交底' || this.taskForm.procDefName == '技术交底'
482 482
         || this.taskForm.procDefName == '承接合同评审' || this.taskForm.procDefName == '分包合同评审' || this.taskForm.procDefName == '品牌项目支付' || this.taskForm.procDefName == '保证金审批'
483 483
         || this.taskForm.procDefName == '成果归档' || this.taskForm.procDefName == '项目结算') {
484 484
         return false

+ 22
- 12
oa-ui/src/views/flowable/task/todo/index.vue View File

@@ -25,7 +25,7 @@
25 25
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
26 26
     </el-row>
27 27
 
28
-    <el-table v-loading="loading" :data="todoList" border @selection-change="handleSelectionChange">
28
+    <el-table v-if="dataShow" v-loading="loading" :data="todoList" border @selection-change="handleSelectionChange">
29 29
       <el-table-column type="index" label="序号" width="55" align="center" />
30 30
       <!-- <el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true" /> -->
31 31
       <el-table-column label="流程名称" align="center" prop="procDefName" />
@@ -56,17 +56,9 @@
56 56
 </template>
57 57
 
58 58
 <script>
59
-import {
60
-  todoList,
61
-  complete,
62
-  returnList,
63
-  returnTask,
64
-  rejectTask,
65
-  getDeployment,
66
-  delDeployment,
67
-  exportDeployment
68
-} from "@/api/flowable/todo";
59
+import { todoList, complete, returnList, returnTask, rejectTask, getDeployment, delDeployment, exportDeployment } from "@/api/flowable/todo";
69 60
 import { getProcessVariables } from "@/api/flowable/definition"
61
+import { getProject, addProject, delProject } from "@/api/oa/project/project";
70 62
 export default {
71 63
   name: "Deploy",
72 64
   components: {},
@@ -100,7 +92,8 @@ export default {
100 92
       // 表单参数
101 93
       form: {},
102 94
       // 表单校验
103
-      rules: {}
95
+      rules: {},
96
+      dataShow: true,
104 97
     };
105 98
   },
106 99
   created() {
@@ -116,6 +109,23 @@ export default {
116 109
         this.loading = false;
117 110
       });
118 111
     },
112
+    getProjectInfo(row) {
113
+      getProcessVariables(row.taskId).then(res => {
114
+        if (res.data) {
115
+          getProject(res.data.formId).then(result => {
116
+            if (res.data) {
117
+              let name = result.data.projectNumber +'-' + result.data.projectName
118
+              this.todoList.map(item => {
119
+                if (item.taskId == row.taskId) {
120
+                 this.$set(item,'project',name)
121
+                }
122
+              })
123
+              console.log(this.todoList);
124
+            }
125
+          })
126
+        }
127
+      })
128
+    },
119 129
     // 跳转到处理页面
120 130
     handleProcess(row) {
121 131
       let path = this.getRoutePath(row);

Loading…
Cancel
Save