Commit 59cdc073585e0e123f09d6e95d640a7eba8df629

Authored by mahuandong
1 parent cde4d931

修改入库首选项页面,规则查询使用数据字典值,表格值显示修改

src/main/java/com/huaheng/pc/config/FilterConfigDetail/service/FilterConfigDetailService.java
... ... @@ -18,10 +18,10 @@ public class FilterConfigDetailService extends ServiceImpl<FilterConfigDetailMap
18 18 * 查询定位自定义sql,供前端页面选择使用
19 19 * @return
20 20 */
21   - public List<Map<String, Object>> queryFilterConfigDetail(String moduleType){
  21 + public List<Map<String, Object>> queryFilterConfigDetail(String recordType){
22 22 LambdaQueryWrapper<FilterConfigDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
23 23 lambdaQueryWrapper.select(FilterConfigDetail::getCode, FilterConfigDetail::getDescription)
24   - .eq(FilterConfigDetail::getModuleType,moduleType)
  24 + .eq(FilterConfigDetail::getRecordType, recordType)
25 25 .eq(FilterConfigDetail::getWarehouseCode, ShiroUtils.getWarehouseCode());
26 26 return this.listMaps(lambdaQueryWrapper);
27 27 }
... ...
src/main/java/com/huaheng/pc/config/statusFlow/controller/StatusFlowDetailController.java
... ... @@ -109,6 +109,8 @@ public class StatusFlowDetailController extends BaseController {
109 109 @ResponseBody
110 110 public AjaxResult addSave(@ApiParam(name = "containerType", value = "流程明细", required = true)
111 111 StatusFlowDetail statusFlowDetail) {
  112 + StatusFlowHeader statusFlowHeader = statusFlowHeaderService.getById(statusFlowDetail.getHeaderId());
  113 + statusFlowDetail.setModuleType(statusFlowHeader.getModuleType());
112 114 statusFlowDetail.setWarehouseCode(ShiroUtils.getWarehouseCode());
113 115 statusFlowDetail.setCreatedBy(ShiroUtils.getLoginName());
114 116 statusFlowDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
... ...
src/main/resources/static/huaheng/js/huahengUI.js
... ... @@ -194,6 +194,15 @@
194 194 });
195 195 return actions.join('');
196 196 },
  197 + selectWhetherLabel: function(_value) {
  198 + var actions = [];
  199 + if (_value == 0) {
  200 + actions.push("<span class='badge badge-primary'>是</span>");
  201 + } else {
  202 + actions.push("<span class='badge badge-danger'>否</span>")
  203 + }
  204 + return actions.join('');
  205 + },
197 206 // 回显数据绑定的表格
198 207 selectIdToName: function(_datas, _value) {
199 208 var actions = [];
... ...
src/main/resources/templates/config/receiptPreference/add.html
... ... @@ -38,8 +38,8 @@
38 38 <label class="col-sm-3 control-label">允许超收:</label>
39 39 <div class="col-sm-8">
40 40 <select id="allowOverReceiving" name="allowOverReceiving" class="form-control">
41   - <option value="0">允许</option>
42   - <option value="1">不允许</option>
  41 + <option value="1">允许</option>
  42 + <option value="0">不允许</option>
43 43 </select>
44 44 </div>
45 45 </div>
... ... @@ -82,7 +82,7 @@
82 82 <div class="form-group">
83 83 <label class="col-sm-3 control-label">定位规则:</label>
84 84 <div class="col-sm-8">
85   - <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}">
  85 + <select id="locationRule" name="locationRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('locationRule')}">
86 86 <option value="">请选择</option>
87 87 <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
88 88 </select>
... ... @@ -92,7 +92,7 @@
92 92 <label class="col-sm-3 control-label">空库位规则:</label>
93 93 <div class="col-sm-8">
94 94 <select id="emptyLocRule" name="emptyLocRule" class="form-control"
95   - th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('空库位规则')}">
  95 + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('emptyLocRule')}">
96 96 <option value="">请选择</option>
97 97 <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
98 98 </select>
... ... @@ -137,7 +137,10 @@
137 137 <div class="form-group">
138 138 <label class="col-sm-3 control-label">RF快速上架:</label>
139 139 <div class="col-sm-8">
140   - <input id="allowQuickPutaway" name="allowQuickPutaway" class="form-control" type="text">
  140 + <select id="allowQuickPutaway" name="allowQuickPutaway" class="form-control">
  141 + <option value="0">是</option>
  142 + <option value="1">否</option>
  143 + </select>
141 144 </div>
142 145 </div>
143 146 <div class="form-group">
... ... @@ -149,7 +152,10 @@
149 152 <div class="form-group">
150 153 <label class="col-sm-3 control-label">快速入库:</label>
151 154 <div class="col-sm-8">
152   - <input id="useQuickCheckIn" name="useQuickCheckIn" class="form-control" type="text">
  155 + <select id="useQuickCheckIn" name="useQuickCheckIn" class="form-control">
  156 + <option value="0">是</option>
  157 + <option value="1">否</option>
  158 + </select>
153 159 </div>
154 160 </div>
155 161 <!--<div class="form-group">
... ... @@ -284,12 +290,14 @@
284 290 submitHandler: function(form) {
285 291 var tableValue = $.common.getTableValue("#form-receiptPreference-add");
286 292 tableValue = formValueReplace(tableValue, "allowOverReceiving", $("#allowOverReceiving option:selected").val());
287   - tableValue = formValueReplace(tableValue, "receiptFlow", $("#receiptFlow option:selected").val());
  293 + tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val());
288 294 tableValue = formValueReplace(tableValue, "autoAssignLPN", $("#autoAssignLPN option:selected").val());
289 295 tableValue = formValueReplace(tableValue, "autoLocate", $("#autoLocate option:selected").val());
290 296 tableValue = formValueReplace(tableValue, "showOpenQty", $("#showOpenQty option:selected").val());
291   - tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val());
  297 + tableValue = formValueReplace(tableValue, "locationRule", $("#locationRule option:selected").val());
292 298 tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val());
  299 + tableValue = formValueReplace(tableValue, "useQuickCheckIn", $("#useQuickCheckIn option:selected").val());
  300 + tableValue = formValueReplace(tableValue, "allowQuickPutaway", $("#allowQuickPutaway option:selected").val());
293 301 $.operate.save(prefix + "/add", tableValue);
294 302 }
295 303 });
... ...
src/main/resources/templates/config/receiptPreference/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-receiptPreference-edit" th:object="${receiptPreference}">
8   - <input id="id" name="id" th:field="*{id}">
  8 + <input id="id" name="id" th:field="*{id}" type="hidden">
9 9 <div class="form-group">
10 10 <label class="col-sm-3 control-label">编码:</label>
11 11 <div class="col-sm-8">
... ... @@ -21,26 +21,27 @@
21 21 <div class="form-group">
22 22 <label class="col-sm-3 control-label">入库流程:</label>
23 23 <div class="col-sm-8">
24   - <input id="receiptFlow" name="receiptFlow" class="form-control" type="text" th:field="*{receiptFlow}">
  24 + <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('入库单')}" th:field="*{receivingFlow}">
  25 + <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option>
  26 + </select>
25 27 </div>
26 28 </div>
27 29 <div class="form-group">
28 30 <label class="col-sm-3 control-label">自动生成托盘号:</label>
29 31 <div class="col-sm-8">
30   - <input id="autoAssignLPN" name="autoAssignLPN" class="form-control" type="text" th:field="*{autoAssignLPN}">
  32 + <select id="autoAssignLPN" name="autoAssignLPN" class="form-control" th:field="*{autoAssignLPN}">
  33 + <option value="0">自动生成</option>
  34 + <option value="1">不自动生成</option>
  35 + </select>
31 36 </div>
32 37 </div>
33 38 <div class="form-group">
34 39 <label class="col-sm-3 control-label">允许超收:</label>
35 40 <div class="col-sm-8">
36   - <div class="onoffswitch">
37   - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowOverReceiving"
38   - name="allowOverReceiving" th:field="*{allowOverReceiving}">
39   - <label class="onoffswitch-label" for="allowOverReceiving">
40   - <span class="onoffswitch-inner"></span>
41   - <span class="onoffswitch-switch"></span>
42   - </label>
43   - </div>
  41 + <select id="allowOverReceiving" name="allowOverReceiving" class="form-control" th:field="*{allowOverReceiving}">
  42 + <option value="1">允许</option>
  43 + <option value="0">不允许</option>
  44 + </select>
44 45 </div>
45 46 </div>
46 47 <div class="form-group">
... ... @@ -52,13 +53,19 @@
52 53 <div class="form-group">
53 54 <label class="col-sm-3 control-label">自动定位:</label>
54 55 <div class="col-sm-8">
55   - <input id="autoLocate" name="autoLocate" class="form-control" type="text" th:field="*{autoLocate}">
  56 + <select id="autoLocate" name="autoLocate" th:field="*{autoLocate}" class="form-control">
  57 + <option value="0">是</option>
  58 + <option value="1">否</option>
  59 + </select>
56 60 </div>
57 61 </div>
58 62 <div class="form-group">
59 63 <label class="col-sm-3 control-label">RF显示未收数量:</label>
60 64 <div class="col-sm-8">
61   - <input id="showOpenQty" name="showOpenQty" class="form-control" type="text" th:field="*{showOpenQty}">
  65 + <select id="showOpenQty" name="showOpenQty" class="form-control" th:field="*{showOpenQty}">
  66 + <option value="0">是</option>
  67 + <option value="1">否</option>
  68 + </select>
62 69 </div>
63 70 </div>
64 71 <div class="form-group">
... ... @@ -76,13 +83,21 @@
76 83 <div class="form-group">
77 84 <label class="col-sm-3 control-label">定位规则:</label>
78 85 <div class="col-sm-8">
79   - <input id="locationRule" name="locationRule" class="form-control" type="text" th:field="*{locationRule}">
  86 + <select id="locationRule" name="locationRule" class="form-control"
  87 + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('locationRule')}" th:field="*{locationRule}">
  88 + <option value="">请选择</option>
  89 + <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
  90 + </select>
80 91 </div>
81 92 </div>
82 93 <div class="form-group">
83 94 <label class="col-sm-3 control-label">空库位规则:</label>
84 95 <div class="col-sm-8">
85   - <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text" th:field="*{emptyLocRule}">
  96 + <select id="emptyLocRule" name="emptyLocRule" class="form-control"
  97 + th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('emptyLocRule')}" th:field="*{emptyLocRule}">
  98 + <option value="">请选择</option>
  99 + <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option>
  100 + </select>
86 101 </div>
87 102 </div>
88 103 <div class="form-group">
... ... @@ -124,7 +139,10 @@
124 139 <div class="form-group">
125 140 <label class="col-sm-3 control-label">RF快速上架:</label>
126 141 <div class="col-sm-8">
127   - <input id="allowQuickPutaway" name="allowQuickPutaway" class="form-control" type="text" th:field="*{allowQuickPutaway}">
  142 + <select id="allowQuickPutaway" name="allowQuickPutaway" class="form-control" th:field="*{allowQuickPutaway}">
  143 + <option value="0">是</option>
  144 + <option value="1">否</option>
  145 + </select>
128 146 </div>
129 147 </div>
130 148 <div class="form-group">
... ... @@ -136,7 +154,10 @@
136 154 <div class="form-group">
137 155 <label class="col-sm-3 control-label">快速入库:</label>
138 156 <div class="col-sm-8">
139   - <input id="useQuickCheckIn" name="useQuickCheckIn" class="form-control" type="text" th:field="*{useQuickCheckIn}">
  157 + <select id="useQuickCheckIn" name="useQuickCheckIn" class="form-control" th:field="*{useQuickCheckIn}">
  158 + <option value="0">是</option>
  159 + <option value="1">否</option>
  160 + </select>
140 161 </div>
141 162 </div>
142 163 <!--<div class="form-group">
... ... @@ -269,8 +290,14 @@
269 290 }
270 291 },
271 292 submitHandler: function(form) {
272   - var tableValue = $.common.getTableValue("#form-receiptPreference-edi");
  293 + var tableValue = $.common.getTableValue("#form-receiptPreference-edit");
273 294 tableValue = formValueReplace(tableValue, "allowOverReceiving", $("input[name='allowOverReceiving']").is(':checked'));
  295 + tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val());
  296 + tableValue = formValueReplace(tableValue, "autoAssignLPN", $("#autoAssignLPN option:selected").val());
  297 + tableValue = formValueReplace(tableValue, "autoLocate", $("#autoLocate option:selected").val());
  298 + tableValue = formValueReplace(tableValue, "showOpenQty", $("#showOpenQty option:selected").val());
  299 + tableValue = formValueReplace(tableValue, "locationRule", $("#locationRule option:selected").val());
  300 + tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val());
274 301 $.operate.save(prefix + "/edit", tableValue);
275 302 }
276 303 });
... ...
src/main/resources/templates/config/receiptPreference/receiptPreference.html
... ... @@ -90,11 +90,19 @@
90 90 },
91 91 {
92 92 field : 'autoAssignLPN',
93   - title : '自动生成托盘号'
  93 + title : '自动生成托盘号',
  94 + align : "center",
  95 + formatter : function(value, row, index) {
  96 + return $.table.selectWhetherLabel(value);
  97 + },
94 98 },
95 99 {
96 100 field : 'allowOverReceiving',
97   - title : '允许超收'
  101 + title : '允许超收',
  102 + align : "center",
  103 + formatter : function(value, row, index) {
  104 + if (value){return "<span class='badge badge-primary'>是</span>";} else {return "<span class='badge badge-danger'>否</span>";}
  105 + },
98 106 },
99 107 {
100 108 field : 'allowOverReceivingQty',
... ... @@ -102,11 +110,19 @@
102 110 },
103 111 {
104 112 field : 'autoLocate',
105   - title : '自动定位'
  113 + title : '自动定位',
  114 + align : "center",
  115 + formatter : function(value, row, index) {
  116 + return $.table.selectWhetherLabel(value);
  117 + },
106 118 },
107 119 {
108 120 field : 'showOpenQty',
109   - title : 'RF显示未收数量'
  121 + title : 'RF显示未收数量',
  122 + align : "center",
  123 + formatter : function(value, row, index) {
  124 + return $.table.selectWhetherLabel(value);
  125 + },
110 126 },
111 127 {
112 128 field : 'receiptTypes',
... ... @@ -114,11 +130,18 @@
114 130 },
115 131 {
116 132 field : 'groupPutaway',
117   - title : 'RF组车收货'
  133 + title : 'RF组车收货',
  134 + align : "center",
  135 + formatter : function(value, row, index) {
  136 + return $.table.selectWhetherLabel(value);
  137 + },
118 138 },
119 139 {
120 140 field : 'manuallyBuildLPN',
121   - title : '人工组盘'
  141 + title : '人工组盘',
  142 + formatter : function(value, row, index) {
  143 + return $.table.selectWhetherLabel(value);
  144 + },
122 145 },
123 146 {
124 147 field : 'locationRule',
... ... @@ -130,11 +153,19 @@
130 153 },
131 154 {
132 155 field : 'checkinByPiece',
133   - title : 'RF逐件收货'
  156 + title : 'RF逐件收货',
  157 + align : "center",
  158 + formatter : function(value, row, index) {
  159 + return $.table.selectWhetherLabel(value);
  160 + },
134 161 },
135 162 {
136 163 field : 'pieceConfirm',
137   - title : 'RF自动提交收货'
  164 + title : 'RF自动提交收货',
  165 + align : "center",
  166 + formatter : function(value, row, index) {
  167 + return $.table.selectWhetherLabel(value);
  168 + },
138 169 },
139 170 {
140 171 field : 'abcClass',
... ... @@ -154,7 +185,11 @@
154 185 },
155 186 {
156 187 field : 'allowQuickPutaway',
157   - title : 'RF快速上架'
  188 + title : 'RF快速上架',
  189 + align : "center",
  190 + formatter : function(value, row, index) {
  191 + return $.table.selectWhetherLabel(value);
  192 + },
158 193 },
159 194 {
160 195 field : 'attributeTemplateCode',
... ... @@ -162,7 +197,11 @@
162 197 },
163 198 {
164 199 field : 'useQuickCheckIn',
165   - title : '快速入库'
  200 + title : '快速入库',
  201 + align : "center",
  202 + formatter : function(value, row, index) {
  203 + return $.table.selectWhetherLabel(value);
  204 + },
166 205 },
167 206 {
168 207 field : 'created',
... ...
src/main/resources/templates/config/statusFlowDetail/statusFlowDetail.html
... ... @@ -24,6 +24,8 @@
24 24 var removeFlag = [[${@permission.hasPermi('config:statusFlowDetails:remove')}]];
25 25 var datas = [[${@dict.getType('sys_normal_disable')}]];
26 26 var nessaryDatas = [[${@dict.getType('nessary')}]];
  27 + var moduleType = [[${@dict.getType('moduleType')}]];
  28 +
27 29 $(function() {
28 30 var options = {
29 31 url: prefix + "/list",
... ... @@ -67,7 +69,11 @@
67 69 },
68 70 {
69 71 field : 'moduleType',
70   - title : '模块'
  72 + title : '模块',
  73 + align : "center",
  74 + formatter: function (value, item, index) {
  75 + return $.table.selectDictLabel(moduleType, value);
  76 + }
71 77 },
72 78 {
73 79 field : 'recordType',
... ...