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

重置密码;耗材前后端

lamphua 10 месяцев назад
Родитель
Сommit
2b885a2a44
27 измененных файлов: 2710 добавлений и 7 удалений
  1. 97
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcMaterialBuyController.java
  2. 97
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcMaterialController.java
  3. 97
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcMaterialGiveController.java
  4. 5
    2
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
  5. 136
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcMaterial.java
  6. 140
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcMaterialBuy.java
  7. 111
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcMaterialGive.java
  8. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcMaterialBuyMapper.java
  9. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcMaterialGiveMapper.java
  10. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcMaterialMapper.java
  11. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcMaterialBuyService.java
  12. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcMaterialGiveService.java
  13. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcMaterialService.java
  14. 93
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcMaterialBuyServiceImpl.java
  15. 93
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcMaterialGiveServiceImpl.java
  16. 93
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcMaterialServiceImpl.java
  17. 90
    0
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcMaterialBuyMapper.xml
  18. 80
    0
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcMaterialGiveMapper.xml
  19. 90
    0
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcMaterialMapper.xml
  20. 44
    0
      oa-ui/src/api/oa/material/material.js
  21. 44
    0
      oa-ui/src/api/oa/material/materialBuy.js
  22. 44
    0
      oa-ui/src/api/oa/material/materialGive.js
  23. 2
    1
      oa-ui/src/api/system/user.js
  24. 343
    0
      oa-ui/src/views/oa/material/buy.vue
  25. 315
    0
      oa-ui/src/views/oa/material/give.vue
  26. 323
    0
      oa-ui/src/views/oa/material/index.vue
  27. 7
    4
      oa-ui/src/views/system/user/index.vue

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

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcMaterialBuy;
19
+import com.ruoyi.oa.service.ICmcMaterialBuyService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc耗材购买Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-07-31
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/materialBuy")
31
+public class CmcMaterialBuyController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcMaterialBuyService cmcMaterialBuyService;
35
+
36
+    /**
37
+     * 查询cmc耗材购买列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcMaterialBuy cmcMaterialBuy)
41
+    {
42
+        startPage();
43
+        List<CmcMaterialBuy> list = cmcMaterialBuyService.selectCmcMaterialBuyList(cmcMaterialBuy);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc耗材购买列表
49
+     */
50
+    @Log(title = "cmc耗材购买", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcMaterialBuy cmcMaterialBuy)
53
+    {
54
+        List<CmcMaterialBuy> list = cmcMaterialBuyService.selectCmcMaterialBuyList(cmcMaterialBuy);
55
+        ExcelUtil<CmcMaterialBuy> util = new ExcelUtil<CmcMaterialBuy>(CmcMaterialBuy.class);
56
+        util.exportExcel(response, list, "cmc耗材购买数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc耗材购买详细信息
61
+     */
62
+    @GetMapping(value = "/{buyId}")
63
+    public AjaxResult getInfo(@PathVariable("buyId") Integer buyId)
64
+    {
65
+        return success(cmcMaterialBuyService.selectCmcMaterialBuyByBuyId(buyId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc耗材购买
70
+     */
71
+    @Log(title = "cmc耗材购买", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcMaterialBuy cmcMaterialBuy)
74
+    {
75
+        return toAjax(cmcMaterialBuyService.insertCmcMaterialBuy(cmcMaterialBuy));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc耗材购买
80
+     */
81
+    @Log(title = "cmc耗材购买", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcMaterialBuy cmcMaterialBuy)
84
+    {
85
+        return toAjax(cmcMaterialBuyService.updateCmcMaterialBuy(cmcMaterialBuy));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc耗材购买
90
+     */
91
+    @Log(title = "cmc耗材购买", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{buyIds}")
93
+    public AjaxResult remove(@PathVariable Integer[] buyIds)
94
+    {
95
+        return toAjax(cmcMaterialBuyService.deleteCmcMaterialBuyByBuyIds(buyIds));
96
+    }
97
+}

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

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcMaterial;
19
+import com.ruoyi.oa.service.ICmcMaterialService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc耗材信息Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-07-31
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/material")
31
+public class CmcMaterialController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcMaterialService cmcMaterialService;
35
+
36
+    /**
37
+     * 查询cmc耗材信息列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcMaterial cmcMaterial)
41
+    {
42
+        startPage();
43
+        List<CmcMaterial> list = cmcMaterialService.selectCmcMaterialList(cmcMaterial);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc耗材信息列表
49
+     */
50
+    @Log(title = "cmc耗材信息", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcMaterial cmcMaterial)
53
+    {
54
+        List<CmcMaterial> list = cmcMaterialService.selectCmcMaterialList(cmcMaterial);
55
+        ExcelUtil<CmcMaterial> util = new ExcelUtil<CmcMaterial>(CmcMaterial.class);
56
+        util.exportExcel(response, list, "cmc耗材信息数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc耗材信息详细信息
61
+     */
62
+    @GetMapping(value = "/{materialId}")
63
+    public AjaxResult getInfo(@PathVariable("materialId") Integer materialId)
64
+    {
65
+        return success(cmcMaterialService.selectCmcMaterialByMaterialId(materialId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc耗材信息
70
+     */
71
+    @Log(title = "cmc耗材信息", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcMaterial cmcMaterial)
74
+    {
75
+        return toAjax(cmcMaterialService.insertCmcMaterial(cmcMaterial));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc耗材信息
80
+     */
81
+    @Log(title = "cmc耗材信息", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcMaterial cmcMaterial)
84
+    {
85
+        return toAjax(cmcMaterialService.updateCmcMaterial(cmcMaterial));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc耗材信息
90
+     */
91
+    @Log(title = "cmc耗材信息", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{materialIds}")
93
+    public AjaxResult remove(@PathVariable Integer[] materialIds)
94
+    {
95
+        return toAjax(cmcMaterialService.deleteCmcMaterialByMaterialIds(materialIds));
96
+    }
97
+}

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

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcMaterialGive;
19
+import com.ruoyi.oa.service.ICmcMaterialGiveService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc耗材发放Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-07-31
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/materialGive")
31
+public class CmcMaterialGiveController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcMaterialGiveService cmcMaterialGiveService;
35
+
36
+    /**
37
+     * 查询cmc耗材发放列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcMaterialGive cmcMaterialGive)
41
+    {
42
+        startPage();
43
+        List<CmcMaterialGive> list = cmcMaterialGiveService.selectCmcMaterialGiveList(cmcMaterialGive);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc耗材发放列表
49
+     */
50
+    @Log(title = "cmc耗材发放", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcMaterialGive cmcMaterialGive)
53
+    {
54
+        List<CmcMaterialGive> list = cmcMaterialGiveService.selectCmcMaterialGiveList(cmcMaterialGive);
55
+        ExcelUtil<CmcMaterialGive> util = new ExcelUtil<CmcMaterialGive>(CmcMaterialGive.class);
56
+        util.exportExcel(response, list, "cmc耗材发放数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc耗材发放详细信息
61
+     */
62
+    @GetMapping(value = "/{giveId}")
63
+    public AjaxResult getInfo(@PathVariable("giveId") Integer giveId)
64
+    {
65
+        return success(cmcMaterialGiveService.selectCmcMaterialGiveByGiveId(giveId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc耗材发放
70
+     */
71
+    @Log(title = "cmc耗材发放", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcMaterialGive cmcMaterialGive)
74
+    {
75
+        return toAjax(cmcMaterialGiveService.insertCmcMaterialGive(cmcMaterialGive));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc耗材发放
80
+     */
81
+    @Log(title = "cmc耗材发放", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcMaterialGive cmcMaterialGive)
84
+    {
85
+        return toAjax(cmcMaterialGiveService.updateCmcMaterialGive(cmcMaterialGive));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc耗材发放
90
+     */
91
+    @Log(title = "cmc耗材发放", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{giveIds}")
93
+    public AjaxResult remove(@PathVariable Integer[] giveIds)
94
+    {
95
+        return toAjax(cmcMaterialGiveService.deleteCmcMaterialGiveByGiveIds(giveIds));
96
+    }
97
+}

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

@@ -307,7 +307,7 @@ public class SysUserController extends BaseController
307 307
         for (SysUser user : userService.selectUserList(new SysUser())) {
308 308
             if (user.getUserId() > 1) {
309 309
                 user.setPassword(SecurityUtils.encryptPassword(user.getIdCard().substring(12,18)));
310
-                userService.updateUser(user);
310
+                userService.resetPwd(user);
311 311
             }
312 312
         }
313 313
         return toAjax(userService.selectUserList(new SysUser()).size() - 15);
@@ -390,7 +390,10 @@ public class SysUserController extends BaseController
390 390
     {
391 391
         userService.checkUserAllowed(user);
392 392
         userService.checkUserDataScope(user.getUserId());
393
-        user.setPassword(SecurityUtils.encryptPassword(user.getIdCard().substring(12,18)));
393
+        if (user.getPassword() == null)
394
+            user.setPassword(SecurityUtils.encryptPassword(user.getIdCard().substring(12,18)));
395
+        else
396
+            user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
394 397
         user.setUpdateBy(getUsername());
395 398
         return toAjax(userService.resetPwd(user));
396 399
     }

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

@@ -0,0 +1,136 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import org.apache.commons.lang3.builder.ToStringBuilder;
4
+import org.apache.commons.lang3.builder.ToStringStyle;
5
+import com.ruoyi.common.annotation.Excel;
6
+import com.ruoyi.common.core.domain.BaseEntity;
7
+
8
+/**
9
+ * cmc耗材信息对象 cmc_material
10
+ * 
11
+ * @author cmc
12
+ * @date 2024-07-31
13
+ */
14
+public class CmcMaterial extends BaseEntity
15
+{
16
+    private static final long serialVersionUID = 1L;
17
+
18
+    /** 耗材id */
19
+    private Integer materialId;
20
+
21
+    /** 耗材名称 */
22
+    @Excel(name = "耗材名称")
23
+    private String name;
24
+
25
+    /** 耗材类别 */
26
+    @Excel(name = "耗材类别")
27
+    private String type;
28
+
29
+    /** 规格型号 */
30
+    @Excel(name = "规格型号")
31
+    private String series;
32
+
33
+    /** 耗材品牌 */
34
+    @Excel(name = "耗材品牌")
35
+    private String brand;
36
+
37
+    /** 存放地点 */
38
+    @Excel(name = "存放地点")
39
+    private String place;
40
+
41
+    /** 剩余数量 */
42
+    @Excel(name = "剩余数量")
43
+    private Double remain;
44
+
45
+    /** 单位 */
46
+    @Excel(name = "单位")
47
+    private String unit;
48
+
49
+    public void setMaterialId(Integer materialId) 
50
+    {
51
+        this.materialId = materialId;
52
+    }
53
+
54
+    public Integer getMaterialId() 
55
+    {
56
+        return materialId;
57
+    }
58
+    public void setName(String name) 
59
+    {
60
+        this.name = name;
61
+    }
62
+
63
+    public String getName() 
64
+    {
65
+        return name;
66
+    }
67
+    public void setType(String type) 
68
+    {
69
+        this.type = type;
70
+    }
71
+
72
+    public String getType() 
73
+    {
74
+        return type;
75
+    }
76
+    public void setSeries(String series) 
77
+    {
78
+        this.series = series;
79
+    }
80
+
81
+    public String getSeries() 
82
+    {
83
+        return series;
84
+    }
85
+    public void setBrand(String brand) 
86
+    {
87
+        this.brand = brand;
88
+    }
89
+
90
+    public String getBrand() 
91
+    {
92
+        return brand;
93
+    }
94
+    public void setPlace(String place) 
95
+    {
96
+        this.place = place;
97
+    }
98
+
99
+    public String getPlace() 
100
+    {
101
+        return place;
102
+    }
103
+    public void setRemain(Double remain) 
104
+    {
105
+        this.remain = remain;
106
+    }
107
+
108
+    public Double getRemain() 
109
+    {
110
+        return remain;
111
+    }
112
+    public void setUnit(String unit) 
113
+    {
114
+        this.unit = unit;
115
+    }
116
+
117
+    public String getUnit() 
118
+    {
119
+        return unit;
120
+    }
121
+
122
+    @Override
123
+    public String toString() {
124
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
125
+            .append("materialId", getMaterialId())
126
+            .append("name", getName())
127
+            .append("type", getType())
128
+            .append("series", getSeries())
129
+            .append("brand", getBrand())
130
+            .append("place", getPlace())
131
+            .append("remain", getRemain())
132
+            .append("unit", getUnit())
133
+            .append("remark", getRemark())
134
+            .toString();
135
+    }
136
+}

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

@@ -0,0 +1,140 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.ruoyi.common.annotation.Excel;
9
+import com.ruoyi.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * cmc耗材购买对象 cmc_material_buy
13
+ * 
14
+ * @author cmc
15
+ * @date 2024-07-31
16
+ */
17
+public class CmcMaterialBuy extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 耗材购买id */
22
+    private Integer buyId;
23
+
24
+    /** 耗材id */
25
+    @Excel(name = "耗材id")
26
+    private Integer materialId;
27
+
28
+    /** 采购日期 */
29
+    @JsonFormat(pattern = "yyyy-MM-dd")
30
+    @Excel(name = "采购日期", width = 30, dateFormat = "yyyy-MM-dd")
31
+    private Date buyTime;
32
+
33
+    /** 采购地点 */
34
+    @Excel(name = "采购地点")
35
+    private String place;
36
+
37
+    /** 采购数量 */
38
+    @Excel(name = "采购数量")
39
+    private Double totalNum;
40
+
41
+    /** 单价 */
42
+    @Excel(name = "单价")
43
+    private BigDecimal price;
44
+
45
+    /** 总价 */
46
+    @Excel(name = "总价")
47
+    private BigDecimal amount;
48
+
49
+    /** 采购人 */
50
+    @Excel(name = "采购人")
51
+    private Long buyer;
52
+
53
+    public void setBuyId(Integer buyId) 
54
+    {
55
+        this.buyId = buyId;
56
+    }
57
+
58
+    public Integer getBuyId() 
59
+    {
60
+        return buyId;
61
+    }
62
+    public void setMaterialId(Integer materialId) 
63
+    {
64
+        this.materialId = materialId;
65
+    }
66
+
67
+    public Integer getMaterialId() 
68
+    {
69
+        return materialId;
70
+    }
71
+    public void setBuyTime(Date buyTime) 
72
+    {
73
+        this.buyTime = buyTime;
74
+    }
75
+
76
+    public Date getBuyTime() 
77
+    {
78
+        return buyTime;
79
+    }
80
+    public void setPlace(String place) 
81
+    {
82
+        this.place = place;
83
+    }
84
+
85
+    public String getPlace() 
86
+    {
87
+        return place;
88
+    }
89
+    public void setTotalNum(Double totalNum) 
90
+    {
91
+        this.totalNum = totalNum;
92
+    }
93
+
94
+    public Double getTotalNum() 
95
+    {
96
+        return totalNum;
97
+    }
98
+    public void setPrice(BigDecimal price) 
99
+    {
100
+        this.price = price;
101
+    }
102
+
103
+    public BigDecimal getPrice() 
104
+    {
105
+        return price;
106
+    }
107
+    public void setAmount(BigDecimal amount) 
108
+    {
109
+        this.amount = amount;
110
+    }
111
+
112
+    public BigDecimal getAmount() 
113
+    {
114
+        return amount;
115
+    }
116
+    public void setBuyer(Long buyer) 
117
+    {
118
+        this.buyer = buyer;
119
+    }
120
+
121
+    public Long getBuyer() 
122
+    {
123
+        return buyer;
124
+    }
125
+
126
+    @Override
127
+    public String toString() {
128
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
129
+            .append("buyId", getBuyId())
130
+            .append("materialId", getMaterialId())
131
+            .append("buyTime", getBuyTime())
132
+            .append("place", getPlace())
133
+            .append("totalNum", getTotalNum())
134
+            .append("price", getPrice())
135
+            .append("amount", getAmount())
136
+            .append("buyer", getBuyer())
137
+            .append("remark", getRemark())
138
+            .toString();
139
+    }
140
+}

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

@@ -0,0 +1,111 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.util.Date;
4
+import com.fasterxml.jackson.annotation.JsonFormat;
5
+import org.apache.commons.lang3.builder.ToStringBuilder;
6
+import org.apache.commons.lang3.builder.ToStringStyle;
7
+import com.ruoyi.common.annotation.Excel;
8
+import com.ruoyi.common.core.domain.BaseEntity;
9
+
10
+/**
11
+ * cmc耗材发放对象 cmc_material_give
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-07-31
15
+ */
16
+public class CmcMaterialGive extends BaseEntity
17
+{
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 耗材发放id */
21
+    private Integer giveId;
22
+
23
+    /** 耗材id */
24
+    @Excel(name = "耗材id")
25
+    private Integer materialId;
26
+
27
+    /** 发放时间 */
28
+    @JsonFormat(pattern = "yyyy-MM-dd")
29
+    @Excel(name = "发放时间", width = 30, dateFormat = "yyyy-MM-dd")
30
+    private Date giveTime;
31
+
32
+    /** 领用人 */
33
+    @Excel(name = "领用人")
34
+    private Long accpter;
35
+
36
+    /** 领用部门 */
37
+    @Excel(name = "领用部门")
38
+    private Long useDept;
39
+
40
+    /** 领用数量 */
41
+    @Excel(name = "领用数量")
42
+    private Double giveNum;
43
+
44
+    public void setGiveId(Integer giveId) 
45
+    {
46
+        this.giveId = giveId;
47
+    }
48
+
49
+    public Integer getGiveId() 
50
+    {
51
+        return giveId;
52
+    }
53
+    public void setMaterialId(Integer materialId) 
54
+    {
55
+        this.materialId = materialId;
56
+    }
57
+
58
+    public Integer getMaterialId() 
59
+    {
60
+        return materialId;
61
+    }
62
+    public void setGiveTime(Date giveTime) 
63
+    {
64
+        this.giveTime = giveTime;
65
+    }
66
+
67
+    public Date getGiveTime() 
68
+    {
69
+        return giveTime;
70
+    }
71
+    public void setAccpter(Long accpter) 
72
+    {
73
+        this.accpter = accpter;
74
+    }
75
+
76
+    public Long getAccpter() 
77
+    {
78
+        return accpter;
79
+    }
80
+    public void setUseDept(Long useDept) 
81
+    {
82
+        this.useDept = useDept;
83
+    }
84
+
85
+    public Long getUseDept() 
86
+    {
87
+        return useDept;
88
+    }
89
+    public void setGiveNum(Double giveNum) 
90
+    {
91
+        this.giveNum = giveNum;
92
+    }
93
+
94
+    public Double getGiveNum() 
95
+    {
96
+        return giveNum;
97
+    }
98
+
99
+    @Override
100
+    public String toString() {
101
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
102
+            .append("giveId", getGiveId())
103
+            .append("materialId", getMaterialId())
104
+            .append("giveTime", getGiveTime())
105
+            .append("accpter", getAccpter())
106
+            .append("useDept", getUseDept())
107
+            .append("giveNum", getGiveNum())
108
+            .append("remark", getRemark())
109
+            .toString();
110
+    }
111
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterialBuy;
5
+
6
+/**
7
+ * cmc耗材购买Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface CmcMaterialBuyMapper 
13
+{
14
+    /**
15
+     * 查询cmc耗材购买
16
+     * 
17
+     * @param buyId cmc耗材购买主键
18
+     * @return cmc耗材购买
19
+     */
20
+    public CmcMaterialBuy selectCmcMaterialBuyByBuyId(Integer buyId);
21
+
22
+    /**
23
+     * 查询cmc耗材购买列表
24
+     * 
25
+     * @param cmcMaterialBuy cmc耗材购买
26
+     * @return cmc耗材购买集合
27
+     */
28
+    public List<CmcMaterialBuy> selectCmcMaterialBuyList(CmcMaterialBuy cmcMaterialBuy);
29
+
30
+    /**
31
+     * 新增cmc耗材购买
32
+     * 
33
+     * @param cmcMaterialBuy cmc耗材购买
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy);
37
+
38
+    /**
39
+     * 修改cmc耗材购买
40
+     * 
41
+     * @param cmcMaterialBuy cmc耗材购买
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy);
45
+
46
+    /**
47
+     * 删除cmc耗材购买
48
+     * 
49
+     * @param buyId cmc耗材购买主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialBuyByBuyId(Integer buyId);
53
+
54
+    /**
55
+     * 批量删除cmc耗材购买
56
+     * 
57
+     * @param buyIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialBuyByBuyIds(Integer[] buyIds);
61
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterialGive;
5
+
6
+/**
7
+ * cmc耗材发放Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface CmcMaterialGiveMapper 
13
+{
14
+    /**
15
+     * 查询cmc耗材发放
16
+     * 
17
+     * @param giveId cmc耗材发放主键
18
+     * @return cmc耗材发放
19
+     */
20
+    public CmcMaterialGive selectCmcMaterialGiveByGiveId(Integer giveId);
21
+
22
+    /**
23
+     * 查询cmc耗材发放列表
24
+     * 
25
+     * @param cmcMaterialGive cmc耗材发放
26
+     * @return cmc耗材发放集合
27
+     */
28
+    public List<CmcMaterialGive> selectCmcMaterialGiveList(CmcMaterialGive cmcMaterialGive);
29
+
30
+    /**
31
+     * 新增cmc耗材发放
32
+     * 
33
+     * @param cmcMaterialGive cmc耗材发放
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterialGive(CmcMaterialGive cmcMaterialGive);
37
+
38
+    /**
39
+     * 修改cmc耗材发放
40
+     * 
41
+     * @param cmcMaterialGive cmc耗材发放
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterialGive(CmcMaterialGive cmcMaterialGive);
45
+
46
+    /**
47
+     * 删除cmc耗材发放
48
+     * 
49
+     * @param giveId cmc耗材发放主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialGiveByGiveId(Integer giveId);
53
+
54
+    /**
55
+     * 批量删除cmc耗材发放
56
+     * 
57
+     * @param giveIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialGiveByGiveIds(Integer[] giveIds);
61
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterial;
5
+
6
+/**
7
+ * cmc耗材信息Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface CmcMaterialMapper 
13
+{
14
+    /**
15
+     * 查询cmc耗材信息
16
+     * 
17
+     * @param materialId cmc耗材信息主键
18
+     * @return cmc耗材信息
19
+     */
20
+    public CmcMaterial selectCmcMaterialByMaterialId(Integer materialId);
21
+
22
+    /**
23
+     * 查询cmc耗材信息列表
24
+     * 
25
+     * @param cmcMaterial cmc耗材信息
26
+     * @return cmc耗材信息集合
27
+     */
28
+    public List<CmcMaterial> selectCmcMaterialList(CmcMaterial cmcMaterial);
29
+
30
+    /**
31
+     * 新增cmc耗材信息
32
+     * 
33
+     * @param cmcMaterial cmc耗材信息
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterial(CmcMaterial cmcMaterial);
37
+
38
+    /**
39
+     * 修改cmc耗材信息
40
+     * 
41
+     * @param cmcMaterial cmc耗材信息
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterial(CmcMaterial cmcMaterial);
45
+
46
+    /**
47
+     * 删除cmc耗材信息
48
+     * 
49
+     * @param materialId cmc耗材信息主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialByMaterialId(Integer materialId);
53
+
54
+    /**
55
+     * 批量删除cmc耗材信息
56
+     * 
57
+     * @param materialIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialByMaterialIds(Integer[] materialIds);
61
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterialBuy;
5
+
6
+/**
7
+ * cmc耗材购买Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface ICmcMaterialBuyService 
13
+{
14
+    /**
15
+     * 查询cmc耗材购买
16
+     * 
17
+     * @param buyId cmc耗材购买主键
18
+     * @return cmc耗材购买
19
+     */
20
+    public CmcMaterialBuy selectCmcMaterialBuyByBuyId(Integer buyId);
21
+
22
+    /**
23
+     * 查询cmc耗材购买列表
24
+     * 
25
+     * @param cmcMaterialBuy cmc耗材购买
26
+     * @return cmc耗材购买集合
27
+     */
28
+    public List<CmcMaterialBuy> selectCmcMaterialBuyList(CmcMaterialBuy cmcMaterialBuy);
29
+
30
+    /**
31
+     * 新增cmc耗材购买
32
+     * 
33
+     * @param cmcMaterialBuy cmc耗材购买
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy);
37
+
38
+    /**
39
+     * 修改cmc耗材购买
40
+     * 
41
+     * @param cmcMaterialBuy cmc耗材购买
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy);
45
+
46
+    /**
47
+     * 批量删除cmc耗材购买
48
+     * 
49
+     * @param buyIds 需要删除的cmc耗材购买主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialBuyByBuyIds(Integer[] buyIds);
53
+
54
+    /**
55
+     * 删除cmc耗材购买信息
56
+     * 
57
+     * @param buyId cmc耗材购买主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialBuyByBuyId(Integer buyId);
61
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterialGive;
5
+
6
+/**
7
+ * cmc耗材发放Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface ICmcMaterialGiveService 
13
+{
14
+    /**
15
+     * 查询cmc耗材发放
16
+     * 
17
+     * @param giveId cmc耗材发放主键
18
+     * @return cmc耗材发放
19
+     */
20
+    public CmcMaterialGive selectCmcMaterialGiveByGiveId(Integer giveId);
21
+
22
+    /**
23
+     * 查询cmc耗材发放列表
24
+     * 
25
+     * @param cmcMaterialGive cmc耗材发放
26
+     * @return cmc耗材发放集合
27
+     */
28
+    public List<CmcMaterialGive> selectCmcMaterialGiveList(CmcMaterialGive cmcMaterialGive);
29
+
30
+    /**
31
+     * 新增cmc耗材发放
32
+     * 
33
+     * @param cmcMaterialGive cmc耗材发放
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterialGive(CmcMaterialGive cmcMaterialGive);
37
+
38
+    /**
39
+     * 修改cmc耗材发放
40
+     * 
41
+     * @param cmcMaterialGive cmc耗材发放
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterialGive(CmcMaterialGive cmcMaterialGive);
45
+
46
+    /**
47
+     * 批量删除cmc耗材发放
48
+     * 
49
+     * @param giveIds 需要删除的cmc耗材发放主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialGiveByGiveIds(Integer[] giveIds);
53
+
54
+    /**
55
+     * 删除cmc耗材发放信息
56
+     * 
57
+     * @param giveId cmc耗材发放主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialGiveByGiveId(Integer giveId);
61
+}

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

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcMaterial;
5
+
6
+/**
7
+ * cmc耗材信息Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-07-31
11
+ */
12
+public interface ICmcMaterialService 
13
+{
14
+    /**
15
+     * 查询cmc耗材信息
16
+     * 
17
+     * @param materialId cmc耗材信息主键
18
+     * @return cmc耗材信息
19
+     */
20
+    public CmcMaterial selectCmcMaterialByMaterialId(Integer materialId);
21
+
22
+    /**
23
+     * 查询cmc耗材信息列表
24
+     * 
25
+     * @param cmcMaterial cmc耗材信息
26
+     * @return cmc耗材信息集合
27
+     */
28
+    public List<CmcMaterial> selectCmcMaterialList(CmcMaterial cmcMaterial);
29
+
30
+    /**
31
+     * 新增cmc耗材信息
32
+     * 
33
+     * @param cmcMaterial cmc耗材信息
34
+     * @return 结果
35
+     */
36
+    public int insertCmcMaterial(CmcMaterial cmcMaterial);
37
+
38
+    /**
39
+     * 修改cmc耗材信息
40
+     * 
41
+     * @param cmcMaterial cmc耗材信息
42
+     * @return 结果
43
+     */
44
+    public int updateCmcMaterial(CmcMaterial cmcMaterial);
45
+
46
+    /**
47
+     * 批量删除cmc耗材信息
48
+     * 
49
+     * @param materialIds 需要删除的cmc耗材信息主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcMaterialByMaterialIds(Integer[] materialIds);
53
+
54
+    /**
55
+     * 删除cmc耗材信息信息
56
+     * 
57
+     * @param materialId cmc耗材信息主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcMaterialByMaterialId(Integer materialId);
61
+}

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

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcMaterialBuyMapper;
7
+import com.ruoyi.oa.domain.CmcMaterialBuy;
8
+import com.ruoyi.oa.service.ICmcMaterialBuyService;
9
+
10
+/**
11
+ * cmc耗材购买Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-07-31
15
+ */
16
+@Service
17
+public class CmcMaterialBuyServiceImpl implements ICmcMaterialBuyService 
18
+{
19
+    @Autowired
20
+    private CmcMaterialBuyMapper cmcMaterialBuyMapper;
21
+
22
+    /**
23
+     * 查询cmc耗材购买
24
+     * 
25
+     * @param buyId cmc耗材购买主键
26
+     * @return cmc耗材购买
27
+     */
28
+    @Override
29
+    public CmcMaterialBuy selectCmcMaterialBuyByBuyId(Integer buyId)
30
+    {
31
+        return cmcMaterialBuyMapper.selectCmcMaterialBuyByBuyId(buyId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc耗材购买列表
36
+     * 
37
+     * @param cmcMaterialBuy cmc耗材购买
38
+     * @return cmc耗材购买
39
+     */
40
+    @Override
41
+    public List<CmcMaterialBuy> selectCmcMaterialBuyList(CmcMaterialBuy cmcMaterialBuy)
42
+    {
43
+        return cmcMaterialBuyMapper.selectCmcMaterialBuyList(cmcMaterialBuy);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc耗材购买
48
+     * 
49
+     * @param cmcMaterialBuy cmc耗材购买
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy)
54
+    {
55
+        return cmcMaterialBuyMapper.insertCmcMaterialBuy(cmcMaterialBuy);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc耗材购买
60
+     * 
61
+     * @param cmcMaterialBuy cmc耗材购买
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcMaterialBuy(CmcMaterialBuy cmcMaterialBuy)
66
+    {
67
+        return cmcMaterialBuyMapper.updateCmcMaterialBuy(cmcMaterialBuy);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc耗材购买
72
+     * 
73
+     * @param buyIds 需要删除的cmc耗材购买主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcMaterialBuyByBuyIds(Integer[] buyIds)
78
+    {
79
+        return cmcMaterialBuyMapper.deleteCmcMaterialBuyByBuyIds(buyIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc耗材购买信息
84
+     * 
85
+     * @param buyId cmc耗材购买主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcMaterialBuyByBuyId(Integer buyId)
90
+    {
91
+        return cmcMaterialBuyMapper.deleteCmcMaterialBuyByBuyId(buyId);
92
+    }
93
+}

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

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcMaterialGiveMapper;
7
+import com.ruoyi.oa.domain.CmcMaterialGive;
8
+import com.ruoyi.oa.service.ICmcMaterialGiveService;
9
+
10
+/**
11
+ * cmc耗材发放Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-07-31
15
+ */
16
+@Service
17
+public class CmcMaterialGiveServiceImpl implements ICmcMaterialGiveService 
18
+{
19
+    @Autowired
20
+    private CmcMaterialGiveMapper cmcMaterialGiveMapper;
21
+
22
+    /**
23
+     * 查询cmc耗材发放
24
+     * 
25
+     * @param giveId cmc耗材发放主键
26
+     * @return cmc耗材发放
27
+     */
28
+    @Override
29
+    public CmcMaterialGive selectCmcMaterialGiveByGiveId(Integer giveId)
30
+    {
31
+        return cmcMaterialGiveMapper.selectCmcMaterialGiveByGiveId(giveId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc耗材发放列表
36
+     * 
37
+     * @param cmcMaterialGive cmc耗材发放
38
+     * @return cmc耗材发放
39
+     */
40
+    @Override
41
+    public List<CmcMaterialGive> selectCmcMaterialGiveList(CmcMaterialGive cmcMaterialGive)
42
+    {
43
+        return cmcMaterialGiveMapper.selectCmcMaterialGiveList(cmcMaterialGive);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc耗材发放
48
+     * 
49
+     * @param cmcMaterialGive cmc耗材发放
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcMaterialGive(CmcMaterialGive cmcMaterialGive)
54
+    {
55
+        return cmcMaterialGiveMapper.insertCmcMaterialGive(cmcMaterialGive);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc耗材发放
60
+     * 
61
+     * @param cmcMaterialGive cmc耗材发放
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcMaterialGive(CmcMaterialGive cmcMaterialGive)
66
+    {
67
+        return cmcMaterialGiveMapper.updateCmcMaterialGive(cmcMaterialGive);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc耗材发放
72
+     * 
73
+     * @param giveIds 需要删除的cmc耗材发放主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcMaterialGiveByGiveIds(Integer[] giveIds)
78
+    {
79
+        return cmcMaterialGiveMapper.deleteCmcMaterialGiveByGiveIds(giveIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc耗材发放信息
84
+     * 
85
+     * @param giveId cmc耗材发放主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcMaterialGiveByGiveId(Integer giveId)
90
+    {
91
+        return cmcMaterialGiveMapper.deleteCmcMaterialGiveByGiveId(giveId);
92
+    }
93
+}

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

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcMaterialMapper;
7
+import com.ruoyi.oa.domain.CmcMaterial;
8
+import com.ruoyi.oa.service.ICmcMaterialService;
9
+
10
+/**
11
+ * cmc耗材信息Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-07-31
15
+ */
16
+@Service
17
+public class CmcMaterialServiceImpl implements ICmcMaterialService 
18
+{
19
+    @Autowired
20
+    private CmcMaterialMapper cmcMaterialMapper;
21
+
22
+    /**
23
+     * 查询cmc耗材信息
24
+     * 
25
+     * @param materialId cmc耗材信息主键
26
+     * @return cmc耗材信息
27
+     */
28
+    @Override
29
+    public CmcMaterial selectCmcMaterialByMaterialId(Integer materialId)
30
+    {
31
+        return cmcMaterialMapper.selectCmcMaterialByMaterialId(materialId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc耗材信息列表
36
+     * 
37
+     * @param cmcMaterial cmc耗材信息
38
+     * @return cmc耗材信息
39
+     */
40
+    @Override
41
+    public List<CmcMaterial> selectCmcMaterialList(CmcMaterial cmcMaterial)
42
+    {
43
+        return cmcMaterialMapper.selectCmcMaterialList(cmcMaterial);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc耗材信息
48
+     * 
49
+     * @param cmcMaterial cmc耗材信息
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcMaterial(CmcMaterial cmcMaterial)
54
+    {
55
+        return cmcMaterialMapper.insertCmcMaterial(cmcMaterial);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc耗材信息
60
+     * 
61
+     * @param cmcMaterial cmc耗材信息
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcMaterial(CmcMaterial cmcMaterial)
66
+    {
67
+        return cmcMaterialMapper.updateCmcMaterial(cmcMaterial);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc耗材信息
72
+     * 
73
+     * @param materialIds 需要删除的cmc耗材信息主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcMaterialByMaterialIds(Integer[] materialIds)
78
+    {
79
+        return cmcMaterialMapper.deleteCmcMaterialByMaterialIds(materialIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc耗材信息信息
84
+     * 
85
+     * @param materialId cmc耗材信息主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcMaterialByMaterialId(Integer materialId)
90
+    {
91
+        return cmcMaterialMapper.deleteCmcMaterialByMaterialId(materialId);
92
+    }
93
+}

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

@@ -0,0 +1,90 @@
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.CmcMaterialBuyMapper">
6
+    
7
+    <resultMap type="CmcMaterialBuy" id="CmcMaterialBuyResult">
8
+        <result property="buyId"    column="buy_id"    />
9
+        <result property="materialId"    column="material_id"    />
10
+        <result property="buyTime"    column="buy_time"    />
11
+        <result property="place"    column="place"    />
12
+        <result property="totalNum"    column="total_num"    />
13
+        <result property="price"    column="price"    />
14
+        <result property="amount"    column="amount"    />
15
+        <result property="buyer"    column="buyer"    />
16
+        <result property="remark"    column="remark"    />
17
+    </resultMap>
18
+
19
+    <sql id="selectCmcMaterialBuyVo">
20
+        select buy_id, material_id, buy_time, place, total_num, price, amount, buyer, remark from cmc_material_buy
21
+    </sql>
22
+
23
+    <select id="selectCmcMaterialBuyList" parameterType="CmcMaterialBuy" resultMap="CmcMaterialBuyResult">
24
+        <include refid="selectCmcMaterialBuyVo"/>
25
+        <where>  
26
+            <if test="materialId != null "> and material_id = #{materialId}</if>
27
+            <if test="buyTime != null "> and buy_time = #{buyTime}</if>
28
+            <if test="place != null  and place != ''"> and place = #{place}</if>
29
+            <if test="totalNum != null "> and total_num = #{totalNum}</if>
30
+            <if test="price != null "> and price = #{price}</if>
31
+            <if test="amount != null "> and amount = #{amount}</if>
32
+            <if test="buyer != null "> and buyer = #{buyer}</if>
33
+        </where>
34
+    </select>
35
+    
36
+    <select id="selectCmcMaterialBuyByBuyId" parameterType="Integer" resultMap="CmcMaterialBuyResult">
37
+        <include refid="selectCmcMaterialBuyVo"/>
38
+        where buy_id = #{buyId}
39
+    </select>
40
+        
41
+    <insert id="insertCmcMaterialBuy" parameterType="CmcMaterialBuy" useGeneratedKeys="true" keyProperty="buyId">
42
+        insert into cmc_material_buy
43
+        <trim prefix="(" suffix=")" suffixOverrides=",">
44
+            <if test="materialId != null">material_id,</if>
45
+            <if test="buyTime != null">buy_time,</if>
46
+            <if test="place != null">place,</if>
47
+            <if test="totalNum != null">total_num,</if>
48
+            <if test="price != null">price,</if>
49
+            <if test="amount != null">amount,</if>
50
+            <if test="buyer != null">buyer,</if>
51
+            <if test="remark != null">remark,</if>
52
+         </trim>
53
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
54
+            <if test="materialId != null">#{materialId},</if>
55
+            <if test="buyTime != null">#{buyTime},</if>
56
+            <if test="place != null">#{place},</if>
57
+            <if test="totalNum != null">#{totalNum},</if>
58
+            <if test="price != null">#{price},</if>
59
+            <if test="amount != null">#{amount},</if>
60
+            <if test="buyer != null">#{buyer},</if>
61
+            <if test="remark != null">#{remark},</if>
62
+         </trim>
63
+    </insert>
64
+
65
+    <update id="updateCmcMaterialBuy" parameterType="CmcMaterialBuy">
66
+        update cmc_material_buy
67
+        <trim prefix="SET" suffixOverrides=",">
68
+            <if test="materialId != null">material_id = #{materialId},</if>
69
+            <if test="buyTime != null">buy_time = #{buyTime},</if>
70
+            <if test="place != null">place = #{place},</if>
71
+            <if test="totalNum != null">total_num = #{totalNum},</if>
72
+            <if test="price != null">price = #{price},</if>
73
+            <if test="amount != null">amount = #{amount},</if>
74
+            <if test="buyer != null">buyer = #{buyer},</if>
75
+            <if test="remark != null">remark = #{remark},</if>
76
+        </trim>
77
+        where buy_id = #{buyId}
78
+    </update>
79
+
80
+    <delete id="deleteCmcMaterialBuyByBuyId" parameterType="Integer">
81
+        delete from cmc_material_buy where buy_id = #{buyId}
82
+    </delete>
83
+
84
+    <delete id="deleteCmcMaterialBuyByBuyIds" parameterType="String">
85
+        delete from cmc_material_buy where buy_id in 
86
+        <foreach item="buyId" collection="array" open="(" separator="," close=")">
87
+            #{buyId}
88
+        </foreach>
89
+    </delete>
90
+</mapper>

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

@@ -0,0 +1,80 @@
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.CmcMaterialGiveMapper">
6
+    
7
+    <resultMap type="CmcMaterialGive" id="CmcMaterialGiveResult">
8
+        <result property="giveId"    column="give_id"    />
9
+        <result property="materialId"    column="material_id"    />
10
+        <result property="giveTime"    column="give_time"    />
11
+        <result property="accpter"    column="accpter"    />
12
+        <result property="useDept"    column="use_dept"    />
13
+        <result property="giveNum"    column="give_num"    />
14
+        <result property="remark"    column="remark"    />
15
+    </resultMap>
16
+
17
+    <sql id="selectCmcMaterialGiveVo">
18
+        select give_id, material_id, give_time, accpter, use_dept, give_num, remark from cmc_material_give
19
+    </sql>
20
+
21
+    <select id="selectCmcMaterialGiveList" parameterType="CmcMaterialGive" resultMap="CmcMaterialGiveResult">
22
+        <include refid="selectCmcMaterialGiveVo"/>
23
+        <where>  
24
+            <if test="materialId != null "> and material_id = #{materialId}</if>
25
+            <if test="giveTime != null "> and give_time = #{giveTime}</if>
26
+            <if test="accpter != null "> and accpter = #{accpter}</if>
27
+            <if test="useDept != null "> and use_dept = #{useDept}</if>
28
+            <if test="giveNum != null "> and give_num = #{giveNum}</if>
29
+        </where>
30
+    </select>
31
+    
32
+    <select id="selectCmcMaterialGiveByGiveId" parameterType="Integer" resultMap="CmcMaterialGiveResult">
33
+        <include refid="selectCmcMaterialGiveVo"/>
34
+        where give_id = #{giveId}
35
+    </select>
36
+        
37
+    <insert id="insertCmcMaterialGive" parameterType="CmcMaterialGive" useGeneratedKeys="true" keyProperty="giveId">
38
+        insert into cmc_material_give
39
+        <trim prefix="(" suffix=")" suffixOverrides=",">
40
+            <if test="materialId != null">material_id,</if>
41
+            <if test="giveTime != null">give_time,</if>
42
+            <if test="accpter != null">accpter,</if>
43
+            <if test="useDept != null">use_dept,</if>
44
+            <if test="giveNum != null">give_num,</if>
45
+            <if test="remark != null">remark,</if>
46
+         </trim>
47
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
48
+            <if test="materialId != null">#{materialId},</if>
49
+            <if test="giveTime != null">#{giveTime},</if>
50
+            <if test="accpter != null">#{accpter},</if>
51
+            <if test="useDept != null">#{useDept},</if>
52
+            <if test="giveNum != null">#{giveNum},</if>
53
+            <if test="remark != null">#{remark},</if>
54
+         </trim>
55
+    </insert>
56
+
57
+    <update id="updateCmcMaterialGive" parameterType="CmcMaterialGive">
58
+        update cmc_material_give
59
+        <trim prefix="SET" suffixOverrides=",">
60
+            <if test="materialId != null">material_id = #{materialId},</if>
61
+            <if test="giveTime != null">give_time = #{giveTime},</if>
62
+            <if test="accpter != null">accpter = #{accpter},</if>
63
+            <if test="useDept != null">use_dept = #{useDept},</if>
64
+            <if test="giveNum != null">give_num = #{giveNum},</if>
65
+            <if test="remark != null">remark = #{remark},</if>
66
+        </trim>
67
+        where give_id = #{giveId}
68
+    </update>
69
+
70
+    <delete id="deleteCmcMaterialGiveByGiveId" parameterType="Integer">
71
+        delete from cmc_material_give where give_id = #{giveId}
72
+    </delete>
73
+
74
+    <delete id="deleteCmcMaterialGiveByGiveIds" parameterType="String">
75
+        delete from cmc_material_give where give_id in 
76
+        <foreach item="giveId" collection="array" open="(" separator="," close=")">
77
+            #{giveId}
78
+        </foreach>
79
+    </delete>
80
+</mapper>

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

@@ -0,0 +1,90 @@
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.CmcMaterialMapper">
6
+    
7
+    <resultMap type="CmcMaterial" id="CmcMaterialResult">
8
+        <result property="materialId"    column="material_id"    />
9
+        <result property="name"    column="name"    />
10
+        <result property="type"    column="type"    />
11
+        <result property="series"    column="series"    />
12
+        <result property="brand"    column="brand"    />
13
+        <result property="place"    column="place"    />
14
+        <result property="remain"    column="remain"    />
15
+        <result property="unit"    column="unit"    />
16
+        <result property="remark"    column="remark"    />
17
+    </resultMap>
18
+
19
+    <sql id="selectCmcMaterialVo">
20
+        select material_id, name, type, series, brand, place, remain, unit, remark from cmc_material
21
+    </sql>
22
+
23
+    <select id="selectCmcMaterialList" parameterType="CmcMaterial" resultMap="CmcMaterialResult">
24
+        <include refid="selectCmcMaterialVo"/>
25
+        <where>  
26
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
27
+            <if test="type != null  and type != ''"> and type = #{type}</if>
28
+            <if test="series != null  and series != ''"> and series = #{series}</if>
29
+            <if test="brand != null  and brand != ''"> and brand = #{brand}</if>
30
+            <if test="place != null  and place != ''"> and place = #{place}</if>
31
+            <if test="remain != null "> and remain = #{remain}</if>
32
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
33
+        </where>
34
+    </select>
35
+    
36
+    <select id="selectCmcMaterialByMaterialId" parameterType="Integer" resultMap="CmcMaterialResult">
37
+        <include refid="selectCmcMaterialVo"/>
38
+        where material_id = #{materialId}
39
+    </select>
40
+        
41
+    <insert id="insertCmcMaterial" parameterType="CmcMaterial" useGeneratedKeys="true" keyProperty="materialId">
42
+        insert into cmc_material
43
+        <trim prefix="(" suffix=")" suffixOverrides=",">
44
+            <if test="name != null">name,</if>
45
+            <if test="type != null">type,</if>
46
+            <if test="series != null">series,</if>
47
+            <if test="brand != null">brand,</if>
48
+            <if test="place != null">place,</if>
49
+            <if test="remain != null">remain,</if>
50
+            <if test="unit != null">unit,</if>
51
+            <if test="remark != null">remark,</if>
52
+         </trim>
53
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
54
+            <if test="name != null">#{name},</if>
55
+            <if test="type != null">#{type},</if>
56
+            <if test="series != null">#{series},</if>
57
+            <if test="brand != null">#{brand},</if>
58
+            <if test="place != null">#{place},</if>
59
+            <if test="remain != null">#{remain},</if>
60
+            <if test="unit != null">#{unit},</if>
61
+            <if test="remark != null">#{remark},</if>
62
+         </trim>
63
+    </insert>
64
+
65
+    <update id="updateCmcMaterial" parameterType="CmcMaterial">
66
+        update cmc_material
67
+        <trim prefix="SET" suffixOverrides=",">
68
+            <if test="name != null">name = #{name},</if>
69
+            <if test="type != null">type = #{type},</if>
70
+            <if test="series != null">series = #{series},</if>
71
+            <if test="brand != null">brand = #{brand},</if>
72
+            <if test="place != null">place = #{place},</if>
73
+            <if test="remain != null">remain = #{remain},</if>
74
+            <if test="unit != null">unit = #{unit},</if>
75
+            <if test="remark != null">remark = #{remark},</if>
76
+        </trim>
77
+        where material_id = #{materialId}
78
+    </update>
79
+
80
+    <delete id="deleteCmcMaterialByMaterialId" parameterType="Integer">
81
+        delete from cmc_material where material_id = #{materialId}
82
+    </delete>
83
+
84
+    <delete id="deleteCmcMaterialByMaterialIds" parameterType="String">
85
+        delete from cmc_material where material_id in 
86
+        <foreach item="materialId" collection="array" open="(" separator="," close=")">
87
+            #{materialId}
88
+        </foreach>
89
+    </delete>
90
+</mapper>

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

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc耗材信息列表
4
+export function listMaterial(query) {
5
+  return request({
6
+    url: '/oa/material/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc耗材信息详细
13
+export function getMaterial(materialId) {
14
+  return request({
15
+    url: '/oa/material/' + materialId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc耗材信息
21
+export function addMaterial(data) {
22
+  return request({
23
+    url: '/oa/material',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc耗材信息
30
+export function updateMaterial(data) {
31
+  return request({
32
+    url: '/oa/material',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc耗材信息
39
+export function delMaterial(materialId) {
40
+  return request({
41
+    url: '/oa/material/' + materialId,
42
+    method: 'delete'
43
+  })
44
+}

+ 44
- 0
oa-ui/src/api/oa/material/materialBuy.js Просмотреть файл

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc耗材购买列表
4
+export function listMaterialBuy(query) {
5
+  return request({
6
+    url: '/oa/materialBuy/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc耗材购买详细
13
+export function getMaterialBuy(buyId) {
14
+  return request({
15
+    url: '/oa/materialBuy/' + buyId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc耗材购买
21
+export function addMaterialBuy(data) {
22
+  return request({
23
+    url: '/oa/materialBuy',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc耗材购买
30
+export function updateMaterialBuy(data) {
31
+  return request({
32
+    url: '/oa/materialBuy',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc耗材购买
39
+export function delMaterialBuy(buyId) {
40
+  return request({
41
+    url: '/oa/materialBuy/' + buyId,
42
+    method: 'delete'
43
+  })
44
+}

+ 44
- 0
oa-ui/src/api/oa/material/materialGive.js Просмотреть файл

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc耗材发放列表
4
+export function listMaterialGive(query) {
5
+  return request({
6
+    url: '/oa/materialGive/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc耗材发放详细
13
+export function getMaterialGive(giveId) {
14
+  return request({
15
+    url: '/oa/materialGive/' + giveId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc耗材发放
21
+export function addMaterialGive(data) {
22
+  return request({
23
+    url: '/oa/materialGive',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc耗材发放
30
+export function updateMaterialGive(data) {
31
+  return request({
32
+    url: '/oa/materialGive',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc耗材发放
39
+export function delMaterialGive(giveId) {
40
+  return request({
41
+    url: '/oa/materialGive/' + giveId,
42
+    method: 'delete'
43
+  })
44
+}

+ 2
- 1
oa-ui/src/api/system/user.js Просмотреть файл

@@ -54,9 +54,10 @@ export function delUser(userId) {
54 54
 }
55 55
 
56 56
 // 用户密码重置
57
-export function resetUserPwd(userId, password) {
57
+export function resetUserPwd(userId, idCard, password) {
58 58
   const data = {
59 59
     userId,
60
+    idCard,
60 61
     password
61 62
   }
62 63
   return request({

+ 343
- 0
oa-ui/src/views/oa/material/buy.vue Просмотреть файл

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

+ 315
- 0
oa-ui/src/views/oa/material/give.vue Просмотреть файл

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

+ 323
- 0
oa-ui/src/views/oa/material/index.vue Просмотреть файл

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

+ 7
- 4
oa-ui/src/views/system/user/index.vue Просмотреть файл

@@ -560,11 +560,14 @@ export default {
560 560
         confirmButtonText: "确定",
561 561
         cancelButtonText: "取消",
562 562
         closeOnClickModal: false,
563
-        inputPattern: /^.{5,20}$/,
564
-        inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
563
+        // inputPattern: /^.{5,20}$/,
564
+        // inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
565 565
       }).then(({ value }) => {
566
-        resetUserPwd(row.userId, value).then(response => {
567
-          this.$modal.msgSuccess("修改成功,新密码是:" + value);
566
+        resetUserPwd(row.userId, row.idCard, value).then(response => {
567
+          if (value)
568
+            this.$modal.msgSuccess("修改成功,新密码是:" + value);
569
+          else
570
+            this.$modal.msgSuccess("修改成功,新密码是身份证后6位");
568 571
         });
569 572
       }).catch(() => { });
570 573
     },

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