Bläddra i källkod

部门负责人查看用车、借款、结算

lamphua 9 månader sedan
förälder
incheckning
2eefd0f775

+ 0
- 17
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowController.java Visa fil

@@ -48,23 +48,6 @@ public class CmcBorrowController extends BaseController
48 48
         return getDataTable(list);
49 49
     }
50 50
 
51
-    /**
52
-     * 部门负责人查询cmc借款申请列表
53
-     */
54
-    @GetMapping("/listDeptQuery")
55
-    public TableDataInfo listDeptQuery()
56
-    {
57
-        CmcBorrow cmcBorrow = new CmcBorrow();
58
-        cmcBorrow.setApplyDept(getLoginUser().getDeptId());
59
-        List<CmcBorrow> list = cmcBorrowService.selectCmcBorrowList(cmcBorrow);
60
-        CmcBorrow borrow = new CmcBorrow();
61
-        borrow.setUndertakingDept(getLoginUser().getDeptId().toString());
62
-        List<CmcBorrow> list1 = cmcBorrowService.selectCmcBorrowList(borrow);
63
-        list.addAll(list1);
64
-        list.stream().distinct().collect(Collectors.toList());
65
-        return getDataTable(list);
66
-    }
67
-
68 51
     /**
69 52
      * 导出cmc借款申请列表
70 53
      */

+ 1
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcSettleController.java Visa fil

@@ -72,6 +72,7 @@ public class CmcSettleController extends BaseController
72 72
     @PostMapping
73 73
     public AjaxResult add(@RequestBody CmcSettle cmcSettle)
74 74
     {
75
+        cmcSettle.setReportDept(getLoginUser().getDeptId());
75 76
         if (cmcSettle.getProjectId() != null && cmcSettle.getXmName() == null)
76 77
             cmcSettle.setXmName(" ");
77 78
         if (cmcSettle.getProjectId() == null && cmcSettle.getXmName() != null)

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCarApproval.java Visa fil

@@ -43,6 +43,8 @@ public class CmcCarApproval extends BaseEntity
43 43
     private String projectNumber;
44 44
     @Excel(name = "项目名称")
45 45
     private String projectName;
46
+    @Excel(name = "承担部门")
47
+    private String undertakingDept;
46 48
     private CmcProject project;
47 49
 
48 50
     /** 用车事由 */
@@ -358,6 +360,15 @@ public class CmcCarApproval extends BaseEntity
358 360
     {
359 361
         return project;
360 362
     }
363
+    public void setUndertakingDept(String undertakingDept)
364
+    {
365
+        this.undertakingDept = undertakingDept;
366
+    }
367
+
368
+    public String getUndertakingDept()
369
+    {
370
+        return undertakingDept;
371
+    }
361 372
     public void setApplyReason(String applyReason)
362 373
     {
363 374
         this.applyReason = applyReason;

+ 13
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcSettle.java Visa fil

@@ -47,6 +47,10 @@ public class CmcSettle extends BaseEntity
47 47
     private String reporterUserName;
48 48
     private Long reporter;
49 49
 
50
+    /** 上报部门 */
51
+    @Excel(name = "上报部门")
52
+    private Long reportDept;
53
+
50 54
     /** 上报日期 */
51 55
     @JsonFormat(pattern = "yyyy-MM-dd")
52 56
     @Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -211,6 +215,15 @@ public class CmcSettle extends BaseEntity
211 215
     {
212 216
         return undertakingDept;
213 217
     }
218
+    public void setReportDept(Long reportDept)
219
+    {
220
+        this.reportDept = reportDept;
221
+    }
222
+
223
+    public Long getReportDept()
224
+    {
225
+        return reportDept;
226
+    }
214 227
     public void setWorkloadReport(String workloadReport) 
215 228
     {
216 229
         this.workloadReport = workloadReport;

+ 3
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml Visa fil

@@ -11,6 +11,7 @@
11 11
         <result property="cars"    column="cars"    />
12 12
         <result property="drivers"    column="drivers"    />
13 13
         <result property="projectId"    column="project_id"    />
14
+        <result property="undertakingDept"    column="undertaking_dept"    />
14 15
         <result property="applyReason"    column="apply_reason"    />
15 16
         <result property="passengers"    column="passengers"    />
16 17
         <result property="applyDate"    column="apply_date"    />
@@ -92,10 +93,11 @@
92 93
         <result property="projectId"    column="project_id"    />
93 94
         <result property="projectNumber"    column="project_number"    />
94 95
         <result property="projectName"    column="project_name"    />
96
+        <result property="undertakingDept"    column="undertaking_dept"    />
95 97
     </resultMap>
96 98
 
97 99
     <sql id="selectCmcCarApprovalVo">
98
-        select ca.car_apply_id, ca.applier, u.nick_name as applier_nick_name, ca.use_dept, d.dept_name, ca.cars, ca.drivers, ca.project_id, p.project_number, p.project_name,
100
+        select ca.car_apply_id, ca.applier, u.nick_name as applier_nick_name, ca.use_dept, d.dept_name, ca.cars, ca.drivers, ca.project_id, p.project_number, p.project_name, p.undertaking_dept,
99 101
                ca.apply_reason, ca.passengers, ca.apply_date, ca.begin_date, ca.end_date, ca.days, ca.dept_user_id, u1.nick_name as dept_nick_name, ca.dept_comment, ca.manager_user_id,
100 102
                u2.nick_name as manager_nick_name, ca.manager_comment, ca.car_usage, ca.union_user_id, u3.nick_name as union_nick_name, ca.union_comment, ca.gm_user_id, u4.nick_name as gm_nick_name,
101 103
                ca.dsz_user_id, u5.nick_name as dsz_nick_name, ca.gm_comment, ca.dsz_comment, ca.dispatcher, u6.nick_name as dispatch_nick_name, ca.dispatch_comment, ca.estimate_cost, ca.dept_time,

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSettleMapper.xml Visa fil

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
8 8
         <result property="settleId"    column="settle_id"    />
9 9
         <result property="projectId"    column="project_id"    />
10 10
         <result property="undertakingDept"    column="undertaking_dept"    />
11
+        <result property="reportDept"    column="report_dept"    />
11 12
         <result property="xmName"    column="xm_name"    />
12 13
         <result property="workloadReport"    column="workload_report"    />
13 14
         <result property="reporter"    column="reporter"    />
@@ -90,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
90 91
         select s.settle_id, s.project_id, p.project_number, p.project_name, p.undertaking_dept, s.xm_name, s.workload_report, s.reporter, u.nick_name as reporter_nick_name, s.report_time, s.settle_comment, s.zh_user_id, u1.nick_name as zh_nick_name,
91 92
                s.zh_time, s.zh_comment, s.js_user_id, u2.nick_name as js_nick_name, s.js_time, s.js_comment, s.jy_user_id, u3.nick_name as jy_nick_name, s.jy_time, s.jy_comment, 
92 93
                s.manager_user_id, u4.nick_name as manager_nick_name, s.manager_time, s.manager_comment, s.gm_user_id, u5.nick_name as gm_nick_name, s.gm_time, s.gm_comment,
93
-               s.dsz_user_id, u6.nick_name as dsz_nick_name, s.dsz_time, s.dsz_comment, s.settle_document, s.modify_document, s.final_document from cmc_settle as s
94
+               s.dsz_user_id, u6.nick_name as dsz_nick_name, s.dsz_time, s.dsz_comment, s.settle_document, s.modify_document, s.final_document, s.report_dept from cmc_settle as s
94 95
         left join sys_user as u on u.user_id = s.reporter
95 96
         left join sys_user as u1 on u1.user_id = s.zh_user_id
96 97
         left join sys_user as u2 on u2.user_id = s.js_user_id
@@ -107,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
107 108
             <if test="settleId != null  and settleId != ''"> and s.settle_id = #{settleId}</if>
108 109
             <if test="projectId != null"> and s.project_id = #{projectId}</if>
109 110
             <if test="undertakingDept != null  and undertakingDept != ''"> and find_in_set(#{undertakingDept}, p.undertaking_dept)</if>
111
+            <if test="reportDept != null  and reportDept != ''"> and s.report_dept = #{reportDept}</if>
110 112
             <if test="xmName != null"> and s.xm_name like concat('%', #{xmName}, '%')</if>
111 113
             <if test="workloadReport != null  and workloadReport != ''"> and s.workload_report = #{workloadReport}</if>
112 114
             <if test="reporter != null "> and s.reporter = #{reporter}</if>
@@ -167,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
167 169
             <if test="settleDocument != null">settle_document,</if>
168 170
             <if test="modifyDocument != null">modify_document,</if>
169 171
             <if test="finalDocument != null">final_document,</if>
172
+            <if test="reportDept != null">report_dept,</if>
170 173
          </trim>
171 174
         <trim prefix="values (" suffix=")" suffixOverrides=",">
172 175
             <if test="settleId != null">#{settleId},</if>
@@ -197,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
197 200
             <if test="settleDocument != null">#{settleDocument},</if>
198 201
             <if test="modifyDocument != null">#{modifyDocument},</if>
199 202
             <if test="finalDocument != null">#{finalDocument},</if>
203
+            <if test="reportDept != null">#{reportDept},</if>
200 204
          </trim>
201 205
     </insert>
202 206
 
@@ -230,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
230 234
             <if test="settleDocument != null">settle_document = #{settleDocument},</if>
231 235
             <if test="modifyDocument != null">modify_document = #{modifyDocument},</if>
232 236
             <if test="finalDocument != null">final_document = #{finalDocument},</if>
237
+            <if test="reportDept != null">report_dept = #{reportDept},</if>
233 238
         </trim>
234 239
         where settle_id = #{settleId}
235 240
     </update>

+ 6
- 9
oa-ui/src/api/oa/borrow/borrow.js Visa fil

@@ -1,3 +1,9 @@
1
+/*
2
+ * @Author: wrh
3
+ * @Date: 2024-04-07 10:45:54
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-08-22 09:31:26
6
+ */
1 7
 import request from '@/utils/request'
2 8
 
3 9
 // 查询cmc借款申请列表
@@ -9,15 +15,6 @@ export function listBorrow(query) {
9 15
   })
10 16
 }
11 17
 
12
-// 部门负责人查询cmc借款申请列表
13
-export function listBorrowDeptQuery(query) {
14
-  return request({
15
-    url: '/oa/borrow/listDeptQuery',
16
-    method: 'get',
17
-    params: query
18
-  })
19
-}
20
-
21 18
 // 查询cmc借款申请详细
22 19
 export function getBorrow(borrowId) {
23 20
   return request({

+ 32
- 30
oa-ui/src/views/file/index.vue Visa fil

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:49
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-08-20 11:05:25
5
+ * @LastEditTime: 2024-08-21 14:36:48
6 6
 -->
7 7
 <template>
8 8
   <div class="warpper-container">
@@ -98,53 +98,53 @@
98 98
               <template slot-scope="props">
99 99
                 <div class="expand-info">
100 100
                   <el-descriptions :column="2">
101
-                    <el-descriptions-item label="存放地址" class="desLabel" :span="2">
101
+                    <el-descriptions-item label="存放地址" class="desLabel" :span="2">
102 102
                       {{ props.row.storageAddress == '' || props.row.storageAddress == undefined ? '暂无' :
103 103
                         props.row.storageAddress
104 104
                       }}
105 105
                     </el-descriptions-item>
106
-                    <el-descriptions-item label="甲方单位" class="desLabel" :span="2">{{ props.row.partyA.partyAName == ''
106
+                    <el-descriptions-item label="甲方单位" class="desLabel" :span="2">{{ props.row.partyA.partyAName == ''
107 107
                       ? '暂无' :
108 108
                       props.row.partyA.partyAName
109 109
                     }}</el-descriptions-item>
110
-                    <el-descriptions-item label="联系人" class="desLabel">{{ props.row.contactPerson == '' ? '暂无' :
110
+                    <el-descriptions-item label="联系人" class="desLabel">{{ props.row.contactPerson == '' ? '暂无' :
111 111
                       props.row.contactPerson
112 112
                     }}</el-descriptions-item>
113
-                    <el-descriptions-item label="联系电话" class="desLabel">{{ props.row.telephone == '' ? '暂无' :
113
+                    <el-descriptions-item label="联系电话" class="desLabel">{{ props.row.telephone == '' ? '暂无' :
114 114
                       props.row.telephone
115 115
                     }}</el-descriptions-item>
116
-                    <el-descriptions-item label="项目类型" class="desLabel">{{ props.row.projectType == '' ? '暂无' :
116
+                    <el-descriptions-item label="项目类型" class="desLabel">{{ props.row.projectType == '' ? '暂无' :
117 117
                       props.row.projectType
118 118
                     }}</el-descriptions-item>
119
-                    <el-descriptions-item label="技术负责人" class="desLabel">{{ props.row.technicalDirector == '' ? '暂无'
119
+                    <el-descriptions-item label="技术负责人" class="desLabel">{{ props.row.technicalDirector == '' ? '暂无'
120 120
                       :
121 121
                       getUserName(props.row.technicalDirector)
122 122
                     }}</el-descriptions-item>
123
-                    <el-descriptions-item label="技术设计人" class="desLabel">{{ props.row.techinicalDesigner == '' ? '暂无'
123
+                    <el-descriptions-item label="技术设计人" class="desLabel">{{ props.row.techinicalDesigner == '' ? '暂无'
124 124
                       :
125 125
                       getUserName(props.row.techinicalDesigner)
126 126
                     }}</el-descriptions-item>
127
-                    <el-descriptions-item label="承担部门" class="desLabel">{{ props.row.undertakingSector == '' ? '暂无' :
128
-                      props.row.undertakingSector
127
+                    <el-descriptions-item label="承担部门" class="desLabel">{{ props.row.undertakingSector == '' ? '暂无' :
128
+                      props.row.undertakingDeptName
129 129
                     }}</el-descriptions-item>
130
-                    <el-descriptions-item label="质量检察员" class="desLabel">{{ props.row.qualityInspector == '' ? '暂无' :
130
+                    <el-descriptions-item label="质量检察员" class="desLabel">{{ props.row.qualityInspector == '' ? '暂无' :
131 131
                       getUserNames(props.row.qualityInspector)
132 132
                     }}</el-descriptions-item>
133
-                    <el-descriptions-item label="项目登记时间" class="desLabel" :span="2">{{ props.row.registrationDate ==
133
+                    <el-descriptions-item label="项目登记时间" class="desLabel" :span="2">{{ props.row.registrationDate ==
134 134
                       '' ? '暂无' :
135 135
                       props.row.registrationDate
136 136
                     }}</el-descriptions-item>
137
-                    <el-descriptions-item label="项目登记人" class="desLabel">{{ props.row.projectRegistrant == '' ? '暂无'
137
+                    <el-descriptions-item label="项目登记人" class="desLabel">{{ props.row.projectRegistrant == '' ? '暂无'
138 138
                       :
139 139
                       getUserName(props.row.projectRegistrant)
140 140
                     }}</el-descriptions-item>
141
-                    <el-descriptions-item label="进场时间" class="desLabel">{{ props.row.approachTime == '' ? '暂无' :
141
+                    <el-descriptions-item label="进场时间" class="desLabel">{{ props.row.approachTime == '' ? '暂无' :
142 142
                       props.row.approachTime
143 143
                     }}</el-descriptions-item>
144
-                    <el-descriptions-item label="撤场时间" class="desLabel">{{ props.row.withdrawalTime == '' ? '暂无' :
144
+                    <el-descriptions-item label="撤场时间" class="desLabel">{{ props.row.withdrawalTime == '' ? '暂无' :
145 145
                       props.row.withdrawalTime
146 146
                     }}</el-descriptions-item>
147
-                    <el-descriptions-item label="项目要求完成时间" class="desLabel">{{ props.row.requiredCompletionDate == ''
147
+                    <el-descriptions-item label="项目要求完成时间" class="desLabel">{{ props.row.requiredCompletionDate == ''
148 148
                       ? '暂无' :
149 149
                       props.row.requiredCompletionDate
150 150
                     }}</el-descriptions-item>
@@ -186,41 +186,41 @@
186 186
                 <template #default="props">
187 187
                   <el-descriptions :column="2" size="small">
188 188
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
189
-                      label="成果名称:">{{
189
+                      label="成果名称">{{
190 190
                         props.row.achiName
191 191
                       }}</el-descriptions-item>
192 192
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
193
-                      label="数据年份:">{{
193
+                      label="数据年份">{{
194 194
                         props.row.dataYear }}</el-descriptions-item>
195 195
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
196
-                      label="成果类型:">{{ selectDictLabel(dict.type.cmc_achi_type, props.row.resultType)
196
+                      label="成果类型">{{ selectDictLabel(dict.type.cmc_achi_type, props.row.resultType)
197 197
                       }}</el-descriptions-item>
198 198
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
199
-                      label="文件类型:">{{
199
+                      label="文件类型">{{
200 200
                         props.row.fileType }}</el-descriptions-item>
201 201
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
202
-                      label="工作量:">{{
202
+                      label="工作量">{{
203 203
                         props.row.workLoad }}</el-descriptions-item>
204 204
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
205
-                      label="单位:">{{
205
+                      label="单位">{{
206 206
                         props.row.unit }}</el-descriptions-item>
207 207
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
208
-                      label="大地基准:">{{
208
+                      label="大地基准">{{
209 209
                         props.row.geodeticDatum }}</el-descriptions-item>
210 210
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
211
-                      label="分辨率:">{{
211
+                      label="分辨率">{{
212 212
                         props.row.resolution }}</el-descriptions-item>
213 213
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
214
-                      label="比例尺或等级:">{{ selectDictLabel(dict.type.cmc_scale_grade, props.row.scaleGrade)
214
+                      label="比例尺或等级">{{ selectDictLabel(dict.type.cmc_scale_grade, props.row.scaleGrade)
215 215
                       }}</el-descriptions-item>
216 216
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
217
-                      label="数据类型:">{{
217
+                      label="数据类型">{{
218 218
                         props.row.dataType }}</el-descriptions-item>
219 219
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
220
-                      label="存放地址:">{{
220
+                      label="存放地址">{{
221 221
                         props.row.storageAddress }}</el-descriptions-item>
222 222
                     <el-descriptions-item min-width="195px" label-class-name="my-label" class-name="my-content"
223
-                      label="提交时间:">{{
223
+                      label="提交时间">{{
224 224
                         props.row.submitDate }}</el-descriptions-item>
225 225
                   </el-descriptions>
226 226
                 </template>
@@ -833,8 +833,10 @@ export default {
833 833
           this.$message.error('暂无成果,请添加');
834 834
           this.achiDialogData = [];
835 835
         } else {
836
-          this.dialogTableVisible = true;
837
-          console.log(res.rows);
836
+          if (this.dialogTableVisible == false)
837
+            this.dialogTableVisible = true;
838
+          else
839
+            this.dialogTableVisible = false;
838 840
           this.achiDialogData = res.rows;
839 841
         }
840 842
       })

+ 10
- 4
oa-ui/src/views/oa/borrow/index.vue Visa fil

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:59
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-08-21 10:22:33
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-08-22 09:21:21
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -186,8 +186,14 @@ export default {
186 186
     getList() {
187 187
       this.loading = true;
188 188
       if (this.roles.some(element => element === "dept")) {
189
-        this.queryParams.applyDept = this.deptId;
190
-        // this.queryParams.undertakingDept = this.deptId;
189
+        if (this.queryParams.borrowUsage == '0') {
190
+          this.queryParams.undertakingDept = this.deptId;
191
+          this.queryParams.applyDept = null;
192
+        }
193
+        else {
194
+          this.queryParams.applyDept = this.deptId;
195
+          this.queryParams.undertakingDept = null;
196
+        }
191 197
       }
192 198
       if (this.roles.some(e => e === 'leader')) {
193 199
         this.queryParams.applyDept = null;

+ 13
- 2
oa-ui/src/views/oa/car/approval.vue Visa fil

@@ -177,8 +177,19 @@ export default {
177 177
     /** 查询cmc用车审批列表 */
178 178
     getList() {
179 179
       this.loading = true;
180
-      if (this.roles.some(element => element === "dept")) {
181
-        this.queryParams.useDept = this.deptId;
180
+      if (this.roles.some(element => element === "dept")) {        
181
+        if (this.queryParams.carUsage == '0') {
182
+          this.queryParams.undertakingDept = this.deptId;
183
+          this.queryParams.useDept = null;
184
+        }
185
+        else {
186
+          this.queryParams.useDept = this.deptId;
187
+          this.queryParams.undertakingDept = null;
188
+        }
189
+      }
190
+      if (this.roles.some(e => e === 'leader')) {
191
+        this.queryParams.useDept = null;
192
+        this.queryParams.undertakingDept = null;
182 193
       }
183 194
       listCarApproval(this.queryParams).then(response => {
184 195
         this.carApprovalList = response.rows;

+ 10
- 0
oa-ui/src/views/oa/settle/index.vue Visa fil

@@ -88,10 +88,14 @@
88 88
 import { listSettle, getSettle, delSettle, addSettle, updateSettle } from "@/api/oa/settle/settle";
89 89
 import { listProject } from '@/api/oa/project/project';
90 90
 import settleForm from '../../flowable/form/settleForm.vue';
91
+import { mapGetters } from 'vuex'
91 92
 
92 93
 export default {
93 94
   components: { settleForm },
94 95
   name: "Settle",
96
+  computed: {
97
+    ...mapGetters(['roles', 'deptId']),
98
+  },
95 99
   data() {
96 100
     return {
97 101
       // 遮罩层
@@ -162,6 +166,12 @@ export default {
162 166
     /** 查询cmc结算审批列表 */
163 167
     getList() {
164 168
       this.loading = true;
169
+      if (this.roles.some(element => element === "dept")) {
170
+          this.queryParams.undertakingDept = this.deptId;        
171
+      }
172
+      if (this.roles.some(e => e === 'leader')) {
173
+        this.queryParams.undertakingDept = null;
174
+      }
165 175
       listSettle(this.queryParams).then(response => {
166 176
         this.settleList = response.rows;
167 177
         this.total = response.total;

+ 10
- 0
oa-ui/src/views/oa/settle/other.vue Visa fil

@@ -82,10 +82,14 @@
82 82
 import { listSettle, getSettle, delSettle, addSettle, updateSettle } from "@/api/oa/settle/settle";
83 83
 import { listProject } from '@/api/oa/project/project';
84 84
 import settleOther from '../../flowable/form/settleOther.vue';
85
+import { mapGetters } from 'vuex'
85 86
 
86 87
 export default {
87 88
   components: { settleOther },
88 89
   name: "Settle",
90
+  computed: {
91
+    ...mapGetters(['roles', 'deptId']),
92
+  },
89 93
   data() {
90 94
     return {
91 95
       // 遮罩层
@@ -156,6 +160,12 @@ export default {
156 160
     /** 查询cmc结算审批列表 */
157 161
     getList() {
158 162
       this.loading = true;
163
+      if (this.roles.some(element => element === "dept")) {
164
+          this.queryParams.reportDept = this.deptId;        
165
+      }
166
+      if (this.roles.some(e => e === 'leader')) {
167
+        this.queryParams.reportDept = null;
168
+      }
159 169
       listSettle(this.queryParams).then(response => {
160 170
         this.settleList = response.rows;
161 171
         this.total = response.total;

Loading…
Avbryt
Spara