Commit 68e0a40cfbefa66c1a53af8f63fce2b6641b972d
1 parent
5dc1040b
feat: 页面优化
Showing
7 changed files
with
64 additions
and
119 deletions
src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java
... | ... | @@ -43,8 +43,7 @@ public class cycleCountPreferenceController extends BaseController { |
43 | 43 | |
44 | 44 | @RequiresPermissions("config:cycleCountPreference:view") |
45 | 45 | @GetMapping() |
46 | - public String cyclecountHeader() | |
47 | - { | |
46 | + public String cyclecountHeader() { | |
48 | 47 | return prefix + "/cycleCountPreference"; |
49 | 48 | } |
50 | 49 | |
... | ... | @@ -53,7 +52,7 @@ public class cycleCountPreferenceController extends BaseController { |
53 | 52 | */ |
54 | 53 | @RequiresPermissions("config:cycleCountPreference:list") |
55 | 54 | @PostMapping("/list") |
56 | - @Log(title = "配置-库存配置",operating = "盘点首选项", action = BusinessType.GRANT) | |
55 | + @Log(title = "配置-库存配置", operating = "盘点首选项", action = BusinessType.GRANT) | |
57 | 56 | @ResponseBody |
58 | 57 | public TableDataInfo list(CycleCountPreference cycleCountPreference, String createdBegin, String createdEnd) { |
59 | 58 | |
... | ... | @@ -62,19 +61,16 @@ public class cycleCountPreferenceController extends BaseController { |
62 | 61 | Integer pageNum = pageDomain.getPageNum(); |
63 | 62 | Integer pageSize = pageDomain.getPageSize(); |
64 | 63 | |
65 | - lambdaQueryWrapper.ge( | |
66 | - StringUtils.isNotEmpty(createdBegin), CycleCountPreference::getCreated, createdBegin) | |
67 | - .le(StringUtils.isNotEmpty(createdEnd), CycleCountPreference::getCreated, createdEnd)//创建时间范围 | |
68 | - .eq(CycleCountPreference::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库 | |
69 | - .eq(StringUtils.isNotEmpty(cycleCountPreference.getCode()), CycleCountPreference::getCode, cycleCountPreference.getCode())//首选项编码 | |
70 | - | |
71 | - /*.eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLocation()),CycleCountPreference::getPromptLocation,cycleCountPreference.getPromptLocation())//提示货位 | |
72 | - .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLpn()),CycleCountPreference::getPromptLpn,cycleCountPreference.getPromptLpn())//提示PLN | |
73 | - .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptItem()),CycleCountPreference::getPromptItem,cycleCountPreference.getPromptItem())//提示物料 | |
74 | - */ | |
75 | - .eq(StringUtils.isNotEmpty(cycleCountPreference.getLastUpdatedBy()), CycleCountPreference::getLastUpdatedBy,cycleCountPreference.getLastUpdatedBy())//更新人 | |
76 | - .eq(StringUtils.isNotEmpty(cycleCountPreference.getCreatedBy()), CycleCountPreference::getCreatedBy,cycleCountPreference.getCreatedBy())//创建人 | |
77 | - | |
64 | + lambdaQueryWrapper | |
65 | + .ge(StringUtils.isNotEmpty(createdBegin), CycleCountPreference::getCreated, createdBegin) | |
66 | + .le(StringUtils.isNotEmpty(createdEnd), CycleCountPreference::getCreated, createdEnd) | |
67 | + .eq(CycleCountPreference::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
68 | + .eq(StringUtils.isNotEmpty(cycleCountPreference.getCode()), CycleCountPreference::getCode, cycleCountPreference.getCode()) | |
69 | + .eq(StringUtils.isNotNull(cycleCountPreference.getPromptLocation()), CycleCountPreference::getPromptLocation, cycleCountPreference.getPromptLocation()) | |
70 | + .eq(StringUtils.isNotNull(cycleCountPreference.getPromptLpn()), CycleCountPreference::getPromptLpn, cycleCountPreference.getPromptLpn()) | |
71 | + .eq(StringUtils.isNotNull(cycleCountPreference.getPromptItem()), CycleCountPreference::getPromptItem, cycleCountPreference.getPromptItem()) | |
72 | + .eq(StringUtils.isNotEmpty(cycleCountPreference.getLastUpdatedBy()), CycleCountPreference::getLastUpdatedBy, cycleCountPreference.getLastUpdatedBy()) | |
73 | + .eq(StringUtils.isNotEmpty(cycleCountPreference.getCreatedBy()), CycleCountPreference::getCreatedBy, cycleCountPreference.getCreatedBy()) | |
78 | 74 | .orderByDesc(CycleCountPreference::getId); |
79 | 75 | |
80 | 76 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { |
... | ... | @@ -104,8 +100,8 @@ public class cycleCountPreferenceController extends BaseController { |
104 | 100 | @Log(title = "配置-盘点首选项", operating = "新增盘点首选项", action = BusinessType.INSERT) |
105 | 101 | @PostMapping("/addSave") |
106 | 102 | @ResponseBody |
107 | - public AjaxResult addSave(CycleCountPreference cycleCountPreference) { | |
108 | - if(cycleCountPreference == null){ | |
103 | + public AjaxResult addSave(CycleCountPreference cycleCountPreference) { | |
104 | + if (cycleCountPreference == null) { | |
109 | 105 | return AjaxResult.error("新增数据不能为空!"); |
110 | 106 | } |
111 | 107 | return cycleCountPreferenceService.addSave(cycleCountPreference); |
... | ... | @@ -129,16 +125,16 @@ public class cycleCountPreferenceController extends BaseController { |
129 | 125 | @ResponseBody |
130 | 126 | public AjaxResult editSave(CycleCountPreference cycleCountPreference) { |
131 | 127 | //不允许在被配置默认使用的情况先停用首选项 |
132 | - if(cycleCountPreference.getEnable() == false){ | |
128 | + if (cycleCountPreference.getEnable() == false) { | |
133 | 129 | ConfigValue configValueTemp = new ConfigValue(); |
134 | 130 | configValueTemp.setModuleType("cyclecount"); |
135 | 131 | configValueTemp.setWarehouseCode(cycleCountPreference.getWarehouseCode()); |
136 | 132 | LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper = Wrappers.lambdaQuery(configValueTemp); |
137 | 133 | ConfigValue configValue = configValueService.getOne(configValueLambdaQueryWrapper); |
138 | - if(configValue != null){ | |
139 | - if(configValue.getIdentifier().equals(cycleCountPreference.getCode())){ | |
140 | - return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再停用,修改失败!"); | |
141 | - } | |
134 | + if (configValue != null) { | |
135 | + if (configValue.getIdentifier().equals(cycleCountPreference.getCode())) { | |
136 | + return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再停用,修改失败!"); | |
137 | + } | |
142 | 138 | } |
143 | 139 | } |
144 | 140 | cycleCountPreference.setLastUpdatedBy(ShiroUtils.getLoginName()); |
... | ... | @@ -151,38 +147,30 @@ public class cycleCountPreferenceController extends BaseController { |
151 | 147 | */ |
152 | 148 | @RequiresPermissions("config:cycleCountPreference:remove") |
153 | 149 | @Log(title = "通用-盘点首选项", operating = "删除盘点首选项", action = BusinessType.DELETE) |
154 | - @PostMapping( "/remove") | |
150 | + @PostMapping("/remove") | |
155 | 151 | @ResponseBody |
156 | 152 | public AjaxResult remove(String ids) { |
157 | - if (StringUtils.isEmpty(ids)){ | |
153 | + if (StringUtils.isEmpty(ids)) { | |
158 | 154 | return AjaxResult.error("id不能为空"); |
159 | 155 | } |
160 | 156 | List<Integer> list = new ArrayList<>(); |
161 | 157 | for (Integer id : Convert.toIntArray(ids)) { |
162 | 158 | //校验该首选项是否在使用 |
163 | 159 | CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getById(id); |
164 | - ConfigValue configValueTemp = new ConfigValue(); | |
165 | - configValueTemp.setModuleType("cyclecount"); | |
166 | - configValueTemp.setWarehouseCode(cycleCountPreference.getWarehouseCode()); | |
167 | - LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper = Wrappers.lambdaQuery(configValueTemp); | |
168 | - ConfigValue configValue = configValueService.getOne(configValueLambdaQueryWrapper); | |
169 | - if(configValue != null){ | |
170 | - if(configValue.getIdentifier().equals(cycleCountPreference.getCode())){ | |
171 | - return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再删除,删除失败!"); | |
172 | - } | |
160 | + ConfigValue configValueTemp = new ConfigValue(); | |
161 | + configValueTemp.setModuleType("cyclecount"); | |
162 | + configValueTemp.setWarehouseCode(cycleCountPreference.getWarehouseCode()); | |
163 | + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper = Wrappers.lambdaQuery(configValueTemp); | |
164 | + ConfigValue configValue = configValueService.getOne(configValueLambdaQueryWrapper); | |
165 | + if (configValue != null) { | |
166 | + if (configValue.getIdentifier().equals(cycleCountPreference.getCode())) { | |
167 | + return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再删除,删除失败!"); | |
173 | 168 | } |
169 | + } | |
174 | 170 | list.add(id); |
175 | 171 | } |
176 | 172 | return toAjax(cycleCountPreferenceService.removeByIds(list)); |
177 | 173 | } |
178 | 174 | |
179 | 175 | |
180 | - | |
181 | - | |
182 | - | |
183 | - | |
184 | - | |
185 | - | |
186 | - | |
187 | - | |
188 | 176 | } |
... | ... |
src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html
... | ... | @@ -14,16 +14,31 @@ |
14 | 14 | <input name="code" placeholder="请输入盘点首选项编码" type="text"/> |
15 | 15 | </li> |
16 | 16 | <li> |
17 | - <label>是否提示货位:</label> | |
18 | - <input name="promptLocation" placeholder="请输入是否提示库位" type="text"/> | |
17 | + <label>是否提示库位:</label> | |
18 | + <select name="promptLocation" th:with="type=${@dict.getType('false_and_true')}"> | |
19 | + <option value="">所有</option> | |
20 | + <option th:each="e : ${type}" th:text="${e['dictLabel']}" | |
21 | + th:value="${e['dictValue']}"> | |
22 | + </option> | |
23 | + </select> | |
19 | 24 | </li> |
20 | 25 | <li> |
21 | 26 | <label>是否提示物料:</label> |
22 | - <input name="promptItem" placeholder="请输入是否提示物料" type="text"/> | |
27 | + <select name="promptItem" th:with="type=${@dict.getType('false_and_true')}"> | |
28 | + <option value="">所有</option> | |
29 | + <option th:each="e : ${type}" th:text="${e['dictLabel']}" | |
30 | + th:value="${e['dictValue']}"> | |
31 | + </option> | |
32 | + </select> | |
23 | 33 | </li> |
24 | 34 | <li> |
25 | 35 | <label>是否提示载具:</label> |
26 | - <input name="promptLpn" placeholder="请输入是否提示载具" type="text"/> | |
36 | + <select name="promptLpn" th:with="type=${@dict.getType('false_and_true')}"> | |
37 | + <option value="">所有</option> | |
38 | + <option th:each="e : ${type}" th:text="${e['dictLabel']}" | |
39 | + th:value="${e['dictValue']}"> | |
40 | + </option> | |
41 | + </select> | |
27 | 42 | </li> |
28 | 43 | <li> |
29 | 44 | <label>更新人:</label> |
... | ... | @@ -77,10 +92,6 @@ |
77 | 92 | { |
78 | 93 | checkbox: true |
79 | 94 | }, |
80 | - /*{ | |
81 | - field: 'id', | |
82 | - title: 'ID' | |
83 | - },*/ | |
84 | 95 | { |
85 | 96 | field: 'code', |
86 | 97 | title: '盘点首选项编码' |
... | ... | @@ -89,11 +100,6 @@ |
89 | 100 | field: 'name', |
90 | 101 | title: '盘点首选项名称' |
91 | 102 | }, |
92 | - /*{ | |
93 | - field: 'warehouseCode', | |
94 | - title: '仓库编码', | |
95 | - visible: true | |
96 | - },*/ | |
97 | 103 | { |
98 | 104 | field: 'promptLocation', |
99 | 105 | title: '系统提示库位', |
... | ... | @@ -107,7 +113,7 @@ |
107 | 113 | }, |
108 | 114 | { |
109 | 115 | field: 'promptLpn', |
110 | - title: '系统提示容器', | |
116 | + title: '系统提示载具', | |
111 | 117 | formatter: function (value, item, index) { |
112 | 118 | if (value === true) { |
113 | 119 | return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; |
... | ... | @@ -181,29 +187,6 @@ |
181 | 187 | title: '更新用户', |
182 | 188 | visible: false |
183 | 189 | }, |
184 | - /*{ | |
185 | - field : 'version', | |
186 | - title : '数据版本', | |
187 | - visible : false | |
188 | - },*/ | |
189 | - /*{ | |
190 | - field : 'processStamp', | |
191 | - title : '处理标记', | |
192 | - visible : false | |
193 | - },*/ | |
194 | - /* { | |
195 | - field : 'countByPiece', | |
196 | - title : 'RF逐件盘点' , | |
197 | - visible : false, | |
198 | - formatter: function (value, item, index) { | |
199 | - if (value==true) { | |
200 | - return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; | |
201 | - } | |
202 | - else if (value==false) { | |
203 | - return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; | |
204 | - } | |
205 | - } | |
206 | - },*/ | |
207 | 190 | { |
208 | 191 | field: 'enable', |
209 | 192 | title: '有效', |
... | ... | @@ -215,22 +198,6 @@ |
215 | 198 | } |
216 | 199 | } |
217 | 200 | }, |
218 | - /*{ | |
219 | - field : 'userDef1', | |
220 | - title : '自定义字段1' , | |
221 | - visible:false | |
222 | - }, | |
223 | - { | |
224 | - field : 'userDef2', | |
225 | - title : '自定义字段2' , | |
226 | - visible:false | |
227 | - }, | |
228 | - { | |
229 | - field : 'userDef3', | |
230 | - title : '自定义字段3' , | |
231 | - visible:false | |
232 | - },*/ | |
233 | - | |
234 | 201 | { |
235 | 202 | title: '操作', |
236 | 203 | align: 'center', |
... | ... |
src/main/resources/templates/config/cycleCountPreference/edit.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <body class="white-bg"> |
6 | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | 7 | <form class="form-horizontal m" id="form-cycleCountPreference-edit" th:object="${cycleCountPreference}"> |
8 | - <div class="form-group"> | |
8 | + <div class="form-group" hidden="hidden"> | |
9 | 9 | <label class="col-sm-3 control-label">ID:</label> |
10 | 10 | <div class="col-sm-8"> |
11 | 11 | <input id="id" name="id" class="form-control" type="text" th:field="*{id}" readonly="readonly"> |
... | ... |
src/main/resources/templates/system/role/role.html
... | ... | @@ -15,8 +15,8 @@ |
15 | 15 | <input name="roleName" placeholder="请输入角色名称" type="text"/> |
16 | 16 | </li> |
17 | 17 | <li> |
18 | - <label>权限字符:</label> | |
19 | - <input name="roleCode" placeholder="请输入权限字符" type="text"/> | |
18 | + <label>角色编码:</label> | |
19 | + <input name="roleCode" placeholder="请输入角色编码" type="text"/> | |
20 | 20 | </li> |
21 | 21 | <li> |
22 | 22 | <label>角色状态:</label> |
... | ... | @@ -62,8 +62,6 @@ |
62 | 62 | var removeFlag = [[${@permission.hasPermi('system:role:remove')}]]; |
63 | 63 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
64 | 64 | var prefix = ctx + "system/role" |
65 | - | |
66 | - | |
67 | 65 | $(function () { |
68 | 66 | var options = { |
69 | 67 | url: prefix + "/list", |
... | ... | @@ -79,10 +77,6 @@ |
79 | 77 | { |
80 | 78 | checkbox: true |
81 | 79 | }, |
82 | - /*{ | |
83 | - field: 'id', | |
84 | - title: '角色id' | |
85 | - },*/ | |
86 | 80 | { |
87 | 81 | field: 'roleName', |
88 | 82 | title: '角色名称', |
... | ... | @@ -90,7 +84,7 @@ |
90 | 84 | }, |
91 | 85 | { |
92 | 86 | field: 'roleCode', |
93 | - title: '权限编码', | |
87 | + title: '角色编码', | |
94 | 88 | sortable: true |
95 | 89 | }, |
96 | 90 | { |
... | ... |
src/main/resources/templates/system/user/add.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | <div class="form-group"> |
11 | 11 | <label class="col-sm-3 control-label ">登录名称:</label> |
12 | 12 | <div class="col-sm-8"> |
13 | - <input class="form-control" type="text" id="loginName" name="loginName"/> | |
13 | + <input class="form-control" type="text" id="loginName" name="loginName" placeholder="请输入登录名称"/> | |
14 | 14 | </div> |
15 | 15 | </div> |
16 | 16 | <div class="form-group"> |
... | ... | @@ -22,25 +22,25 @@ |
22 | 22 | <div class="form-group"> |
23 | 23 | <label class="col-sm-3 control-label">用户名称:</label> |
24 | 24 | <div class="col-sm-8"> |
25 | - <input class="form-control" type="text" name="userName" id="userName"> | |
25 | + <input class="form-control" type="text" name="userName" id="userName" placeholder="请输入用户名称"> | |
26 | 26 | </div> |
27 | 27 | </div> |
28 | 28 | <div class="form-group"> |
29 | 29 | <label class="col-sm-3 control-label">密码:</label> |
30 | 30 | <div class="col-sm-8"> |
31 | - <input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}"> | |
31 | + <input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}" placeholder="请输入密码"> | |
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | <div class="form-group"> |
35 | 35 | <label class="col-sm-3 control-label">邮箱:</label> |
36 | 36 | <div class="col-sm-8"> |
37 | - <input class="form-control" type="text" name="email" id="email"> | |
37 | + <input class="form-control" type="text" name="email" id="email" placeholder="请输入邮箱"> | |
38 | 38 | </div> |
39 | 39 | </div> |
40 | 40 | <div class="form-group"> |
41 | 41 | <label class="col-sm-3 control-label">手机:</label> |
42 | 42 | <div class="col-sm-8"> |
43 | - <input class="form-control" type="text" name="phoneNumber" id="phoneNumber"> | |
43 | + <input class="form-control" type="text" name="phoneNumber" id="phoneNumber" placeholder="请输入手机号"> | |
44 | 44 | </div> |
45 | 45 | </div> |
46 | 46 | <div class="form-group"> |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | <label class="col-sm-3 control-label">货主:</label> |
68 | 68 | <div class="col-sm-8"> |
69 | 69 | <label th:each="company:${companys}" class="checkbox-inline i-checks"> |
70 | - <input name="company" type="checkbox" th:value="${company.id}" th:text=" ${company.name}"> | |
70 | + <input name="company" type="checkbox" checked th:value="${company.id}" th:text=" ${company.name}"> | |
71 | 71 | </label> |
72 | 72 | </div> |
73 | 73 | </div> |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | <label class="col-sm-3 control-label">仓库:</label> |
77 | 77 | <div class="col-sm-8"> |
78 | 78 | <label th:each="warehouse:${warehouseList}" class="checkbox-inline i-checks"> |
79 | - <input name="warehouseCode" type="checkbox" th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} "> | |
79 | + <input name="warehouseCode" type="checkbox" checked th:value="${warehouse.value}" th:text=" ${warehouse.name}" th:disabled="${warehouse.enable == false} "> | |
80 | 80 | </label> |
81 | 81 | </div> |
82 | 82 | </div> |
... | ... |
src/main/resources/templates/system/user/edit.html
... | ... | @@ -23,19 +23,19 @@ |
23 | 23 | <div class="form-group"> |
24 | 24 | <label class="col-sm-3 control-label">用户名称:</label> |
25 | 25 | <div class="col-sm-8"> |
26 | - <input class="form-control" type="text" name="userName" id="userName" th:field="*{userName}"> | |
26 | + <input class="form-control" type="text" name="userName" id="userName" th:field="*{userName}" placeholder="请输入用户名称"> | |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 | <div class="form-group"> |
30 | 30 | <label class="col-sm-3 control-label">邮箱:</label> |
31 | 31 | <div class="col-sm-8"> |
32 | - <input class="form-control" type="text" name="email" id="email" th:field="*{email}"> | |
32 | + <input class="form-control" type="text" name="email" id="email" th:field="*{email}" placeholder="请输入邮箱"> | |
33 | 33 | </div> |
34 | 34 | </div> |
35 | 35 | <div class="form-group"> |
36 | 36 | <label class="col-sm-3 control-label">手机:</label> |
37 | 37 | <div class="col-sm-8"> |
38 | - <input class="form-control" type="text" name="phoneNumber" id="phoneNumber" th:field="*{phoneNumber}"> | |
38 | + <input class="form-control" type="text" name="phoneNumber" id="phoneNumber" th:field="*{phoneNumber}" placeholder="请输入邮箱"> | |
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | <div class="form-group"> |
... | ... |