Procházet zdrojové kódy

新增是否租车、单日成本字段

根据申请人id获取部门主任
lamphua před 1 rokem
rodič
revize
b98791e8ca
20 změnil soubory, kde provedl 266 přidání a 45 odebrání
  1. 3
    13
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java
  2. 18
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarController.java
  3. 70
    8
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java
  4. 19
    1
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java
  5. 11
    1
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
  6. 28
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCar.java
  7. 17
    3
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDevice.java
  8. 16
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceApproval.java
  9. 1
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceMapper.java
  10. 1
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceService.java
  11. 1
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceServiceImpl.java
  12. 9
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
  13. 11
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java
  14. 6
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java
  15. 11
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarMapper.xml
  16. 6
    1
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml
  17. 7
    2
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceMapper.xml
  18. 11
    3
      oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml
  19. 3
    0
      oa-back/sql/sql.sql
  20. 17
    6
      oa-ui/src/views/oa/car/index.vue

+ 3
- 13
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java Zobrazit soubor

165
             cmcCarApproval.setCars(formDataJson.getString("cars"));
165
             cmcCarApproval.setCars(formDataJson.getString("cars"));
166
             cmcCarApproval.setDrivers(formDataJson.getString("drivers"));
166
             cmcCarApproval.setDrivers(formDataJson.getString("drivers"));
167
             String[] cars = formDataJson.getString("cars").split(",");
167
             String[] cars = formDataJson.getString("cars").split(",");
168
+            BigDecimal estimateCost = new BigDecimal(0);
168
             for (String car : cars) {
169
             for (String car : cars) {
169
                 CmcCar cmcCar = cmcCarService.selectCmcCarByCarId(Integer.parseInt(car));
170
                 CmcCar cmcCar = cmcCarService.selectCmcCarByCarId(Integer.parseInt(car));
170
-                if (cmcCar.getAcquisitionTime() != null && cmcCar.getCost() != null) {
171
-                    // 年数总和法折旧
172
-                    int acquisitionYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(cmcCar.getAcquisitionTime()));
173
-                    int life = cmcCar.getExpectLife() == null ? 0 : cmcCar.getExpectLife();
174
-                    int total = 0;
175
-                    for (int i = 0; i < life + 1; i++)
176
-                        total += i;
177
-                    if (total > 0) {
178
-                        int currentYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(DateUtils.getNowDate()));
179
-                        int num = life - (currentYear - acquisitionYear) + 1;
180
-                        cmcCarApproval.setEstimateCost(new BigDecimal(num  * 0.95 / total).multiply(cmcCar.getCost()));
181
-                    }
182
-                }
171
+                estimateCost = estimateCost.add(cmcCar.getDayCost().multiply(new BigDecimal(cmcCarApproval.getDays())));
183
             }
172
             }
173
+            cmcCarApproval.setEstimateCost(estimateCost);
184
         }
174
         }
185
         cmcCarApprovalService.updateCmcCarApproval(cmcCarApproval);
175
         cmcCarApprovalService.updateCmcCarApproval(cmcCarApproval);
186
         return AjaxResult.success("修改用车审批表成功");
176
         return AjaxResult.success("修改用车审批表成功");

+ 18
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarController.java Zobrazit soubor

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.math.BigDecimal;
4
+import java.text.SimpleDateFormat;
3
 import java.util.List;
5
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
6
 import javax.servlet.http.HttpServletResponse;
5
 
7
 
8
+import com.ruoyi.common.utils.DateUtils;
6
 import org.springframework.beans.factory.annotation.Autowired;
9
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.web.bind.annotation.GetMapping;
10
 import org.springframework.web.bind.annotation.GetMapping;
8
 import org.springframework.web.bind.annotation.PostMapping;
11
 import org.springframework.web.bind.annotation.PostMapping;
72
     @PostMapping
75
     @PostMapping
73
     public AjaxResult add(@RequestBody CmcCar cmcCar)
76
     public AjaxResult add(@RequestBody CmcCar cmcCar)
74
     {
77
     {
78
+        if (cmcCar.getIsRent())
79
+        if (cmcCar.getAcquisitionTime() != null && cmcCar.getCost() != null && cmcCar.getDayCost() != null) {
80
+            // 年数总和法折旧
81
+            int acquisitionYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(cmcCar.getAcquisitionTime()));
82
+            int life = cmcCar.getExpectLife() == null ? 0 : cmcCar.getExpectLife();
83
+            int total = 0;
84
+            for (int i = 0; i < life + 1; i++)
85
+                total += i;
86
+            if (total > 0) {
87
+                int currentYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(DateUtils.getNowDate()));
88
+                int num = life - (currentYear - acquisitionYear) + 1;
89
+                BigDecimal estimateCost = new BigDecimal(num  * 0.95 * 10000 / total / 365).multiply(cmcCar.getCost());
90
+                cmcCar.setDayCost(estimateCost);
91
+            }
92
+        }
75
         return toAjax(cmcCarService.insertCmcCar(cmcCar));
93
         return toAjax(cmcCarService.insertCmcCar(cmcCar));
76
     }
94
     }
77
 
95
 

+ 70
- 8
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java Zobrazit soubor

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.math.BigDecimal;
4
+import java.text.SimpleDateFormat;
3
 import java.util.List;
5
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
6
 import javax.servlet.http.HttpServletResponse;
7
+
8
+import com.alibaba.fastjson2.JSONObject;
9
+import com.ruoyi.common.utils.DateUtils;
10
+import com.ruoyi.oa.domain.CmcCar;
11
+import com.ruoyi.oa.domain.CmcDevice;
12
+import com.ruoyi.oa.domain.CmcDeviceApproval;
13
+import com.ruoyi.oa.service.ICmcDeviceService;
5
 import org.springframework.security.access.prepost.PreAuthorize;
14
 import org.springframework.security.access.prepost.PreAuthorize;
6
 import org.springframework.beans.factory.annotation.Autowired;
15
 import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.web.bind.annotation.GetMapping;
8
-import org.springframework.web.bind.annotation.PostMapping;
9
-import org.springframework.web.bind.annotation.PutMapping;
10
-import org.springframework.web.bind.annotation.DeleteMapping;
11
-import org.springframework.web.bind.annotation.PathVariable;
12
-import org.springframework.web.bind.annotation.RequestBody;
13
-import org.springframework.web.bind.annotation.RequestMapping;
14
-import org.springframework.web.bind.annotation.RestController;
16
+import org.springframework.web.bind.annotation.*;
15
 import com.ruoyi.common.annotation.Log;
17
 import com.ruoyi.common.annotation.Log;
16
 import com.ruoyi.common.core.controller.BaseController;
18
 import com.ruoyi.common.core.controller.BaseController;
17
 import com.ruoyi.common.core.domain.AjaxResult;
19
 import com.ruoyi.common.core.domain.AjaxResult;
34
     @Autowired
36
     @Autowired
35
     private ICmcDeviceApprovalService cmcDeviceApprovalService;
37
     private ICmcDeviceApprovalService cmcDeviceApprovalService;
36
 
38
 
39
+    @Autowired
40
+    private ICmcDeviceService cmcDeviceService;
41
+
37
     /**
42
     /**
38
      * 查询cmc设备审批列表
43
      * 查询cmc设备审批列表
39
      */
44
      */
76
         return toAjax(cmcDeviceApprovalService.insertCmcDeviceApproval(cmcDeviceApproval));
81
         return toAjax(cmcDeviceApprovalService.insertCmcDeviceApproval(cmcDeviceApproval));
77
     }
82
     }
78
 
83
 
84
+    /**
85
+     * 新增cmc设备审批
86
+     */
87
+    @Log(title = "cmc设备审批", businessType = BusinessType.INSERT)
88
+    @PostMapping("/submit")
89
+    public AjaxResult submit(@RequestParam("form")String formData)
90
+    {
91
+        JSONObject formDataJson = JSONObject.parse(formData);
92
+        CmcDeviceApproval cmcDeviceApproval = new CmcDeviceApproval();
93
+        cmcDeviceApproval.setDeviceId(formDataJson.getString("formId"));
94
+        cmcDeviceApproval.setApplier(getLoginUser().getUserId());
95
+        cmcDeviceApproval.setApplyDate(DateUtils.getNowDate());
96
+        cmcDeviceApproval.setProjectNumber(formDataJson.getString("projectNumber"));
97
+        cmcDeviceApproval.setApplyReason(formDataJson.getString("applyReason"));
98
+        cmcDeviceApproval.setBeginDate(formDataJson.getDate("startTime"));
99
+        cmcDeviceApproval.setEndDate(formDataJson.getDate("endTime"));
100
+        cmcDeviceApproval.setDays(formDataJson.getLong("day"));
101
+        cmcDeviceApprovalService.insertCmcDeviceApproval(cmcDeviceApproval);
102
+        return AjaxResult.success("提交设备审批表成功");
103
+    }
104
+
79
     /**
105
     /**
80
      * 修改cmc设备审批
106
      * 修改cmc设备审批
81
      */
107
      */
86
         return toAjax(cmcDeviceApprovalService.updateCmcDeviceApproval(cmcDeviceApproval));
112
         return toAjax(cmcDeviceApprovalService.updateCmcDeviceApproval(cmcDeviceApproval));
87
     }
113
     }
88
 
114
 
115
+    /**
116
+     * 修改cmc设备审批
117
+     */
118
+    @Log(title = "cmc设备审批", businessType = BusinessType.UPDATE)
119
+    @PutMapping("/modify")
120
+    public AjaxResult modify(@RequestParam("form")String formData)
121
+    {
122
+        JSONObject formDataJson = JSONObject.parse(formData);
123
+        CmcDeviceApproval cmcDeviceApproval = cmcDeviceApprovalService.selectCmcDeviceApprovalByDeviceApplyId(formDataJson.getString("deviceApplyId"));
124
+        if (formDataJson.getString("deptComment") != null) {
125
+            cmcDeviceApproval.setDeptUserId(getLoginUser().getUserId());
126
+            cmcDeviceApproval.setDeptComment(formDataJson.getString("deptComment"));
127
+        }
128
+        if (formDataJson.getString("managerComment") != null) {
129
+            cmcDeviceApproval.setManagerUserId(getLoginUser().getUserId());
130
+            cmcDeviceApproval.setManagerComment(formDataJson.getString("managerComment"));
131
+        }
132
+
133
+        if (formDataJson.getDate("returnDate") != null) {
134
+            cmcDeviceApproval.setReturnDate(formDataJson.getDate("returnDate"));
135
+        }
136
+        if (formDataJson.getString("dispatchComment") != null) {
137
+            cmcDeviceApproval.setDispatcher(getLoginUser().getUserId());
138
+            cmcDeviceApproval.setDispatchComment(formDataJson.getString("dispatchComment"));
139
+            String[] devices = formDataJson.getString("devices").split(",");
140
+            BigDecimal estimateCost = new BigDecimal(0);
141
+            for (String device : devices) {
142
+                CmcDevice cmcDevice = cmcDeviceService.selectCmcDeviceByDeviceId(Integer.parseInt(device));
143
+                estimateCost = estimateCost.add(cmcDevice.getDayCost().multiply(new BigDecimal(cmcDeviceApproval.getDays())));
144
+            }
145
+            cmcDeviceApproval.setEstimateCost(estimateCost);
146
+        }
147
+        cmcDeviceApprovalService.updateCmcDeviceApproval(cmcDeviceApproval);
148
+        return AjaxResult.success("修改设备审批表成功");
149
+    }
150
+
89
     /**
151
     /**
90
      * 删除cmc设备审批
152
      * 删除cmc设备审批
91
      */
153
      */

+ 19
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java Zobrazit soubor

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.math.BigDecimal;
4
+import java.text.SimpleDateFormat;
3
 import java.util.List;
5
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
6
 import javax.servlet.http.HttpServletResponse;
7
+
8
+import com.ruoyi.common.utils.DateUtils;
5
 import org.springframework.security.access.prepost.PreAuthorize;
9
 import org.springframework.security.access.prepost.PreAuthorize;
6
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.web.bind.annotation.GetMapping;
11
 import org.springframework.web.bind.annotation.GetMapping;
61
      * 获取cmc设备信息详细信息
65
      * 获取cmc设备信息详细信息
62
      */
66
      */
63
     @GetMapping(value = "/{deviceId}")
67
     @GetMapping(value = "/{deviceId}")
64
-    public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
68
+    public AjaxResult getInfo(@PathVariable("deviceId") Integer deviceId)
65
     {
69
     {
66
         return success(cmcDeviceService.selectCmcDeviceByDeviceId(deviceId));
70
         return success(cmcDeviceService.selectCmcDeviceByDeviceId(deviceId));
67
     }
71
     }
73
     @PostMapping
77
     @PostMapping
74
     public AjaxResult add(@RequestBody CmcDevice cmcDevice)
78
     public AjaxResult add(@RequestBody CmcDevice cmcDevice)
75
     {
79
     {
80
+        if (cmcDevice.getAcquisitionTime() != null && cmcDevice.getCost() != null && cmcDevice.getDayCost() != null) {
81
+            // 年数总和法折旧
82
+            int acquisitionYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(cmcDevice.getAcquisitionTime()));
83
+            int life = cmcDevice.getExpectLife() == null ? 0 : cmcDevice.getExpectLife();
84
+            int total = 0;
85
+            for (int i = 0; i < life + 1; i++)
86
+                total += i;
87
+            if (total > 0) {
88
+                int currentYear = Integer.parseInt(new SimpleDateFormat("yyyy").format(DateUtils.getNowDate()));
89
+                int num = life - (currentYear - acquisitionYear) + 1;
90
+                BigDecimal estimateCost = new BigDecimal(num  * 0.95 * 10000 / total / 365).multiply(cmcDevice.getCost());
91
+                cmcDevice.setDayCost(estimateCost);
92
+            }
93
+        }
76
         return toAjax(cmcDeviceService.insertCmcDevice(cmcDevice));
94
         return toAjax(cmcDeviceService.insertCmcDevice(cmcDevice));
77
     }
95
     }
78
 
96
 

+ 11
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java Zobrazit soubor

56
     public TableDataInfo driverList()
56
     public TableDataInfo driverList()
57
     {
57
     {
58
         startPage();
58
         startPage();
59
-        List<SysUser> list = postService.driverList();
59
+        List<SysUser> list = postService.selectDriverList();
60
         return getDataTable(list);
60
         return getDataTable(list);
61
     }
61
     }
62
 
62
 
63
+    /**
64
+     * 获取部门主任
65
+     */
66
+    @GetMapping("/deptLeader")
67
+    public AjaxResult getDeptLeader(String userId)
68
+    {
69
+        SysUser deptLeader = postService.selectDeptLeaderByUserId(userId);
70
+        return success(deptLeader);
71
+    }
72
+
63
     @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
73
     @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
64
     @PreAuthorize("@ss.hasPermi('system:post:export')")
74
     @PreAuthorize("@ss.hasPermi('system:post:export')")
65
     @PostMapping("/export")
75
     @PostMapping("/export")

+ 28
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCar.java Zobrazit soubor

50
     @Excel(name = "车级")
50
     @Excel(name = "车级")
51
     private String level;
51
     private String level;
52
 
52
 
53
+    /** 是否为租车 */
54
+    @Excel(name = "是否为租车")
55
+    private String isRent;
56
+
57
+    /** 单日成本 */
58
+    @Excel(name = "单日成本")
59
+    private BigDecimal dayCost;
60
+
53
     public void setCarId(Integer carId)
61
     public void setCarId(Integer carId)
54
     {
62
     {
55
         this.carId = carId;
63
         this.carId = carId;
122
     {
130
     {
123
         return level;
131
         return level;
124
     }
132
     }
133
+    public void setIsRent(String isRent)
134
+    {
135
+        this.isRent = isRent;
136
+    }
137
+
138
+    public String getIsRent()
139
+    {
140
+        return isRent;
141
+    }
142
+    public void setDayCost(BigDecimal dayCost)
143
+    {
144
+        this.dayCost = dayCost;
145
+    }
146
+
147
+    public BigDecimal getDayCost()
148
+    {
149
+        return dayCost;
150
+    }
125
 
151
 
126
     @Override
152
     @Override
127
     public String toString() {
153
     public String toString() {
134
                 .append("expectLife", getExpectLife())
160
                 .append("expectLife", getExpectLife())
135
                 .append("series", getSeries())
161
                 .append("series", getSeries())
136
                 .append("level", getLevel())
162
                 .append("level", getLevel())
163
+                .append("isRent", getIsRent())
164
+                .append("dayCost", getDayCost())
137
                 .toString();
165
                 .toString();
138
     }
166
     }
139
 }
167
 }

+ 17
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDevice.java Zobrazit soubor

19
     private static final long serialVersionUID = 1L;
19
     private static final long serialVersionUID = 1L;
20
 
20
 
21
     /** 设备id */
21
     /** 设备id */
22
-    private Long deviceId;
22
+    private Integer deviceId;
23
 
23
 
24
     /** 设备编号 */
24
     /** 设备编号 */
25
     @Excel(name = "设备编号")
25
     @Excel(name = "设备编号")
46
     @Excel(name = "设备系列")
46
     @Excel(name = "设备系列")
47
     private String series;
47
     private String series;
48
 
48
 
49
-    public void setDeviceId(Long deviceId) 
49
+    /** 单日成本 */
50
+    @Excel(name = "单日成本")
51
+    private BigDecimal dayCost;
52
+
53
+    public void setDeviceId(Integer deviceId)
50
     {
54
     {
51
         this.deviceId = deviceId;
55
         this.deviceId = deviceId;
52
     }
56
     }
53
 
57
 
54
-    public Long getDeviceId() 
58
+    public Integer getDeviceId()
55
     {
59
     {
56
         return deviceId;
60
         return deviceId;
57
     }
61
     }
109
     {
113
     {
110
         return series;
114
         return series;
111
     }
115
     }
116
+    public void setDayCost(BigDecimal dayCost)
117
+    {
118
+        this.dayCost = dayCost;
119
+    }
120
+
121
+    public BigDecimal getDayCost()
122
+    {
123
+        return dayCost;
124
+    }
112
 
125
 
113
     @Override
126
     @Override
114
     public String toString() {
127
     public String toString() {
120
             .append("cost", getCost())
133
             .append("cost", getCost())
121
             .append("expectLife", getExpectLife())
134
             .append("expectLife", getExpectLife())
122
             .append("series", getSeries())
135
             .append("series", getSeries())
136
+            .append("dayCost", getDayCost())
123
             .toString();
137
             .toString();
124
     }
138
     }
125
 }
139
 }

+ 16
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceApproval.java Zobrazit soubor

92
     @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
92
     @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd")
93
     private Date applyDate;
93
     private Date applyDate;
94
 
94
 
95
+    /** 归还日期 */
96
+    @JsonFormat(pattern = "yyyy-MM-dd")
97
+    @Excel(name = "归还日期", width = 30, dateFormat = "yyyy-MM-dd")
98
+    private Date returnDate;
99
+
95
     public void setDeviceApplyId(String deviceApplyId) 
100
     public void setDeviceApplyId(String deviceApplyId) 
96
     {
101
     {
97
         this.deviceApplyId = deviceApplyId;
102
         this.deviceApplyId = deviceApplyId;
254
     {
259
     {
255
         return applyDate;
260
         return applyDate;
256
     }
261
     }
262
+    public void setReturnDate(Date returnDate)
263
+    {
264
+        this.returnDate = returnDate;
265
+    }
266
+
267
+    public Date getReturnDate()
268
+    {
269
+        return returnDate;
270
+    }
271
+
257
     @Override
272
     @Override
258
     public String toString() {
273
     public String toString() {
259
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
274
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
275
             .append("dispatchComment", getDispatchComment())
290
             .append("dispatchComment", getDispatchComment())
276
             .append("estimateCost", getEstimateCost())
291
             .append("estimateCost", getEstimateCost())
277
             .append("applyDate", getApplyDate())
292
             .append("applyDate", getApplyDate())
293
+            .append("returnDate", getReturnDate())
278
             .toString();
294
             .toString();
279
     }
295
     }
280
 }
296
 }

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceMapper.java Zobrazit soubor

17
      * @param deviceId cmc设备信息主键
17
      * @param deviceId cmc设备信息主键
18
      * @return cmc设备信息
18
      * @return cmc设备信息
19
      */
19
      */
20
-    public CmcDevice selectCmcDeviceByDeviceId(Long deviceId);
20
+    public CmcDevice selectCmcDeviceByDeviceId(Integer deviceId);
21
 
21
 
22
     /**
22
     /**
23
      * 查询cmc设备信息列表
23
      * 查询cmc设备信息列表

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceService.java Zobrazit soubor

17
      * @param deviceId cmc设备信息主键
17
      * @param deviceId cmc设备信息主键
18
      * @return cmc设备信息
18
      * @return cmc设备信息
19
      */
19
      */
20
-    public CmcDevice selectCmcDeviceByDeviceId(Long deviceId);
20
+    public CmcDevice selectCmcDeviceByDeviceId(Integer deviceId);
21
 
21
 
22
     /**
22
     /**
23
      * 查询cmc设备信息列表
23
      * 查询cmc设备信息列表

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceServiceImpl.java Zobrazit soubor

26
      * @return cmc设备信息
26
      * @return cmc设备信息
27
      */
27
      */
28
     @Override
28
     @Override
29
-    public CmcDevice selectCmcDeviceByDeviceId(Long deviceId)
29
+    public CmcDevice selectCmcDeviceByDeviceId(Integer deviceId)
30
     {
30
     {
31
         return cmcDeviceMapper.selectCmcDeviceByDeviceId(deviceId);
31
         return cmcDeviceMapper.selectCmcDeviceByDeviceId(deviceId);
32
     }
32
     }

+ 9
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java Zobrazit soubor

50
      * @param
50
      * @param
51
      * @return 驾驶员列表
51
      * @return 驾驶员列表
52
      */
52
      */
53
-    List<SysUser> selectDriverList();
53
+    public List<SysUser> selectDriverList();
54
+
55
+    /**
56
+     * 查询部门主任
57
+     *
58
+     * @param
59
+     * @return 查询部门主任
60
+     */
61
+    public SysUser selectDeptLeaderByUserId(String userId);
54
 }
62
 }

+ 11
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java Zobrazit soubor

35
      */
35
      */
36
     public SysPost selectPostById(Long postId);
36
     public SysPost selectPostById(Long postId);
37
 
37
 
38
+
38
     /**
39
     /**
39
      * 根据用户ID获取岗位选择框列表
40
      * 根据用户ID获取岗位选择框列表
40
      * 
41
      * 
105
      * @param
106
      * @param
106
      * @return 驾驶员列表
107
      * @return 驾驶员列表
107
      */
108
      */
108
-    List<SysUser> driverList();
109
+    public List<SysUser> selectDriverList();
110
+
111
+    /**
112
+     * 查询部门主任
113
+     *
114
+     * @param
115
+     * @return 查询部门主任
116
+     */
117
+    public SysUser selectDeptLeaderByUserId(String userId);
118
+
109
 }
119
 }

+ 6
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java Zobrazit soubor

185
      * @return 驾驶员列表
185
      * @return 驾驶员列表
186
      */
186
      */
187
     @Override
187
     @Override
188
-    public List<SysUser> driverList() {
188
+    public List<SysUser> selectDriverList() {
189
         return userPostMapper.selectDriverList();
189
         return userPostMapper.selectDriverList();
190
     }
190
     }
191
+
192
+    @Override
193
+    public SysUser selectDeptLeaderByUserId(String userId) {
194
+        return userPostMapper.selectDeptLeaderByUserId(userId);
195
+    }
191
 }
196
 }

+ 11
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarMapper.xml Zobrazit soubor

13
         <result property="expectLife"    column="expect_life"    />
13
         <result property="expectLife"    column="expect_life"    />
14
         <result property="series"    column="series"    />
14
         <result property="series"    column="series"    />
15
         <result property="level"    column="level"    />
15
         <result property="level"    column="level"    />
16
+        <result property="isRent"    column="is_rent"    />
17
+        <result property="dayCost"    column="day_cost"    />
16
     </resultMap>
18
     </resultMap>
17
 
19
 
18
     <sql id="selectCmcCarVo">
20
     <sql id="selectCmcCarVo">
19
-        select car_id, license_plate, driver, acquisition_time, cost, expect_life, series, level from cmc_car
21
+        select car_id, license_plate, driver, acquisition_time, cost, expect_life, series, level, is_rent, day_cost from cmc_car
20
     </sql>
22
     </sql>
21
 
23
 
22
     <select id="selectCmcCarList" parameterType="CmcCar" resultMap="CmcCarResult">
24
     <select id="selectCmcCarList" parameterType="CmcCar" resultMap="CmcCarResult">
29
             <if test="expectLife != null "> and expect_life = #{expectLife}</if>
31
             <if test="expectLife != null "> and expect_life = #{expectLife}</if>
30
             <if test="series != null  and series != ''"> and series like concat('%', #{series}, '%')</if>
32
             <if test="series != null  and series != ''"> and series like concat('%', #{series}, '%')</if>
31
             <if test="level != null  and level != ''"> and level like concat('%', #{level}, '%')</if>
33
             <if test="level != null  and level != ''"> and level like concat('%', #{level}, '%')</if>
34
+            <if test="isRent != null  and isRent != ''"> and isRent = #{isRent}</if>
35
+            <if test="dayCost != null  and dayCost != ''"> and day_cost = #{dayCost}</if>
32
         </where>
36
         </where>
33
     </select>
37
     </select>
34
 
38
 
47
             <if test="expectLife != null">expect_life,</if>
51
             <if test="expectLife != null">expect_life,</if>
48
             <if test="series != null">series,</if>
52
             <if test="series != null">series,</if>
49
             <if test="level != null">level,</if>
53
             <if test="level != null">level,</if>
54
+            <if test="isRent != null">is_rent,</if>
55
+            <if test="dayCost != null">day_cost,</if>
50
         </trim>
56
         </trim>
51
         <trim prefix="values (" suffix=")" suffixOverrides=",">
57
         <trim prefix="values (" suffix=")" suffixOverrides=",">
52
             <if test="licensePlate != null">#{licensePlate},</if>
58
             <if test="licensePlate != null">#{licensePlate},</if>
56
             <if test="expectLife != null">#{expectLife},</if>
62
             <if test="expectLife != null">#{expectLife},</if>
57
             <if test="series != null">#{series},</if>
63
             <if test="series != null">#{series},</if>
58
             <if test="level != null">#{level},</if>
64
             <if test="level != null">#{level},</if>
65
+            <if test="isRent != null">#{isRent},</if>
66
+            <if test="dayCost != null">#{dayCost},</if>
59
         </trim>
67
         </trim>
60
     </insert>
68
     </insert>
61
 
69
 
69
             <if test="expectLife != null">expect_life = #{expectLife},</if>
77
             <if test="expectLife != null">expect_life = #{expectLife},</if>
70
             <if test="series != null">series = #{series},</if>
78
             <if test="series != null">series = #{series},</if>
71
             <if test="level != null">level = #{level},</if>
79
             <if test="level != null">level = #{level},</if>
80
+            <if test="isRent != null">is_rent = #{isRent},</if>
81
+            <if test="dayCost != null">day_cost = #{dayCost},</if>
72
         </trim>
82
         </trim>
73
         where car_id = #{carId}
83
         where car_id = #{carId}
74
     </update>
84
     </update>

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml Zobrazit soubor

11
         <result property="projectNumber"    column="project_number"    />
11
         <result property="projectNumber"    column="project_number"    />
12
         <result property="applyReason"    column="apply_reason"    />
12
         <result property="applyReason"    column="apply_reason"    />
13
         <result property="applyDate"    column="apply_date"    />
13
         <result property="applyDate"    column="apply_date"    />
14
+        <result property="returnDate"    column="return_date"    />
14
         <result property="beginDate"    column="begin_date"    />
15
         <result property="beginDate"    column="begin_date"    />
15
         <result property="beginHalfday"    column="begin_halfday"    />
16
         <result property="beginHalfday"    column="begin_halfday"    />
16
         <result property="endDate"    column="end_date"    />
17
         <result property="endDate"    column="end_date"    />
26
     </resultMap>
27
     </resultMap>
27
 
28
 
28
     <sql id="selectCmcDeviceApprovalVo">
29
     <sql id="selectCmcDeviceApprovalVo">
29
-        select device_apply_id, applier, device_id, project_number, apply_reason, apply_date, begin_date, begin_halfday, end_date, end_halfday, days, dept_user_id, dept_comment, manager_user_id, manager_comment, dispatcher, dispatch_comment, estimate_cost from cmc_device_approval
30
+        select device_apply_id, applier, device_id, project_number, apply_reason, apply_date, return_date, begin_date, begin_halfday, end_date, end_halfday, days, dept_user_id, dept_comment, manager_user_id, manager_comment, dispatcher, dispatch_comment, estimate_cost from cmc_device_approval
30
     </sql>
31
     </sql>
31
 
32
 
32
     <select id="selectCmcDeviceApprovalList" parameterType="CmcDeviceApproval" resultMap="CmcDeviceApprovalResult">
33
     <select id="selectCmcDeviceApprovalList" parameterType="CmcDeviceApproval" resultMap="CmcDeviceApprovalResult">
37
             <if test="projectNumber != null  and projectNumber != ''"> and project_number = #{projectNumber}</if>
38
             <if test="projectNumber != null  and projectNumber != ''"> and project_number = #{projectNumber}</if>
38
             <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
39
             <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
39
             <if test="applyDate != null "> and apply_date = #{applyDate}</if>
40
             <if test="applyDate != null "> and apply_date = #{applyDate}</if>
41
+            <if test="returnDate != null "> and return_date = #{returnDate}</if>
40
             <if test="beginDate != null "> and begin_date = #{beginDate}</if>
42
             <if test="beginDate != null "> and begin_date = #{beginDate}</if>
41
             <if test="beginHalfday != null  and beginHalfday != ''"> and begin_halfday = #{beginHalfday}</if>
43
             <if test="beginHalfday != null  and beginHalfday != ''"> and begin_halfday = #{beginHalfday}</if>
42
             <if test="endDate != null "> and end_date = #{endDate}</if>
44
             <if test="endDate != null "> and end_date = #{endDate}</if>
66
             <if test="projectNumber != null">project_number,</if>
68
             <if test="projectNumber != null">project_number,</if>
67
             <if test="applyReason != null">apply_reason,</if>
69
             <if test="applyReason != null">apply_reason,</if>
68
             <if test="applyDate != null">apply_date,</if>
70
             <if test="applyDate != null">apply_date,</if>
71
+            <if test="returnDate != null">return_date,</if>
69
             <if test="beginDate != null">begin_date,</if>
72
             <if test="beginDate != null">begin_date,</if>
70
             <if test="beginHalfday != null">begin_halfday,</if>
73
             <if test="beginHalfday != null">begin_halfday,</if>
71
             <if test="endDate != null">end_date,</if>
74
             <if test="endDate != null">end_date,</if>
86
             <if test="projectNumber != null">#{projectNumber},</if>
89
             <if test="projectNumber != null">#{projectNumber},</if>
87
             <if test="applyReason != null">#{applyReason},</if>
90
             <if test="applyReason != null">#{applyReason},</if>
88
             <if test="applyDate != null">#{applyDate},</if>
91
             <if test="applyDate != null">#{applyDate},</if>
92
+            <if test="returnDate != null">#{returnDate},</if>
89
             <if test="beginDate != null">#{beginDate},</if>
93
             <if test="beginDate != null">#{beginDate},</if>
90
             <if test="beginHalfday != null">#{beginHalfday},</if>
94
             <if test="beginHalfday != null">#{beginHalfday},</if>
91
             <if test="endDate != null">#{endDate},</if>
95
             <if test="endDate != null">#{endDate},</if>
109
             <if test="projectNumber != null">project_number = #{projectNumber},</if>
113
             <if test="projectNumber != null">project_number = #{projectNumber},</if>
110
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
114
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
111
             <if test="applyDate != null">apply_date = #{applyDate},</if>
115
             <if test="applyDate != null">apply_date = #{applyDate},</if>
116
+            <if test="returnDate != null">return_date = #{returnDate},</if>
112
             <if test="beginDate != null">begin_date = #{beginDate},</if>
117
             <if test="beginDate != null">begin_date = #{beginDate},</if>
113
             <if test="beginHalfday != null">begin_halfday = #{beginHalfday},</if>
118
             <if test="beginHalfday != null">begin_halfday = #{beginHalfday},</if>
114
             <if test="endDate != null">end_date = #{endDate},</if>
119
             <if test="endDate != null">end_date = #{endDate},</if>

+ 7
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceMapper.xml Zobrazit soubor

12
         <result property="cost"    column="cost"    />
12
         <result property="cost"    column="cost"    />
13
         <result property="expectLife"    column="expect_life"    />
13
         <result property="expectLife"    column="expect_life"    />
14
         <result property="series"    column="series"    />
14
         <result property="series"    column="series"    />
15
+        <result property="dayCost"    column="dayCost"    />
15
     </resultMap>
16
     </resultMap>
16
 
17
 
17
     <sql id="selectCmcDeviceVo">
18
     <sql id="selectCmcDeviceVo">
18
-        select device_id, code, type, acquisition_time, cost, expect_life, series from cmc_device
19
+        select device_id, code, type, acquisition_time, cost, expect_life, series, day_cost from cmc_device
19
     </sql>
20
     </sql>
20
 
21
 
21
     <select id="selectCmcDeviceList" parameterType="CmcDevice" resultMap="CmcDeviceResult">
22
     <select id="selectCmcDeviceList" parameterType="CmcDevice" resultMap="CmcDeviceResult">
25
             <if test="type != null  and type != ''"> and type like concat('%', #{type}, '%')</if>
26
             <if test="type != null  and type != ''"> and type like concat('%', #{type}, '%')</if>
26
             <if test="acquisitionTime != null "> and acquisition_time = #{acquisitionTime}</if>
27
             <if test="acquisitionTime != null "> and acquisition_time = #{acquisitionTime}</if>
27
             <if test="cost != null "> and cost = #{cost}</if>
28
             <if test="cost != null "> and cost = #{cost}</if>
29
+            <if test="dayCost != null "> and day_cost = #{dayCost}</if>
28
             <if test="expectLife != null "> and expect_life = #{expectLife}</if>
30
             <if test="expectLife != null "> and expect_life = #{expectLife}</if>
29
             <if test="series != null  and series != ''"> and series like concat('%', #{series}, '%')</if>
31
             <if test="series != null  and series != ''"> and series like concat('%', #{series}, '%')</if>
30
         </where>
32
         </where>
31
     </select>
33
     </select>
32
 
34
 
33
-    <select id="selectCmcDeviceByDeviceId" parameterType="Long" resultMap="CmcDeviceResult">
35
+    <select id="selectCmcDeviceByDeviceId" parameterType="Integer" resultMap="CmcDeviceResult">
34
         <include refid="selectCmcDeviceVo"/>
36
         <include refid="selectCmcDeviceVo"/>
35
         where device_id = #{deviceId}
37
         where device_id = #{deviceId}
36
     </select>
38
     </select>
42
             <if test="type != null">type,</if>
44
             <if test="type != null">type,</if>
43
             <if test="acquisitionTime != null">acquisition_time,</if>
45
             <if test="acquisitionTime != null">acquisition_time,</if>
44
             <if test="cost != null">cost,</if>
46
             <if test="cost != null">cost,</if>
47
+            <if test="dayCost != null">day_cost,</if>
45
             <if test="expectLife != null">expect_life,</if>
48
             <if test="expectLife != null">expect_life,</if>
46
             <if test="series != null">series,</if>
49
             <if test="series != null">series,</if>
47
         </trim>
50
         </trim>
50
             <if test="type != null">#{type},</if>
53
             <if test="type != null">#{type},</if>
51
             <if test="acquisitionTime != null">#{acquisitionTime},</if>
54
             <if test="acquisitionTime != null">#{acquisitionTime},</if>
52
             <if test="cost != null">#{cost},</if>
55
             <if test="cost != null">#{cost},</if>
56
+            <if test="dayCost != null">#{dayCost},</if>
53
             <if test="expectLife != null">#{expectLife},</if>
57
             <if test="expectLife != null">#{expectLife},</if>
54
             <if test="series != null">#{series},</if>
58
             <if test="series != null">#{series},</if>
55
         </trim>
59
         </trim>
62
             <if test="type != null">type = #{type},</if>
66
             <if test="type != null">type = #{type},</if>
63
             <if test="acquisitionTime != null">acquisition_time = #{acquisitionTime},</if>
67
             <if test="acquisitionTime != null">acquisition_time = #{acquisitionTime},</if>
64
             <if test="cost != null">cost = #{cost},</if>
68
             <if test="cost != null">cost = #{cost},</if>
69
+            <if test="dayCost != null">day_cost = #{dayCost},</if>
65
             <if test="expectLife != null">expect_life = #{expectLife},</if>
70
             <if test="expectLife != null">expect_life = #{expectLife},</if>
66
             <if test="series != null">series = #{series},</if>
71
             <if test="series != null">series = #{series},</if>
67
         </trim>
72
         </trim>

+ 11
- 3
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml Zobrazit soubor

14
 		<result property="nickName"     column="nick_name"    />
14
 		<result property="nickName"     column="nick_name"    />
15
 	</resultMap>
15
 	</resultMap>
16
 
16
 
17
-	<select id="selectDriverList" parameterType="SysUser" resultMap="SysUserResult">
18
-		select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.pm_level, u.titles, u.update_reason, u.engineer_level, u.entry_date, u.age,
19
-			   up.post_id
17
+	<select id="selectDriverList" resultMap="SysUserResult">
18
+		select u.user_id, u.nick_name
20
 		from sys_user u
19
 		from sys_user u
21
 				 left join sys_user_post up on u.user_id = up.user_id
20
 				 left join sys_user_post up on u.user_id = up.user_id
22
 		where up.post_id = 27
21
 		where up.post_id = 27
23
 	</select>
22
 	</select>
24
 
23
 
24
+	<select id="selectDeptLeaderByUserId" parameterType="String" resultMap="SysUserResult">
25
+		select r.user_id, r.nick_name, up.post_id from
26
+		(select u1.user_id, u1.nick_name, u.dept_id from
27
+		sys_user as u, sys_user as u1 where u.user_id = #{param} and u1.dept_id = u.dept_id) as r
28
+		left join sys_user_post as up
29
+		on r.user_id = up.user_id
30
+		where up.post_id = 12
31
+	</select>
32
+
25
 	<delete id="deleteUserPostByUserId" parameterType="Long">
33
 	<delete id="deleteUserPostByUserId" parameterType="Long">
26
 		delete from sys_user_post where user_id=#{userId}
34
 		delete from sys_user_post where user_id=#{userId}
27
 	</delete>
35
 	</delete>

+ 3
- 0
oa-back/sql/sql.sql Zobrazit soubor

1407
   `expect_life`			int					default null				comment '预计使用年限',
1407
   `expect_life`			int					default null				comment '预计使用年限',
1408
   `series`				varchar(10)			default null				comment '车系',
1408
   `series`				varchar(10)			default null				comment '车系',
1409
   `level`				varchar(10)			default null				comment '车级',
1409
   `level`				varchar(10)			default null				comment '车级',
1410
+  `is_rent`				char(1)				default null				comment '是否为租车',
1411
+  `day_cost`			decimal(10,2)		default null				comment '单日成本',
1410
   primary key (`car_id`)
1412
   primary key (`car_id`)
1411
 ) engine = innodb comment = 'cmc车辆信息表';
1413
 ) engine = innodb comment = 'cmc车辆信息表';
1412
 
1414
 
1490
   `dispatch_comment`	varchar(255)	default null 	comment '调度审批意见',
1492
   `dispatch_comment`	varchar(255)	default null 	comment '调度审批意见',
1491
   `estimate_cost`		decimal(10,2)	default null	comment '预计设备成本',
1493
   `estimate_cost`		decimal(10,2)	default null	comment '预计设备成本',
1492
   `apply_date`			date			default null 	comment '申请日期',
1494
   `apply_date`			date			default null 	comment '申请日期',
1495
+  `return_date`			date			default null 	comment '归还日期',
1493
   primary key (`device_apply_id`)
1496
   primary key (`device_apply_id`)
1494
 ) engine = innodb comment = 'cmc设备审批表';
1497
 ) engine = innodb comment = 'cmc设备审批表';
1495
 
1498
 

+ 17
- 6
oa-ui/src/views/oa/car/index.vue Zobrazit soubor

40
       <!-- <el-table-column label="驾驶员" align="center" prop="driver" /> -->
40
       <!-- <el-table-column label="驾驶员" align="center" prop="driver" /> -->
41
       <el-table-column label="车系" align="center" prop="series" />
41
       <el-table-column label="车系" align="center" prop="series" />
42
       <el-table-column label="车级" align="center" prop="level" />
42
       <el-table-column label="车级" align="center" prop="level" />
43
-      <el-table-column label="购卖时间" align="center" prop="acquisitionTime" />
43
+      <el-table-column label="购置时间" align="center" prop="acquisitionTime" />
44
+      <el-table-column label="是否为租车" align="center" prop="isRent" >{{ idRent == "0" ? "否" : "是" }}</el-table-column>
44
       <el-table-column label="总价" align="center" prop="cost">
45
       <el-table-column label="总价" align="center" prop="cost">
45
         <template slot-scope="scope">
46
         <template slot-scope="scope">
46
           {{ scope.row.cost + '万元' }}
47
           {{ scope.row.cost + '万元' }}
47
         </template>
48
         </template>
48
       </el-table-column>
49
       </el-table-column>
49
       <el-table-column label="预计使用年限" align="center" prop="expectLife" />
50
       <el-table-column label="预计使用年限" align="center" prop="expectLife" />
50
-      <!-- <el-table-column label="使用成本(天)" align="center" prop="driver" /> -->
51
+      <el-table-column label="使用成本(天)" align="center" prop="dayCost" />
51
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
52
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
52
 
53
 
53
         <template slot-scope="scope">
54
         <template slot-scope="scope">
54
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
55
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
55
             v-hasPermi="['oa:car:edit']">修改</el-button>
56
             v-hasPermi="['oa:car:edit']">修改</el-button>
56
-          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;" @click="handleDelete(scope.row)"
57
-            v-hasPermi="['oa:car:remove']">删除</el-button>
57
+          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;"
58
+            @click="handleDelete(scope.row)" v-hasPermi="['oa:car:remove']">删除</el-button>
58
         </template>
59
         </template>
59
       </el-table-column>
60
       </el-table-column>
60
     </el-table>
61
     </el-table>
74
         <el-form-item label="车级" prop="level">
75
         <el-form-item label="车级" prop="level">
75
           <el-input v-model="form.level" placeholder="请输入车级" />
76
           <el-input v-model="form.level" placeholder="请输入车级" />
76
         </el-form-item>
77
         </el-form-item>
77
-        <el-form-item label="购时间" prop="acquisitionTime">
78
+        <el-form-item label="购时间" prop="acquisitionTime">
78
           <el-date-picker v-model="form.acquisitionTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
79
           <el-date-picker v-model="form.acquisitionTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
79
             value-format="yyyy-MM-dd">
80
             value-format="yyyy-MM-dd">
80
           </el-date-picker>
81
           </el-date-picker>
84
           <span>万元</span>
85
           <span>万元</span>
85
         </el-form-item>
86
         </el-form-item>
86
         <el-form-item label="预计使用年限" prop="expectLife">
87
         <el-form-item label="预计使用年限" prop="expectLife">
87
-          <el-input v-model="form.expectLife" placeholder="请输入年限"  style="width:130px;margin-right:10px;" />
88
+          <el-input v-model="form.expectLife" placeholder="请输入年限" style="width:130px;margin-right:10px;" />
88
           <span>年</span>
89
           <span>年</span>
89
         </el-form-item>
90
         </el-form-item>
90
         <el-form-item label="驾驶员" prop="driver">
91
         <el-form-item label="驾驶员" prop="driver">
93
             </el-option>
94
             </el-option>
94
           </el-select>
95
           </el-select>
95
         </el-form-item>
96
         </el-form-item>
97
+        <el-form-item label="是否为租车" prop="isRent">
98
+          <el-radio-group v-model="form.isRent">
99
+            <el-radio label="0">否</el-radio>
100
+            <el-radio label="1">是</el-radio>
101
+          </el-radio-group>
102
+        </el-form-item>
103
+        <el-form-item v-if="form.isRent == '1'" label="使用成本(天)" prop="dayCost">
104
+          <el-input style="width:130px;margin-right:10px;" v-model="form.dayCost" placeholder="请输入金额" />
105
+          <span>元</span>
106
+        </el-form-item>
96
       </el-form>
107
       </el-form>
97
       <div slot="footer" class="dialog-footer">
108
       <div slot="footer" class="dialog-footer">
98
         <el-button type="primary" @click="submitForm">确 定</el-button>
109
         <el-button type="primary" @click="submitForm">确 定</el-button>

Loading…
Zrušit
Uložit