Commit 72b465ae0536579531110b3e70c05240417f24d6
Merge remote-tracking branch 'origin/develop' into develop
Showing
17 changed files
with
463 additions
and
35 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationService.java
... | ... | @@ -6,7 +6,7 @@ import java.util.List; |
6 | 6 | |
7 | 7 | public interface LocationAllocationService { |
8 | 8 | |
9 | - String allocation(int locationRule, List<String> locationTypeCodeList, int high, String destination, String warehouseCode, String containerCode, Integer materialAreas); | |
9 | + String allocation(int locationRule, List<String> locationTypeCodeList, int high, String destination, String warehouseCode, String containerCode, String materialAreaCode); | |
10 | 10 | |
11 | 11 | |
12 | 12 | } |
... | ... |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationServiceImpl.java
... | ... | @@ -39,7 +39,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
39 | 39 | private TaskHeaderService taskHeaderService; |
40 | 40 | |
41 | 41 | @Override |
42 | - public String allocation(int locationRule, List<String> locationTypeCodeList, int high, String area, String warehouseCode, String containerCode, Integer materialAreas) { | |
42 | + public String allocation(int locationRule, List<String> locationTypeCodeList, int high, String area, String warehouseCode, String containerCode, String materialAreaCode) { | |
43 | 43 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
44 | 44 | containerLambdaQueryWrapper.eq(Container::getCode, containerCode) |
45 | 45 | .eq(Container::getWarehouseCode, warehouseCode); |
... | ... | @@ -71,9 +71,9 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
71 | 71 | // } |
72 | 72 | switch (locationRule) { |
73 | 73 | case QuantityConstant.DOUBLE_FORK: |
74 | - return doubleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreas); | |
74 | + return doubleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreaCode); | |
75 | 75 | case QuantityConstant.SINGLE_FORK: |
76 | - return singleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreas); | |
76 | + return singleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreaCode); | |
77 | 77 | } |
78 | 78 | return null; |
79 | 79 | } |
... | ... | @@ -81,25 +81,17 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
81 | 81 | /* |
82 | 82 | * 双伸位库位入库分配库位 |
83 | 83 | */ |
84 | - private String doubleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, Integer materialAreas) { | |
84 | + private String doubleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, String materialAreaCode) { | |
85 | 85 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
86 | 86 | locationLambda.eq(Location::getArea, area). |
87 | 87 | eq(Location::getWarehouseCode, warehouseCode) |
88 | 88 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
89 | 89 | .eq(Location::getHigh, high) |
90 | + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) | |
90 | 91 | .eq(Location::getRowFlag, QuantityConstant.ROW_OUT) |
91 | 92 | .eq(Location::getContainerCode, ""); |
92 | 93 | List<Location> locationList = locationService.list(locationLambda); |
93 | 94 | List<Location> removeLocaationList = new ArrayList<>(); |
94 | - for (Location location1 : locationList) { | |
95 | - if (taskHeaderService.getUncompleteTaskInNear(location1) > 0) { | |
96 | - removeLocaationList.add(location1); | |
97 | - } | |
98 | - Integer areas = location1.getMaterialAreas(); | |
99 | - if(areas.intValue() != materialAreas.intValue()) { | |
100 | - removeLocaationList.add(location1); | |
101 | - } | |
102 | - } | |
103 | 95 | locationList.removeAll(removeLocaationList); |
104 | 96 | if (locationList == null || locationList.size() == 0) { |
105 | 97 | locationLambda = Wrappers.lambdaQuery(); |
... | ... | @@ -107,6 +99,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
107 | 99 | eq(Location::getWarehouseCode, warehouseCode) |
108 | 100 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
109 | 101 | .eq(Location::getHigh, high) |
102 | + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) | |
110 | 103 | .eq(Location::getRowFlag, QuantityConstant.ROW_IN) |
111 | 104 | .eq(Location::getContainerCode, ""); |
112 | 105 | locationList = locationService.list(locationLambda); |
... | ... | @@ -125,25 +118,17 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
125 | 118 | /* |
126 | 119 | * 单伸位库位入库分配库位 |
127 | 120 | */ |
128 | - private String singleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, Integer materialAreas) { | |
121 | + private String singleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, String materialAreaCode) { | |
129 | 122 | LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); |
130 | 123 | locationLambda.eq(Location::getArea, area). |
131 | 124 | eq(Location::getWarehouseCode, warehouseCode) |
132 | 125 | .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY) |
133 | 126 | .eq(Location::getHigh, high) |
127 | + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode) | |
134 | 128 | .in(Location::getLocationType, locationTypeCodeList) |
135 | 129 | .eq(Location::getContainerCode, ""); |
136 | 130 | List<Location> locationList = locationService.list(locationLambda); |
137 | - List<Location> removeLocaationList = new ArrayList<>(); | |
138 | - if(!(materialAreas.intValue() == QuantityConstant.NOT_MATERIAL_AREAS)) { | |
139 | - for (Location location1 : locationList) { | |
140 | - Integer areas = location1.getMaterialAreas(); | |
141 | - if (areas.intValue() != materialAreas.intValue()) { | |
142 | - removeLocaationList.add(location1); | |
143 | - } | |
144 | - } | |
145 | - } | |
146 | - locationList.removeAll(removeLocaationList); | |
131 | + | |
147 | 132 | Location location = locationList.stream().findFirst().orElse(null); |
148 | 133 | String locationCode = location.getCode(); |
149 | 134 | return locationCode; |
... | ... |
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... | ... | @@ -173,7 +173,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
173 | 173 | return AjaxResult.error("未绑定定位规则"); |
174 | 174 | } |
175 | 175 | int allocationRule = Integer.parseInt(value); |
176 | - Integer materialAreas = 0; | |
176 | + String materialAreaCode = null; | |
177 | 177 | /* 循环查询入库组盘明细*/ |
178 | 178 | List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); |
179 | 179 | for (TaskDetail taskDetail : taskDetailList) { |
... | ... | @@ -188,10 +188,10 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService |
188 | 188 | if(receiptContainerDetailList != null && receiptContainerDetailList.size() > 0) { |
189 | 189 | String materialCode = receiptContainerDetailList.get(0).getMaterialCode(); |
190 | 190 | Material material = materialService.findAllByCode(materialCode, warehouseCode); |
191 | - materialAreas = material.getMaterialAreas(); | |
191 | + materialAreaCode = material.getMaterialAreaCode(); | |
192 | 192 | } |
193 | 193 | locationCode = locationAllocationService.allocation(allocationRule, |
194 | - locationTypeCodeList, high, destination, warehouseCode, containerCode, materialAreas); | |
194 | + locationTypeCodeList, high, destination, warehouseCode, containerCode, materialAreaCode); | |
195 | 195 | if (StringUtils.isEmpty(locationCode)) { |
196 | 196 | return AjaxResult.error("没有库位可分配"); |
197 | 197 | } |
... | ... |
src/main/java/com/huaheng/pc/config/location/domain/Location.java
... | ... | @@ -99,8 +99,8 @@ public class Location implements Serializable { |
99 | 99 | /** |
100 | 100 | * 物料分区 |
101 | 101 | */ |
102 | - @TableField(value = "materialAreas") | |
103 | - private Integer materialAreas; | |
102 | + @TableField(value = "materialAreaCode") | |
103 | + private String materialAreaCode; | |
104 | 104 | |
105 | 105 | /** |
106 | 106 | * 名称 |
... | ... |
src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java
... | ... | @@ -164,7 +164,7 @@ public class MaterialController extends BaseController { |
164 | 164 | String[] idArray = Convert.toStrArray(ids); |
165 | 165 | LambdaUpdateWrapper<Material> wrapper = Wrappers.lambdaUpdate(); |
166 | 166 | wrapper.in(Material::getId, idArray) |
167 | - .set(Material::getMaterialAreas, Integer.parseInt(area)); | |
167 | + .set(Material::getMaterialAreaCode, Integer.parseInt(area)); | |
168 | 168 | return toAjax(materialService.update(wrapper)); |
169 | 169 | } |
170 | 170 | |
... | ... |
src/main/java/com/huaheng/pc/config/material/domain/Material.java
... | ... | @@ -315,7 +315,7 @@ public class Material implements Serializable { |
315 | 315 | /** |
316 | 316 | * 物料分区 |
317 | 317 | */ |
318 | - @TableField(value = "materialAreas") | |
319 | - private Integer materialAreas; | |
318 | + @TableField(value = "materialAreaCode") | |
319 | + private String materialAreaCode; | |
320 | 320 | |
321 | 321 | } |
322 | 322 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/config/materialArea/controller/MaterialAreaController.java
0 → 100644
1 | +package com.huaheng.pc.config.materialArea.controller; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import com.huaheng.common.support.Convert; | |
6 | +import com.huaheng.common.utils.StringUtils; | |
7 | +import com.huaheng.common.utils.security.ShiroUtils; | |
8 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | |
9 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
10 | +import com.huaheng.framework.web.controller.BaseController; | |
11 | +import com.huaheng.framework.web.domain.AjaxResult; | |
12 | +import com.huaheng.framework.web.page.TableDataInfo; | |
13 | +import com.huaheng.pc.config.locationHigh.domain.LocationHigh; | |
14 | +import com.huaheng.pc.config.locationHigh.service.LocationHighService; | |
15 | +import com.huaheng.pc.config.materialArea.domain.MaterialArea; | |
16 | +import com.huaheng.pc.config.materialArea.service.MaterialAreaService; | |
17 | +import io.swagger.annotations.Api; | |
18 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
19 | +import org.springframework.beans.factory.annotation.Autowired; | |
20 | +import org.springframework.stereotype.Controller; | |
21 | +import org.springframework.ui.ModelMap; | |
22 | +import org.springframework.web.bind.annotation.*; | |
23 | + | |
24 | +import java.util.List; | |
25 | + | |
26 | +/** | |
27 | + * 物料分区 | |
28 | + * | |
29 | + * @author youjie | |
30 | + * @date 2021-08-24 | |
31 | + */ | |
32 | +@Api(tags = "物料分区") | |
33 | +@Controller | |
34 | +@RequestMapping("/config/materialArea") | |
35 | +public class MaterialAreaController extends BaseController | |
36 | +{ | |
37 | + private String prefix = "config/materialArea"; | |
38 | + | |
39 | + @Autowired | |
40 | + private MaterialAreaService materialAreaService; | |
41 | + | |
42 | + @GetMapping() | |
43 | + public String materialArea() | |
44 | + { | |
45 | + return prefix + "/materialArea"; | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * 查询物料分区列表 | |
50 | + */ | |
51 | + @Log(title = "基础数据-物料分区", operating = "物料分区", action = BusinessType.GRANT) | |
52 | + @PostMapping("/list") | |
53 | + @ResponseBody | |
54 | + public TableDataInfo list(MaterialArea materialArea, String createdBegin, String createdEnd) | |
55 | + { | |
56 | + LambdaQueryWrapper<MaterialArea> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
57 | + startPage(); | |
58 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), MaterialArea::getCreated, createdBegin) | |
59 | + .le(StringUtils.isNotEmpty(createdEnd), MaterialArea::getCreated, createdEnd) | |
60 | + .eq(MaterialArea::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
61 | + .eq(StringUtils.isNotEmpty(materialArea.getCode()), MaterialArea::getCode, materialArea.getCode()) | |
62 | + .orderByAsc(MaterialArea::getId); | |
63 | + | |
64 | + List<MaterialArea> list = materialAreaService.list(lambdaQueryWrapper); | |
65 | + return getDataTable(list); | |
66 | + } | |
67 | + | |
68 | + /** | |
69 | + * 新增库位类型 | |
70 | + */ | |
71 | + @GetMapping("/add") | |
72 | + public String add() | |
73 | + { | |
74 | + return prefix + "/add"; | |
75 | + } | |
76 | + | |
77 | + /** | |
78 | + * 新增物料分区 | |
79 | + */ | |
80 | + @Log(title = "基础数据-物料分区", operating = "新增物料分区", action = BusinessType.INSERT) | |
81 | + @PostMapping("/add") | |
82 | + @ResponseBody | |
83 | + public AjaxResult addSave(MaterialArea materialArea) | |
84 | + { | |
85 | + if(StringUtils.isEmpty(materialArea.getCode())) { | |
86 | + return AjaxResult.error("物料分区编码为空"); | |
87 | + } | |
88 | + materialArea.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
89 | + return toAjax(materialAreaService.save(materialArea)); | |
90 | + } | |
91 | + | |
92 | + /** | |
93 | + * 修改物料分区 | |
94 | + */ | |
95 | + @GetMapping("/edit/{id}") | |
96 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) | |
97 | + { | |
98 | + MaterialArea materialArea = materialAreaService.getById(id); | |
99 | + mmap.put("materialArea", materialArea); | |
100 | + return prefix + "/edit"; | |
101 | + } | |
102 | + | |
103 | + | |
104 | + /** | |
105 | + * 修改物料分区 | |
106 | + */ | |
107 | + @Log(title = "基础数据-物料分区", operating = "修改物料分区", action = BusinessType.UPDATE) | |
108 | + @PostMapping("/edit") | |
109 | + @ResponseBody | |
110 | + public AjaxResult editSave(MaterialArea materialArea) | |
111 | + { | |
112 | + return toAjax(materialAreaService.saveOrUpdate(materialArea)); | |
113 | + } | |
114 | + | |
115 | + /** | |
116 | + * 删除物料分区 | |
117 | + */ | |
118 | + @Log(title = "基础数据-物料分区", operating = "修改物料分区", action = BusinessType.DELETE) | |
119 | + @PostMapping( "/remove") | |
120 | + @ResponseBody | |
121 | + public AjaxResult remove(String ids) | |
122 | + { | |
123 | + if (StringUtils.isEmpty(ids)) { | |
124 | + return AjaxResult.error("id不能为空"); | |
125 | + } | |
126 | + for (Integer id : Convert.toIntArray(ids)) | |
127 | + { | |
128 | + materialAreaService.removeById(id); | |
129 | + } | |
130 | + return AjaxResult.success("删除成功!"); | |
131 | + } | |
132 | + | |
133 | +} | |
... | ... |
src/main/java/com/huaheng/pc/config/materialArea/domain/MaterialArea.java
0 → 100644
1 | +package com.huaheng.pc.config.materialArea.domain; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.annotation.*; | |
4 | +import lombok.Data; | |
5 | + | |
6 | +import java.io.Serializable; | |
7 | +import java.util.Date; | |
8 | + | |
9 | +@Data | |
10 | +@TableName(value = "material_area") | |
11 | +public class MaterialArea implements Serializable { | |
12 | + | |
13 | + /** | |
14 | + * 内部号 | |
15 | + */ | |
16 | + @TableId(value = "id", type = IdType.AUTO) | |
17 | + private Integer id; | |
18 | + | |
19 | + /** | |
20 | + * 仓库编码 | |
21 | + */ | |
22 | + @TableField(value = "warehouseCode") | |
23 | + private String warehouseCode; | |
24 | + | |
25 | + /** | |
26 | + * 编码 | |
27 | + */ | |
28 | + @TableField(value = "code") | |
29 | + private String code; | |
30 | + | |
31 | + | |
32 | + /** | |
33 | + * 名字 | |
34 | + */ | |
35 | + @TableField(value = "name") | |
36 | + private String name; | |
37 | + | |
38 | + /** | |
39 | + * 创建时间 | |
40 | + */ | |
41 | + @TableField(value = "created", fill = FieldFill.INSERT) | |
42 | + private Date created; | |
43 | + | |
44 | + /** | |
45 | + * 创建用户 | |
46 | + */ | |
47 | + @TableField(value = "createdBy", fill = FieldFill.INSERT) | |
48 | + private String createdBy; | |
49 | + | |
50 | +} | |
0 | 51 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/config/materialArea/mapper/MaterialAreaMapper.java
0 → 100644
1 | +package com.huaheng.pc.config.materialArea.mapper; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.huaheng.pc.config.locationHigh.domain.LocationHigh; | |
5 | +import com.huaheng.pc.config.locationType.domain.LocationType; | |
6 | +import com.huaheng.pc.config.materialArea.domain.MaterialArea; | |
7 | + | |
8 | +public interface MaterialAreaMapper extends BaseMapper<MaterialArea> { | |
9 | + | |
10 | +} | |
0 | 11 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/config/materialArea/service/MaterialAreaService.java
0 → 100644
1 | +package com.huaheng.pc.config.materialArea.service; | |
2 | + | |
3 | +import com.huaheng.pc.config.locationHigh.domain.LocationHigh; | |
4 | +import com.huaheng.pc.config.locationType.domain.LocationType; | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | +import com.huaheng.pc.config.materialArea.domain.MaterialArea; | |
7 | + | |
8 | +import java.util.List; | |
9 | +import java.util.Map; | |
10 | + | |
11 | +public interface MaterialAreaService extends IService<MaterialArea>{ | |
12 | + | |
13 | + List<Map<String, Object>> getCode(); | |
14 | +} | |
... | ... |
src/main/java/com/huaheng/pc/config/materialArea/service/MaterialAreaServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.config.materialArea.service; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
6 | +import com.huaheng.common.utils.security.ShiroUtils; | |
7 | +import com.huaheng.pc.config.locationHigh.domain.LocationHigh; | |
8 | +import com.huaheng.pc.config.locationHigh.mapper.LocationHighMapper; | |
9 | +import com.huaheng.pc.config.locationHigh.service.LocationHighService; | |
10 | +import com.huaheng.pc.config.materialArea.domain.MaterialArea; | |
11 | +import com.huaheng.pc.config.materialArea.mapper.MaterialAreaMapper; | |
12 | +import com.huaheng.pc.config.zone.domain.Zone; | |
13 | +import org.springframework.stereotype.Service; | |
14 | + | |
15 | +import java.util.List; | |
16 | +import java.util.Map; | |
17 | + | |
18 | +@Service("MaterialArea") | |
19 | +public class MaterialAreaServiceImpl extends ServiceImpl<MaterialAreaMapper, MaterialArea> implements MaterialAreaService { | |
20 | + | |
21 | + | |
22 | + @Override | |
23 | + public List<Map<String, Object>> getCode() { | |
24 | + LambdaQueryWrapper<MaterialArea> lambda = Wrappers.lambdaQuery(); | |
25 | + lambda.select(MaterialArea::getCode, MaterialArea::getId, MaterialArea::getName) | |
26 | + .eq(MaterialArea::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
27 | + return this.listMaps(lambda); | |
28 | + } | |
29 | +} | |
... | ... |
src/main/java/com/huaheng/pc/config/materialType/domain/MaterialType.java
... | ... | @@ -57,6 +57,12 @@ public class MaterialType implements Serializable { |
57 | 57 | private String abcClass; |
58 | 58 | |
59 | 59 | /** |
60 | + * 物料分区 | |
61 | + */ | |
62 | + @TableField(value = "materialAreaCode") | |
63 | + private String materialAreaCode; | |
64 | + | |
65 | + /** | |
60 | 66 | * 保质期(天) |
61 | 67 | */ |
62 | 68 | @TableField(value = "daysToExpire") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... | ... | @@ -159,8 +159,8 @@ public class ReceivingService { |
159 | 159 | } |
160 | 160 | int allocationRule = Integer.parseInt(value); |
161 | 161 | Material material = materialService.findAllByCode(receiptContainerDetail.getMaterialCode()); |
162 | - Integer materialAreas = material.getMaterialAreas(); | |
163 | - String locationCode = locationAllocationService.allocation(allocationRule, null, 0, area, ShiroUtils.getWarehouseCode(),container.getCode(), materialAreas); | |
162 | + String materialAreaCode = material.getMaterialAreaCode(); | |
163 | + String locationCode = locationAllocationService.allocation(allocationRule, null, 0, area, ShiroUtils.getWarehouseCode(),container.getCode(), materialAreaCode); | |
164 | 164 | |
165 | 165 | if (StringUtils.isNotEmpty(locationCode)){ |
166 | 166 | locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK); |
... | ... |
src/main/resources/templates/config/material/material.html
... | ... | @@ -70,6 +70,8 @@ |
70 | 70 | var prefix = ctx + "config/material"; |
71 | 71 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
72 | 72 | var mType = [[${@materialType.queryType()}]]; |
73 | + var materialArea =[[${@materialArea.getCode()}]]; | |
74 | + | |
73 | 75 | $(function() { |
74 | 76 | var options = { |
75 | 77 | url: prefix + "/list", |
... | ... | @@ -134,6 +136,21 @@ |
134 | 136 | title : '规格' |
135 | 137 | }, |
136 | 138 | { |
139 | + field: 'materialAreaCode', | |
140 | + title: '物料分区', | |
141 | + align: 'center', | |
142 | + formatter: function(value, row, index) { | |
143 | + var actions = []; | |
144 | + $.each(materialArea, function(index, dict) { | |
145 | + if (dict.code == value) { | |
146 | + actions.push("<span class='badge badge-info'>" + dict.name + "</span>"); | |
147 | + return false; | |
148 | + } | |
149 | + }); | |
150 | + return actions.join(''); | |
151 | + } | |
152 | + }, | |
153 | + { | |
137 | 154 | field : 'unit', |
138 | 155 | title : '单位' , |
139 | 156 | visible:false |
... | ... | @@ -170,14 +187,17 @@ |
170 | 187 | { |
171 | 188 | field : 'attributeTemplateCode', |
172 | 189 | title : '属性模板' , |
190 | + visible:false, | |
173 | 191 | }, |
174 | 192 | { |
175 | 193 | field : 'trackSerialNum', |
176 | 194 | title : '记录序列号' , |
195 | + visible:false, | |
177 | 196 | }, |
178 | 197 | { |
179 | 198 | field : 'autoGenSerialNum', |
180 | 199 | title : '自动生成序列号', |
200 | + visible:false, | |
181 | 201 | align: 'center', |
182 | 202 | formatter: function(value, row, index) { |
183 | 203 | var actions = []; |
... | ... | @@ -192,10 +212,12 @@ |
192 | 212 | { |
193 | 213 | field : 'autoGenSerialNumFormat', |
194 | 214 | title : '自动生成序列号表达式' , |
215 | + visible:false, | |
195 | 216 | }, |
196 | 217 | { |
197 | 218 | field : 'snTemplateCode', |
198 | 219 | title : '序列号模板' , |
220 | + visible:false, | |
199 | 221 | }, |
200 | 222 | { |
201 | 223 | field : 'expiringDays', |
... | ... | @@ -238,6 +260,7 @@ |
238 | 260 | { |
239 | 261 | field: 'isMix', |
240 | 262 | title: '是否允许混放', |
263 | + visible:false, | |
241 | 264 | align: 'center', |
242 | 265 | formatter: function (value, row, index) { |
243 | 266 | return $.table.selectLogicLabel(value); |
... | ... |
src/main/resources/templates/config/materialArea/add.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg"> | |
6 | + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + <form class="form-horizontal m" id="form-material-area"> | |
8 | + | |
9 | + <div class="form-group"> | |
10 | + <label class="col-sm-3 control-label">编码:</label> | |
11 | + <div class="col-sm-8"> | |
12 | + <input id="code" name="code" class="form-control" type="text"> | |
13 | + </div> | |
14 | + </div> | |
15 | + | |
16 | + <div class="form-group"> | |
17 | + <label class="col-sm-3 control-label">名字:</label> | |
18 | + <div class="col-sm-8"> | |
19 | + <input id="name" name="name" class="form-control" type="text"> | |
20 | + </div> | |
21 | + </div> | |
22 | + | |
23 | + <div class="form-group"> | |
24 | + <div class="form-control-static col-sm-offset-9"> | |
25 | + <button type="submit" class="btn btn-primary">提交</button> | |
26 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
27 | + </div> | |
28 | + </div> | |
29 | + | |
30 | + </form> | |
31 | + </div> | |
32 | + <div th:include="include::footer"></div> | |
33 | + <script type="text/javascript"> | |
34 | + var prefix = ctx + "config/materialArea"; | |
35 | + $("#form-material-area").validate({ | |
36 | + submitHandler: function(form) { | |
37 | + // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize()); | |
38 | + var tableValue = $.common.getTableValue("#form-material-area"); | |
39 | + $.operate.save(prefix + "/add", tableValue); | |
40 | + } | |
41 | + }); | |
42 | + </script> | |
43 | +</body> | |
44 | +</html> | |
... | ... |
src/main/resources/templates/config/materialArea/edit.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg"> | |
6 | + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + <form class="form-horizontal m" id="form-materialArea-edit" th:object="${materialArea}"> | |
8 | + <input id="id" name="id" th:field="*{id}" type="hidden"> | |
9 | + | |
10 | + <div class="form-group"> | |
11 | + <label class="col-sm-3 control-label">编码:</label> | |
12 | + <div class="col-sm-8"> | |
13 | + <input id="code" name="code" th:field="*{code}" class="form-control" type="text"> | |
14 | + </div> | |
15 | + </div> | |
16 | + | |
17 | + <div class="form-group"> | |
18 | + <label class="col-sm-3 control-label">名字:</label> | |
19 | + <div class="col-sm-8"> | |
20 | + <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> | |
21 | + </div> | |
22 | + </div> | |
23 | + | |
24 | + <div class="form-group"> | |
25 | + <div class="form-control-static col-sm-offset-9"> | |
26 | + <button type="submit" class="btn btn-primary">提交</button> | |
27 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
28 | + </div> | |
29 | + </div> | |
30 | + | |
31 | + </form> | |
32 | + </div> | |
33 | + <div th:include="include::footer"></div> | |
34 | + <script type="text/javascript"> | |
35 | + var prefix = ctx + "config/locationHigh"; | |
36 | + $("#form-materialArea-edit").validate({ | |
37 | + submitHandler: function(form) { | |
38 | + // $.operate.save(prefix + "/edit", $('#form-locationType-edit').serialize()); | |
39 | + var tableValue = $.common.getTableValue("#form-materialArea-edit"); | |
40 | + $.operate.save(prefix + "/edit", tableValue); | |
41 | + } | |
42 | + }); | |
43 | + </script> | |
44 | +</body> | |
45 | +</html> | |
... | ... |
src/main/resources/templates/config/materialArea/materialArea.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="gray-bg"> | |
6 | + <div class="container-div"> | |
7 | + <div class="row"> | |
8 | + <div class="col-sm-12 select-info"> | |
9 | + <form id="materialArea-form"> | |
10 | + <div class="select-list"> | |
11 | + <li> | |
12 | + | |
13 | + <li> | |
14 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | |
15 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('alarmLevel-form')"><i class="fa fa-refresh"></i> 重置</a> | |
16 | + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> | |
17 | + </li> | |
18 | + </ul> | |
19 | + </div> | |
20 | + </form> | |
21 | + </div> | |
22 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
23 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> | |
24 | + <i class="fa fa-plus"></i> 新增 | |
25 | + </a> | |
26 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"> | |
27 | + <i class="fa fa-trash-o"></i> 删除 | |
28 | + </a> | |
29 | + </div> | |
30 | + | |
31 | + <div class="col-sm-12 select-info"> | |
32 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
33 | + </div> | |
34 | + <div> | |
35 | + </div> | |
36 | + <div th:include="include :: footer"></div> | |
37 | + <script th:inline="javascript"> | |
38 | + var editFlag = [[${@permission.hasPermi('config:locationType:edit')}]]; | |
39 | + var removeFlag = [[${@permission.hasPermi('config:locationType:remove')}]]; | |
40 | + var prefix = ctx + "config/materialArea" | |
41 | + var datas = [[${@dict.getType('sys_normal_disable')}]]; | |
42 | + var rowFlags = [[${@dict.getType('rowFlag')}]]; | |
43 | + $(function() { | |
44 | + var options = { | |
45 | + url: prefix + "/list", | |
46 | + createUrl: prefix + "/add", | |
47 | + updateUrl: prefix + "/edit/{id}", | |
48 | + removeUrl: prefix + "/remove", | |
49 | + modalName: "物料分区", | |
50 | + search: false, | |
51 | + columns: [{ | |
52 | + checkbox: true | |
53 | + }, | |
54 | + { | |
55 | + field : 'warehouseCode', | |
56 | + title : '仓库编码' | |
57 | + }, | |
58 | + { | |
59 | + field : 'code', | |
60 | + title : '编码' | |
61 | + }, | |
62 | + { | |
63 | + field : 'name', | |
64 | + title : '名称' | |
65 | + }, | |
66 | + { | |
67 | + field : 'created', | |
68 | + title : '创建时间' | |
69 | + }, | |
70 | + { | |
71 | + field : 'createdBy', | |
72 | + title : '创建用户' | |
73 | + }, | |
74 | + { | |
75 | + title: '操作', | |
76 | + align: 'center', | |
77 | + formatter: function(value, row, index) { | |
78 | + var actions = []; | |
79 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); | |
80 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); | |
81 | + return actions.join(''); | |
82 | + } | |
83 | + }] | |
84 | + }; | |
85 | + $.table.init(options); | |
86 | + }); | |
87 | + </script> | |
88 | +</body> | |
89 | +</html> | |
0 | 90 | \ No newline at end of file |
... | ... |