Commit 1ad895e1c7ffd8865ec5c0a7b25f4cde36efd7e9
1 parent
e12715b5
入库任务建立
Showing
7 changed files
with
185 additions
and
173 deletions
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -309,60 +309,6 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
309 | 309 | if(taskHeader==null){ |
310 | 310 | throw new ServiceException("有相同的组盘头,但找不到相应的任务头"); |
311 | 311 | } |
312 | - | |
313 | - if(shipmentContainerDetaill == null) { | |
314 | - //shipmentContainerDetaill为空时,说明组盘明细不是新建,so修改任务明细 | |
315 | - //查找任务明细 | |
316 | - LambdaQueryWrapper<TaskDetail> taskDetailLam = Wrappers.lambdaQuery(); | |
317 | - taskDetailLam.eq(TaskDetail::getWarehouseCode,shipmentContainerDetail.getWarehouseCode()) | |
318 | - .eq(TaskDetail::getAllocationId,shipmentContainerDetail.getId()) | |
319 | - .eq(TaskDetail::getTaskId,taskHeader.getId()) | |
320 | - .eq(TaskDetail::getInternalTaskType,QuantityConstant.TASK_INTENERTYPE_PICKING); | |
321 | - TaskDetail taskDetail = taskDetailService.getOne(taskDetailLam); | |
322 | - if(taskDetail == null){ | |
323 | - throw new ServiceException("找不到对应的任务明细"); | |
324 | - } | |
325 | - taskDetail.setQty(taskDetail.getQty().add(shipmentCombinationModel.getShipQty())); | |
326 | - flag=taskDetailService.saveOrUpdate(taskDetail); | |
327 | - if(flag == false){ | |
328 | - throw new ServiceException("修改任务明细失败,sql错误"); | |
329 | - } | |
330 | - }else { | |
331 | - //shipmentContainerDetaill不为空时,说明组盘明细是新建,so新建任务明细 | |
332 | - TaskDetail taskDetail = new TaskDetail(); | |
333 | - taskDetail.setTaskId(taskHeader.getId()); | |
334 | - taskDetail.setInternalTaskType(taskHeader.getInternalTaskType()); | |
335 | - taskDetail.setWarehouseCode(taskHeader.getWarehouseCode()); | |
336 | - taskDetail.setCompanyCode(taskHeader.getCompanyCode()); | |
337 | - taskDetail.setTaskType(taskHeader.getTaskType()); | |
338 | - taskDetail.setAllocationId(shipmentContainerDetaill.getId()); | |
339 | - taskDetail.setBillCode(shipmentContainerDetaill.getShipmentCode()); | |
340 | - taskDetail.setBillDetailId(shipmentContainerDetaill.getShipmentDetailId()); | |
341 | - taskDetail.setMaterialCode(shipmentContainerDetaill.getMaterialCode()); | |
342 | - taskDetail.setMaterialName(shipmentContainerDetaill.getMaterialName()); | |
343 | - taskDetail.setMaterialSpec(shipmentContainerDetaill.getMaterialSpec()); | |
344 | - taskDetail.setMaterialUnit(shipmentContainerDetaill.getMaterialUnit()); | |
345 | - taskDetail.setFromInventoryId(shipmentContainerDetaill.getInventoryId()); | |
346 | - taskDetail.setQty(shipmentContainerDetaill.getQty()); | |
347 | - taskDetail.setContainerCode(taskHeader.getContainerCode()); | |
348 | - taskDetail.setFromLocation(taskHeader.getFromLocation()); | |
349 | - taskDetail.setToLocation(taskHeader.getToLocation()); | |
350 | - taskDetail.setLot(shipmentContainerDetaill.getLot()); | |
351 | - taskDetail.setWaveId(shipmentContainerDetaill.getWaveId()); | |
352 | - taskDetail.setBatch(shipmentContainerDetaill.getBatch()); | |
353 | - taskDetail.setProjectNo(shipmentContainerDetaill.getProjectNo()); | |
354 | - if (shipmentContainerHeader.getStatus().equals(QuantityConstant.SHIPMENT_CONTAINER_TASK)) { | |
355 | - taskDetail.setStatus(QuantityConstant.TASK_STATUS_BUILD); | |
356 | - } else { | |
357 | - taskDetail.setStatus(QuantityConstant.TASK_STATUS_RELEASE); | |
358 | - } | |
359 | - taskDetail.setCreatedBy(ShiroUtils.getLoginName()); | |
360 | - taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
361 | - flag = taskDetailService.save(taskDetail); | |
362 | - if(flag == false){ | |
363 | - throw new ServiceException("新建任务明细失败,sql错误"); | |
364 | - } | |
365 | - } | |
366 | 312 | } |
367 | 313 | return shipmentContainerDetail; |
368 | 314 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -102,6 +102,31 @@ public class TaskHeaderController extends BaseController { |
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
105 | + * 新增立库任务界面 | |
106 | + */ | |
107 | + @GetMapping("/add") | |
108 | + public String add() | |
109 | + { | |
110 | + return prefix + "/add"; | |
111 | + } | |
112 | + | |
113 | + | |
114 | + | |
115 | + /** | |
116 | + * 新增立库任务 | |
117 | + */ | |
118 | + @RequiresPermissions("task:taskHeader:add") | |
119 | + @Log(title = "任务-任务管理", operating = "新增立库任务", action = BusinessType.UPDATE) | |
120 | + @PostMapping( "/add") | |
121 | + @ResponseBody | |
122 | + public AjaxResult add(String containerCode) | |
123 | + { | |
124 | + AjaxResult ajaxResult = taskHeaderService.addTaskHeader(containerCode); | |
125 | + return ajaxResult; | |
126 | + } | |
127 | + | |
128 | + | |
129 | + /** | |
105 | 130 | * 下发任务 |
106 | 131 | */ |
107 | 132 | @RequiresPermissions("task:taskHeader:execute") |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 7 | import com.huaheng.api.wcs.service.taskAssignService.TaskAssignService; |
8 | 8 | import com.huaheng.common.constant.QuantityConstant; |
9 | +import com.huaheng.common.exception.service.Asserrt; | |
9 | 10 | import com.huaheng.common.exception.service.ServiceException; |
10 | 11 | import com.huaheng.common.support.Convert; |
11 | 12 | import com.huaheng.common.utils.StringUtils; |
... | ... | @@ -158,102 +159,75 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
158 | 159 | } |
159 | 160 | |
160 | 161 | /** |
162 | + * 1、查看任务状态 | |
163 | + * 2、修改库位和容器状态 | |
164 | + * 3、如果是出库任务,减去相应库存的任务数 | |
165 | + * 4、删除任务头和明细 | |
166 | + * | |
161 | 167 | * 取消任务 |
162 | 168 | */ |
163 | 169 | @Override |
164 | 170 | @Transactional(rollbackFor = Exception.class) |
165 | 171 | public AjaxResult cancelTask(Integer[] taskIds) { |
166 | 172 | for (int taskId : taskIds) { |
167 | - TaskHeader taskHeader = taskHeaderService.getById(taskId); | |
173 | + TaskHeader | |
174 | + taskHeader | |
175 | + = taskHeaderService.getById(taskId); | |
168 | 176 | if (taskHeader == null) { |
169 | 177 | return AjaxResult.error("任务" + taskId + "未找到,操作中止"); |
170 | 178 | } |
171 | 179 | if (taskHeader.getStatus() >= QuantityConstant.TASK_STATUS_RELEASE) { |
172 | 180 | return AjaxResult.error("存在任务" + taskHeader.getId() + "已下发或执行,操作中止"); |
173 | 181 | } |
182 | + | |
183 | + // 更改库位状态 | |
184 | + LambdaQueryWrapper<Container> containerLambda = Wrappers.lambdaQuery(); | |
185 | + containerLambda.eq(Container::getCode, taskHeader.getContainerCode()) | |
186 | + .eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
187 | + Container container = containerService.getOne(containerLambda); | |
188 | + | |
189 | + if (StringUtils.isEmpty(container.getLocationCode())) { | |
190 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(),"","empty"); | |
191 | + }else { | |
192 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(),container.getCode(),"empty"); | |
193 | + } | |
194 | + | |
195 | + | |
196 | + | |
197 | + | |
174 | 198 | //查出任务明细 |
175 | - TaskDetail taskDetail1 = new TaskDetail(); | |
199 | + TaskDetail | |
200 | + taskDetail1 | |
201 | + = new TaskDetail(); | |
176 | 202 | taskDetail1.setTaskId(taskHeader.getId()); |
177 | 203 | taskDetail1.setWarehouseCode(taskHeader.getWarehouseCode()); |
178 | 204 | taskDetail1.setCompanyCode(taskHeader.getCompanyCode()); |
179 | - LambdaQueryWrapper<TaskDetail> td = Wrappers.lambdaQuery(taskDetail1); | |
180 | - List<TaskDetail> taskDetailList = taskDetailService.list(td); | |
181 | - TaskDetail taskDetail = taskDetailList.get(0); | |
182 | - if (taskDetail == null) { | |
183 | - throw new ServiceException("任务明细条目错误"); | |
184 | - } | |
185 | - //删除子任务 | |
186 | - LambdaQueryWrapper<TaskDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
187 | - lambdaQueryWrapper.eq(TaskDetail::getTaskId, taskHeader.getId()); | |
188 | - taskDetailService.remove(lambdaQueryWrapper); | |
189 | - //删除主任务 | |
190 | - taskHeaderService.removeById(taskHeader.getId()); | |
191 | - // 更改库位状态(整盘入库任务除外) | |
192 | - if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF)) { | |
193 | - receiptContainerHeaderService.cancelReceipt(taskHeader.getAllocationHeadId()); | |
194 | - } | |
195 | - //根据任务类型来更新货箱状态 | |
196 | - //修改关联的货箱状态 | |
197 | - if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_PICKING)) { | |
198 | - ShipmentContainerHeader shipmentContainerHeader = new ShipmentContainerHeader(); | |
199 | - shipmentContainerHeader.setId(taskHeader.getAllocationHeadId()); | |
200 | - shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD); | |
201 | - shipmentContainerHeaderService.updateById(shipmentContainerHeader); | |
202 | - } | |
203 | - //盘点取消任务,恢复明细状态为1 | |
204 | - if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_CYCLECOUNT)) { | |
205 | - | |
206 | - CycleCountDetail cycleCountDetail = new CycleCountDetail(); | |
207 | - cycleCountDetail.setCompanyCode(taskDetail.getCompanyCode()); | |
208 | - cycleCountDetail.setWarehouseCode(taskDetail.getWarehouseCode()); | |
209 | - cycleCountDetail.setLocationCode(taskDetail.getFromLocation()); | |
210 | - cycleCountDetail.setContainerCode(taskDetail.getContainerCode()); | |
211 | - cycleCountDetail.setCycleCountHeadCode(taskDetail.getBillCode());//盘点单Code | |
212 | - cycleCountDetail.setId(taskDetail.getBillDetailId());//盘点细单ID | |
213 | - LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(cycleCountDetail); | |
214 | - List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(lam);// | |
215 | - for (CycleCountDetail item : cycleCountDetailList) { | |
216 | - item.setTaskHeaderId(null); | |
217 | - item.setTaskHeaderId(null); | |
218 | - item.setLastUpdated(new Date()); | |
219 | - item.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
220 | - item.setEnableStatus(1); | |
221 | - cycleCountDetailService.saveOrUpdate(item); | |
222 | - } | |
223 | - | |
224 | - } | |
225 | - if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_TRANSFER)) { | |
226 | - if (taskHeader.getFromLocation() != null) { | |
227 | - //更新托盘、库位状态 | |
228 | - locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
229 | - } | |
230 | - if (taskHeader.getToLocation() != null) { | |
231 | - //更新托盘、库位状态 | |
232 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
233 | - } | |
234 | - } | |
235 | - if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF) || taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_PICKING)) { | |
236 | - if (taskHeader.getToLocation() != null) { | |
237 | - //更新托盘、库位状态 | |
238 | - locationService.updateStatus(taskHeader.getToLocation(), "empty"); | |
239 | - } | |
240 | - LambdaQueryWrapper<InventoryHeader> inventoryHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
241 | - inventoryHeaderLambdaQueryWrapper.eq(InventoryHeader::getContainerCode, taskHeader.getContainerCode()); | |
242 | - InventoryHeader inventoryHeader = inventoryHeaderService.getOne(inventoryHeaderLambdaQueryWrapper); | |
243 | - Container container = new Container(); | |
244 | - container.setStatus("empty"); | |
245 | - if(inventoryHeader != null) { | |
246 | - if("some".equals(inventoryHeader.getContainerStatus())) { | |
247 | - container.setStatus("some"); | |
205 | + LambdaQueryWrapper<TaskDetail> | |
206 | + td | |
207 | + = Wrappers.lambdaQuery(taskDetail1); | |
208 | + List<TaskDetail> | |
209 | + taskDetailList | |
210 | + = taskDetailService.list(td); | |
211 | + if(!taskDetailList.isEmpty()) { | |
212 | + //如果是出库任务,修改库存任务数量 | |
213 | + if(taskHeader.getInternalTaskType() == QuantityConstant.TASK_INTENERTYPE_PICKING){ | |
214 | + for(TaskDetail item: taskDetailList){ | |
215 | + InventoryDetail inventoryDetail = inventoryDetailService.getById(item.getBillDetailId()); | |
216 | + Asserrt.notNull(inventoryDetail,"出库任务明细id为"+item.getId()+"的库存不存在"); | |
217 | + inventoryDetail.setTaskQty(inventoryDetail.getTaskQty().subtract(item.getQty())); | |
218 | + Asserrt.isFalse(inventoryDetailService.updateById(inventoryDetail),"修改出库任务明细id为"+item.getId()+"的库存失败"); | |
248 | 219 | } |
249 | 220 | } |
250 | - LambdaUpdateWrapper<Container> containerUpdateWrapper = Wrappers.lambdaUpdate(); | |
251 | - containerUpdateWrapper.eq(Container::getCode, taskHeader.getContainerCode()); | |
252 | - containerService.update(container, containerUpdateWrapper); | |
221 | + | |
222 | + //删除子任务 | |
223 | + LambdaQueryWrapper<TaskDetail> | |
224 | + lambdaQueryWrapper | |
225 | + = Wrappers.lambdaQuery(); | |
226 | + lambdaQueryWrapper.eq(TaskDetail::getTaskId, taskHeader.getId()); | |
227 | + taskDetailService.remove(lambdaQueryWrapper); | |
253 | 228 | } |
254 | -// if(task.getType()==900){ | |
255 | -// //出库查看任务没有关联的货箱,不做处理 | |
256 | -// } | |
229 | + //删除主任务 | |
230 | + taskHeaderService.removeById(taskHeader.getId()); | |
257 | 231 | } |
258 | 232 | |
259 | 233 | return AjaxResult.success("取消任务成功!"); |
... | ... | @@ -686,6 +660,73 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
686 | 660 | } |
687 | 661 | |
688 | 662 | /** |
663 | + * 新增入库任务 | |
664 | + * 1、检查容器是否存在 | |
665 | + * 2、检查改容器是否有未完成任务 | |
666 | + * 3、创建任务 | |
667 | + * 4、整盘定位 | |
668 | + * 5、修改库位状态 | |
669 | + * @param containerCode | |
670 | + * @return | |
671 | + */ | |
672 | + @Override | |
673 | + public AjaxResult addTaskHeader(String containerCode) { | |
674 | + if(StringUtils.isEmpty(containerCode)){ | |
675 | + return AjaxResult.error("容器为空"); | |
676 | + } | |
677 | + | |
678 | + //1、验证容器 | |
679 | + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
680 | + containerLambdaQueryWrapper.eq(Container::getCode,containerCode) | |
681 | + .eq(Container::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
682 | + Container container = containerService.getOne(containerLambdaQueryWrapper); | |
683 | + Asserrt.notNull(container,"容器编码错误,系统没有此编号"); | |
684 | + | |
685 | + //2、验证该托盘是否还有任务 | |
686 | + LambdaQueryWrapper<TaskHeader> taskHeaderLambda = Wrappers.lambdaQuery(); | |
687 | + | |
688 | + //3、创建任务 | |
689 | + TaskHeader taskHeader = new TaskHeader(); | |
690 | + taskHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
691 | + if(StringUtils.isEmpty(container.getLocationCode())){ | |
692 | + taskHeader.setTaskType(QuantityConstant.TASK_TYPE_WHOLERECEIPT); | |
693 | + }else { | |
694 | + taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT); | |
695 | + } | |
696 | + taskHeader.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_SHELF); | |
697 | + taskHeader.setContainerCode(containerCode); | |
698 | + taskHeader.setFromLocation(container.getLocationCode()); | |
699 | + taskHeader.setToLocation(container.getLocationCode()); | |
700 | + taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); | |
701 | + taskHeader.setCreated(new Date()); | |
702 | + taskHeader.setCreatedBy(ShiroUtils.getLoginName()); | |
703 | + taskHeader.setLastUpdated(new Date()); | |
704 | + taskHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
705 | + | |
706 | + | |
707 | + //4、整盘定位 | |
708 | + if(taskHeader.getTaskType() == QuantityConstant.TASK_TYPE_WHOLERECEIPT){ | |
709 | + LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery(); | |
710 | + locationLambda.eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
711 | + .last("AND status = 'empty' AND (containerCode IS NULL OR containerCode = '') order by iColumn asc,iLayer asc,iRow asc LIMIT 1"); | |
712 | + Location location = locationService.getOne(locationLambda); | |
713 | + Asserrt.notNull(location,"现在没有空余库位,请稍后再试"); | |
714 | + taskHeader.setToLocation(location.getCode()); | |
715 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), "", "lock"); | |
716 | + }else { | |
717 | + locationService.updateContainerCodeAndStatus(taskHeader.getToLocation(), taskHeader.getContainerCode(), "lock"); | |
718 | + } | |
719 | + | |
720 | + Asserrt.isFalse(this.save(taskHeader),"新增任务头失败"); | |
721 | + return AjaxResult.success("新增任务头成功"); | |
722 | + } | |
723 | + | |
724 | + | |
725 | + | |
726 | + | |
727 | + | |
728 | + | |
729 | + /** | |
689 | 730 | * 自动分配库位 |
690 | 731 | * @param taskId 任务号 |
691 | 732 | * @param high 1是高库位,否则低库位 |
... | ... |
src/main/resources/application-druid.properties
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
3 | 3 | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver |
4 | 4 | # Ö÷¿â |
5 | -spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8 | |
5 | +spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/jxwms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8 | |
6 | 6 | #spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/huahengExample?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false |
7 | 7 | #spring.datasource.druid.master.url=jdbc:mysql://117.62.222.186:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8 |
8 | 8 | |
... | ... |
src/main/resources/templates/task/taskHeader/add.html
... | ... | @@ -23,30 +23,24 @@ |
23 | 23 | <!--<input id="companyId" name="companyId" class="form-control" type="text">--> |
24 | 24 | <!--</div>--> |
25 | 25 | <!--</div>--> |
26 | - <div class="form-group"> | |
27 | - <label class="col-sm-3 control-label">优先级(1-99):</label> | |
28 | - <div class="col-sm-8"> | |
29 | - <input id="priority" name="priority" class="form-control" type="text"> | |
30 | - </div> | |
31 | - </div> | |
32 | - <div class="form-group"> | |
33 | - <label class="col-sm-3 control-label">任务类型:</label> | |
34 | - <div class="col-sm-8"> | |
35 | - <!--<input id="type" name="type" class="form-control" type="text">--> | |
36 | - <select id="type" class="form-control m-b" th:with="taskType=${@dict.getType('taskType')}"> | |
37 | - <option th:each="dict : ${taskType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
38 | - </select> | |
39 | - </div> | |
40 | - </div> | |
41 | - <div class="form-group"> | |
42 | - <label class="col-sm-3 control-label">出入库站台:</label> | |
43 | - <div class="col-sm-8"> | |
44 | - <!--<input id="station" name="station" class="form-control" type="text">--> | |
45 | - <select id="station" class="form-control m-b" th:with="stations=${@dict.getType('taskType')}"> | |
46 | - <option th:each="dict : ${stations}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
47 | - </select> | |
48 | - </div> | |
49 | - </div> | |
26 | + <!--<div class="form-group"> --> | |
27 | + <!--<label class="col-sm-3 control-label">任务类型:</label>--> | |
28 | + <!--<div class="col-sm-8">--> | |
29 | + <!--<!–<input id="type" name="type" class="form-control" type="text">–>--> | |
30 | + <!--<select id="type" class="form-control m-b" th:with="taskType=${@dict.getType('taskType')}">--> | |
31 | + <!--<option th:each="dict : ${taskType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>--> | |
32 | + <!--</select>--> | |
33 | + <!--</div>--> | |
34 | + <!--</div>--> | |
35 | + <!--<div class="form-group"> --> | |
36 | + <!--<label class="col-sm-3 control-label">出入库站台:</label>--> | |
37 | + <!--<div class="col-sm-8">--> | |
38 | + <!--<!–<input id="station" name="station" class="form-control" type="text">–>--> | |
39 | + <!--<select id="station" class="form-control m-b" th:with="stations=${@dict.getType('taskType')}">--> | |
40 | + <!--<option th:each="dict : ${stations}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>--> | |
41 | + <!--</select>--> | |
42 | + <!--</div>--> | |
43 | + <!--</div>--> | |
50 | 44 | <!--<div class="form-group"> --> |
51 | 45 | <!--<label class="col-sm-3 control-label">容器Id:</label>--> |
52 | 46 | <!--<div class="col-sm-8">--> |
... | ... | @@ -59,18 +53,18 @@ |
59 | 53 | <input id="containerCode" name="containerCode" class="form-control" type="text"> |
60 | 54 | </div> |
61 | 55 | </div> |
62 | - <div class="form-group"> | |
63 | - <label class="col-sm-3 control-label">来源库位:</label> | |
64 | - <div class="col-sm-8"> | |
65 | - <input id="sourceLocation" name="sourceLocation" class="form-control" type="text"> | |
66 | - </div> | |
67 | - </div> | |
68 | - <div class="form-group"> | |
69 | - <label class="col-sm-3 control-label">目的库位:</label> | |
70 | - <div class="col-sm-8"> | |
71 | - <input id="destinationLocation" name="destinationLocation" class="form-control" type="text"> | |
72 | - </div> | |
73 | - </div> | |
56 | + <!--<div class="form-group"> --> | |
57 | + <!--<label class="col-sm-3 control-label">来源库位:</label>--> | |
58 | + <!--<div class="col-sm-8">--> | |
59 | + <!--<input id="sourceLocation" name="sourceLocation" class="form-control" type="text">--> | |
60 | + <!--</div>--> | |
61 | + <!--</div>--> | |
62 | + <!--<div class="form-group"> --> | |
63 | + <!--<label class="col-sm-3 control-label">目的库位:</label>--> | |
64 | + <!--<div class="col-sm-8">--> | |
65 | + <!--<input id="destinationLocation" name="destinationLocation" class="form-control" type="text">--> | |
66 | + <!--</div>--> | |
67 | + <!--</div>--> | |
74 | 68 | <!--<div class="form-group"> --> |
75 | 69 | <!--<label class="col-sm-3 control-label">完成状态:</label>--> |
76 | 70 | <!--<div class="col-sm-8">--> |
... | ... | @@ -141,7 +135,7 @@ |
141 | 135 | </div> |
142 | 136 | <div th:include="include::footer"></div> |
143 | 137 | <script type="text/javascript"> |
144 | - var prefix = ctx + "task/task" | |
138 | + var prefix = ctx + "task/taskHeader" | |
145 | 139 | $("#form-task-add").validate({ |
146 | 140 | rules:{ |
147 | 141 | xxxx:{ |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html
... | ... | @@ -94,7 +94,10 @@ |
94 | 94 | <!--<a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" shiro:hasPermission="task:task:emptyOut">--> |
95 | 95 | <!--<i class="fa fa-level-up"></i> 空托出库--> |
96 | 96 | <!--</a>--> |
97 | - <a class="btn btn-outline btn-success btn-rounded" onclick="print()" shiro:hasPermission="task:task:execute"> | |
97 | + <a th:if="${InternalTaskType} eq 100" class="btn btn-outline btn-primary btn-rounded" onclick="$.operate.add()" shiro:hasPermission="task:task:add"> | |
98 | + <i class="fa fa-send"></i> 新增 | |
99 | + </a> | |
100 | + <a class="btn btn-outline btn-success btn-rounded" onclick="print()" shiro:hasPermission="task:task:print"> | |
98 | 101 | <i class="fa fa-print"></i> 打印 |
99 | 102 | </a> |
100 | 103 | <a class="btn btn-outline btn-primary btn-rounded" onclick="batchExecute()" shiro:hasPermission="task:task:execute"> |
... | ... | @@ -168,9 +171,9 @@ |
168 | 171 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消</a> '); |
169 | 172 | actions.push('<a class="btn btn-primary btn-xs ' + completeFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>完成</a>'); |
170 | 173 | } |
171 | - if (row.status >= 10 && row.status < 100) { | |
172 | - actions.push('<a class="btn btn-primary btn-xs ' + completeFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>完成</a>'); | |
173 | - } | |
174 | + // if (row.status >= 10 && row.status < 100) { | |
175 | + // actions.push('<a class="btn btn-primary btn-xs ' + completeFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>完成</a>'); | |
176 | + // } | |
174 | 177 | return actions.join(''); |
175 | 178 | } |
176 | 179 | }, |
... | ... |