lamphua vor 1 Jahr
Ursprung
Commit
c8d0108509
29 geänderte Dateien mit 968 neuen und 1300 gelöschten Zeilen
  1. 3
    14
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  2. 3
    2
      oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/oa/CallSafeActivityExecutionListener.java
  3. 0
    28
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetStaff.java
  4. 14
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceScrap.java
  5. 3
    19
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
  6. 3
    19
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java
  7. 4
    26
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java
  8. 1
    11
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetStaffMapper.xml
  9. 2
    2
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml
  10. 1
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml
  11. 6
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceScrapMapper.xml
  12. 0
    115
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSupplyMapper.xml
  13. 26
    38
      oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml
  14. 212
    204
      oa-back/sql/sql.sql
  15. 6
    13
      oa-ui/src/api/system/post.js
  16. 1
    1
      oa-ui/src/api/system/role.js
  17. 8
    8
      oa-ui/src/router/index.js
  18. 1
    1
      oa-ui/src/views/flowable/form/archiveForm.vue
  19. 7
    10
      oa-ui/src/views/flowable/form/budget/components/chooseCar.vue
  20. 3
    3
      oa-ui/src/views/flowable/form/finance/borrowForm.vue
  21. 36
    26
      oa-ui/src/views/flowable/form/oa/carForm.vue
  22. 15
    8
      oa-ui/src/views/flowable/form/oa/deviceForm.vue
  23. 5
    5
      oa-ui/src/views/flowable/form/settleForm.vue
  24. 430
    371
      oa-ui/src/views/oa/car/detail.vue
  25. 4
    7
      oa-ui/src/views/oa/car/index.vue
  26. 168
    71
      oa-ui/src/views/oa/device/detail.vue
  27. 0
    290
      oa-ui/src/views/oa/device/expense.vue
  28. 3
    3
      oa-ui/src/views/oa/device/index.vue
  29. 3
    3
      oa-ui/src/views/oa/supply/index.vue

+ 3
- 14
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java Datei anzeigen

@@ -55,17 +55,6 @@ public class SysPostController extends BaseController
55 55
         return getDataTable(list);
56 56
     }
57 57
 
58
-    /**
59
-     * 获取岗位列表
60
-     */
61
-    @GetMapping("/driverList")
62
-    public TableDataInfo driverList()
63
-    {
64
-        startPage();
65
-        List<SysUser> list = postService.selectDriverList();
66
-        return getDataTable(list);
67
-    }
68
-
69 58
     /**
70 59
      * 获取部门主任
71 60
      */
@@ -122,10 +111,10 @@ public class SysPostController extends BaseController
122 111
     /**
123 112
      * 查询总经理
124 113
      */
125
-    @GetMapping("/gm")
126
-    public AjaxResult getGm()
114
+    @GetMapping("/postName")
115
+    public AjaxResult getUserByPost(String postName)
127 116
     {
128
-        return success(postService.selectGm().getUserId());
117
+        return success(postService.selectUserListByPostName(postName));
129 118
     }
130 119
 
131 120
     /**

+ 3
- 2
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/oa/CallSafeActivityExecutionListener.java Datei anzeigen

@@ -13,7 +13,8 @@ public class CallSafeActivityExecutionListener implements ExecutionListener {
13 13
     @Override
14 14
     public void notify(DelegateExecution delegateExecution) {
15 15
         SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
16
-        Authentication.setAuthenticatedUserId(userPostMapper.selectSafe().getUserId().toString());
17
-        delegateExecution.setVariable("approval", userPostMapper.selectSafe().getUserId().toString());
16
+        String userId = userPostMapper.selectUserListByPostName("专职安全员").get(0).getUserId().toString();
17
+        Authentication.setAuthenticatedUserId(userId);
18
+        delegateExecution.setVariable("approval", userId);
18 19
     }
19 20
 }

+ 0
- 28
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudgetStaff.java Datei anzeigen

@@ -42,14 +42,6 @@ public class CmcBudgetStaff extends BaseEntity
42 42
     @Excel(name = "人员成本")
43 43
     private BigDecimal staffCost;
44 44
 
45
-    /** 进出场单价 */
46
-    @Excel(name = "进出场单价")
47
-    private BigDecimal inOutPrice;
48
-
49
-    /** 进出场费用 */
50
-    @Excel(name = "进出场费用")
51
-    private BigDecimal inOutExpense;
52
-
53 45
     public void setBudgetStaffId(Long budgetStaffId)
54 46
     {
55 47
         this.budgetStaffId = budgetStaffId;
@@ -113,24 +105,6 @@ public class CmcBudgetStaff extends BaseEntity
113 105
     {
114 106
         return salary;
115 107
     }
116
-    public void setInOutPrice(BigDecimal inOutPrice) 
117
-    {
118
-        this.inOutPrice = inOutPrice;
119
-    }
120
-
121
-    public BigDecimal getInOutPrice() 
122
-    {
123
-        return inOutPrice;
124
-    }
125
-    public void setInOutExpense(BigDecimal inOutExpense) 
126
-    {
127
-        this.inOutExpense = inOutExpense;
128
-    }
129
-
130
-    public BigDecimal getInOutExpense() 
131
-    {
132
-        return inOutExpense;
133
-    }
134 108
 
135 109
     @Override
136 110
     public String toString() {
@@ -140,8 +114,6 @@ public class CmcBudgetStaff extends BaseEntity
140 114
             .append("userId", getUserId())
141 115
             .append("days", getDays())
142 116
             .append("staffCost", getStaffCost())
143
-            .append("inOutPrice", getInOutPrice())
144
-            .append("inOutExpense", getInOutExpense())
145 117
             .toString();
146 118
     }
147 119
 }

+ 14
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceScrap.java Datei anzeigen

@@ -25,6 +25,10 @@ public class CmcDeviceScrap extends BaseEntity
25 25
     @Excel(name = "设备id")
26 26
     private Long deviceId;
27 27
 
28
+    /** 车辆id */
29
+    @Excel(name = "车辆id")
30
+    private Long carId;
31
+
28 32
     /** 原价值 */
29 33
     @Excel(name = "原价值")
30 34
     private BigDecimal cost;
@@ -64,6 +68,15 @@ public class CmcDeviceScrap extends BaseEntity
64 68
     {
65 69
         return deviceId;
66 70
     }
71
+    public void setCarId(Long carId)
72
+    {
73
+        this.carId = carId;
74
+    }
75
+
76
+    public Long getCarId()
77
+    {
78
+        return carId;
79
+    }
67 80
     public void setCost(BigDecimal cost) 
68 81
     {
69 82
         this.cost = cost;
@@ -115,6 +128,7 @@ public class CmcDeviceScrap extends BaseEntity
115 128
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
116 129
             .append("deviceScrapId", getDeviceScrapId())
117 130
             .append("deviceId", getDeviceId())
131
+            .append("carId", getCarId())
118 132
             .append("cost", getCost())
119 133
             .append("scrapDate", getScrapDate())
120 134
             .append("reason", getReason())

+ 3
- 19
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java Datei anzeigen

@@ -44,14 +44,6 @@ public interface SysUserPostMapper
44 44
      */
45 45
     public int batchUserPost(List<SysUserPost> userPostList);
46 46
 
47
-    /**
48
-     * 查询驾驶员集合
49
-     *
50
-     * @param
51
-     * @return 驾驶员列表
52
-     */
53
-    public List<SysUser> selectDriverList();
54
-
55 47
     /**
56 48
      * 查询高级管理员集合
57 49
      *
@@ -61,20 +53,12 @@ public interface SysUserPostMapper
61 53
     public List<SysUser> selectGmAssistant(SysUser user);
62 54
 
63 55
     /**
64
-     * 查询总经理
65
-     *
66
-     * @param
67
-     * @return 总经理
68
-     */
69
-    public SysUser selectGm();
70
-
71
-    /**
72
-     * 查询专职安全员
56
+     * 根据岗位查询用户
73 57
      *
74 58
      * @param
75
-     * @return 专职安全员
59
+     * @return 用户列表
76 60
      */
77
-    public SysUser selectSafe();
61
+    public List<SysUser> selectUserListByPostName(String postName);
78 62
 
79 63
     /**
80 64
      * 查询部门主任

+ 3
- 19
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java Datei anzeigen

@@ -100,14 +100,6 @@ public interface ISysPostService
100 100
      */
101 101
     public int updatePost(SysPost post);
102 102
 
103
-    /**
104
-     * 查询驾驶员集合
105
-     *
106
-     * @param
107
-     * @return 驾驶员列表
108
-     */
109
-    public List<SysUser> selectDriverList();
110
-
111 103
     /**
112 104
      * 查询高级管理员集合
113 105
      *
@@ -117,20 +109,12 @@ public interface ISysPostService
117 109
     public List<SysUser> selectGmAssistant(SysUser user);
118 110
 
119 111
     /**
120
-     * 查询总经理
121
-     *
122
-     * @param
123
-     * @return 总经理
124
-     */
125
-    public SysUser selectGm();
126
-
127
-    /**
128
-     * 查询专职安全员
112
+     * 根据岗位查询用户
129 113
      *
130 114
      * @param
131
-     * @return 专职安全员
115
+     * @return 用户列表
132 116
      */
133
-    public SysUser selectSafe();
117
+    public List<SysUser> selectUserListByPostName(String postName);
134 118
 
135 119
     /**
136 120
      * 查询部门主任

+ 4
- 26
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java Datei anzeigen

@@ -178,17 +178,6 @@ public class SysPostServiceImpl implements ISysPostService
178 178
         return postMapper.updatePost(post);
179 179
     }
180 180
 
181
-    /**
182
-     * 查询驾驶员集合
183
-     *
184
-     * @param
185
-     * @return 驾驶员列表
186
-     */
187
-    @Override
188
-    public List<SysUser> selectDriverList() {
189
-        return userPostMapper.selectDriverList();
190
-    }
191
-
192 181
     /**
193 182
      * 查询高级管理员集合
194 183
      *
@@ -201,25 +190,14 @@ public class SysPostServiceImpl implements ISysPostService
201 190
     }
202 191
 
203 192
     /**
204
-     * 查询总经理
205
-     *
206
-     * @param
207
-     * @return 总经理
208
-     */
209
-    @Override
210
-    public SysUser selectGm() {
211
-        return userPostMapper.selectGm();
212
-    }
213
-
214
-    /**
215
-     * 查询专职安全员
193
+     * 根据岗位查询用户
216 194
      *
217 195
      * @param
218
-     * @return 总经理
196
+     * @return 用户列表
219 197
      */
220 198
     @Override
221
-    public SysUser selectSafe() {
222
-        return userPostMapper.selectSafe();
199
+    public List<SysUser> selectUserListByPostName(String postName) {
200
+        return userPostMapper.selectUserListByPostName(postName);
223 201
     }
224 202
 
225 203
     /**

+ 1
- 11
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetStaffMapper.xml Datei anzeigen

@@ -10,8 +10,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
10 10
         <result property="userId"    column="user_id"    />
11 11
         <result property="days"    column="days"    />
12 12
         <result property="staffCost"    column="staff_cost"    />
13
-        <result property="inOutPrice"    column="in_out_price"    />
14
-        <result property="inOutExpense"    column="in_out_expense"    />
15 13
         <result property="remark"    column="remark"    />
16 14
         <association property="user"    javaType="SysUser"         resultMap="SysUserResult" />
17 15
         <association property="salary"    javaType="CmcPostSalary"         resultMap="CmcPostSalaryResult" />
@@ -32,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
32 30
     </resultMap>
33 31
 
34 32
     <sql id="selectCmcBudgetStaffVo">
35
-        select bs.budget_staff_id, bs.budget_id, bs.user_id, u.nick_name, bs.days, ps.salary, bs.staff_cost, bs.in_out_price, bs.in_out_expense, bs.remark from cmc_budget_staff as bs
33
+        select bs.budget_staff_id, bs.budget_id, bs.user_id, u.nick_name, bs.days, ps.salary, bs.staff_cost, bs.remark from cmc_budget_staff as bs
36 34
         left join sys_user as u on u.user_id = bs.user_id
37 35
         left join cmc_post_salary as ps on u.salary_level = ps.salary_level and u.post_level = ps.post_level
38 36
     </sql>
@@ -44,8 +42,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
44 42
             <if test="userId != null "> and bs.user_id = #{userId}</if>
45 43
             <if test="days != null "> and bs.days = #{days}</if>
46 44
             <if test="staffCost != null "> and bs.staff_cost = #{staffCost}</if>
47
-            <if test="inOutPrice != null "> and bs.in_out_price = #{inOutPrice}</if>
48
-            <if test="inOutExpense != null "> and bs.in_out_expense = #{inOutExpense}</if>
49 45
         </where>
50 46
     </select>
51 47
     
@@ -62,8 +58,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
62 58
             <if test="userId != null">user_id,</if>
63 59
             <if test="days != null">days,</if>
64 60
             <if test="staffCost != null">staff_cost,</if>
65
-            <if test="inOutPrice != null">in_out_price,</if>
66
-            <if test="inOutExpense != null">in_out_expense,</if>
67 61
             <if test="remark != null">remark,</if>
68 62
          </trim>
69 63
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -72,8 +66,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
72 66
             <if test="userId != null">#{userId},</if>
73 67
             <if test="days != null">#{days},</if>
74 68
             <if test="staffCost != null">#{staffCost},</if>
75
-            <if test="inOutPrice != null">#{inOutPrice},</if>
76
-            <if test="inOutExpense != null">#{inOutExpense},</if>
77 69
             <if test="remark != null">#{remark},</if>
78 70
          </trim>
79 71
     </insert>
@@ -85,8 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
85 77
             <if test="userId != null">user_id = #{userId},</if>
86 78
             <if test="days != null">days = #{days},</if>
87 79
             <if test="staffCost != null">staff_cost = #{staffCost},</if>
88
-            <if test="inOutPrice != null">in_out_price = #{inOutPrice},</if>
89
-            <if test="inOutExpense != null">in_out_expense = #{inOutExpense},</if>
90 80
             <if test="remark != null">remark = #{remark},</if>
91 81
         </trim>
92 82
         where budget_staff_id = #{budgetStaffId}

+ 2
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml Datei anzeigen

@@ -105,8 +105,8 @@
105 105
         <where>
106 106
             <if test="applier != null "> and ca.applier = #{applier}</if>
107 107
             <if test="useDept != null "> and ca.use_dept = #{useDept}</if>
108
-            <if test="cars != null  and cars != ''"> and ca.cars = #{cars}</if>
109
-            <if test="drivers != null  and drivers != ''"> and ca.drivers = #{drivers}</if>
108
+            <if test="cars != null  and cars != ''"> and ca.cars like concat('%', #{cars}, '%')</if>
109
+            <if test="drivers != null  and drivers != ''"> and ca.drivers like concat('%', #{drivers}, '%')</if>
110 110
             <if test="projectId != null  and projectId != ''"> and ca.project_id = #{projectId}</if>
111 111
             <if test="applyReason != null  and applyReason != ''"> and ca.apply_reason = #{applyReason}</if>
112 112
             <if test="passengers != null "> and ca.passengers = #{passengers}</if>

+ 1
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml Datei anzeigen

@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
85 85
         <where>  
86 86
             <if test="applier != null "> and da.applier = #{applier}</if>
87 87
             <if test="useDept != null "> and da.use_dept = #{useDept}</if>
88
-            <if test="devices != null  and devices != ''"> and da.devices = #{devices}</if>
88
+            <if test="devices != null  and devices != ''"> and da.devices like concat('%', #{devices}, '%')</if>
89 89
             <if test="projectId != null  and projectId != ''"> and da.project_id = #{projectId}</if>
90 90
             <if test="applyReason != null  and applyReason != ''"> and da.apply_reason = #{applyReason}</if>
91 91
             <if test="applyDate != null "> and da.apply_date = #{applyDate}</if>

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceScrapMapper.xml Datei anzeigen

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
7 7
     <resultMap type="CmcDeviceScrap" id="CmcDeviceScrapResult">
8 8
         <result property="deviceScrapId"    column="device_scrap_id"    />
9 9
         <result property="deviceId"    column="device_id"    />
10
+        <result property="carId"    column="car_id"    />
10 11
         <result property="cost"    column="cost"    />
11 12
         <result property="scrapDate"    column="scrap_date"    />
12 13
         <result property="reason"    column="reason"    />
@@ -16,13 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
16 17
     </resultMap>
17 18
 
18 19
     <sql id="selectCmcDeviceScrapVo">
19
-        select device_scrap_id, device_id, cost, scrap_date, reason, deal, remark, document from cmc_device_scrap
20
+        select device_scrap_id, device_id, car_id, cost, scrap_date, reason, deal, remark, document from cmc_device_scrap
20 21
     </sql>
21 22
 
22 23
     <select id="selectCmcDeviceScrapList" parameterType="CmcDeviceScrap" resultMap="CmcDeviceScrapResult">
23 24
         <include refid="selectCmcDeviceScrapVo"/>
24 25
         <where>  
25 26
             <if test="deviceId != null "> and device_id = #{deviceId}</if>
27
+            <if test="carId != null "> and car_id = #{carId}</if>
26 28
             <if test="cost != null "> and cost = #{cost}</if>
27 29
             <if test="scrapDate != null "> and scrap_date = #{scrapDate}</if>
28 30
             <if test="reason != null  and reason != ''"> and reason = #{reason}</if>
@@ -41,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
41 43
         <trim prefix="(" suffix=")" suffixOverrides=",">
42 44
             <if test="deviceScrapId != null">device_scrap_id,</if>
43 45
             <if test="deviceId != null">device_id,</if>
46
+            <if test="carId != null">car_id,</if>
44 47
             <if test="cost != null">cost,</if>
45 48
             <if test="scrapDate != null">scrap_date,</if>
46 49
             <if test="reason != null">reason,</if>
@@ -51,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
51 54
         <trim prefix="values (" suffix=")" suffixOverrides=",">
52 55
             <if test="deviceScrapId != null">#{deviceScrapId},</if>
53 56
             <if test="deviceId != null">#{deviceId},</if>
57
+            <if test="carId != null">#{carId},</if>
54 58
             <if test="cost != null">#{cost},</if>
55 59
             <if test="scrapDate != null">#{scrapDate},</if>
56 60
             <if test="reason != null">#{reason},</if>
@@ -64,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
64 68
         update cmc_device_scrap
65 69
         <trim prefix="SET" suffixOverrides=",">
66 70
             <if test="deviceId != null">device_id = #{deviceId},</if>
71
+            <if test="carId != null">car_id = #{carId},</if>
67 72
             <if test="cost != null">cost = #{cost},</if>
68 73
             <if test="scrapDate != null">scrap_date = #{scrapDate},</if>
69 74
             <if test="reason != null">reason = #{reason},</if>

+ 0
- 115
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcSupplyMapper.xml Datei anzeigen

@@ -1,115 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper
3
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
-<mapper namespace="com.ruoyi.oa.mapper.CmcSupplyMapper">
6
-    
7
-    <resultMap type="CmcSupply" id="CmcSupplyResult">
8
-        <result property="supplyId"    column="supply_id"    />
9
-        <result property="supplyNumber"    column="supply_number"    />
10
-        <result property="code"    column="code"    />
11
-        <result property="name"    column="name"    />
12
-        <result property="type"    column="type"    />
13
-        <result property="acquisitionTime"    column="acquisition_time"    />
14
-        <result property="cost"    column="cost"    />
15
-        <result property="expectLife"    column="expect_life"    />
16
-        <result property="series"    column="series"    />
17
-        <result property="brand"    column="brand"    />
18
-        <result property="dayCost"    column="day_cost"    />
19
-        <result property="place"    column="place"    />
20
-        <result property="remark"    column="remark"    />
21
-        <result property="manageDept"    column="manage_dept"    />
22
-    </resultMap>
23
-
24
-    <sql id="selectCmcSupplyVo">
25
-        select supply_id, supply_number, code, name, type, acquisition_time, cost, expect_life, series, brand, day_cost, place, remark, manage_dept from cmc_supply
26
-    </sql>
27
-
28
-    <select id="selectCmcSupplyList" parameterType="CmcSupply" resultMap="CmcSupplyResult">
29
-        <include refid="selectCmcSupplyVo"/>
30
-        <where>  
31
-            <if test="supplyNumber != null  and supplyNumber != ''"> and supply_number = #{supplyNumber}</if>
32
-            <if test="code != null  and code != ''"> and code = #{code}</if>
33
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
34
-            <if test="type != null  and type != ''"> and type = #{type}</if>
35
-            <if test="acquisitionTime != null "> and acquisition_time = #{acquisitionTime}</if>
36
-            <if test="cost != null "> and cost = #{cost}</if>
37
-            <if test="expectLife != null "> and expect_life = #{expectLife}</if>
38
-            <if test="series != null  and series != ''"> and series = #{series}</if>
39
-            <if test="brand != null  and brand != ''"> and brand = #{brand}</if>
40
-            <if test="dayCost != null "> and day_cost = #{dayCost}</if>
41
-            <if test="place != null  and place != ''"> and place = #{place}</if>
42
-            <if test="manageDept != null "> and manage_dept = #{manageDept}</if>
43
-        </where>
44
-    </select>
45
-    
46
-    <select id="selectCmcSupplyBySupplyId" parameterType="Long" resultMap="CmcSupplyResult">
47
-        <include refid="selectCmcSupplyVo"/>
48
-        where supply_id = #{supplyId}
49
-    </select>
50
-        
51
-    <insert id="insertCmcSupply" parameterType="CmcSupply" useGeneratedKeys="true" keyProperty="supplyId">
52
-        insert into cmc_supply
53
-        <trim prefix="(" suffix=")" suffixOverrides=",">
54
-            <if test="supplyNumber != null">supply_number,</if>
55
-            <if test="code != null">code,</if>
56
-            <if test="name != null">name,</if>
57
-            <if test="type != null">type,</if>
58
-            <if test="acquisitionTime != null">acquisition_time,</if>
59
-            <if test="cost != null">cost,</if>
60
-            <if test="expectLife != null">expect_life,</if>
61
-            <if test="series != null">series,</if>
62
-            <if test="brand != null">brand,</if>
63
-            <if test="dayCost != null">day_cost,</if>
64
-            <if test="place != null">place,</if>
65
-            <if test="remark != null">remark,</if>
66
-            <if test="manageDept != null">manage_dept,</if>
67
-         </trim>
68
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
69
-            <if test="supplyNumber != null">#{supplyNumber},</if>
70
-            <if test="code != null">#{code},</if>
71
-            <if test="name != null">#{name},</if>
72
-            <if test="type != null">#{type},</if>
73
-            <if test="acquisitionTime != null">#{acquisitionTime},</if>
74
-            <if test="cost != null">#{cost},</if>
75
-            <if test="expectLife != null">#{expectLife},</if>
76
-            <if test="series != null">#{series},</if>
77
-            <if test="brand != null">#{brand},</if>
78
-            <if test="dayCost != null">#{dayCost},</if>
79
-            <if test="place != null">#{place},</if>
80
-            <if test="remark != null">#{remark},</if>
81
-            <if test="manageDept != null">#{manageDept},</if>
82
-         </trim>
83
-    </insert>
84
-
85
-    <update id="updateCmcSupply" parameterType="CmcSupply">
86
-        update cmc_supply
87
-        <trim prefix="SET" suffixOverrides=",">
88
-            <if test="supplyNumber != null">supply_number = #{supplyNumber},</if>
89
-            <if test="code != null">code = #{code},</if>
90
-            <if test="name != null">name = #{name},</if>
91
-            <if test="type != null">type = #{type},</if>
92
-            <if test="acquisitionTime != null">acquisition_time = #{acquisitionTime},</if>
93
-            <if test="cost != null">cost = #{cost},</if>
94
-            <if test="expectLife != null">expect_life = #{expectLife},</if>
95
-            <if test="series != null">series = #{series},</if>
96
-            <if test="brand != null">brand = #{brand},</if>
97
-            <if test="dayCost != null">day_cost = #{dayCost},</if>
98
-            <if test="place != null">place = #{place},</if>
99
-            <if test="remark != null">remark = #{remark},</if>
100
-            <if test="manageDept != null">manage_dept = #{manageDept},</if>
101
-        </trim>
102
-        where supply_id = #{supplyId}
103
-    </update>
104
-
105
-    <delete id="deleteCmcSupplyBySupplyId" parameterType="Long">
106
-        delete from cmc_supply where supply_id = #{supplyId}
107
-    </delete>
108
-
109
-    <delete id="deleteCmcSupplyBySupplyIds" parameterType="String">
110
-        delete from cmc_supply where supply_id in 
111
-        <foreach item="supplyId" collection="array" open="(" separator="," close=")">
112
-            #{supplyId}
113
-        </foreach>
114
-    </delete>
115
-</mapper>

+ 26
- 38
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml Datei anzeigen

@@ -60,15 +60,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
60 60
 	<select id="selectDriverList" resultMap="SysUserResult">
61 61
 		select u.user_id, u.nick_name
62 62
 		from sys_user u left join sys_user_post up on u.user_id = up.user_id
63
-		where up.post_id = 27 and u.status = '0'
63
+		where up.post_id = 31 and u.status = '0'
64 64
 	</select>
65 65
 
66 66
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
67 67
 		select u.*, d.dept_name
68 68
 		from sys_user u
69
-				 left join sys_dept d on u.dept_id = d.dept_id
70
-				 left join sys_user_post up on u.user_id = up.user_id
71
-		where up.post_id = 11
69
+		left join sys_dept d on u.dept_id = d.dept_id
70
+		left join sys_user_post up on u.user_id = up.user_id
71
+		left join sys_post p on up.post_id = p.post_id
72
+		where p.post_name = "总经理助理"
72 73
 		<if test="userId != null and userId != 0">
73 74
 			AND u.user_id = #{userId}
74 75
 		</if>
@@ -86,52 +87,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
86 87
 		</if>
87 88
 	</select>
88 89
 
89
-	<select id="selectGm" resultMap="SysUserResult">
90
-		select u.user_id, u.nick_name
91
-		from sys_user u left join sys_user_post up on u.user_id = up.user_id
92
-		where up.post_id = 2
93
-	</select>
94
-
95
-	<select id="selectSafe" resultMap="SysUserResult">
96
-		select u.user_id, u.nick_name
97
-		from sys_user u left join sys_user_post up on u.user_id = up.user_id
98
-		where up.post_id = 20
90
+	<select id="selectUserListByPostName" parameterType="String" resultMap="SysUserResult">
91
+		select * from sys_user u
92
+		left join sys_user_post up on u.user_id = up.user_id
93
+		left join sys_post p on up.post_id = p.post_id
94
+		where p.post_name = #{param}
99 95
 	</select>
100 96
 
101 97
 	<select id="selectDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
102
-		select r.user_id, r.nick_name from
103
-		(select u1.user_id, u1.nick_name, u.dept_id from
104
-		sys_user as u, sys_user as u1 where u.user_id = #{param} and u1.dept_id = u.dept_id) as r
105
-		left join sys_user_post as up
106
-		on r.user_id = up.user_id
107
-		where up.post_id = 13
98
+		select u.user_id, u.nick_name from sys_user as u
99
+		left join sys_user_post as up on u.user_id = up.user_id
100
+		left join sys_post as p on up.post_id = p.post_id
101
+		where p.post_name = '主任' and u.user_id = #{param}
108 102
 	</select>
109 103
 
110 104
 	<select id="selectViceDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
111
-	select r.user_id, r.nick_name from
112
-	(select u1.user_id, u1.nick_name, u.dept_id from
113
-	sys_user as u, sys_user as u1 where u.user_id = #{param} and u1.dept_id = u.dept_id) as r
114
-	left join sys_user_post as up
115
-	on r.user_id = up.user_id
116
-	where up.post_id = 14 order by user_id desc limit 1
105
+		select u.user_id, u.nick_name from sys_user as u
106
+		left join sys_user_post as up on u.user_id = up.user_id
107
+		left join sys_post as p on up.post_id = p.post_id
108
+		where p.post_name = '副主任' and u.user_id = #{param} order by u.user_id desc limit 1
117 109
 	</select>
118 110
 
119 111
 	<select id="selectDeptLeaderByDeptId" parameterType="String" resultMap="SysUserResult">
120
-		select r.user_id, r.nick_name, up.post_id from
121
-		(select user_id, nick_name, dept_id from
122
-		sys_user where dept_id = #{param}) as r
123
-		left join sys_user_post as up
124
-		on r.user_id = up.user_id
125
-		where up.post_id = 13
112
+		select u.user_id, u.nick_name from sys_user as u
113
+		left join sys_user_post as up on u.user_id = up.user_id
114
+		left join sys_post as p on up.post_id = p.post_id
115
+		where p.post_name = '副主任' and u.dept_id = #{param}
126 116
 	</select>
127 117
 
128 118
 	<select id="selectViceDeptLeaderByDeptId" parameterType="String" resultMap="SysUserResult">
129
-		select r.user_id, r.nick_name, up.post_id from
130
-		(select user_id, nick_name, dept_id from
131
-		sys_user where dept_id = #{param}) as r
132
-		left join sys_user_post as up
133
-		on r.user_id = up.user_id
134
-		where up.post_id = 14 order by user_id desc limit 1
119
+		select u.user_id, u.nick_name from sys_user as u
120
+		left join sys_user_post as up on u.user_id = up.user_id
121
+		left join sys_post as p on up.post_id = p.post_id
122
+		where p.post_name = '副主任' and u.dept_id = #{param} order by u.user_id desc limit 1
135 123
 	</select>
136 124
 
137 125
 	<delete id="deleteUserPostByUserId" parameterType="Long">

+ 212
- 204
oa-back/sql/sql.sql
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 6
- 13
oa-ui/src/api/system/post.js Datei anzeigen

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-03-07 17:33:37
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-14 14:44:34
5
+ * @LastEditTime: 2024-05-22 16:17:43
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -15,19 +15,12 @@ export function listPost(query) {
15 15
   })
16 16
 }
17 17
 
18
-// 查询驾驶员列表
19
-export function listDriver() {
18
+// 根据岗位查用户
19
+export function getUserByPost(query) {
20 20
   return request({
21
-    url: '/system/post/driverList',
22
-    method: 'get'
23
-  })
24
-}
25
-
26
-// 查询总经理
27
-export function getGm() {
28
-  return request({
29
-    url: '/system/post/gm',
30
-    method: 'get'
21
+    url: '/system/post/postName',
22
+    method: 'get',
23
+    params: query
31 24
   })
32 25
 }
33 26
 

+ 1
- 1
oa-ui/src/api/system/role.js Datei anzeigen

@@ -20,7 +20,7 @@ export function getRole(roleId) {
20 20
 // 查询角色详细
21 21
 export function getUserByRole(roleId) {
22 22
   return request({
23
-    url: '/system/getUserByRole',
23
+    url: '/system/role/getUserByRole',
24 24
     method: 'get',    
25 25
     params: roleId
26 26
   })

+ 8
- 8
oa-ui/src/router/index.js Datei anzeigen

@@ -1,8 +1,8 @@
1 1
 /*
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-10 16:24:43
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-05-22 13:51:01
6 6
  */
7 7
 /*
8 8
  * @Author: ysh
@@ -179,28 +179,28 @@ export const constantRoutes = [
179 179
     ]
180 180
   },
181 181
   {
182
-    path: '/car/expense',
182
+    path: '/car/detail',
183 183
     component: Layout,
184 184
     hidden: true,
185 185
     children: [
186 186
       {
187 187
         path: '',
188
-        component: () => import('@/views/oa/car/expense'),
189
-        name: 'carExpense',
188
+        component: () => import('@/views/oa/car/detail'),
189
+        name: 'carDetail',
190 190
         meta: { title: '车辆明细', icon: '' }
191 191
 
192 192
       }
193 193
     ]
194 194
   },
195 195
   {
196
-    path: '/device/approval',
196
+    path: '/device/detail',
197 197
     component: Layout,
198 198
     hidden: true,
199 199
     children: [
200 200
       {
201 201
         path: '',
202
-        component: () => import('@/views/oa/device/approval'),
203
-        name: 'deviceApproval',
202
+        component: () => import('@/views/oa/device/detail'),
203
+        name: 'deviceDetail',
204 204
         meta: { title: '设备明细', icon: '' }
205 205
 
206 206
       }

+ 1
- 1
oa-ui/src/views/flowable/form/archiveForm.vue Datei anzeigen

@@ -484,7 +484,7 @@ export default {
484 484
                 });
485 485
               }
486 486
               if (this.taskName == '技术部审核') {
487
-                getUserByRole(6).then(result => {
487
+                getUserByRole({ roleId: 6 }).then(result => {
488 488
                   this.$set(this.taskForm.variables, "approval", result.data[0]);
489 489
                   complete(this.taskForm).then(response => {
490 490
                     this.$modal.msgSuccess(response.msg);

+ 7
- 10
oa-ui/src/views/flowable/form/budget/components/chooseCar.vue Datei anzeigen

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-27 11:10:16
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-03-27 14:56:23
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-05-22 17:55:15
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -25,8 +25,8 @@
25 25
       <el-table-column label="单日成本" align="center" prop="dayCost" />
26 26
     </el-table>
27 27
     <div style="text-align: right;">
28
-      <el-pagination @current-change="getList" :current-page.sync="queryParams.pageNum"
29
-        :page-size="queryParams.pageSize" layout="total, prev, pager, next" :total="total">
28
+      <el-pagination @current-change="getList" :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize"
29
+        layout="total, prev, pager, next" :total="total">
30 30
       </el-pagination>
31 31
     </div>
32 32
     <div>
@@ -44,7 +44,7 @@
44 44
 
45 45
 <script>
46 46
 import { listCar } from "@/api/oa/car/car";
47
-import { listDriver } from "@/api/system/post";
47
+import { getUserByPost } from "@/api/system/post";
48 48
 export default {
49 49
   data() {
50 50
     return {
@@ -76,11 +76,8 @@ export default {
76 76
     },
77 77
     // 查询驾驶员列表
78 78
     getDriverList() {
79
-      listDriver({
80
-        pageNum: 1,
81
-        pageSize: 99999999
82
-      }).then(response => {
83
-        this.driverList = response.rows;
79
+      getUserByPost({ postName: '驾驶员' }).then(response => {
80
+        this.driverList = response.data;
84 81
       })
85 82
     },
86 83
     handleSelectionChange(val) {

+ 3
- 3
oa-ui/src/views/flowable/form/finance/borrowForm.vue Datei anzeigen

@@ -253,7 +253,7 @@ import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersViceDeptLeaderByD
253 253
 import { listBorrow, getBorrow, delBorrow, addBorrow, updateBorrow } from "@/api/oa/borrow/borrow";
254 254
 import { listBorrowDetail, addBorrowDetail, updateBorrowDetail } from "@/api/oa/borrow/borrowDetail";
255 255
 import { listProject, getProject } from "@/api/oa/project/project";
256
-import { getGm } from "@/api/system/post";
256
+import { getUserByPost } from "@/api/system/post";
257 257
 import flow from '@/views/flowable/task/todo/detail/flow'
258 258
 import { flowXmlAndNode } from "@/api/flowable/definition";
259 259
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
@@ -492,8 +492,8 @@ export default {
492 492
                 });
493 493
               }
494 494
               else if (this.taskName == '分管审核') {
495
-                getGm().then(res => {
496
-                  this.$set(this.taskForm.variables, "approval", res.data);
495
+                getUserByPost({ postName: '总经理' }).then(res => {
496
+                  this.$set(this.taskForm.variables, "approval", res.data[0].userId);
497 497
                   complete(this.taskForm).then(response => {
498 498
                     this.$modal.msgSuccess(response.msg);
499 499
                     this.$emit('goBack')

+ 36
- 26
oa-ui/src/views/flowable/form/oa/carForm.vue Datei anzeigen

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-14 18:14:03
5
+ * @LastEditTime: 2024-05-22 18:54:31
6 6
 -->
7 7
 
8 8
 <template>
@@ -16,19 +16,19 @@
16 16
               <!-- 申请人填写 -->
17 17
               <el-divider></el-divider>
18 18
               <el-row :gutter="20">
19
-                <el-col :span="6" :xs="24">
19
+                <el-col :span="7" :xs="24">
20 20
                   <el-form-item label="申请人:" prop="user.nickName">
21 21
                     <!-- <el-input v-model="form.user"></el-input> -->
22 22
                     {{ form.applierUser ? form.applierUser.nickName : form.user.nickName }}
23 23
                   </el-form-item>
24 24
                 </el-col>
25
-                <el-col :span="6" :xs="24">
25
+                <el-col :span="7" :xs="24">
26 26
                   <el-form-item label="所在部门:" prop="dept.deptName">
27 27
                     <!-- <el-input v-model="form.deptName"></el-input> -->
28 28
                     {{ form.dept.deptName }}
29 29
                   </el-form-item>
30 30
                 </el-col>
31
-                <el-col :span="6" :xs="24">
31
+                <el-col :span="7" :xs="24">
32 32
                   <el-form-item label="申请时间:" prop="date">
33 33
                     <el-date-picker style="width:170px;" v-model="form.applyDate" value-format="yyyy-MM-dd" type="date"
34 34
                       placeholder="选择日期" :disabled="taskName != '用车申请'">
@@ -73,7 +73,7 @@
73 73
                 </el-input>
74 74
               </el-form-item>
75 75
               <el-row>
76
-                <el-col :span="6" :xs="24">
76
+                <el-col :span="7" :xs="24">
77 77
                   <el-form-item label="乘车人数:" prop="passengers">
78 78
                     <el-input-number v-model="form.passengers" :min="1" :disabled="taskName != '用车申请'"></el-input-number>
79 79
                   </el-form-item>
@@ -92,7 +92,7 @@
92 92
                     </el-date-picker>
93 93
                   </el-form-item>
94 94
                 </el-col>
95
-                <el-col :span="6" :xs="24">
95
+                <el-col :span="5" :xs="24">
96 96
                   <el-form-item label="共计:">
97 97
                     {{ form.days + '天' }}
98 98
                   </el-form-item>
@@ -243,12 +243,13 @@ import { parseTime } from "@/utils/ruoyi";
243 243
 import { listProject, getProject } from "@/api/oa/project/project";
244 244
 import { listCar, getCar } from "@/api/oa/car/car";
245 245
 import { listCarApproval, getCarApproval, updateCarApproval, addCarApproval, modifyCarApproval } from '@/api/oa/car/carApproval'
246
-import { listDriver, getGm } from "@/api/system/post";
246
+import { getUserByPost } from "@/api/system/post";
247 247
 import { complete, rejectTask, returnList, returnTask, getNextFlowNode, delegate, flowTaskForm, } from "@/api/flowable/todo";
248 248
 import { getUsersDeptLeader, getUsersManageLeader } from '@/api/system/post.js'
249 249
 import flow from '@/views/flowable/task/todo/detail/flow'
250 250
 import { flowXmlAndNode } from "@/api/flowable/definition";
251 251
 import { listUser } from '@/api/system/user';
252
+import { getUserByRole } from "@/api/system/role";
252 253
 export default {
253 254
   components: {
254 255
     flow
@@ -454,19 +455,28 @@ export default {
454 455
           this.$set(this.taskForm.variables, "dept", this.dept);
455 456
           if (res.data && this.dept != 0) {
456 457
             this.$set(this.taskForm.variables, "approval", res.data.userId);
458
+            complete(this.taskForm).then(response => {
459
+              this.$modal.msgSuccess(response.msg);
460
+              this.$emit('goBack')
461
+            })
457 462
           } else if (this.dept == 102) {
458
-            getGm().then(result => {
459
-              this.$set(this.taskForm.variables, "approval", result.data);
463
+            getUserByPost({ postName: '总经理' }).then(result => {
464
+              this.$set(this.taskForm.variables, "approval", result.data[0].userId);
465
+              complete(this.taskForm).then(response => {
466
+                this.$modal.msgSuccess(response.msg);
467
+                this.$emit('goBack')
468
+              })
460 469
             })
461 470
           } else {
462
-            let userId = this.getChooseType()
463
-            this.$set(this.taskForm.variables, "approval", userId);
471
+            let postName = this.getChooseType()
472
+            getUserByPost({ postName: postName }).then(result => {
473
+              this.$set(this.taskForm.variables, "approval", result.data[0].userId);
474
+              complete(this.taskForm).then(response => {
475
+                this.$modal.msgSuccess(response.msg);
476
+                this.$emit('goBack')
477
+              })
478
+            })
464 479
           }
465
-
466
-          complete(this.taskForm).then(response => {
467
-            this.$modal.msgSuccess(response.msg);
468
-            this.$emit('goBack')
469
-          });
470 480
         })
471 481
       } else if (this.taskName == '部门审核') {
472 482
         getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
@@ -478,7 +488,7 @@ export default {
478 488
           });
479 489
         })
480 490
       } else if (this.taskName == '分管审核' || this.taskName == '党工团审核' || this.taskName == '总经理审核') {
481
-        getUserByRole(3).then(result => {
491
+        getUserByRole({ roleId: 4 }).then(result => {
482 492
           this.$set(this.taskForm.variables, "approvalList", result.data);
483 493
           complete(this.taskForm).then(response => {
484 494
             this.$modal.msgSuccess(response.msg);
@@ -493,11 +503,14 @@ export default {
493 503
       }
494 504
     },
495 505
     getChooseType() {
496
-      if (this.form.carUsage == '2' || this.form.carUsage == '3') {
497
-        return 4 // 4为党委书记
498
-      } else {
499
-        return 142  //142为团委书记
506
+      if (this.form.carUsage == '2') {
507
+        return '党总支书记'
508
+      }
509
+      else if (this.form.carUsage == '3') {
510
+        return '工会主席'
500 511
       }
512
+      else
513
+        return '团委书记'
501 514
     },
502 515
     // 查询项目列表
503 516
     getProjectList() {
@@ -533,11 +546,8 @@ export default {
533 546
 
534 547
     // 查询驾驶员列表
535 548
     getDriverList() {
536
-      listDriver({
537
-        pageNum: 1,
538
-        pageSize: 99999999
539
-      }).then(response => {
540
-        this.driverList = response.rows;
549
+      getUserByPost({ postName: '驾驶员' }).then(response => {
550
+        this.driverList = response.data;
541 551
       })
542 552
     },
543 553
     // 查询用户列表

+ 15
- 8
oa-ui/src/views/flowable/form/oa/deviceForm.vue Datei anzeigen

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-07 13:44:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-14 18:16:09
5
+ * @LastEditTime: 2024-05-22 19:15:50
6 6
 -->
7 7
 
8 8
 <template>
@@ -165,8 +165,14 @@
165 165
                 </el-descriptions>
166 166
               </el-form-item>
167 167
               <el-divider></el-divider>
168
-              <el-form-item label="设备情况:" prop="remark" label-width="120px">
169
-                <el-input type="textarea" :rows="2" placeholder="请输入设备情况" v-model="form.remark"
168
+              <el-form-item label="设备状况:" prop="state" label-width="120px">                
169
+                <el-radio-group v-model="form.state" size="small" :disabled="taskName != '归还确认'">
170
+                  <el-radio label="0">完好</el-radio>
171
+                  <el-radio label="1">需维修</el-radio>
172
+                </el-radio-group>
173
+              </el-form-item>
174
+              <el-form-item label="备注:" prop="remark" label-width="120px">
175
+                <el-input type="textarea" :rows="2" placeholder="请输入备注" v-model="form.remark"
170 176
                   :disabled="taskName != '归还确认'">
171 177
                 </el-input>
172 178
               </el-form-item>
@@ -381,12 +387,12 @@ export default {
381 387
           });
382 388
         })
383 389
       } else if (this.taskName == '分管审核') {
384
-        getUserByRole(5).then(result => {
390
+        getUserByRole({ roleId: 5 }).then(result => {
385 391
           this.$set(this.taskForm.variables, "approval", result.data[0]);
386 392
           complete(this.taskForm).then(response => {
387 393
             this.$modal.msgSuccess(response.msg);
388 394
             this.$emit('goBack')
389
-          })
395
+          });
390 396
         });
391 397
       } else if (this.taskName == '安排设备') {
392 398
         complete(this.taskForm).then(response => {
@@ -394,12 +400,12 @@ export default {
394 400
           this.$emit('goBack')
395 401
         });
396 402
       } else if (this.taskName == '申请确认') {
397
-        getUserByRole(5).then(result => {
403
+        getUserByRole({ roleId: 5 }).then(result => {
398 404
           this.$set(this.taskForm.variables, "approval", result.data[0]);
399 405
           complete(this.taskForm).then(response => {
400 406
             this.$modal.msgSuccess(response.msg);
401 407
             this.$emit('goBack')
402
-          })
408
+          });
403 409
         });
404 410
       } else {
405 411
         complete(this.taskForm).then(response => {
@@ -434,7 +440,8 @@ export default {
434 440
     getDeviceList() {
435 441
       listDevice({
436 442
         pageNum: 1,
437
-        pageSize: 99999999
443
+        pageSize: 99999999,
444
+        type: '仪器设备'
438 445
       }).then(res => {
439 446
         this.deviceList = res.rows
440 447
       })

+ 5
- 5
oa-ui/src/views/flowable/form/settleForm.vue Datei anzeigen

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-30 09:03:14
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-05-14 18:13:20
5
+ * @LastEditTime: 2024-05-22 17:02:59
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container" v-loading="loading">
@@ -433,7 +433,7 @@ import { getPrice } from "@/api/oa/price/price";
433 433
 import ChoosePrice from "./components/choosePrice.vue";
434 434
 import { getUser } from "@/api/system/user";
435 435
 import { getUserByRole } from "@/api/system/role";
436
-import { getGm } from "@/api/system/post";
436
+import { getUserByPost } from "@/api/system/post";
437 437
 import { complete, getNextFlowNode } from "@/api/flowable/todo";
438 438
 import { getUsersDeptLeader, getUsersDeptLeaderByDept, getUsersManageLeaderByDept } from '@/api/system/post.js'
439 439
 import SettlePrint from './components/settlePrint.vue';
@@ -660,7 +660,7 @@ export default {
660 660
         if (vaild) {
661 661
           this.preserve();
662 662
           if (this.taskName == '结算发起') {
663
-            getUserByRole(5).then(res => {
663
+            getUserByRole({ roleId: 5 }).then(res => {
664 664
               this.getNextFlowNodeFn(res.data[0]);
665 665
             })
666 666
           } else if (this.taskName == '综合事务部处理') {
@@ -674,8 +674,8 @@ export default {
674 674
           } else if (this.taskName == '经营发展部校核') {
675 675
             this.getNextFlowNodeFn(null, this.deptId, true);
676 676
           } else if (this.taskName == '分管审核') {
677
-            getGm().then(res => {
678
-              this.getNextFlowNodeFn(res.data);
677
+            getUserByPost({ postName: '总经理' }).then(res => {
678
+              this.getNextFlowNodeFn(res.data[0].userId);
679 679
             })
680 680
           } else if (this.taskName == '总经理审批') {
681 681
             this.getNextFlowNodeFn();

oa-ui/src/views/oa/car/expense.vue → oa-ui/src/views/oa/car/detail.vue Datei anzeigen

@@ -1,372 +1,431 @@
1
-<template>
2
-  <div class="app-container">
3
-    <div class="header">
4
-      <el-button icon="el-icon-d-arrow-left" plain type="primary" class="back" @click="goBack">返回</el-button>
5
-      <h1>{{ '【' + carInfo.licensePlate + '】' }}车辆明细</h1>
6
-    </div>
7
-    <el-divider></el-divider>
8
-    <el-descriptions class="descriptions" :column="column" border style="text-align: center;">
9
-      <el-descriptions-item>
10
-        <template slot="label">
11
-          <svg-icon slot="prefix" icon-class="car" class="el-input__icon input-icon" />
12
-          车牌号
13
-        </template>
14
-        {{ carInfo.licensePlate }}
15
-      </el-descriptions-item>
16
-      <el-descriptions-item>
17
-        <template slot="label">
18
-          <svg-icon slot="prefix" icon-class="Branding" class="el-input__icon input-icon" />
19
-          品牌
20
-        </template>
21
-        {{ carInfo.brand }}
22
-      </el-descriptions-item>
23
-      <el-descriptions-item>
24
-        <template slot="label">
25
-          <svg-icon slot="prefix" icon-class="PhAppStoreLogoFill" class="el-input__icon input-icon" />
26
-          车型
27
-        </template>
28
-        {{ carInfo.series }}
29
-      </el-descriptions-item>
30
-      <el-descriptions-item>
31
-        <template slot="label">
32
-          <svg-icon slot="prefix" icon-class="cost" class="el-input__icon input-icon" />
33
-          总价(元)
34
-        </template>
35
-        {{ carInfo.cost }}
36
-      </el-descriptions-item>
37
-      <el-descriptions-item>
38
-        <template slot="label">
39
-          <svg-icon slot="prefix" icon-class="date" class="el-input__icon input-icon" />
40
-          上牌时间
41
-        </template>
42
-        {{ parseTime(carInfo.acquisitionTime, '{y}-{m}-{d}') }}
43
-      </el-descriptions-item>
44
-      <el-descriptions-item>
45
-        <template slot="label">
46
-          <i class="el-icon-user-solid"></i>
47
-          驾驶员
48
-        </template>
49
-        {{ carInfo.driverUser ? carInfo.driverUser.nickName : '' }}
50
-      </el-descriptions-item>
51
-      <el-descriptions-item>
52
-        <template slot="label">
53
-          <svg-icon slot="prefix" icon-class="date" class="el-input__icon input-icon" />
54
-          预计使用年限(年)
55
-        </template>
56
-        {{ carInfo.expectLife }}
57
-      </el-descriptions-item>
58
-      <el-descriptions-item>
59
-        <template slot="label">
60
-          <svg-icon slot="prefix" icon-class="car" class="el-input__icon input-icon" />
61
-          预计行驶里程(万千米)
62
-        </template>
63
-        {{ carInfo.expectKm }}
64
-      </el-descriptions-item>
65
-      <el-descriptions-item>
66
-        <template slot="label">
67
-          <svg-icon slot="prefix" icon-class="JamYelpSquare" class="el-input__icon input-icon" />
68
-          是否为租车
69
-        </template>
70
-        {{ carInfo.isRent == '0' ? '否' : '是' }}
71
-      </el-descriptions-item>
72
-      <el-descriptions-item>
73
-        <template slot="label">
74
-          <svg-icon slot="prefix" icon-class="TeenyiconsYenSolid" class="el-input__icon input-icon" />
75
-          单日成本(元)
76
-        </template>
77
-        {{ carInfo.dayCost }}
78
-      </el-descriptions-item>
79
-      <el-descriptions-item>
80
-        <template slot="label">
81
-          <svg-icon slot="prefix" icon-class="remark" class="el-input__icon input-icon" />
82
-          备注
83
-        </template>
84
-        {{ carInfo.remark }}
85
-      </el-descriptions-item>
86
-    </el-descriptions>
87
-    <!-- 费用明细 -->
88
-    <el-divider></el-divider>
89
-
90
-    <el-card>
91
-      <el-row :gutter="10" class="mb8">
92
-        <el-col :span="1.5">
93
-          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
94
-        </el-col>
95
-        <el-col :span="1.5">
96
-          <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
97
-            @click="handleUpdate">修改</el-button>
98
-        </el-col>
99
-        <el-col :span="1.5">
100
-          <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
101
-            @click="handleDelete">删除</el-button>
102
-        </el-col>
103
-        <el-col :span="1.5">
104
-          <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
105
-        </el-col>
106
-      </el-row>
107
-      <el-table v-loading="loading" :data="expenseList" @selection-change="handleSelectionChange">
108
-        <el-table-column type="selection" width="55" align="center" />
109
-        <el-table-column type="index" width="55" align="center" label="序号" />
110
-        <el-table-column label="费用类型" align="center" prop="expenseType">
111
-          <template slot-scope="scope">
112
-            <el-tag :type="typeStyle(scope.row.expenseType)">{{ expenseTypeText(scope.row.expenseType) }}</el-tag>
113
-          </template>
114
-        </el-table-column>
115
-        <el-table-column label="费用金额" align="center" prop="expense">
116
-          <template slot-scope="scope">
117
-            {{ scope.row.expense + '元' }}
118
-          </template>
119
-        </el-table-column>
120
-        <el-table-column label="发生日期" align="center" prop="occurDate" width="180">
121
-          <template slot-scope="scope">
122
-            {{ scope.row.occurDate }}
123
-          </template>
124
-        </el-table-column>
125
-        <el-table-column width="55" align="center" label="备注" prop="remark" />
126
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
127
-          <template slot-scope="scope">
128
-            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
129
-              v-hasPermi="['oa:carExpense:edit']">修改</el-button>
130
-            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
131
-              v-hasPermi="['oa:carExpense:remove']">删除</el-button>
132
-          </template>
133
-        </el-table-column>
134
-      </el-table>
135
-      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
136
-        @pagination="getList" />
137
-    </el-card>
138
-    <!-- 添加明细 -->
139
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
140
-      <el-form ref="expenseForm" :model="form" :rules="rules" label-width="100px">
141
-        <el-form-item label="费用类型" prop="expenseType">
142
-          <el-select v-model="form.expenseType" placeholder="请选择" clearable>
143
-            <el-option label="保险费" value="0"></el-option>
144
-            <el-option label="维修/保养费" value="1"></el-option>
145
-            <el-option label="轮胎费" value="2"></el-option>
146
-          </el-select>
147
-        </el-form-item>
148
-        <el-form-item label="费用金额" prop="expense">
149
-          <el-input v-model="form.expense" placeholder="请输入费用金额" style="width:150px" /> <el-tag>元</el-tag>
150
-        </el-form-item>
151
-        <el-form-item label="发生日期" prop="occurDate">
152
-          <el-date-picker clearable v-model="form.occurDate" type="date" value-format="yyyy-MM-dd"
153
-            placeholder="请选择发生日期">
154
-          </el-date-picker>
155
-        </el-form-item>
156
-        <el-form-item label="备注说明" prop="remark">
157
-          <el-input type="textarea" v-model="form.remark" placeholder="请输入备注说明" style="width:220px" />
158
-        </el-form-item>
159
-      </el-form>
160
-      <div slot="footer" class="dialog-footer">
161
-        <el-button type="primary" @click="submitForm">确 定</el-button>
162
-        <el-button @click="cancel">取 消</el-button>
163
-      </div>
164
-    </el-dialog>
165
-  </div>
166
-</template>
167
-
168
-<script>
169
-import { getCar } from '@/api/oa/car/car.js'
170
-import { listCarExpense, getCarExpense, delCarExpense, addCarExpense, updateCarExpense } from "@/api/oa/car/carExpense";
171
-export default {
172
-  data() {
173
-    let validateExpense = (rule, value, callback) => {
174
-      setTimeout(() => {
175
-        if (!value) {
176
-          return callback(new Error('请输入金额'));
177
-        }
178
-        if (!this.isNumber(Number(value))) {
179
-          callback(new Error('请输入数字值'));
180
-        } else {
181
-          callback();
182
-        }
183
-      }, 100)
184
-    }
185
-    return {
186
-      column: 4,
187
-      carInfo: {},
188
-      expenseList: [],
189
-      queryParams: {
190
-        pageNum: 1,
191
-        pageSize: 10,
192
-      },
193
-      total: 0,
194
-      multiple: true,
195
-      // 选中数组
196
-      ids: [],
197
-      // 非单个禁用
198
-      single: true,
199
-      title: '',
200
-      open: false,
201
-      form: {},
202
-      rules: {
203
-        expenseType: [
204
-          { required: true, message: '请选择费用类型', trigger: 'change' }
205
-        ],
206
-        expense: [
207
-          { validator: validateExpense, required: true, trigger: 'blur' },
208
-        ],
209
-        occurDate: [
210
-          { required: true, message: '请选择发生日期', trigger: 'change' },
211
-        ],
212
-      },
213
-      loading: false
214
-    }
215
-  },
216
-  created() {
217
-    if (this.$route.query) {
218
-      getCar(this.$route.query.carId).then(res => {
219
-        this.carInfo = res.data;
220
-      })
221
-      this.getList();
222
-    }
223
-    if (this.$store.state.app.device == 'desktop') {
224
-
225
-    } else {
226
-      this.column = 1
227
-    }
228
-  },
229
-  methods: {
230
-    getList() {
231
-      this.queryParams.carId = this.$route.query.carId
232
-      listCarExpense(this.queryParams).then(res => {
233
-        this.expenseList = res.rows;
234
-        this.total = res.total;
235
-      })
236
-    },
237
-    goBack() {
238
-      let obj = { path: "/car/expense" }
239
-      this.$tab.closeOpenPage(obj);
240
-      this.$router.push({ path: '/car' });
241
-    },
242
-    /** 搜索按钮操作 */
243
-    handleQuery() {
244
-      this.queryParams.pageNum = 1;
245
-      this.getList();
246
-    },
247
-    // 多选框选中数据
248
-    handleSelectionChange(selection) {
249
-      this.ids = selection.map(item => item.carExpenseId)
250
-      this.single = selection.length !== 1
251
-      this.multiple = !selection.length
252
-    },
253
-    handleAdd() {
254
-      this.reset();
255
-      this.open = true;
256
-      this.title = "添加车辆明细";
257
-    },
258
-    handleUpdate(row) {
259
-      this.reset();
260
-      const carExpenseId = row.carExpenseId || this.ids
261
-      getCarExpense(carExpenseId).then(response => {
262
-        this.form = response.data;
263
-        this.open = true;
264
-        this.title = "修改车辆明细";
265
-      });
266
-    },
267
-    handleDelete(row) {
268
-      const carExpenseIds = row.carExpenseId || this.ids;
269
-      this.$modal.confirm('是否确认删除车辆费用编号为"' + carExpenseIds + '"的数据项?').then(function () {
270
-        return delCarExpense(carExpenseIds);
271
-      }).then(() => {
272
-        this.getList();
273
-        this.$modal.msgSuccess("删除成功");
274
-      }).catch(() => { });
275
-    },
276
-    handleExport() {
277
-      this.download('oa/carExpense/export', {
278
-        ...this.queryParams
279
-      }, `carExpense_${new Date().getTime()}.xlsx`)
280
-    },
281
-    // 表单重置
282
-    reset() {
283
-      this.form = {
284
-        carExpenseId: null,
285
-        carId: null,
286
-        expenseType: null,
287
-        expense: null,
288
-        occurDate: null,
289
-        remark: null,
290
-      };
291
-      this.resetForm("expenseForm");
292
-    },
293
-    submitForm() {
294
-      this.$refs["expenseForm"].validate(valid => {
295
-        if (valid) {
296
-          this.form.carId = this.$route.query.carId
297
-          if (this.form.carExpenseId != null) {
298
-            updateCarExpense(this.form).then(response => {
299
-              this.$modal.msgSuccess("修改成功");
300
-              this.open = false;
301
-              this.getList();
302
-            });
303
-          } else {
304
-            addCarExpense(this.form).then(response => {
305
-              this.$modal.msgSuccess("新增成功");
306
-              this.open = false;
307
-              this.getList();
308
-            });
309
-          }
310
-        }
311
-      });
312
-    },
313
-    cancel() {
314
-      this.open = false;
315
-      this.reset();
316
-    },
317
-    isNumber(value) {
318
-      return typeof value === 'number' && /^\d+(\.\d+)?$/.test(value);
319
-    },
320
-    expenseTypeText(row) {
321
-      if (row == '0') {
322
-        return '保险费'
323
-      }
324
-      if (row == '1') {
325
-        return '维修/保养费'
326
-      }
327
-      if (row == '2') {
328
-        return '轮胎费'
329
-      }
330
-    },
331
-    typeStyle(row) {
332
-      if (row == '0') {
333
-        return 'primary'
334
-      }
335
-      if (row == '1') {
336
-        return 'warning'
337
-      }
338
-      if (row == '2') {
339
-        return 'success'
340
-      }
341
-    }
342
-  },
343
-}
344
-</script>
345
-
346
-<style lang="scss" scoped>
347
-.header {
348
-  position: relative;
349
-  text-align: center;
350
-
351
-  .back {
352
-    position: absolute;
353
-    left: 12px;
354
-    top: -10px;
355
-  }
356
-}
357
-
358
-.descriptions {
359
-  padding: 20px 50px;
360
-}
361
-
362
-
363
-::v-deep .el-descriptions-item__label.is-bordered-label {
364
-  color: #121212;
365
-  background: rgba($color: #46a6ff, $alpha: 0.1);
366
-  width: 200px;
367
-}
368
-
369
-::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
370
-  border: 1px solid #2d3f62;
371
-}
1
+<template>
2
+  <div class="app-container">
3
+    <div class="header">
4
+      <el-button icon="el-icon-d-arrow-left" plain type="primary" class="back" @click="goBack">返回</el-button>
5
+      <h1>{{ '【' + carInfo.licensePlate + '】' }}车辆明细</h1>
6
+    </div>
7
+    <el-divider></el-divider>
8
+    <el-descriptions class="descriptions" :column="column" border style="text-align: center;">
9
+      <el-descriptions-item>
10
+        <template slot="label">
11
+          <svg-icon slot="prefix" icon-class="car" class="el-input__icon input-icon" />
12
+          车牌号
13
+        </template>
14
+        {{ carInfo.licensePlate }}
15
+      </el-descriptions-item>
16
+      <el-descriptions-item>
17
+        <template slot="label">
18
+          <svg-icon slot="prefix" icon-class="Branding" class="el-input__icon input-icon" />
19
+          品牌
20
+        </template>
21
+        {{ carInfo.brand }}
22
+      </el-descriptions-item>
23
+      <el-descriptions-item>
24
+        <template slot="label">
25
+          <svg-icon slot="prefix" icon-class="PhAppStoreLogoFill" class="el-input__icon input-icon" />
26
+          车型
27
+        </template>
28
+        {{ carInfo.series }}
29
+      </el-descriptions-item>
30
+      <el-descriptions-item>
31
+        <template slot="label">
32
+          <svg-icon slot="prefix" icon-class="cost" class="el-input__icon input-icon" />
33
+          总价(元)
34
+        </template>
35
+        {{ carInfo.cost }}
36
+      </el-descriptions-item>
37
+      <el-descriptions-item>
38
+        <template slot="label">
39
+          <svg-icon slot="prefix" icon-class="date" class="el-input__icon input-icon" />
40
+          上牌时间
41
+        </template>
42
+        {{ parseTime(carInfo.acquisitionTime, '{y}-{m}-{d}') }}
43
+      </el-descriptions-item>
44
+      <el-descriptions-item>
45
+        <template slot="label">
46
+          <i class="el-icon-user-solid"></i>
47
+          驾驶员
48
+        </template>
49
+        {{ carInfo.driverUser ? carInfo.driverUser.nickName : '' }}
50
+      </el-descriptions-item>
51
+      <el-descriptions-item>
52
+        <template slot="label">
53
+          <svg-icon slot="prefix" icon-class="date" class="el-input__icon input-icon" />
54
+          预计使用年限(年)
55
+        </template>
56
+        {{ carInfo.expectLife }}
57
+      </el-descriptions-item>
58
+      <el-descriptions-item>
59
+        <template slot="label">
60
+          <svg-icon slot="prefix" icon-class="car" class="el-input__icon input-icon" />
61
+          预计行驶里程(万千米)
62
+        </template>
63
+        {{ carInfo.expectKm }}
64
+      </el-descriptions-item>
65
+      <el-descriptions-item>
66
+        <template slot="label">
67
+          <svg-icon slot="prefix" icon-class="JamYelpSquare" class="el-input__icon input-icon" />
68
+          是否为租车
69
+        </template>
70
+        {{ carInfo.isRent == '0' ? '否' : '是' }}
71
+      </el-descriptions-item>
72
+      <el-descriptions-item>
73
+        <template slot="label">
74
+          <svg-icon slot="prefix" icon-class="TeenyiconsYenSolid" class="el-input__icon input-icon" />
75
+          单日成本(元)
76
+        </template>
77
+        {{ carInfo.dayCost }}
78
+      </el-descriptions-item>
79
+      <el-descriptions-item>
80
+        <template slot="label">
81
+          <svg-icon slot="prefix" icon-class="remark" class="el-input__icon input-icon" />
82
+          备注
83
+        </template>
84
+        {{ carInfo.remark }}
85
+      </el-descriptions-item>
86
+    </el-descriptions>
87
+    <el-divider></el-divider>
88
+    <el-row :gutter="20">
89
+      <!-- 费用明细 -->
90
+      <el-col :span="12" :xs="24">
91
+        <el-card>
92
+          <div slot="header" class="clearfix">
93
+            <h3>维保记录</h3>
94
+          </div>
95
+          <el-row :gutter="10" class="mb8">
96
+            <el-col :span="1.5">
97
+              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
98
+            </el-col>
99
+            <el-col :span="1.5">
100
+              <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
101
+                @click="handleUpdate">修改</el-button>
102
+            </el-col>
103
+            <el-col :span="1.5">
104
+              <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
105
+                @click="handleDelete">删除</el-button>
106
+            </el-col>
107
+            <el-col :span="1.5">
108
+              <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
109
+            </el-col>
110
+            <el-col :span="1.5">
111
+              <el-button type="info" plain icon="el-icon-s-release" size="mini">前往报废</el-button>
112
+            </el-col>
113
+          </el-row>
114
+          <el-table v-loading="loading" :data="expenseList" @selection-change="handleSelectionChange">
115
+            <el-table-column type="selection" width="55" align="center" />
116
+            <el-table-column type="index" width="55" align="center" label="序号" />
117
+            <el-table-column label="费用类型" align="center" prop="expenseType">
118
+              <template slot-scope="scope">
119
+                <el-tag :type="typeStyle(scope.row.expenseType)">{{ expenseTypeText(scope.row.expenseType) }}</el-tag>
120
+              </template>
121
+            </el-table-column>
122
+            <el-table-column label="费用金额" align="center" prop="expense">
123
+              <template slot-scope="scope">
124
+                {{ scope.row.expense + '元' }}
125
+              </template>
126
+            </el-table-column>
127
+            <el-table-column label="发生日期" align="center" prop="occurDate" width="180">
128
+              <template slot-scope="scope">
129
+                {{ scope.row.occurDate }}
130
+              </template>
131
+            </el-table-column>
132
+            <el-table-column width="55" align="center" label="备注" prop="remark" />
133
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
134
+              <template slot-scope="scope">
135
+                <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
136
+                  v-hasPermi="['oa:carExpense:edit']">修改</el-button>
137
+                <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
138
+                  v-hasPermi="['oa:carExpense:remove']">删除</el-button>
139
+              </template>
140
+            </el-table-column>
141
+          </el-table>
142
+          <pagination v-show="expenseTotal > 0" :total="expenseTotal" :page.sync="queryParams.pageNum"
143
+            :limit.sync="queryParams.pageSize" @pagination="getList" />
144
+        </el-card>
145
+      </el-col>
146
+      <el-col :span="12" :xs="24">
147
+        <el-card>
148
+          <div slot="header" class="clearfix">
149
+            <h3>派出任务</h3>
150
+          </div>
151
+          <el-table v-loading="loading" :data="approvalList" @selection-change="handleSelectionChange">
152
+            <el-table-column type="selection" width="55" align="center" />
153
+            <el-table-column type="index" width="55" align="center" label="序号" />
154
+            <el-table-column label="申请人" align="center" prop="user.nickName">
155
+              <template slot-scope="scope">
156
+                {{ scope.row.applierUser ? scope.row.applierUser.nickName : '' }}
157
+              </template>
158
+            </el-table-column>
159
+            <el-table-column label="使用部门" align="center" prop="dept.deptName">
160
+              <template slot-scope="scope">
161
+                {{ scope.row.dept ? scope.row.dept.deptName : '' }}
162
+              </template>
163
+            </el-table-column>
164
+            <el-table-column label="项目编号" align="center" prop="project.projectNumber">
165
+              <template slot-scope="scope">
166
+                {{ scope.row.project ? scope.row.project.projectNumber : '' }}
167
+              </template>
168
+            </el-table-column>
169
+            <el-table-column label="项目名称" align="center" prop="project.projectName">
170
+              <template slot-scope="scope">
171
+                {{ scope.row.project ? scope.row.project.projectName : '' }}
172
+              </template>
173
+            </el-table-column>
174
+            <el-table-column label="开始时间" align="center" prop="beginDate">
175
+              <template slot-scope="scope">
176
+                {{ scope.row.beginDate }}
177
+              </template>
178
+            </el-table-column>
179
+            <el-table-column label="结束时间" align="center" prop="endDate">
180
+              <template slot-scope="scope">
181
+                {{ scope.row.endDate }}
182
+              </template>
183
+            </el-table-column>
184
+          </el-table>
185
+          <pagination v-show="approvalTotal > 0" :total="approvalTotal" :page.sync="queryParams.pageNum"
186
+            :limit.sync="queryParams.pageSize" @pagination="getList" />
187
+        </el-card>
188
+      </el-col>
189
+    </el-row>
190
+    <!-- 添加明细 -->
191
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
192
+      <el-form ref="expenseForm" :model="form" :rules="rules" label-width="100px">
193
+        <el-form-item label="费用类型" prop="expenseType">
194
+          <el-select v-model="form.expenseType" placeholder="请选择" clearable>
195
+            <el-option label="保险费" value="0"></el-option>
196
+            <el-option label="维修/保养费" value="1"></el-option>
197
+            <el-option label="轮胎费" value="2"></el-option>
198
+          </el-select>
199
+        </el-form-item>
200
+        <el-form-item label="费用金额" prop="expense">
201
+          <el-input v-model="form.expense" placeholder="请输入费用金额" style="width:150px" /> <el-tag>元</el-tag>
202
+        </el-form-item>
203
+        <el-form-item label="发生日期" prop="occurDate">
204
+          <el-date-picker clearable v-model="form.occurDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择发生日期">
205
+          </el-date-picker>
206
+        </el-form-item>
207
+        <el-form-item label="备注说明" prop="remark">
208
+          <el-input type="textarea" v-model="form.remark" placeholder="请输入备注说明" style="width:220px" />
209
+        </el-form-item>
210
+      </el-form>
211
+      <div slot="footer" class="dialog-footer">
212
+        <el-button type="primary" @click="submitForm">确 定</el-button>
213
+        <el-button @click="cancel">取 消</el-button>
214
+      </div>
215
+    </el-dialog>
216
+  </div>
217
+</template>
218
+
219
+<script>
220
+import { getCar } from '@/api/oa/car/car.js'
221
+import { listCarExpense, getCarExpense, delCarExpense, addCarExpense, updateCarExpense } from "@/api/oa/car/carExpense";
222
+import { listCarApproval } from "@/api/oa/car/carApproval";
223
+export default {
224
+  data() {
225
+    let validateExpense = (rule, value, callback) => {
226
+      setTimeout(() => {
227
+        if (!value) {
228
+          return callback(new Error('请输入金额'));
229
+        }
230
+        if (!this.isNumber(Number(value))) {
231
+          callback(new Error('请输入数字值'));
232
+        } else {
233
+          callback();
234
+        }
235
+      }, 100)
236
+    }
237
+    return {
238
+      column: 4,
239
+      carInfo: {},
240
+      expenseList: [],
241
+      approvalList: [],
242
+      queryParams: {
243
+        pageNum: 1,
244
+        pageSize: 10,
245
+      },
246
+      expenseTotal: 0,
247
+      approvalTotal: 0,
248
+      multiple: true,
249
+      // 选中数组
250
+      ids: [],
251
+      // 非单个禁用
252
+      single: true,
253
+      title: '',
254
+      open: false,
255
+      form: {},
256
+      rules: {
257
+        expenseType: [
258
+          { required: true, message: '请选择费用类型', trigger: 'change' }
259
+        ],
260
+        expense: [
261
+          { validator: validateExpense, required: true, trigger: 'blur' },
262
+        ],
263
+        occurDate: [
264
+          { required: true, message: '请选择发生日期', trigger: 'change' },
265
+        ],
266
+      },
267
+      loading: false
268
+    }
269
+  },
270
+  created() {
271
+    if (this.$route.query) {
272
+      getCar(this.$route.query.carId).then(res => {
273
+        this.carInfo = res.data;
274
+      })
275
+      this.getList();
276
+    }
277
+    if (this.$store.state.app.device == 'desktop') {
278
+
279
+    } else {
280
+      this.column = 1
281
+    }
282
+  },
283
+  methods: {
284
+    getList() {
285
+      this.queryParams.carId = this.$route.query.carId;
286
+      listCarExpense(this.queryParams).then(res => {
287
+        this.expenseList = res.rows;
288
+        this.expenseTotal = res.total;
289
+      });
290
+      this.queryParams.cars = this.$route.query.carId;
291
+      listCarApproval(this.queryParams).then(res => {
292
+        this.approvalList = res.rows;
293
+        this.approvalTotal = res.total;
294
+      })
295
+    },
296
+    goBack() {
297
+      let obj = { path: "/car/detail" }
298
+      this.$tab.closeOpenPage(obj);
299
+      this.$router.push({ path: '/car' });
300
+    },
301
+    /** 搜索按钮操作 */
302
+    handleQuery() {
303
+      this.queryParams.pageNum = 1;
304
+      this.getList();
305
+    },
306
+    // 多选框选中数据
307
+    handleSelectionChange(selection) {
308
+      this.ids = selection.map(item => item.carExpenseId)
309
+      this.single = selection.length !== 1
310
+      this.multiple = !selection.length
311
+    },
312
+    handleAdd() {
313
+      this.reset();
314
+      this.open = true;
315
+      this.title = "添加车辆明细";
316
+    },
317
+    handleUpdate(row) {
318
+      this.reset();
319
+      const carExpenseId = row.carExpenseId || this.ids
320
+      getCarExpense(carExpenseId).then(response => {
321
+        this.form = response.data;
322
+        this.open = true;
323
+        this.title = "修改车辆明细";
324
+      });
325
+    },
326
+    handleDelete(row) {
327
+      const carExpenseIds = row.carExpenseId || this.ids;
328
+      this.$modal.confirm('是否确认删除车辆费用编号为"' + carExpenseIds + '"的数据项?').then(function () {
329
+        return delCarExpense(carExpenseIds);
330
+      }).then(() => {
331
+        this.getList();
332
+        this.$modal.msgSuccess("删除成功");
333
+      }).catch(() => { });
334
+    },
335
+    handleExport() {
336
+      this.download('oa/carExpense/export', {
337
+        ...this.queryParams
338
+      }, `carExpense_${new Date().getTime()}.xlsx`)
339
+    },
340
+    // 表单重置
341
+    reset() {
342
+      this.form = {
343
+        carExpenseId: null,
344
+        carId: null,
345
+        expenseType: null,
346
+        expense: null,
347
+        occurDate: null,
348
+        remark: null,
349
+      };
350
+      this.resetForm("expenseForm");
351
+    },
352
+    submitForm() {
353
+      this.$refs["expenseForm"].validate(valid => {
354
+        if (valid) {
355
+          this.form.carId = this.$route.query.carId
356
+          if (this.form.carExpenseId != null) {
357
+            updateCarExpense(this.form).then(response => {
358
+              this.$modal.msgSuccess("修改成功");
359
+              this.open = false;
360
+              this.getList();
361
+            });
362
+          } else {
363
+            addCarExpense(this.form).then(response => {
364
+              this.$modal.msgSuccess("新增成功");
365
+              this.open = false;
366
+              this.getList();
367
+            });
368
+          }
369
+        }
370
+      });
371
+    },
372
+    cancel() {
373
+      this.open = false;
374
+      this.reset();
375
+    },
376
+    isNumber(value) {
377
+      return typeof value === 'number' && /^\d+(\.\d+)?$/.test(value);
378
+    },
379
+    expenseTypeText(row) {
380
+      if (row == '0') {
381
+        return '保险费'
382
+      }
383
+      if (row == '1') {
384
+        return '维修/保养费'
385
+      }
386
+      if (row == '2') {
387
+        return '轮胎费'
388
+      }
389
+    },
390
+    typeStyle(row) {
391
+      if (row == '0') {
392
+        return 'primary'
393
+      }
394
+      if (row == '1') {
395
+        return 'warning'
396
+      }
397
+      if (row == '2') {
398
+        return 'success'
399
+      }
400
+    }
401
+  },
402
+}
403
+</script>
404
+
405
+<style lang="scss" scoped>
406
+.header {
407
+  position: relative;
408
+  text-align: center;
409
+
410
+  .back {
411
+    position: absolute;
412
+    left: 12px;
413
+    top: -10px;
414
+  }
415
+}
416
+
417
+.descriptions {
418
+  padding: 20px 50px;
419
+}
420
+
421
+
422
+::v-deep .el-descriptions-item__label.is-bordered-label {
423
+  color: #121212;
424
+  background: rgba($color: #46a6ff, $alpha: 0.1);
425
+  width: 200px;
426
+}
427
+
428
+::v-deep .el-descriptions .is-bordered .el-descriptions-item__cell {
429
+  border: 1px solid #2d3f62;
430
+}
372 431
 </style>

+ 4
- 7
oa-ui/src/views/oa/car/index.vue Datei anzeigen

@@ -139,7 +139,7 @@
139 139
 
140 140
 <script>
141 141
 import { listCar, getCar, delCar, addCar, updateCar } from "@/api/oa/car/car";
142
-import { listDriver } from "@/api/system/post";
142
+import { getUserByPost } from "@/api/system/post";
143 143
 
144 144
 export default {
145 145
   name: "Car",
@@ -195,11 +195,8 @@ export default {
195 195
     },
196 196
     // 查询驾驶员列表
197 197
     getDriverList() {
198
-      listDriver({
199
-        pageNum: 1,
200
-        pageSize: 99999999
201
-      }).then(response => {
202
-        this.driverList = response.rows;
198
+      getUserByPost({ postName: '驾驶员' }).then(response => {
199
+        this.driverList = response.data;
203 200
       })
204 201
     },
205 202
     // 取消按钮
@@ -251,7 +248,7 @@ export default {
251 248
     // 新增明细按钮
252 249
     handleAddDetail(row) {
253 250
       this.$router.push({
254
-        path: '/car/expense',
251
+        path: '/car/detail',
255 252
         query: {
256 253
           carId: row.carId,
257 254
         }

oa-ui/src/views/oa/device/approval.vue → oa-ui/src/views/oa/device/detail.vue Datei anzeigen

@@ -84,75 +84,141 @@
84 84
         {{ deviceInfo.remark }}
85 85
       </el-descriptions-item>
86 86
     </el-descriptions>
87
-    <!-- 费用明细 -->
88
-    <el-divider></el-divider>
89 87
 
90
-    <el-deviced>
91
-      <div slot="header" class="clearfix">
92
-        <h3>设备使用记录</h3>
93
-      </div>
94
-      <el-row :gutter="10" class="mb8">
95
-        <el-col :span="1.5">
96
-          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
97
-        </el-col>
98
-        <el-col :span="1.5">
99
-          <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
100
-            @click="handleUpdate">修改</el-button>
101
-        </el-col>
102
-        <el-col :span="1.5">
103
-          <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
104
-            @click="handleDelete">删除</el-button>
105
-        </el-col>
106
-        <el-col :span="1.5">
107
-          <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
108
-        </el-col>
109
-      </el-row>
110
-      <!-- 设备使用记录 -->
111
-      <el-table v-loading="loading" :data="approvalList" @selection-change="handleSelectionChange">
112
-        <el-table-column type="selection" width="55" align="center" />
113
-        <el-table-column type="index" width="55" align="center" label="序号" />
114
-        <el-table-column label="申请人" align="center" prop="user.nickName">
115
-          <template slot-scope="scope">
116
-            {{ scope.row.applierUser ? scope.row.applierUser.nickName : '' }}
117
-          </template>
118
-        </el-table-column>
119
-        <el-table-column label="使用部门" align="center" prop="dept.deptName">
120
-          <template slot-scope="scope">
121
-            {{ scope.row.dept ? scope.row.dept.deptName : '' }}
122
-          </template>
123
-        </el-table-column>
124
-        <el-table-column label="项目编号" align="center" prop="project.projectNumber">
125
-          <template slot-scope="scope">
126
-            {{ scope.row.project ? scope.row.project.projectNumber : '' }}
127
-          </template>
128
-        </el-table-column>
129
-        <el-table-column label="项目名称" align="center" prop="project.projectName">
130
-          <template slot-scope="scope">
131
-            {{ scope.row.project ? scope.row.project.projectName : '' }}
132
-          </template>
133
-        </el-table-column>
134
-        <el-table-column label="申请时间" align="center" prop="beginDate">
135
-          <template slot-scope="scope">
136
-            {{ scope.row.beginDate }}
137
-          </template>
138
-        </el-table-column>
139
-        <el-table-column label="归还时间" align="center" prop="returnDate" width="180">
140
-          <template slot-scope="scope">
141
-            {{ scope.row.returnDate }}
142
-          </template>
143
-        </el-table-column>
144
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
145
-          <template slot-scope="scope">
146
-            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
147
-              v-hasPermi="['oa:deviceApproval:edit']">修改</el-button>
148
-            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
149
-              v-hasPermi="['oa:deviceApproval:remove']">删除</el-button>
150
-          </template>
151
-        </el-table-column>
152
-      </el-table>
153
-      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
154
-        @pagination="getList" />
155
-    </el-deviced>
88
+    <el-divider></el-divider>
89
+    <el-row :gutter="20">
90
+      <!-- 维保记录 -->
91
+      <el-col :span="12" :xs="24">
92
+        <el-card>
93
+          <div slot="header" class="clearfix">
94
+            <h3>维保记录</h3>
95
+          </div>
96
+          <el-row :gutter="10" class="mb8">
97
+            <el-col :span="1.5">
98
+              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
99
+            </el-col>
100
+            <el-col :span="1.5">
101
+              <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
102
+                @click="handleUpdate">修改</el-button>
103
+            </el-col>
104
+            <el-col :span="1.5">
105
+              <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
106
+                @click="handleDelete">删除</el-button>
107
+            </el-col>
108
+            <el-col :span="1.5">
109
+              <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
110
+            </el-col>
111
+            <el-col :span="1.5">
112
+              <el-button type="info" plain icon="el-icon-s-release" size="mini">前往报废</el-button>
113
+            </el-col>
114
+          </el-row>
115
+          <el-table v-loading="loading" :data="expenseList" @selection-change="handleSelectionChange">
116
+            <el-table-column type="selection" width="55" align="center" />
117
+            <el-table-column type="index" width="55" align="center" label="序号" />
118
+            <el-table-column label="费用类型" align="center" prop="expenseType">
119
+              <template slot-scope="scope">
120
+                <el-tag :type="typeStyle(scope.row.expenseType)">{{ expenseTypeText(scope.row.expenseType) }}</el-tag>
121
+              </template>
122
+            </el-table-column>
123
+            <el-table-column label="费用金额" align="center" prop="expense">
124
+              <template slot-scope="scope">
125
+                {{ scope.row.expense + '元' }}
126
+              </template>
127
+            </el-table-column>
128
+            <el-table-column label="发生日期" align="center" prop="occurDate" width="180">
129
+              <template slot-scope="scope">
130
+                {{ scope.row.occurDate }}
131
+              </template>
132
+            </el-table-column>
133
+            <el-table-column label="负责人" align="center" prop="userId">
134
+              <template slot-scope="scope">
135
+                {{ scope.row.userId}}
136
+              </template>
137
+            </el-table-column>
138
+            <el-table-column width="55" align="center" label="备注" prop="remark" />
139
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
140
+              <template slot-scope="scope">
141
+                <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
142
+                  v-hasPermi="['oa:carExpense:edit']">修改</el-button>
143
+                <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
144
+                  v-hasPermi="['oa:carExpense:remove']">删除</el-button>
145
+              </template>
146
+            </el-table-column>
147
+          </el-table>
148
+          <pagination v-show="expenseTotal > 0" :total="expenseTotal" :page.sync="queryParams.pageNum"
149
+            :limit.sync="queryParams.pageSize" @pagination="getList" />
150
+        </el-card>
151
+      </el-col>
152
+      <el-col :span="12" :xs="24">
153
+      <!-- 移交、申领记录 -->
154
+        <el-card>
155
+          <div slot="header" class="clearfix">
156
+            <h3>{{ cardName }}</h3>
157
+          </div>
158
+          <el-row :gutter="10" class="mb8">
159
+            <el-col :span="1.5">
160
+              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
161
+            </el-col>
162
+            <el-col :span="1.5">
163
+              <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
164
+                @click="handleUpdate">修改</el-button>
165
+            </el-col>
166
+            <el-col :span="1.5">
167
+              <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
168
+                @click="handleDelete">删除</el-button>
169
+            </el-col>
170
+            <el-col :span="1.5">
171
+              <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
172
+            </el-col>
173
+          </el-row>
174
+          <!-- 设备使用记录 -->
175
+          <el-table v-loading="loading" :data="approvalList" @selection-change="handleSelectionChange">
176
+            <el-table-column type="selection" width="55" align="center" />
177
+            <el-table-column type="index" width="55" align="center" label="序号" />
178
+            <el-table-column label="申请人" align="center" prop="user.nickName">
179
+              <template slot-scope="scope">
180
+                {{ scope.row.applierUser ? scope.row.applierUser.nickName : '' }}
181
+              </template>
182
+            </el-table-column>
183
+            <el-table-column label="使用部门" align="center" prop="dept.deptName">
184
+              <template slot-scope="scope">
185
+                {{ scope.row.dept ? scope.row.dept.deptName : '' }}
186
+              </template>
187
+            </el-table-column>
188
+            <el-table-column label="项目编号" align="center" prop="project.projectNumber">
189
+              <template slot-scope="scope">
190
+                {{ scope.row.project ? scope.row.project.projectNumber : '' }}
191
+              </template>
192
+            </el-table-column>
193
+            <el-table-column label="项目名称" align="center" prop="project.projectName">
194
+              <template slot-scope="scope">
195
+                {{ scope.row.project ? scope.row.project.projectName : '' }}
196
+              </template>
197
+            </el-table-column>
198
+            <el-table-column label="申请时间" align="center" prop="beginDate">
199
+              <template slot-scope="scope">
200
+                {{ scope.row.beginDate }}
201
+              </template>
202
+            </el-table-column>
203
+            <el-table-column label="归还时间" align="center" prop="returnDate" width="180">
204
+              <template slot-scope="scope">
205
+                {{ scope.row.returnDate }}
206
+              </template>
207
+            </el-table-column>
208
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
209
+              <template slot-scope="scope">
210
+                <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
211
+                  v-hasPermi="['oa:deviceApproval:edit']">修改</el-button>
212
+                <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
213
+                  v-hasPermi="['oa:deviceApproval:remove']">删除</el-button>
214
+              </template>
215
+            </el-table-column>
216
+          </el-table>
217
+          <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
218
+            :limit.sync="queryParams.pageSize" @pagination="getList" />
219
+        </el-card>
220
+      </el-col>
221
+    </el-row>
156 222
     <!-- 添加明细 -->
157 223
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
158 224
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -229,8 +295,11 @@ export default {
229 295
       showSearch: true,
230 296
       // 总条数
231 297
       total: 0,
298
+      expenseTotal: 0,
232 299
       // cmc设备审批表格数据
233 300
       approvalList: [],
301
+      expenseList: [],
302
+      cardName: '',
234 303
       column: 4,
235 304
       deviceInfo: {},
236 305
       // 弹出层标题
@@ -247,11 +316,17 @@ export default {
247 316
       // 表单校验
248 317
       rules: {
249 318
       },
250
-      loading: false
319
+      loading: false,
320
+      routeType:''
251 321
     }
252 322
   },
253 323
   created() {
254 324
     if (this.$route.query) {
325
+      this.routeType = this.$route.query.type
326
+      if (this.$route.query.type == 'equipment')
327
+        this.cardName = '申领记录';
328
+      else
329
+        this.cardName = '移交记录';
255 330
       getDevice(this.$route.query.deviceId).then(res => {
256 331
         this.deviceInfo = res.data;
257 332
       })
@@ -272,9 +347,9 @@ export default {
272 347
       })
273 348
     },
274 349
     goBack() {
275
-      let obj = { path: "/device/approval" }
350
+      let obj = { path: "/device/detail" }
276 351
       this.$tab.closeOpenPage(obj);
277
-      this.$router.push({ path: '/device' });
352
+      this.$router.push({ path: '/device/'+ this.routeType });
278 353
     },
279 354
     /** 搜索按钮操作 */
280 355
     handleQuery() {
@@ -368,6 +443,28 @@ export default {
368 443
     isNumber(value) {
369 444
       return typeof value === 'number' && /^\d+(\.\d+)?$/.test(value);
370 445
     },
446
+    expenseTypeText(row) {
447
+      if (row == '0') {
448
+        return '保险费'
449
+      }
450
+      if (row == '1') {
451
+        return '维修/保养费'
452
+      }
453
+      if (row == '2') {
454
+        return '检定费'
455
+      }
456
+    },
457
+    typeStyle(row) {
458
+      if (row == '0') {
459
+        return 'primary'
460
+      }
461
+      if (row == '1') {
462
+        return 'warning'
463
+      }
464
+      if (row == '2') {
465
+        return 'success'
466
+      }
467
+    }
371 468
   },
372 469
 }
373 470
 </script>

+ 0
- 290
oa-ui/src/views/oa/device/expense.vue Datei anzeigen

@@ -1,290 +0,0 @@
1
-<template>
2
-  <div class="app-container">
3
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
-      <el-form-item label="仪器id" prop="deviceId">
5
-        <el-input
6
-          v-model="queryParams.deviceId"
7
-          placeholder="请输入仪器id"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="费用金额" prop="expense">
13
-        <el-input
14
-          v-model="queryParams.expense"
15
-          placeholder="请输入费用金额"
16
-          clearable
17
-          @keyup.enter.native="handleQuery"
18
-        />
19
-      </el-form-item>
20
-      <el-form-item label="发生日期" prop="occurDate">
21
-        <el-date-picker clearable
22
-          v-model="queryParams.occurDate"
23
-          type="date"
24
-          value-format="yyyy-MM-dd"
25
-          placeholder="请选择发生日期">
26
-        </el-date-picker>
27
-      </el-form-item>
28
-      <el-form-item>
29
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
30
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
31
-      </el-form-item>
32
-    </el-form>
33
-
34
-    <el-row :gutter="10" class="mb8">
35
-      <el-col :span="1.5">
36
-        <el-button
37
-          type="primary"
38
-          plain
39
-          icon="el-icon-plus"
40
-          size="mini"
41
-          @click="handleAdd"
42
-          v-hasPermi="['oa:deviceExpense:add']"
43
-        >新增</el-button>
44
-      </el-col>
45
-      <el-col :span="1.5">
46
-        <el-button
47
-          type="success"
48
-          plain
49
-          icon="el-icon-edit"
50
-          size="mini"
51
-          :disabled="single"
52
-          @click="handleUpdate"
53
-          v-hasPermi="['oa:deviceExpense:edit']"
54
-        >修改</el-button>
55
-      </el-col>
56
-      <el-col :span="1.5">
57
-        <el-button
58
-          type="danger"
59
-          plain
60
-          icon="el-icon-delete"
61
-          size="mini"
62
-          :disabled="multiple"
63
-          @click="handleDelete"
64
-          v-hasPermi="['oa:deviceExpense:remove']"
65
-        >删除</el-button>
66
-      </el-col>
67
-      <el-col :span="1.5">
68
-        <el-button
69
-          type="warning"
70
-          plain
71
-          icon="el-icon-download"
72
-          size="mini"
73
-          @click="handleExport"
74
-          v-hasPermi="['oa:deviceExpense:export']"
75
-        >导出</el-button>
76
-      </el-col>
77
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
78
-    </el-row>
79
-
80
-    <el-table v-loading="loading" :data="deviceExpenseList" @selection-change="handleSelectionChange">
81
-      <el-table-column type="selection" width="55" align="center" />
82
-      <el-table-column label="仪器费用id" align="center" prop="deviceExpenseId" />
83
-      <el-table-column label="仪器id" align="center" prop="deviceId" />
84
-      <el-table-column label="费用类型" align="center" prop="expenseType" />
85
-      <el-table-column label="费用金额" align="center" prop="expense" />
86
-      <el-table-column label="发生日期" align="center" prop="occurDate" width="180">
87
-        <template slot-scope="scope">
88
-          <span>{{ parseTime(scope.row.occurDate, '{y}-{m}-{d}') }}</span>
89
-        </template>
90
-      </el-table-column>
91
-      <el-table-column label="备注" align="center" prop="remark" />
92
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
93
-        <template slot-scope="scope">
94
-          <el-button
95
-            size="mini"
96
-            type="text"
97
-            icon="el-icon-edit"
98
-            @click="handleUpdate(scope.row)"
99
-            v-hasPermi="['oa:deviceExpense:edit']"
100
-          >修改</el-button>
101
-          <el-button
102
-            size="mini"
103
-            type="text"
104
-            icon="el-icon-delete"
105
-            @click="handleDelete(scope.row)"
106
-            v-hasPermi="['oa:deviceExpense:remove']"
107
-          >删除</el-button>
108
-        </template>
109
-      </el-table-column>
110
-    </el-table>
111
-    
112
-    <pagination
113
-      v-show="total>0"
114
-      :total="total"
115
-      :page.sync="queryParams.pageNum"
116
-      :limit.sync="queryParams.pageSize"
117
-      @pagination="getList"
118
-    />
119
-
120
-    <!-- 添加或修改cmc仪器费用对话框 -->
121
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
122
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
123
-        <el-form-item label="仪器id" prop="deviceId">
124
-          <el-input v-model="form.deviceId" placeholder="请输入仪器id" />
125
-        </el-form-item>
126
-        <el-form-item label="费用金额" prop="expense">
127
-          <el-input v-model="form.expense" placeholder="请输入费用金额" />
128
-        </el-form-item>
129
-        <el-form-item label="发生日期" prop="occurDate">
130
-          <el-date-picker clearable
131
-            v-model="form.occurDate"
132
-            type="date"
133
-            value-format="yyyy-MM-dd"
134
-            placeholder="请选择发生日期">
135
-          </el-date-picker>
136
-        </el-form-item>
137
-        <el-form-item label="备注" prop="remark">
138
-          <el-input v-model="form.remark" placeholder="请输入备注" />
139
-        </el-form-item>
140
-      </el-form>
141
-      <div slot="footer" class="dialog-footer">
142
-        <el-button type="primary" @click="submitForm">确 定</el-button>
143
-        <el-button @click="cancel">取 消</el-button>
144
-      </div>
145
-    </el-dialog>
146
-  </div>
147
-</template>
148
-
149
-<script>
150
-import { listDeviceExpense, getDeviceExpense, delDeviceExpense, addDeviceExpense, updateDeviceExpense } from "@/api/oa/device/deviceExpense";
151
-
152
-export default {
153
-  name: "DeviceExpense",
154
-  data() {
155
-    return {
156
-      // 遮罩层
157
-      loading: true,
158
-      // 选中数组
159
-      ids: [],
160
-      // 非单个禁用
161
-      single: true,
162
-      // 非多个禁用
163
-      multiple: true,
164
-      // 显示搜索条件
165
-      showSearch: true,
166
-      // 总条数
167
-      total: 0,
168
-      // cmc仪器费用表格数据
169
-      deviceExpenseList: [],
170
-      // 弹出层标题
171
-      title: "",
172
-      // 是否显示弹出层
173
-      open: false,
174
-      // 查询参数
175
-      queryParams: {
176
-        pageNum: 1,
177
-        pageSize: 10,
178
-        deviceId: null,
179
-        expenseType: null,
180
-        expense: null,
181
-        occurDate: null,
182
-      },
183
-      // 表单参数
184
-      form: {},
185
-      // 表单校验
186
-      rules: {
187
-      }
188
-    };
189
-  },
190
-  created() {
191
-    this.getList();
192
-  },
193
-  methods: {
194
-    /** 查询cmc仪器费用列表 */
195
-    getList() {
196
-      this.loading = true;
197
-      listDeviceExpense(this.queryParams).then(response => {
198
-        this.deviceExpenseList = response.rows;
199
-        this.total = response.total;
200
-        this.loading = false;
201
-      });
202
-    },
203
-    // 取消按钮
204
-    cancel() {
205
-      this.open = false;
206
-      this.reset();
207
-    },
208
-    // 表单重置
209
-    reset() {
210
-      this.form = {
211
-        deviceExpenseId: null,
212
-        deviceId: null,
213
-        expenseType: null,
214
-        expense: null,
215
-        occurDate: null,
216
-        remark: null
217
-      };
218
-      this.resetForm("form");
219
-    },
220
-    /** 搜索按钮操作 */
221
-    handleQuery() {
222
-      this.queryParams.pageNum = 1;
223
-      this.getList();
224
-    },
225
-    /** 重置按钮操作 */
226
-    resetQuery() {
227
-      this.resetForm("queryForm");
228
-      this.handleQuery();
229
-    },
230
-    // 多选框选中数据
231
-    handleSelectionChange(selection) {
232
-      this.ids = selection.map(item => item.deviceExpenseId)
233
-      this.single = selection.length!==1
234
-      this.multiple = !selection.length
235
-    },
236
-    /** 新增按钮操作 */
237
-    handleAdd() {
238
-      this.reset();
239
-      this.open = true;
240
-      this.title = "添加cmc仪器费用";
241
-    },
242
-    /** 修改按钮操作 */
243
-    handleUpdate(row) {
244
-      this.reset();
245
-      const deviceExpenseId = row.deviceExpenseId || this.ids
246
-      getDeviceExpense(deviceExpenseId).then(response => {
247
-        this.form = response.data;
248
-        this.open = true;
249
-        this.title = "修改cmc仪器费用";
250
-      });
251
-    },
252
-    /** 提交按钮 */
253
-    submitForm() {
254
-      this.$refs["form"].validate(valid => {
255
-        if (valid) {
256
-          if (this.form.deviceExpenseId != null) {
257
-            updateDeviceExpense(this.form).then(response => {
258
-              this.$modal.msgSuccess("修改成功");
259
-              this.open = false;
260
-              this.getList();
261
-            });
262
-          } else {
263
-            addDeviceExpense(this.form).then(response => {
264
-              this.$modal.msgSuccess("新增成功");
265
-              this.open = false;
266
-              this.getList();
267
-            });
268
-          }
269
-        }
270
-      });
271
-    },
272
-    /** 删除按钮操作 */
273
-    handleDelete(row) {
274
-      const deviceExpenseIds = row.deviceExpenseId || this.ids;
275
-      this.$modal.confirm('是否确认删除cmc仪器费用编号为"' + deviceExpenseIds + '"的数据项?').then(function() {
276
-        return delDeviceExpense(deviceExpenseIds);
277
-      }).then(() => {
278
-        this.getList();
279
-        this.$modal.msgSuccess("删除成功");
280
-      }).catch(() => {});
281
-    },
282
-    /** 导出按钮操作 */
283
-    handleExport() {
284
-      this.download('oa/deviceExpense/export', {
285
-        ...this.queryParams
286
-      }, `deviceExpense_${new Date().getTime()}.xlsx`)
287
-    }
288
-  }
289
-};
290
-</script>

+ 3
- 3
oa-ui/src/views/oa/device/index.vue Datei anzeigen

@@ -186,7 +186,7 @@ export default {
186 186
         pageNum: 1,
187 187
         pageSize: 10,
188 188
         code: null,
189
-        type: null,
189
+        type: '仪器设备',
190 190
         acquisitionTime: null,
191 191
         cost: null,
192 192
         expectLife: null,
@@ -206,7 +206,6 @@ export default {
206 206
     /** 查询cmc设备信息列表 */
207 207
     getList() {
208 208
       this.loading = true;
209
-      this.queryParams.type = '仪器设备';
210 209
       listDevice(this.queryParams).then(response => {
211 210
         this.deviceList = response.rows;
212 211
         this.total = response.total;
@@ -256,8 +255,9 @@ export default {
256 255
     // 新增明细按钮
257 256
     handleAddDetail(row) {
258 257
       this.$router.push({
259
-        path: '/device/approval',
258
+        path: '/device/detail',
260 259
         query: {
260
+          type: 'equipment',
261 261
           deviceId: row.deviceId,
262 262
         }
263 263
       })

+ 3
- 3
oa-ui/src/views/oa/supply/index.vue Datei anzeigen

@@ -186,7 +186,7 @@ export default {
186 186
         pageNum: 1,
187 187
         pageSize: 10,
188 188
         code: null,
189
-        type: null,
189
+        type: '办公设备',
190 190
         acquisitionTime: null,
191 191
         cost: null,
192 192
         expectLife: null,
@@ -206,7 +206,6 @@ export default {
206 206
     /** 查询cmc设备信息列表 */
207 207
     getList() {
208 208
       this.loading = true;
209
-      this.queryParams.type = '办公设备';
210 209
       listDevice(this.queryParams).then(response => {
211 210
         this.deviceList = response.rows;
212 211
         this.total = response.total;
@@ -256,8 +255,9 @@ export default {
256 255
     // 新增明细按钮
257 256
     handleAddDetail(row) {
258 257
       this.$router.push({
259
-        path: '/device/approval',
258
+        path: '/device/detail',
260 259
         query: {
260
+          type: 'supply',
261 261
           deviceId: row.deviceId,
262 262
         }
263 263
       })

Laden…
Abbrechen
Speichern