浏览代码

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

lamphua 3 天前
父节点
当前提交
9536fa112a

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java 查看文件

75
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
75
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
76
             list.addAll(postService.selectDsSecretary(user));
76
             list.addAll(postService.selectDsSecretary(user));
77
         }
77
         }
78
+        if (user.getDeptId() != null && user.getDeptId() == 102L) {
79
+            list.addAll(postService.selectJyLeader(user));
80
+        }
78
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
81
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
79
             list = postService.selectGmAssistant(user);
82
             list = postService.selectGmAssistant(user);
80
         }
83
         }

+ 11
- 0
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowTaskController.java 查看文件

262
         return flowTaskService.flowXmlAndNodeByFormIdAndName(formId, name);
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
      */
230
      */
231
     AjaxResult flowXmlAndNodeByFormIdAndName(String formId, String name);
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
      * @param taskId 流程任务编号
242
      * @param taskId 流程任务编号

+ 26
- 0
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java 查看文件

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
         sysUser.setDeptId(dept.getDeptId());
45
         sysUser.setDeptId(dept.getDeptId());
46
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
46
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
47
         List<SysUser> list = userMapper.selectUserServingList(sysUser);
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
         String count = "(" + (list == null ? 0 : list.size()) + ")";
67
         String count = "(" + (list == null ? 0 : list.size()) + ")";
57
         this.label = dept.getDeptName() + count;
68
         this.label = dept.getDeptName() + count;

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java 查看文件

52
      */
52
      */
53
     public List<SysUser> selectGmAssistant(SysUser user);
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
      */
108
      */
109
     public List<SysUser> selectGmAssistant(SysUser user);
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
         return userPostMapper.selectGmAssistant(user);
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
 		</if>
129
 		</if>
130
 	</select>
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
 	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">
165
 	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">
133
 		select * from sys_user u
166
 		select * from sys_user u
134
 		left join sys_user_post up on u.user_id = up.user_id
167
 		left join sys_user_post up on u.user_id = up.user_id
135
 		left join sys_post p on up.post_id = p.post_id
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
 	</select>
170
 	</select>
138
 
171
 
139
 	<select id="selectSubLeaderByUserId" parameterType="String" resultMap="SysUserResult">
172
 	<select id="selectSubLeaderByUserId" parameterType="String" resultMap="SysUserResult">
166
 	<select id="selectDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
199
 	<select id="selectDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
167
 		select r.user_id, r.nick_name from
200
 		select r.user_id, r.nick_name from
168
 		(select u1.user_id, u1.nick_name, u.dept_id from
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
 		left join sys_user_post as up on r.user_id = up.user_id
203
 		left join sys_user_post as up on r.user_id = up.user_id
171
 		left join sys_post as p on p.post_id = up.post_id
204
 		left join sys_post as p on p.post_id = up.post_id
172
 		where p.post_name = '主任'
205
 		where p.post_name = '主任'
221
 	<select id="selectDeptLeaderByDeptId" parameterType="String" resultMap="SysUserResult">
254
 	<select id="selectDeptLeaderByDeptId" parameterType="String" resultMap="SysUserResult">
222
 		select r.user_id, r.nick_name from
255
 		select r.user_id, r.nick_name from
223
 		(select user_id, nick_name, dept_id from
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
 		left join sys_user_post as up on r.user_id = up.user_id
258
 		left join sys_user_post as up on r.user_id = up.user_id
226
 		left join sys_post as p on p.post_id = up.post_id
259
 		left join sys_post as p on p.post_id = up.post_id
227
 		where p.post_name = '主任'
260
 		where p.post_name = '主任'
230
 	<select id="selectDeptLeadersByDeptId" parameterType="String" resultMap="SysUserResult">
263
 	<select id="selectDeptLeadersByDeptId" parameterType="String" resultMap="SysUserResult">
231
 		select r.user_id, r.nick_name from
264
 		select r.user_id, r.nick_name from
232
 		(select user_id, nick_name, dept_id from
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
 		left join sys_user_post as up on r.user_id = up.user_id
267
 		left join sys_user_post as up on r.user_id = up.user_id
235
 		left join sys_post as p on p.post_id = up.post_id
268
 		left join sys_post as p on p.post_id = up.post_id
236
 		where p.post_name = '主任'
269
 		where p.post_name = '主任'

+ 9
- 0
oa-ui/src/api/flowable/definition.js 查看文件

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
 // 读取xml文件
116
 // 读取xml文件
108
 export function saveXml(data) {
117
 export function saveXml(data) {
109
   return request({
118
   return request({

+ 51
- 16
oa-ui/src/views/flowable/form/budget/adjust/adjustIndex.vue 查看文件

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-14 16:09:56
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
 <template>
7
 <template>
8
   <div class="app-container">
8
   <div class="app-container">
43
         </el-form>
43
         </el-form>
44
         <el-table v-loading="loading" :data="budgetList">
44
         <el-table v-loading="loading" :data="budgetList">
45
           <el-table-column label="序号" align="center" type="index" width="60" />
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
             <template slot-scope="scope">
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
             </template>
49
             </template>
50
           </el-table-column>
50
           </el-table-column>
51
           <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
51
           <el-table-column label="项目编号" align="center" prop="project.projectNumber" />
56
               {{ getUserName(scope.row.compiler) }}
56
               {{ getUserName(scope.row.compiler) }}
57
             </template>
57
             </template>
58
           </el-table-column>
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
             <template slot-scope="scope">
61
             <template slot-scope="scope">
61
               {{ getUserName(scope.row.auditor) }}
62
               {{ getUserName(scope.row.auditor) }}
62
             </template>
63
             </template>
63
-          </el-table-column>
64
+          </el-table-column> -->
64
           <el-table-column label="操作" align="center" width="120">
65
           <el-table-column label="操作" align="center" width="120">
65
             <template slot-scope="scope">
66
             <template slot-scope="scope">
66
               <el-button type="primary" size="mini" @click="handleSelect(scope.row)"
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
             </template>
69
             </template>
69
           </el-table-column>
70
           </el-table-column>
70
         </el-table>
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
       </div>
74
       </div>
74
       <div v-else key="adjust">
75
       <div v-else key="adjust">
75
         <div class="adjust-header" v-if="hideReturn">
76
         <div class="adjust-header" v-if="hideReturn">
87
 import { listBudget, getBudget } from '@/api/oa/budget/budget';
88
 import { listBudget, getBudget } from '@/api/oa/budget/budget';
88
 import { listCheck, getCheck, delCheck, addCheck, updateCheck } from "@/api/oa/budget/check";
89
 import { listCheck, getCheck, delCheck, addCheck, updateCheck } from "@/api/oa/budget/check";
89
 import { listProject } from '@/api/oa/project/project';
90
 import { listProject } from '@/api/oa/project/project';
91
+import { currentNodeByFormId } from "@/api/flowable/definition";
90
 import BudgetAdjust from './budgetAdjust.vue';
92
 import BudgetAdjust from './budgetAdjust.vue';
91
 export default {
93
 export default {
92
   props: {
94
   props: {
118
       queryType: '1',
120
       queryType: '1',
119
       projectList: [],
121
       projectList: [],
120
       hideReturn: true,
122
       hideReturn: true,
121
-      isSurvey: 0
123
+      isSurvey: 0,
122
     }
124
     }
123
   },
125
   },
124
   created() {
126
   created() {
142
         this.budgetList = res.rows;
144
         this.budgetList = res.rows;
143
         for (let b of this.budgetList) {
145
         for (let b of this.budgetList) {
144
           this.isDisabled(b).then(res => {
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
     async isDisabled(row) {
165
     async isDisabled(row) {
161
       let res = await listCheck({ budgetId: row.budgetId })
166
       let res = await listCheck({ budgetId: row.budgetId })
162
       if (res.total > 0) {
167
       if (res.total > 0) {
163
-        return true;
168
+        return '1';
164
       } else {
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
     handleBack() {
181
     handleBack() {
169
       this.projectId = '';
182
       this.projectId = '';
223
     },
236
     },
224
     handleIsSurveyChange(val) {
237
     handleIsSurveyChange(val) {
225
       this.isSurvey = val;
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
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-07 11:01:39
3
  * @Date: 2025-05-07 11:01:39
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-09-10 13:58:29
5
+ * @LastEditTime: 2025-09-30 16:13:13
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="main">
8
   <div class="main">
134
       <el-descriptions-item label="实际使用车辆" :span="3" v-if="taskName == '核算编制'">
134
       <el-descriptions-item label="实际使用车辆" :span="3" v-if="taskName == '核算编制'">
135
         <span v-for="car in actualInfo.carList" :key="car.id">
135
         <span v-for="car in actualInfo.carList" :key="car.id">
136
           <el-tag :type="car.isExist ? 'primary' : 'warning'" effect="plain" style="margin-right: 10px;">{{
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
         </span>
138
         </span>
140
       </el-descriptions-item>
139
       </el-descriptions-item>
141
       <el-descriptions-item label="车辆成本" :span="3" v-if="taskName == '核算编制' || carList.length > 0">
140
       <el-descriptions-item label="车辆成本" :span="3" v-if="taskName == '核算编制' || carList.length > 0">
214
           </tr>
213
           </tr>
215
           <tr>
214
           <tr>
216
             <td>人员成本</td>
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
             <td style="text-align:right;">{{ isNaN(checkStaffCost) ? 0 : Number(checkStaffCost).toFixed(2) }}</td>
218
             <td style="text-align:right;">{{ isNaN(checkStaffCost) ? 0 : Number(checkStaffCost).toFixed(2) }}</td>
220
             <td style="text-align:right;">{{ (Number(checkStaffCost) - Number(budgetForm.staffCost)).toFixed(2) }}</td>
219
             <td style="text-align:right;">{{ (Number(checkStaffCost) - Number(budgetForm.staffCost)).toFixed(2) }}</td>
221
           </tr>
220
           </tr>
258
             <td style="text-align:right;"><b>{{ isNaN(budgetForm.totalBudget) ? 0 : budgetForm.totalBudget }}</b></td>
257
             <td style="text-align:right;"><b>{{ isNaN(budgetForm.totalBudget) ? 0 : budgetForm.totalBudget }}</b></td>
259
             <td style="text-align:right;"><b>{{ isNaN(totalBudgetAdjust) ? 0 : totalBudgetAdjust }}</b></td>
258
             <td style="text-align:right;"><b>{{ isNaN(totalBudgetAdjust) ? 0 : totalBudgetAdjust }}</b></td>
260
             <td style="text-align:right;"><b>{{ (Number(totalBudgetAdjust) - Number(budgetForm.totalBudget)).toFixed(2)
259
             <td style="text-align:right;"><b>{{ (Number(totalBudgetAdjust) - Number(budgetForm.totalBudget)).toFixed(2)
261
-                }}</b></td>
260
+            }}</b></td>
262
           </tr>
261
           </tr>
263
         </table>
262
         </table>
264
       </el-descriptions-item>
263
       </el-descriptions-item>
371
 import { listProjectContract } from "@/api/oa/contract/projectContract";
370
 import { listProjectContract } from "@/api/oa/contract/projectContract";
372
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
371
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
373
 import { getContract } from "@/api/oa/contract/contract";
372
 import { getContract } from "@/api/oa/contract/contract";
373
+import { currentNodeByFormId } from "@/api/flowable/definition";
374
 import { getSubContract } from "@/api/oa/contract/subContract";
374
 import { getSubContract } from "@/api/oa/contract/subContract";
375
 import InnerStaffCost from './components/InnerStaffCost.vue';
375
 import InnerStaffCost from './components/InnerStaffCost.vue';
376
 import OuterStaffCost from './components/OuterStaffCost.vue';
376
 import OuterStaffCost from './components/OuterStaffCost.vue';
474
         if (this.budgetForm) {
474
         if (this.budgetForm) {
475
           const budgetId = this.budgetForm.budgetId;
475
           const budgetId = this.budgetForm.budgetId;
476
           this.budgetId = budgetId;
476
           this.budgetId = budgetId;
477
-          
477
+
478
           // 并发获取所有数据
478
           // 并发获取所有数据
479
           const [
479
           const [
480
             deviceRes,
480
             deviceRes,
621
       getCheck(this.taskForm.formId).then(res => {
621
       getCheck(this.taskForm.formId).then(res => {
622
         if (res.data) {
622
         if (res.data) {
623
           this.checkForm = res.data;
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
         if (this.taskName == '核算编制') {
630
         if (this.taskName == '核算编制') {
626
           this.checkForm.checker = this.$store.getters.userId;
631
           this.checkForm.checker = this.$store.getters.userId;
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
     async initActualInfo(project) {
676
     async initActualInfo(project) {
664
       let deviceIds = [];
677
       let deviceIds = [];
665
       let carIds = [];
678
       let carIds = [];
719
     // 处理内业人员数据变化
732
     // 处理内业人员数据变化
720
     handleInnerStaffChange(newList) {
733
     handleInnerStaffChange(newList) {
721
       this.innerStaffList = newList;
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
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
736
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
724
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
737
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
725
       this.getTotalBudgetAdjust();
738
       this.getTotalBudgetAdjust();
728
     // 处理外业人员数据变化
741
     // 处理外业人员数据变化
729
     handleOuterStaffChange(newList) {
742
     handleOuterStaffChange(newList) {
730
       this.outerStaffList = newList;
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
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
745
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
733
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
746
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
734
       this.getTotalBudgetAdjust();
747
       this.getTotalBudgetAdjust();
759
         amount: Number(site.amount).toFixed(2),
772
         amount: Number(site.amount).toFixed(2),
760
         amountAdjust: site.amountAdjust ? Number(site.amountAdjust).toFixed(2) : 0
773
         amountAdjust: site.amountAdjust ? Number(site.amountAdjust).toFixed(2) : 0
761
       }));
774
       }));
762
-      
775
+
763
       this.budgetForm.siteSum = this.siteList.reduce((sum, site) => sum + Number(site.amount || 0), 0).toFixed(2);
776
       this.budgetForm.siteSum = this.siteList.reduce((sum, site) => sum + Number(site.amount || 0), 0).toFixed(2);
764
       this.checkSiteCost = this.siteList.reduce((sum, site) => sum + Number(site.amountAdjust || 0), 0).toFixed(2);
777
       this.checkSiteCost = this.siteList.reduce((sum, site) => sum + Number(site.amountAdjust || 0), 0).toFixed(2);
765
     },
778
     },
802
           projectId: this.row.projectId,
815
           projectId: this.row.projectId,
803
           checkId: this.taskForm.formId
816
           checkId: this.taskForm.formId
804
         }
817
         }
805
-        
818
+
806
         // 并发处理基础数据保存
819
         // 并发处理基础数据保存
807
         const savePromises = [];
820
         const savePromises = [];
808
-        
821
+
809
         if (!this.checkForm.checkId) {
822
         if (!this.checkForm.checkId) {
810
           savePromises.push(addCheck(obj));
823
           savePromises.push(addCheck(obj));
811
           this.$emit('preserve');
824
           this.$emit('preserve');
822
             delBudgetDevice(this.row.budgetId),
835
             delBudgetDevice(this.row.budgetId),
823
             delOther(this.row.budgetId)
836
             delOther(this.row.budgetId)
824
           ];
837
           ];
825
-          
838
+
826
           await Promise.all(deletePromises);
839
           await Promise.all(deletePromises);
827
-          
840
+
828
           // 并发处理所有新增操作
841
           // 并发处理所有新增操作
829
           const addPromises = [];
842
           const addPromises = [];
830
-          
843
+
831
           // 人员数据(保持顺序)
844
           // 人员数据(保持顺序)
832
           const staffList = this.innerStaffList.concat(this.outerStaffList);
845
           const staffList = this.innerStaffList.concat(this.outerStaffList);
833
           staffList.forEach(staff => {
846
           staffList.forEach(staff => {
834
             staff.budgetId = this.row.budgetId;
847
             staff.budgetId = this.row.budgetId;
835
             addPromises.push(addBudgetStaff(staff));
848
             addPromises.push(addBudgetStaff(staff));
836
           });
849
           });
837
-          
850
+
838
           // 车辆数据(保持顺序)
851
           // 车辆数据(保持顺序)
839
           this.carList.forEach(car => {
852
           this.carList.forEach(car => {
840
             car.budgetId = this.row.budgetId;
853
             car.budgetId = this.row.budgetId;
841
             addPromises.push(addBudgetCar(car));
854
             addPromises.push(addBudgetCar(car));
842
           });
855
           });
843
-          
856
+
844
           // 设备数据(保持顺序)
857
           // 设备数据(保持顺序)
845
           this.deviceList.forEach(device => {
858
           this.deviceList.forEach(device => {
846
             device.budgetId = this.row.budgetId;
859
             device.budgetId = this.row.budgetId;
847
             addPromises.push(addBudgetDevice(device));
860
             addPromises.push(addBudgetDevice(device));
848
           });
861
           });
849
-          
862
+
850
           // 预算外开销数据(保持顺序)
863
           // 预算外开销数据(保持顺序)
851
           this.otherList.forEach(other => {
864
           this.otherList.forEach(other => {
852
             other.budgetId = this.row.budgetId;
865
             other.budgetId = this.row.budgetId;
853
             addPromises.push(addOther(other));
866
             addPromises.push(addOther(other));
854
           });
867
           });
855
-          
868
+
856
           // 现场开支更新(保持顺序)
869
           // 现场开支更新(保持顺序)
857
           this.siteList.forEach(site => {
870
           this.siteList.forEach(site => {
858
             addPromises.push(updateSite(site));
871
             addPromises.push(updateSite(site));
859
           });
872
           });
860
-          
873
+
861
           // 并发执行所有新增操作
874
           // 并发执行所有新增操作
862
           await Promise.all(addPromises);
875
           await Promise.all(addPromises);
863
         }
876
         }
864
-        
877
+
865
         // 等待基础数据保存完成
878
         // 等待基础数据保存完成
866
         await Promise.all(savePromises);
879
         await Promise.all(savePromises);
867
-        
880
+
868
         this.$message.success('保存成功');
881
         this.$message.success('保存成功');
869
       } catch (error) {
882
       } catch (error) {
870
         console.error('保存失败:', error);
883
         console.error('保存失败:', error);
1002
     color: #E6A23C;
1015
     color: #E6A23C;
1003
     font-weight: bold;
1016
     font-weight: bold;
1004
   }
1017
   }
1005
-}
1006
-</style>
1018
+}</style>

+ 23
- 2
oa-ui/src/views/flowable/form/budget/adjust/newBudgetInfo.vue 查看文件

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-07 11:01:39
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
 <template>
7
 <template>
8
   <div class="main" v-loading="loading">
8
   <div class="main" v-loading="loading">
501
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
501
 import { listProjectSubcontract } from "@/api/oa/contract/projectSubcontract";
502
 import { getContract } from "@/api/oa/contract/contract";
502
 import { getContract } from "@/api/oa/contract/contract";
503
 import { getSubContract } from "@/api/oa/contract/subContract";
503
 import { getSubContract } from "@/api/oa/contract/subContract";
504
+import { currentNodeByFormId } from "@/api/flowable/definition";
504
 import InnerStaffCost from './components/InnerStaffCost.vue';
505
 import InnerStaffCost from './components/InnerStaffCost.vue';
505
 import OuterStaffCost from './components/OuterStaffCost.vue';
506
 import OuterStaffCost from './components/OuterStaffCost.vue';
506
 import CarCost from './components/CarCost.vue';
507
 import CarCost from './components/CarCost.vue';
668
           if (totalPerformance > Number(this.budgetForm.settleExpense)) {
669
           if (totalPerformance > Number(this.budgetForm.settleExpense)) {
669
             this.$message.warning('内业人员绩效总额超过内业绩效总额,请检查');
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
         this.loading = false;
685
         this.loading = false;
673
       }).catch(() => {
686
       }).catch(() => {
708
         this.workContentList = res.rows;
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
     async preserve() {
732
     async preserve() {
712
       this.$message.warning('正在保存,请勿关闭页面');
733
       this.$message.warning('正在保存,请勿关闭页面');
713
       if (this.taskName == '分管审核') {
734
       if (this.taskName == '分管审核') {

+ 3
- 3
oa-ui/src/views/oa/staff/changeRecord.vue 查看文件

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

正在加载...
取消
保存