Просмотр исходного кода

通过表单id及流程名获取当前流程节点信息

lamphua 3 дней назад
Родитель
Сommit
9536fa112a

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java Просмотреть файл

@@ -75,6 +75,9 @@ public class SysUserController extends BaseController
75 75
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
76 76
             list.addAll(postService.selectDsSecretary(user));
77 77
         }
78
+        if (user.getDeptId() != null && user.getDeptId() == 102L) {
79
+            list.addAll(postService.selectJyLeader(user));
80
+        }
78 81
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
79 82
             list = postService.selectGmAssistant(user);
80 83
         }

+ 11
- 0
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowTaskController.java Просмотреть файл

@@ -262,6 +262,17 @@ public class FlowTaskController {
262 262
         return flowTaskService.flowXmlAndNodeByFormIdAndName(formId, name);
263 263
     }
264 264
 
265
+    /**
266
+     * 通过表单id及流程名获取当前流程节点信息
267
+     *
268
+     * @param formId 表单id
269
+     * @return
270
+     */
271
+    @GetMapping("/currentNodeByFormId")
272
+    public AjaxResult currentNodeByFormIdAndName(String formId, String name) {
273
+        return flowTaskService.currentNodeByFormIdAndName(formId, name);
274
+    }
275
+
265 276
     /**
266 277
      * 流程节点表单
267 278
      *

+ 7
- 0
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/IFlowTaskService.java Просмотреть файл

@@ -230,6 +230,13 @@ public interface IFlowTaskService {
230 230
      */
231 231
     AjaxResult flowXmlAndNodeByFormIdAndName(String formId, String name);
232 232
 
233
+    /**
234
+     * 通过表单id及流程名获取当前流程节点信息
235
+     * @param formId
236
+     * @return
237
+     */
238
+    AjaxResult currentNodeByFormIdAndName(String formId, String name);
239
+
233 240
     /**
234 241
      * 流程节点表单
235 242
      * @param taskId 流程任务编号

+ 26
- 0
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java Просмотреть файл

@@ -1606,6 +1606,32 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
1606 1606
         }
1607 1607
     }
1608 1608
 
1609
+    /**
1610
+     * 通过表单id及流程名获取当前流程节点信息
1611
+     *
1612
+     * @param formId
1613
+     * @return
1614
+     */
1615
+    @Override
1616
+    public AjaxResult currentNodeByFormIdAndName(String formId, String name) {
1617
+        try {
1618
+            List<FlowVarInst> flowVarInst = flowVarInstMapper.selectProcInstByVar(formId);
1619
+            String taskName = "";
1620
+            for (FlowVarInst varInst : flowVarInst) {
1621
+                List<HistoricTaskInstance> historicTaskInstanceList = historyService.createHistoricTaskInstanceQuery()
1622
+                        .processInstanceId(varInst.getProcInstId())
1623
+                        .orderByHistoricTaskInstanceStartTime().desc().list();
1624
+                String processDefinitionId = historicTaskInstanceList.get(historicTaskInstanceList.size() - 1).getProcessDefinitionId();
1625
+                if (name.equals(String.valueOf(Integer.parseInt(processDefinitionId.split(":")[2]) - 3)))
1626
+                    taskName = historicTaskInstanceList.get(0).getName();
1627
+            }
1628
+            return AjaxResult.success(taskName);
1629
+        }
1630
+        catch (Exception e) {
1631
+            return AjaxResult.error("无流程历史记录");
1632
+        }
1633
+    }
1634
+
1609 1635
     /**
1610 1636
      * 流程节点表单
1611 1637
      *

+ 17
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/domain/TreeSelectNew.java Просмотреть файл

@@ -45,13 +45,24 @@ public class TreeSelectNew implements Serializable
45 45
         sysUser.setDeptId(dept.getDeptId());
46 46
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
47 47
         List<SysUser> list = userMapper.selectUserServingList(sysUser);
48
-        if (dept.getDeptId() == 101) {
49
-            SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
50
-            list.addAll(userPostMapper.selectDsSecretary(new SysUser()));
48
+        SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
49
+        SysUser dsSecretary = new SysUser();
50
+        dsSecretary.setStatus("0");
51
+        List<SysUser> dsSecretaryList = userPostMapper.selectDsSecretary(dsSecretary);
52
+        SysUser jyLeader = new SysUser();
53
+        jyLeader.setStatus("0");
54
+        List<SysUser> jyLeaderList = userPostMapper.selectJyLeader(jyLeader);
55
+        SysUser gmAssistant = new SysUser();
56
+        gmAssistant.setStatus("0");
57
+        List<SysUser> gmAssistantList = userPostMapper.selectGmAssistant(gmAssistant);
58
+        if (dept.getDeptId() == 101L) {
59
+            list.addAll(dsSecretaryList);
51 60
         }
52
-        if (dept.getDeptId() == 103) {
53
-            SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
54
-            list = userPostMapper.selectGmAssistant(new SysUser());
61
+        if (dept.getDeptId() == 102L) {
62
+            list.addAll(jyLeaderList);
63
+        }
64
+        if (dept.getDeptId() == 103L) {
65
+            list = gmAssistantList;
55 66
         }
56 67
         String count = "(" + (list == null ? 0 : list.size()) + ")";
57 68
         this.label = dept.getDeptName() + count;

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java Просмотреть файл

@@ -52,6 +52,14 @@ public interface SysUserPostMapper
52 52
      */
53 53
     public List<SysUser> selectGmAssistant(SysUser user);
54 54
 
55
+    /**
56
+     * 查询经营主任集合
57
+     *
58
+     * @param
59
+     * @return 经营主任列表
60
+     */
61
+    public List<SysUser> selectJyLeader(SysUser user);
62
+
55 63
     /**
56 64
      * 查询董事会秘书集合
57 65
      *

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java Просмотреть файл

@@ -108,6 +108,14 @@ public interface ISysPostService
108 108
      */
109 109
     public List<SysUser> selectGmAssistant(SysUser user);
110 110
 
111
+    /**
112
+     * 查询经营主任集合
113
+     *
114
+     * @param
115
+     * @return 经营主任列表
116
+     */
117
+    public List<SysUser> selectJyLeader(SysUser user);
118
+
111 119
     /**
112 120
      * 查询董事会秘书集合
113 121
      *

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java Просмотреть файл

@@ -189,6 +189,17 @@ public class SysPostServiceImpl implements ISysPostService
189 189
         return userPostMapper.selectGmAssistant(user);
190 190
     }
191 191
 
192
+    /**
193
+     * 查询经营主任集合
194
+     *
195
+     * @param
196
+     * @return 经营主任列表
197
+     */
198
+    @Override
199
+    public List<SysUser> selectJyLeader(SysUser user) {
200
+        return userPostMapper.selectJyLeader(user);
201
+    }
202
+
192 203
     /**
193 204
      * 查询董事会秘书集合
194 205
      *

+ 37
- 4
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml Просмотреть файл

@@ -129,11 +129,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
129 129
 		</if>
130 130
 	</select>
131 131
 
132
+	<select id="selectJyLeader" parameterType="SysUser" resultMap="SysUserResult">
133
+		select u.*, d.dept_name
134
+		from sys_user u
135
+		left join sys_dept d on u.dept_id = d.dept_id
136
+		left join sys_user_post up on u.user_id = up.user_id
137
+		left join sys_post p on up.post_id = p.post_id
138
+		where p.post_name = "副总经理" and d.dept_name = "经营发展部"
139
+		<if test="userId != null and userId != 0">
140
+			AND u.user_id = #{userId}
141
+		</if>
142
+		<if test="userName != null and userName != ''">
143
+			AND u.user_name like concat('%', #{userName}, '%')
144
+		</if>
145
+		<if test="nickName != null and nickName != ''">
146
+			AND u.nick_name like concat('%', #{nickName}, '%')
147
+		</if>
148
+		<if test="status != null and status != ''">
149
+			AND u.status = #{status}
150
+		</if>
151
+		<if test="phonenumber != null and phonenumber != ''">
152
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
153
+		</if>
154
+		<if test="degree != null and degree != ''">
155
+			AND u.degree = #{degree}
156
+		</if>
157
+		<if test="titles != null and titles != ''">
158
+			AND find_in_set(#{titles}, u.titles)
159
+		</if>
160
+		<if test="certificates != null and certificates != ''">
161
+			AND find_in_set(#{certificates}, u.certificates)
162
+		</if>
163
+	</select>
164
+
132 165
 	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">
133 166
 		select * from sys_user u
134 167
 		left join sys_user_post up on u.user_id = up.user_id
135 168
 		left join sys_post p on up.post_id = p.post_id
136
-		where p.post_name = #{param}
169
+		where p.post_name = #{param} and u.status = '0'
137 170
 	</select>
138 171
 
139 172
 	<select id="selectSubLeaderByUserId" parameterType="String" resultMap="SysUserResult">
@@ -166,7 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
166 199
 	<select id="selectDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
167 200
 		select r.user_id, r.nick_name from
168 201
 		(select u1.user_id, u1.nick_name, u.dept_id from
169
-		sys_user as u, sys_user as u1 where u.user_id = #{param} and u1.dept_id = u.dept_id) as r
202
+		sys_user as u, sys_user as u1 where u.user_id = #{param} and u1.dept_id = u.dept_id and u1.status = '0') as r
170 203
 		left join sys_user_post as up on r.user_id = up.user_id
171 204
 		left join sys_post as p on p.post_id = up.post_id
172 205
 		where p.post_name = '主任'
@@ -221,7 +254,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
221 254
 	<select id="selectDeptLeaderByDeptId" parameterType="String" resultMap="SysUserResult">
222 255
 		select r.user_id, r.nick_name from
223 256
 		(select user_id, nick_name, dept_id from
224
-		sys_user where dept_id = #{param}) as r
257
+		sys_user where dept_id = #{param} and status = '0') as r
225 258
 		left join sys_user_post as up on r.user_id = up.user_id
226 259
 		left join sys_post as p on p.post_id = up.post_id
227 260
 		where p.post_name = '主任'
@@ -230,7 +263,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
230 263
 	<select id="selectDeptLeadersByDeptId" parameterType="String" resultMap="SysUserResult">
231 264
 		select r.user_id, r.nick_name from
232 265
 		(select user_id, nick_name, dept_id from
233
-		sys_user where dept_id = #{param}) as r
266
+		sys_user where dept_id = #{param} and status = '0') as r
234 267
 		left join sys_user_post as up on r.user_id = up.user_id
235 268
 		left join sys_post as p on p.post_id = up.post_id
236 269
 		where p.post_name = '主任'

+ 9
- 0
oa-ui/src/api/flowable/definition.js Просмотреть файл

@@ -104,6 +104,15 @@ export function flowXmlAndNodeByFormId(query) {
104 104
   })
105 105
 }
106 106
 
107
+// 通过表单id及流程名获取当前流程节点信息
108
+export function currentNodeByFormId(query) {
109
+  return request({
110
+    url: '/flowable/task/currentNodeByFormId',
111
+    method: 'get',
112
+    params: query
113
+  })
114
+}
115
+
107 116
 // 读取xml文件
108 117
 export function saveXml(data) {
109 118
   return request({

+ 51
- 16
oa-ui/src/views/flowable/form/budget/adjust/adjustIndex.vue Просмотреть файл

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-14 16:09:56
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-06-23 11:00:49
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2025-09-30 16:39:33
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -43,9 +43,9 @@
43 43
         </el-form>
44 44
         <el-table v-loading="loading" :data="budgetList">
45 45
           <el-table-column label="序号" align="center" type="index" width="60" />
46
-          <el-table-column label="状态" align="center" width="70">
46
+          <el-table-column label="状态" align="center" width="90">
47 47
             <template slot-scope="scope">
48
-              <el-tag v-if="scope.row.disabled" type="warning">已核算</el-tag>
48
+              <el-tag :type="statusTypeStyle(scope.row.disabled)"> {{ statusTypeText(scope.row.disabled) }}</el-tag>
49 49
             </template>
50 50
           </el-table-column>
51 51
           <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
@@ -56,20 +56,21 @@
56 56
               {{ getUserName(scope.row.compiler) }}
57 57
             </template>
58 58
           </el-table-column>
59
-          <el-table-column label="审核人" align="center" prop="auditor">
59
+          <el-table-column label="预算当前流程节点" align="center" prop="taskName" />
60
+          <!-- <el-table-column label="审核人" align="center" prop="auditor">
60 61
             <template slot-scope="scope">
61 62
               {{ getUserName(scope.row.auditor) }}
62 63
             </template>
63
-          </el-table-column>
64
+          </el-table-column> -->
64 65
           <el-table-column label="操作" align="center" width="120">
65 66
             <template slot-scope="scope">
66 67
               <el-button type="primary" size="mini" @click="handleSelect(scope.row)"
67
-                :disabled="scope.row.disabled">选择</el-button>
68
+                :disabled="scope.row.disabled == '1'">选择</el-button>
68 69
             </template>
69 70
           </el-table-column>
70 71
         </el-table>
71
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
72
-          :limit.sync="queryParams.pageSize" @pagination="getList" />
72
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
73
+          @pagination="getList" />
73 74
       </div>
74 75
       <div v-else key="adjust">
75 76
         <div class="adjust-header" v-if="hideReturn">
@@ -87,6 +88,7 @@
87 88
 import { listBudget, getBudget } from '@/api/oa/budget/budget';
88 89
 import { listCheck, getCheck, delCheck, addCheck, updateCheck } from "@/api/oa/budget/check";
89 90
 import { listProject } from '@/api/oa/project/project';
91
+import { currentNodeByFormId } from "@/api/flowable/definition";
90 92
 import BudgetAdjust from './budgetAdjust.vue';
91 93
 export default {
92 94
   props: {
@@ -118,7 +120,7 @@ export default {
118 120
       queryType: '1',
119 121
       projectList: [],
120 122
       hideReturn: true,
121
-      isSurvey: 0
123
+      isSurvey: 0,
122 124
     }
123 125
   },
124 126
   created() {
@@ -142,10 +144,13 @@ export default {
142 144
         this.budgetList = res.rows;
143 145
         for (let b of this.budgetList) {
144 146
           this.isDisabled(b).then(res => {
145
-            if (res) {
146
-              this.$set(b, 'disabled', true);
147
-            } else {
148
-              this.$set(b, 'disabled', false);
147
+            if (!b.disabled && b.disabled != '2')
148
+              this.$set(b, 'disabled', res);
149
+          })
150
+          this.getCurrentTaskName(b).then(res => {
151
+            this.$set(b, 'taskName', res);
152
+            if (res != '预算批准' || res == '') {
153
+              this.$set(b, 'disabled', '2');
149 154
             }
150 155
           })
151 156
         }
@@ -160,10 +165,18 @@ export default {
160 165
     async isDisabled(row) {
161 166
       let res = await listCheck({ budgetId: row.budgetId })
162 167
       if (res.total > 0) {
163
-        return true;
168
+        return '1';
164 169
       } else {
165
-        return false;
170
+        return '0';
171
+      }
172
+    },
173
+    async getCurrentTaskName(row) {
174
+      let resData = await currentNodeByFormId({ formId: row.projectId, name: '3045' })
175
+      if (resData.code == 200) {
176
+        return resData.msg;
166 177
       }
178
+      else
179
+        return ''
167 180
     },
168 181
     handleBack() {
169 182
       this.projectId = '';
@@ -223,6 +236,28 @@ export default {
223 236
     },
224 237
     handleIsSurveyChange(val) {
225 238
       this.isSurvey = val;
239
+    },
240
+    statusTypeText(row) {
241
+      if (row == '0') {
242
+        return '待核算'
243
+      }
244
+      if (row == '1') {
245
+        return '已核算'
246
+      }
247
+      if (row == '2') {
248
+        return '预算未批'
249
+      }
250
+    },
251
+    statusTypeStyle(row) {
252
+      if (row == '0') {
253
+        return 'primary'
254
+      }
255
+      if (row == '1') {
256
+        return 'warning'
257
+      }
258
+      if (row == '2') {
259
+        return 'danger'
260
+      }
226 261
     }
227 262
   }
228 263
 }

+ 36
- 24
oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue Просмотреть файл

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-07 11:01:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-09-10 13:58:29
5
+ * @LastEditTime: 2025-09-30 16:13:13
6 6
 -->
7 7
 <template>
8 8
   <div class="main">
@@ -134,8 +134,7 @@
134 134
       <el-descriptions-item label="实际使用车辆" :span="3" v-if="taskName == '核算编制'">
135 135
         <span v-for="car in actualInfo.carList" :key="car.id">
136 136
           <el-tag :type="car.isExist ? 'primary' : 'warning'" effect="plain" style="margin-right: 10px;">{{
137
-            car.licensePlate }} - {{ car.series
138
-            }}</el-tag>
137
+            car.licensePlate }} - {{ car.series }}</el-tag>
139 138
         </span>
140 139
       </el-descriptions-item>
141 140
       <el-descriptions-item label="车辆成本" :span="3" v-if="taskName == '核算编制' || carList.length > 0">
@@ -214,8 +213,8 @@
214 213
           </tr>
215 214
           <tr>
216 215
             <td>人员成本</td>
217
-            <td style="text-align:right;">{{ isNaN(budgetForm.staffCost) ? 0 : Number(budgetForm.staffCost).toFixed(2)
218
-            }}</td>
216
+            <td style="text-align:right;">{{ isNaN(budgetForm.staffCost) ? 0 : Number(budgetForm.staffCost).toFixed(2) }}
217
+            </td>
219 218
             <td style="text-align:right;">{{ isNaN(checkStaffCost) ? 0 : Number(checkStaffCost).toFixed(2) }}</td>
220 219
             <td style="text-align:right;">{{ (Number(checkStaffCost) - Number(budgetForm.staffCost)).toFixed(2) }}</td>
221 220
           </tr>
@@ -258,7 +257,7 @@
258 257
             <td style="text-align:right;"><b>{{ isNaN(budgetForm.totalBudget) ? 0 : budgetForm.totalBudget }}</b></td>
259 258
             <td style="text-align:right;"><b>{{ isNaN(totalBudgetAdjust) ? 0 : totalBudgetAdjust }}</b></td>
260 259
             <td style="text-align:right;"><b>{{ (Number(totalBudgetAdjust) - Number(budgetForm.totalBudget)).toFixed(2)
261
-                }}</b></td>
260
+            }}</b></td>
262 261
           </tr>
263 262
         </table>
264 263
       </el-descriptions-item>
@@ -371,6 +370,7 @@ import { getUsersManageLeader, getUserByPost, getUsersViceDeptLeaderByDept } fro
371 370
 import { listProjectContract } from "@/api/oa/contract/projectContract";
372 371
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
373 372
 import { getContract } from "@/api/oa/contract/contract";
373
+import { currentNodeByFormId } from "@/api/flowable/definition";
374 374
 import { getSubContract } from "@/api/oa/contract/subContract";
375 375
 import InnerStaffCost from './components/InnerStaffCost.vue';
376 376
 import OuterStaffCost from './components/OuterStaffCost.vue';
@@ -474,7 +474,7 @@ export default {
474 474
         if (this.budgetForm) {
475 475
           const budgetId = this.budgetForm.budgetId;
476 476
           this.budgetId = budgetId;
477
-          
477
+
478 478
           // 并发获取所有数据
479 479
           const [
480 480
             deviceRes,
@@ -621,6 +621,11 @@ export default {
621 621
       getCheck(this.taskForm.formId).then(res => {
622 622
         if (res.data) {
623 623
           this.checkForm = res.data;
624
+          this.getCurrentTaskName(this.checkForm.projectId).then(response => {
625
+            if (response != '预算批准' || response == '') {
626
+              this.$set(this.checkForm, 'checkComment', '新版预算暂未获批准,当前节点:' + response);
627
+            }
628
+          })
624 629
         }
625 630
         if (this.taskName == '核算编制') {
626 631
           this.checkForm.checker = this.$store.getters.userId;
@@ -660,6 +665,14 @@ export default {
660 665
         }
661 666
       })
662 667
     },
668
+    async getCurrentTaskName(projectId) {
669
+      let resData = await currentNodeByFormId({ formId: projectId, name: '3045' })
670
+      if (resData.code == 200) {
671
+        return resData.msg;
672
+      }
673
+      else
674
+        return ''
675
+    },
663 676
     async initActualInfo(project) {
664 677
       let deviceIds = [];
665 678
       let carIds = [];
@@ -719,7 +732,7 @@ export default {
719 732
     // 处理内业人员数据变化
720 733
     handleInnerStaffChange(newList) {
721 734
       this.innerStaffList = newList;
722
-      let innerSum =  this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
735
+      let innerSum = this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
723 736
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
724 737
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
725 738
       this.getTotalBudgetAdjust();
@@ -728,7 +741,7 @@ export default {
728 741
     // 处理外业人员数据变化
729 742
     handleOuterStaffChange(newList) {
730 743
       this.outerStaffList = newList;
731
-      let innerSum =  this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
744
+      let innerSum = this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
732 745
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
733 746
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
734 747
       this.getTotalBudgetAdjust();
@@ -759,7 +772,7 @@ export default {
759 772
         amount: Number(site.amount).toFixed(2),
760 773
         amountAdjust: site.amountAdjust ? Number(site.amountAdjust).toFixed(2) : 0
761 774
       }));
762
-      
775
+
763 776
       this.budgetForm.siteSum = this.siteList.reduce((sum, site) => sum + Number(site.amount || 0), 0).toFixed(2);
764 777
       this.checkSiteCost = this.siteList.reduce((sum, site) => sum + Number(site.amountAdjust || 0), 0).toFixed(2);
765 778
     },
@@ -802,10 +815,10 @@ export default {
802 815
           projectId: this.row.projectId,
803 816
           checkId: this.taskForm.formId
804 817
         }
805
-        
818
+
806 819
         // 并发处理基础数据保存
807 820
         const savePromises = [];
808
-        
821
+
809 822
         if (!this.checkForm.checkId) {
810 823
           savePromises.push(addCheck(obj));
811 824
           this.$emit('preserve');
@@ -822,49 +835,49 @@ export default {
822 835
             delBudgetDevice(this.row.budgetId),
823 836
             delOther(this.row.budgetId)
824 837
           ];
825
-          
838
+
826 839
           await Promise.all(deletePromises);
827
-          
840
+
828 841
           // 并发处理所有新增操作
829 842
           const addPromises = [];
830
-          
843
+
831 844
           // 人员数据(保持顺序)
832 845
           const staffList = this.innerStaffList.concat(this.outerStaffList);
833 846
           staffList.forEach(staff => {
834 847
             staff.budgetId = this.row.budgetId;
835 848
             addPromises.push(addBudgetStaff(staff));
836 849
           });
837
-          
850
+
838 851
           // 车辆数据(保持顺序)
839 852
           this.carList.forEach(car => {
840 853
             car.budgetId = this.row.budgetId;
841 854
             addPromises.push(addBudgetCar(car));
842 855
           });
843
-          
856
+
844 857
           // 设备数据(保持顺序)
845 858
           this.deviceList.forEach(device => {
846 859
             device.budgetId = this.row.budgetId;
847 860
             addPromises.push(addBudgetDevice(device));
848 861
           });
849
-          
862
+
850 863
           // 预算外开销数据(保持顺序)
851 864
           this.otherList.forEach(other => {
852 865
             other.budgetId = this.row.budgetId;
853 866
             addPromises.push(addOther(other));
854 867
           });
855
-          
868
+
856 869
           // 现场开支更新(保持顺序)
857 870
           this.siteList.forEach(site => {
858 871
             addPromises.push(updateSite(site));
859 872
           });
860
-          
873
+
861 874
           // 并发执行所有新增操作
862 875
           await Promise.all(addPromises);
863 876
         }
864
-        
877
+
865 878
         // 等待基础数据保存完成
866 879
         await Promise.all(savePromises);
867
-        
880
+
868 881
         this.$message.success('保存成功');
869 882
       } catch (error) {
870 883
         console.error('保存失败:', error);
@@ -1002,5 +1015,4 @@ table {
1002 1015
     color: #E6A23C;
1003 1016
     font-weight: bold;
1004 1017
   }
1005
-}
1006
-</style>
1018
+}</style>

+ 23
- 2
oa-ui/src/views/flowable/form/budget/adjust/newBudgetInfo.vue Просмотреть файл

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-07 11:01:39
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-07-10 15:47:58
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2025-09-30 16:23:05
6 6
 -->
7 7
 <template>
8 8
   <div class="main" v-loading="loading">
@@ -501,6 +501,7 @@ import { listProjectContract } from "@/api/oa/contract/projectContract";
501 501
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
502 502
 import { getContract } from "@/api/oa/contract/contract";
503 503
 import { getSubContract } from "@/api/oa/contract/subContract";
504
+import { currentNodeByFormId } from "@/api/flowable/definition";
504 505
 import InnerStaffCost from './components/InnerStaffCost.vue';
505 506
 import OuterStaffCost from './components/OuterStaffCost.vue';
506 507
 import CarCost from './components/CarCost.vue';
@@ -668,6 +669,18 @@ export default {
668 669
           if (totalPerformance > Number(this.budgetForm.settleExpense)) {
669 670
             this.$message.warning('内业人员绩效总额超过内业绩效总额,请检查');
670 671
           }
672
+          this.getCurrentTaskName(this.budgetForm.projectId).then(response => {
673
+            if (response != '总经理审核' && response != '预算批准') {
674
+              this.$set(this.budgetForm, 'managerComment', undefined);
675
+              this.$set(this.budgetForm, 'manager', undefined);
676
+              this.$set(this.budgetForm, 'managerTime', undefined);
677
+            }
678
+            if (response != '预算批准') {
679
+              this.$set(this.budgetForm, 'zjlComment', undefined);
680
+              this.$set(this.budgetForm, 'auditor', undefined);
681
+              this.$set(this.budgetForm, 'zjlTime', undefined);
682
+            }
683
+          })
671 684
         }
672 685
         this.loading = false;
673 686
       }).catch(() => {
@@ -708,6 +721,14 @@ export default {
708 721
         this.workContentList = res.rows;
709 722
       })
710 723
     },
724
+    async getCurrentTaskName(projectId) {
725
+      let resData = await currentNodeByFormId({ formId: projectId, name: '3045' })
726
+      if (resData.code == 200) {
727
+        return resData.msg;
728
+      }
729
+      else
730
+        return ''
731
+    },
711 732
     async preserve() {
712 733
       this.$message.warning('正在保存,请勿关闭页面');
713 734
       if (this.taskName == '分管审核') {

+ 3
- 3
oa-ui/src/views/oa/staff/changeRecord.vue Просмотреть файл

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-03-25 17:38:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-02-25 12:17:11
5
+ * @LastEditTime: 2025-09-29 09:29:14
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -134,8 +134,8 @@ export default {
134 134
         row.after = row.after == null ? '' : this.selectDictLabel(this.dict.type.sys_user_operatorlevel, row.after);
135 135
       }
136 136
       else if (row.field == '政治面貌') {
137
-        row.before = row.before == null ? '' : this.selectDictLabel(this.dict.type.sys_user_political, row.before);
138
-        row.after = row.after == null ? '' : this.selectDictLabel(this.dict.type.sys_user_political, row.after);
137
+        row.before = row.before == null ? '' : this.selectDictLabels(this.dict.type.sys_user_political, row.before, ',');
138
+        row.after = row.after == null ? '' : this.selectDictLabels(this.dict.type.sys_user_political, row.after, ',');
139 139
       }
140 140
       else if (row.field == '学历') {
141 141
         row.before = row.before == null ? '' : this.selectDictLabel(this.dict.type.sys_user_degree, row.before);

Загрузка…
Отмена
Сохранить