Commit 14ea7786136911465cc808d7a28121a4a028c181
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
3 changed files
with
24 additions
and
32 deletions
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... | ... | @@ -63,6 +63,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
63 | 63 | } |
64 | 64 | |
65 | 65 | //插入数据库 |
66 | + location.setCode(code); | |
66 | 67 | location.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
67 | 68 | location.setCreatedBy(ShiroUtils.getLoginName()); |
68 | 69 | Boolean flag=this.save(location); |
... | ... | @@ -124,7 +125,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i |
124 | 125 | queryWrapper.eq(Location::getCode,code) |
125 | 126 | .eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode()); |
126 | 127 | List<Location> locationList = locationService.list(queryWrapper); |
127 | - if (locationList.size() != 0) { | |
128 | + if (locationList.size() == 0) { | |
128 | 129 | param.setCode(code); |
129 | 130 | locations.add(param); |
130 | 131 | } |
... | ... |
src/main/resources/templates/config/location/add.html
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | <label class="col-sm-3 control-label">库位类型:</label> |
34 | 34 | <div class="col-sm-8"> |
35 | 35 | <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> |
36 | - <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['prefix']}"></option> | |
36 | + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option> | |
37 | 37 | </select> |
38 | 38 | </div> |
39 | 39 | </div> |
... | ... | @@ -48,8 +48,8 @@ |
48 | 48 | <div class="form-group"> |
49 | 49 | <label class="col-sm-3 control-label">库位状态:</label> |
50 | 50 | <div class="col-sm-8"> |
51 | - <select id="status" name="status" class="form-control" th:with="statusList=${@dict.getType('locationStatus')}"> | |
52 | - <option th:each="item : ${statusList}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
51 | + <select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}"> | |
52 | + <option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
53 | 53 | </select> |
54 | 54 | </div> |
55 | 55 | </div> |
... | ... | @@ -66,30 +66,22 @@ |
66 | 66 | var prefix = ctx + "config/location" |
67 | 67 | $("#form-location-add").validate({ |
68 | 68 | rules:{ |
69 | - row:{ | |
69 | + iRow:{ | |
70 | 70 | required:true, |
71 | 71 | digits:true |
72 | 72 | }, |
73 | - line:{ | |
73 | + iColumn:{ | |
74 | 74 | required:true, |
75 | 75 | digits:true |
76 | 76 | }, |
77 | - layer:{ | |
77 | + iLayer:{ | |
78 | 78 | required:true, |
79 | 79 | digits:true |
80 | 80 | }, |
81 | - grid:{ | |
81 | + iGrid:{ | |
82 | 82 | required:true, |
83 | 83 | digits:true |
84 | - }, | |
85 | - rowIndex:{ | |
86 | - required:true, | |
87 | - range:[1,4] | |
88 | - }, | |
89 | - roadway:{ | |
90 | - required:true, | |
91 | - min:0 | |
92 | - }, | |
84 | + } | |
93 | 85 | }, |
94 | 86 | submitHandler: function(form) { |
95 | 87 | $.ajax({ |
... | ... | @@ -101,9 +93,9 @@ |
101 | 93 | "iColumn": $("input[name='iColumn']").val(), |
102 | 94 | "iLayer": $("input[name='iLayer']").val(), |
103 | 95 | "iGrid": $("input[name='iGrid']").val(), |
104 | - "locationType": $("#type option:selected").val(), | |
96 | + "locationType": $("#locationType option:selected").val(), | |
105 | 97 | "zoneCode": $("#zoneCode option:selected").attr("code"), |
106 | - "enable" : $("input[name='enable']").is(':checked'), | |
98 | + "status" : $("#status option:selected").val(), | |
107 | 99 | }, |
108 | 100 | async : false, |
109 | 101 | error : function(request) { |
... | ... |
src/main/resources/templates/config/location/addBatch.html
... | ... | @@ -29,12 +29,12 @@ |
29 | 29 | <input id="iGrid" name="iGrid" class="form-control" type="text"> |
30 | 30 | </div> |
31 | 31 | </div> |
32 | - <div class="form-group"> | |
32 | + <div class="form-group"> | |
33 | 33 | <label class="col-sm-3 control-label">库位类型:</label> |
34 | 34 | <div class="col-sm-8"> |
35 | - <select id="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> | |
36 | - <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option> | |
37 | - </select> | |
35 | + <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> | |
36 | + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option> | |
37 | + </select> | |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | <div class="form-group"> |
... | ... | @@ -48,8 +48,8 @@ |
48 | 48 | <div class="form-group"> |
49 | 49 | <label class="col-sm-3 control-label">库位状态:</label> |
50 | 50 | <div class="col-sm-8"> |
51 | - <select id="status" name="status" class="form-control" th:with="statusList=${@dict.getType('locationStatus')}"> | |
52 | - <option th:each="item : ${statusList}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
51 | + <select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}"> | |
52 | + <option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
53 | 53 | </select> |
54 | 54 | </div> |
55 | 55 | </div> |
... | ... | @@ -87,13 +87,12 @@ |
87 | 87 | digits:true |
88 | 88 | }, |
89 | 89 | locationType:{ |
90 | - required:true, | |
91 | - digits:true | |
90 | + required:true | |
92 | 91 | }, |
93 | - status:{ | |
94 | - required:true, | |
95 | - digits:true | |
96 | - } | |
92 | + // status:{ | |
93 | + // required:true, | |
94 | + // digits:true | |
95 | + // } | |
97 | 96 | }, |
98 | 97 | submitHandler: function(form) { |
99 | 98 | $.ajax({ |
... | ... | @@ -107,7 +106,7 @@ |
107 | 106 | "iGrid": $("input[name='iGrid']").val(), |
108 | 107 | "locationType": $("#locationType option:selected").val(), |
109 | 108 | "zoneCode": $("#zone option:selected").attr("code"), |
110 | - "status" : $("input[name='status']").is(':checked'), | |
109 | + "status" : $("#status option:selected").val(), | |
111 | 110 | }, |
112 | 111 | async : false, |
113 | 112 | error : function(request) { |
... | ... |