diff --git a/src/main/java/com/huaheng/pc/config/shipmentPreference/domain/ShipmentPreference.java b/src/main/java/com/huaheng/pc/config/shipmentPreference/domain/ShipmentPreference.java index 9a20783..ededd96 100644 --- a/src/main/java/com/huaheng/pc/config/shipmentPreference/domain/ShipmentPreference.java +++ b/src/main/java/com/huaheng/pc/config/shipmentPreference/domain/ShipmentPreference.java @@ -74,7 +74,7 @@ public class ShipmentPreference implements Serializable { */ @TableField(value = "autoAssignLPN") @ApiModelProperty(value="自动生成托盘号") - private Integer autoAssignLPN; + private Boolean autoAssignLPN; /** * 允许越库 @@ -95,7 +95,7 @@ public class ShipmentPreference implements Serializable { */ @TableField(value = "showInventoryQty") @ApiModelProperty(value="显示库存数量") - private Integer showInventoryQty; + private Boolean showInventoryQty; @@ -104,28 +104,28 @@ public class ShipmentPreference implements Serializable { */ @TableField(value = "groupPickup") @ApiModelProperty(value="RF组车收货") - private Integer groupPickup; + private Boolean groupPickup; /** * 人工组盘 */ @TableField(value = "manuallyBuildLPN") @ApiModelProperty(value="人工组盘") - private Integer manuallyBuildLPN; + private Boolean manuallyBuildLPN; /** * RF逐件拣货 */ @TableField(value = "checkinByPiece") @ApiModelProperty(value="RF逐件拣货") - private Integer checkinByPiece; + private Boolean checkinByPiece; /** * RF快速拣货 */ @TableField(value = "allowQuickPickup") @ApiModelProperty(value="RF快速拣货") - private Integer allowQuickPickup; + private Boolean allowQuickPickup; /** * 创建时间 @@ -364,23 +364,6 @@ public class ShipmentPreference implements Serializable { this.allocationRule = allocationRule; } - /** - * 获取自动生成托盘号 - * - * @return autoAssignLPN - 自动生成托盘号 - */ - public Integer getAutoAssignLPN() { - return autoAssignLPN; - } - - /** - * 设置自动生成托盘号 - * - * @param autoAssignLPN 自动生成托盘号 - */ - public void setAutoAssignLPN(Integer autoAssignLPN) { - this.autoAssignLPN = autoAssignLPN; - } public Boolean getAllowCross() { return allowCross; @@ -398,95 +381,51 @@ public class ShipmentPreference implements Serializable { this.allowQcCheckResult = allowQcCheckResult; } - /** - * 获取显示库存数量 - * - * @return showInventoryQty - 显示库存数量 - */ - public Integer getShowInventoryQty() { + public Boolean getAutoAssignLPN() { + return autoAssignLPN; + } + + public void setAutoAssignLPN(Boolean autoAssignLPN) { + this.autoAssignLPN = autoAssignLPN; + } + + public Boolean getShowInventoryQty() { return showInventoryQty; } - /** - * 设置显示库存数量 - * - * @param showInventoryQty 显示库存数量 - */ - public void setShowInventoryQty(Integer showInventoryQty) { + public void setShowInventoryQty(Boolean showInventoryQty) { this.showInventoryQty = showInventoryQty; } - - /** - * 获取RF组车收货 - * - * @return groupPickup - RF组车收货 - */ - public Integer getGroupPickup() { + public Boolean getGroupPickup() { return groupPickup; } - /** - * 设置RF组车收货 - * - * @param groupPickup RF组车收货 - */ - public void setGroupPickup(Integer groupPickup) { + public void setGroupPickup(Boolean groupPickup) { this.groupPickup = groupPickup; } - /** - * 获取人工组盘 - * - * @return manuallyBuildLPN - 人工组盘 - */ - public Integer getManuallyBuildLPN() { + public Boolean getManuallyBuildLPN() { return manuallyBuildLPN; } - /** - * 设置人工组盘 - * - * @param manuallyBuildLPN 人工组盘 - */ - public void setManuallyBuildLPN(Integer manuallyBuildLPN) { + public void setManuallyBuildLPN(Boolean manuallyBuildLPN) { this.manuallyBuildLPN = manuallyBuildLPN; } - - /** - * 获取RF逐件拣货 - * - * @return checkinByPiece - RF逐件拣货 - */ - public Integer getCheckinByPiece() { + public Boolean getCheckinByPiece() { return checkinByPiece; } - /** - * 设置RF逐件拣货 - * - * @param checkinByPiece RF逐件拣货 - */ - public void setCheckinByPiece(Integer checkinByPiece) { + public void setCheckinByPiece(Boolean checkinByPiece) { this.checkinByPiece = checkinByPiece; } - /** - * 获取RF快速拣货 - * - * @return allowQuickPickup - RF快速拣货 - */ - public Integer getAllowQuickPickup() { + public Boolean getAllowQuickPickup() { return allowQuickPickup; } - /** - * 设置RF快速拣货 - * - * @param allowQuickPickup RF快速拣货 - */ - public void setAllowQuickPickup(Integer allowQuickPickup) { + public void setAllowQuickPickup(Boolean allowQuickPickup) { this.allowQuickPickup = allowQuickPickup; } diff --git a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java index 520d742..69aa26d 100644 --- a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java +++ b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java @@ -29,7 +29,11 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.io.PushbackInputStream; import java.math.BigDecimal; +import java.text.MessageFormat; +import java.util.Calendar; +import java.util.Date; import java.util.List; @Service public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContainerHeaderMapper, ReceiptContainerHeader> implements ReceiptContainerHeaderService{ @@ -63,9 +67,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai @Transactional public AjaxResult saveCountain(String receiptCode, String containerCode, Integer receiptDetailId, String locationCode, Integer qty, String locatingRule) { + ReceiptDetail detail = receiptDetailService.getById(receiptDetailId); //检查容器编码合法性 - Integer taskType = checkContainer(containerCode); - if (taskType == 0){ throw new ServiceException("容器状态未知"); } + Integer taskType = checkContainer(containerCode, detail.getMaterialCode()); + if (taskType == 1){ + containerCode = createContainer(); + taskType = 100; + }else { + if (taskType == 0){ throw new ServiceException("容器状态未知"); } + } //检查库位编码合法性 if (checkLocationCode(locationCode, containerCode, taskType) == true) { locationService.updateStatus(locationCode, "lock"); @@ -177,13 +187,23 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai /** * 检查容器编码合法性 * @param containerCode - * @return + * @param materialCode + * @return 返回容器状态,如果需自动生成容器编码返回1 */ @Transactional - public Integer checkContainer(String containerCode) { + public Integer checkContainer(String containerCode, String materialCode) { + + if (StringUtils.isEmpty(containerCode)){ + LambdaQueryWrapper<Material> lambdaQueryWrapper = Wrappers.lambdaQuery(); + lambdaQueryWrapper.eq(Material::getCode, materialCode); + Material material = materialService.getOne(lambdaQueryWrapper); + if (material.getAutoGenSerialNum() == 0){ + return 1; //需自动生成容器编码 + } else { + throw new ServiceException("容器不能为空"); + } + } - if (StringUtils.isEmpty(containerCode)) - throw new ServiceException("容器不能为空"); LambdaQueryWrapper<Container> lambda = Wrappers.lambdaQuery(); lambda.eq(Container::getCode, containerCode); @@ -341,5 +361,30 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai throw new ServiceException("更新入库组盘详情失败"); } } + + } + + + /** + * 自动生成容器编码 + * @return 容器编码 + */ + public String createContainer(){ + String code = MessageFormat.format("{0}{1}", + "LS", + String.format("%d", Calendar.getInstance().getTimeInMillis())); + Container container = new Container(); + container.setCode(code); + container.setWarehouseCode(ShiroUtils.getWarehouseCode()); + container.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0)); + container.setContainerType("LS"); + container.setCreatedBy(ShiroUtils.getLoginName()); + container.setLastUpdated(new Date()); + container.setLastUpdatedBy(ShiroUtils.getLoginName()); + container.setStatus("empty"); + if (!containerService.save(container)){ + throw new ServiceException("新增容器失败"); + } + return code; } } diff --git a/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java b/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java index b3ec0c9..b0f45fb 100644 --- a/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java +++ b/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java @@ -88,7 +88,7 @@ public class ReceivingService { throw new ServiceException("该入库组盘已生成任务不能重新定位"); } //如果入库组盘表中有目标库位说明已经指定 - if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){throw new ServiceException("该入库组盘已有库位,不需要定位;如需定位请先取消定位");} + if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){return true;} String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则 if (StringUtils.isNotEmpty(locatingRule)){ //入库组盘头表中定位规则不为空时执行 @@ -102,7 +102,7 @@ public class ReceivingService { Material material = materialService.getOne(materialLambda); locatingRule = material.getLocatingRule(); - if (locatingRule == null){ + if (StringUtils.isEmpty(locatingRule)){ //物料表中定位规则为空时,查询物料类别 LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery(); materialTypeLambda.eq(MaterialType::getCode, material.getType()); diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java b/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java index fa04ccf..28da9f8 100644 --- a/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java +++ b/src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java @@ -71,7 +71,8 @@ public class TaskHeaderController extends BaseController { .eq(StringUtils.isNotEmpty(taskHeader.getContainerCode()),TaskHeader::getContainerCode,taskHeader.getContainerCode()) .eq(StringUtils.isNotEmpty(taskHeader.getToLocation()),TaskHeader::getToLocation,taskHeader.getToLocation()) .gt(StringUtils.isNotEmpty(createdBegin),TaskHeader::getCreated,createdBegin) - .lt(StringUtils.isNotEmpty(createdEnd),TaskHeader::getCreated,createdEnd); + .lt(StringUtils.isNotEmpty(createdEnd),TaskHeader::getCreated,createdEnd) + .orderByDesc(TaskHeader::getId); PageDomain pageDomain = TableSupport.buildPageRequest(); Integer pageNum = pageDomain.getPageNum(); diff --git a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java index 0445d0d..51aaf6a 100644 --- a/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java +++ b/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java @@ -64,8 +64,6 @@ import javax.annotation.Resource; @Service public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHeader> implements TaskHeaderService { - - @Resource private ShipmentContainerHeaderService shipmentContainerHeaderService; @Resource @@ -150,7 +148,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea ReceiptContainerHeader record =new ReceiptContainerHeader(); record.setStatus((short)0); record.setId(taskHeader.getAllocationHeadId()); - receiptContainerHeaderService.updateById(record); + if (receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");} } //根据任务类型来更新货箱状态 //修改关联的货箱状态 @@ -602,8 +600,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea //修改入库单状态 ReceiptHeader receiptHeader = new ReceiptHeader(); - receiptHeader.setFirstStatus(300); - receiptHeader.setLastStatus(300); + receiptHeader.setFirstStatus(800); + receiptHeader.setLastStatus(800); receiptHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); receiptHeader.setLastUpdated(new Date()); LambdaUpdateWrapper<ReceiptHeader> receiptHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); @@ -1112,6 +1110,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea } //添加任务主表 TaskHeader task = new TaskHeader(); + task.setAllocationHeadId(receiptContainerHeader.getId()); task.setInternalTaskType(100); task.setWarehouseCode(receiptContainerHeader.getWarehouseCode()); task.setCompanyCode(receiptContainerHeader.getCompanyCode()); diff --git a/src/main/resources/mybatis/config/ShipmentPreferenceMapper.xml b/src/main/resources/mybatis/config/ShipmentPreferenceMapper.xml index 2b5e7ad..9833d5b 100644 --- a/src/main/resources/mybatis/config/ShipmentPreferenceMapper.xml +++ b/src/main/resources/mybatis/config/ShipmentPreferenceMapper.xml @@ -11,14 +11,14 @@ <result column="shipmentPickingRule" jdbcType="VARCHAR" property="shipmentPickingRule" /> <result column="shipmentPickingLocRange" jdbcType="VARCHAR" property="shipmentPickingLocRange" /> <result column="allocationRule" jdbcType="VARCHAR" property="allocationRule" /> - <result column="autoAssignLPN" jdbcType="INTEGER" property="autoAssignLPN" /> + <result column="autoAssignLPN" jdbcType="BIT" property="autoAssignLPN" /> <result column="allowCross" jdbcType="BIT" property="allowCross" /> <result column="allowQcCheckResult" jdbcType="BIT" property="allowQcCheckResult" /> - <result column="showInventoryQty" jdbcType="INTEGER" property="showInventoryQty" /> - <result column="groupPickup" jdbcType="INTEGER" property="groupPickup" /> - <result column="manuallyBuildLPN" jdbcType="INTEGER" property="manuallyBuildLPN" /> - <result column="checkinByPiece" jdbcType="INTEGER" property="checkinByPiece" /> - <result column="allowQuickPickup" jdbcType="INTEGER" property="allowQuickPickup" /> + <result column="showInventoryQty" jdbcType="BIT" property="showInventoryQty" /> + <result column="groupPickup" jdbcType="BIT" property="groupPickup" /> + <result column="manuallyBuildLPN" jdbcType="BIT" property="manuallyBuildLPN" /> + <result column="checkinByPiece" jdbcType="BIT" property="checkinByPiece" /> + <result column="allowQuickPickup" jdbcType="BIT" property="allowQuickPickup" /> <result column="created" jdbcType="TIMESTAMP" property="created" /> <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> diff --git a/src/main/resources/templates/config/containerType/add.html b/src/main/resources/templates/config/containerType/add.html index ce81e17..30e8f04 100644 --- a/src/main/resources/templates/config/containerType/add.html +++ b/src/main/resources/templates/config/containerType/add.html @@ -155,21 +155,17 @@ <div th:include="include::footer"></div> <script type="text/javascript"> var prefix = ctx + "config/containerType"; - /*$("#form-containerType-add").validate({ - rules:{ - code:{ - required:true + + $("#form-containerType-add").validate({ + rules:{ + code:{ + required:true }, - fillPercent:{ - range:[0,100] + fillPercent:{ + required:true, + range:[0,100] } }, - submitHandler: function(form) { - // $.operate.save(prefix + "/add", $('#form-containerType-add').serialize()); - var tableValue = $.common.getTableValue("#form-containerType-add"); - $.operate.save(prefix + "/add", tableValue); - }*/ - $("#form-containerType-add").validate({ submitHandler: function(form) { $.ajax({ cache : true, diff --git a/src/main/resources/templates/config/material/add.html b/src/main/resources/templates/config/material/add.html index 4a6c67d..6c33743 100644 --- a/src/main/resources/templates/config/material/add.html +++ b/src/main/resources/templates/config/material/add.html @@ -60,37 +60,55 @@ <div class="form-group"> <label class="col-sm-3 control-label">定位规则:</label> <div class="col-sm-8"> - <input id="locatingRule" name="locatingRule" class="form-control" type="text"> + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">分配规则:</label> <div class="col-sm-8"> - <input id="allocationRule" name="allocationRule" class="form-control" type="text"> + <select id="allocationRule" name="allocationRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('分配规则')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">补货规则:</label> <div class="col-sm-8"> - <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text"> + <select id="replenishmentRule" name="replenishmentRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('补货规则')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">空货位规则:</label> <div class="col-sm-8"> - <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text"> + <select id="emptyLocRule" name="emptyLocRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('空货位规则')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['description']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">入库规则</label> + <label class="col-sm-3 control-label">入库规则:</label> <div class="col-sm-8"> - <input id="receivingFlow" name="receivingFlow" class="form-control" type="text"> + <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('入库单')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">出库流程:</label> <div class="col-sm-8"> - <input id="shippingFlow" name="shippingFlow" class="form-control" type="text"> + <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="list=${@StatusFlow.flowList('出库单')}"> + <option value="">请选择</option> + <option th:each="flow : ${list}" th:text="${flow['name']}" th:value="${flow['code']}"></option> + </select> </div> </div> <div class="form-group"> @@ -108,7 +126,11 @@ <div class="form-group"> <label class="col-sm-3 control-label">自动生成序列号:</label> <div class="col-sm-8"> - <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text"> + <select id="autoGenSerialNum" name="autoGenSerialNum" class="form-control"> + <option value="">请选择</option> + <option value="0">是</option> + <option value="1">否</option> + </select> </div> </div> <div class="form-group"> @@ -257,8 +279,15 @@ // var tableValue = $.common.getTableValue("#form-material-add"); // $.operate.save(prefix + "/add", tableValue); var tableValue = $("#form-material-add").serialize(); - tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val()) + tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val()); tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); + tableValue = formValueReplace(tableValue, "receivingFlow", $("#receivingFlow option:selected").val()); + tableValue = formValueReplace(tableValue, "shippingFlow", $("#shippingFlow option:selected").val()); + tableValue = formValueReplace(tableValue, "locatingRule", $("#locatingRule option:selected").val()); + tableValue = formValueReplace(tableValue, "allocationRule", $("#allocationRule option:selected").val()); + tableValue = formValueReplace(tableValue, "replenishmentRule", $("#replenishmentRule option:selected").val()); + tableValue = formValueReplace(tableValue, "emptyLocRule", $("#emptyLocRule option:selected").val()); + tableValue = formValueReplace(tableValue, "pickingRule", $("#pickingRule option:selected").val()); $.operate.save(prefix + "/add", tableValue); } }); diff --git a/src/main/resources/templates/config/shipmentPreference/add.html b/src/main/resources/templates/config/shipmentPreference/add.html index a50641d..fbc5b0e 100644 --- a/src/main/resources/templates/config/shipmentPreference/add.html +++ b/src/main/resources/templates/config/shipmentPreference/add.html @@ -24,9 +24,9 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">自动生成托盘号:</label> + <label class="col-sm-3 control-label">库存分配规则:</label> <div class="col-sm-8"> - <input id="autoAssignLPN" name="autoAssignLPN" class="form-control" type="text"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text"> </div> </div> <div class="form-group"> @@ -42,67 +42,99 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">库存分配规则:</label> + <label class="col-sm-3 control-label">自动生成托盘号:</label> <div class="col-sm-8"> - <input id="allocationRule" name="allocationRule" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="autoAssignLPN" name="autoAssignLPN"> + <label class="onoffswitch-label" for="autoAssignLPN"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">允许越库:</label> <div class="col-sm-8"> - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowCross1" name="allowCross" value="true" checked="checked" - class="radio_select"> - <label for="allowCross1">是</label> - </div> - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowCross2" name="allowCross" value="false"> - <label for="allowCross2">否</label> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowCross" name="allowCross"> + <label class="onoffswitch-label" for="allowCross"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">允许未质检的出库:</label> <div class="col-sm-8"> - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowQcCheckResult1" name="allowQcCheckResult" value="true" checked="checked" - class="radio_select"> - <label for="allowQcCheckResult1">是</label> - </div> - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowQcCheckResult2" name="allowQcCheckResult" value="false"> - <label for="allowQcCheckResult2">否</label> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowQcCheckResult" name="allowQcCheckResult"> + <label class="onoffswitch-label" for="allowQcCheckResult"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">显示库存数量:</label> <div class="col-sm-8"> - <input id="showInventoryQty" name="showInventoryQty" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="showInventoryQty" name="showInventoryQty"> + <label class="onoffswitch-label" for="showInventoryQty"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF组车收货:</label> <div class="col-sm-8"> - <input id="groupPutaway" name="groupPutaway" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="groupPutaway" name="groupPutaway"> + <label class="onoffswitch-label" for="groupPutaway"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">人工组盘:</label> <div class="col-sm-8"> - <input id="manuallyBuildLPN" name="manuallyBuildLPN" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="manuallyBuildLPN" name="manuallyBuildLPN"> + <label class="onoffswitch-label" for="manuallyBuildLPN"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF逐件拣货:</label> <div class="col-sm-8"> - <input id="checkinByPiece" name="checkinByPiece" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="checkinByPiece" name="checkinByPiece"> + <label class="onoffswitch-label" for="checkinByPiece"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF快速拣货:</label> <div class="col-sm-8"> - <input id="allowQuickPickup" name="allowQuickPickup" class="form-control" type="text"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowQuickPickup" name="allowQuickPickup"> + <label class="onoffswitch-label" for="allowQuickPickup"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <!--<div class="form-group"> @@ -242,6 +274,14 @@ }, submitHandler: function(form) { var tableValue = $.common.getTableValue("#form-shipmentPreference-add"); + tableValue = formValueReplace(tableValue, "autoAssignLPN", $("input[name='autoAssignLPN']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowCross", $("input[name='allowCross']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowQcCheckResult", $("input[name='allowQcCheckResult']").is(':checked')); + tableValue = formValueReplace(tableValue, "showInventoryQty", $("input[name='showInventoryQty']").is(':checked')); + tableValue = formValueReplace(tableValue, "groupPickup", $("input[name='groupPickup']").is(':checked')); + tableValue = formValueReplace(tableValue, "manuallyBuildLPN", $("input[name='manuallyBuildLPN']").is(':checked')); + tableValue = formValueReplace(tableValue, "checkinByPiece", $("input[name='checkinByPiece']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowQuickPickup", $("input[name='allowQuickPickup']").is(':checked')); $.operate.save(prefix + "/add", tableValue); } }); diff --git a/src/main/resources/templates/config/shipmentPreference/edit.html b/src/main/resources/templates/config/shipmentPreference/edit.html index 3ca422b..06ad25b 100644 --- a/src/main/resources/templates/config/shipmentPreference/edit.html +++ b/src/main/resources/templates/config/shipmentPreference/edit.html @@ -25,85 +25,117 @@ </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">拣货规则:</label> + <label class="col-sm-3 control-label">库存分配规则:</label> <div class="col-sm-8"> - <input id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" type="text" th:field="*{shipmentPickingRule}"> + <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">拣货库位范围规则:</label> + <label class="col-sm-3 control-label">拣货规则:</label> <div class="col-sm-8"> - <input id="shipmentPickingLocRange" name="shipmentPickingLocRange" class="form-control" type="text" th:field="*{shipmentPickingLocRange}"> + <input id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" type="text" th:field="*{shipmentPickingRule}"> </div> </div> <div class="form-group"> - <label class="col-sm-3 control-label">库存分配规则:</label> + <label class="col-sm-3 control-label">拣货库位范围规则:</label> <div class="col-sm-8"> - <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> + <input id="shipmentPickingLocRange" name="shipmentPickingLocRange" class="form-control" type="text" th:field="*{shipmentPickingLocRange}"> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">自动生成托盘号:</label> <div class="col-sm-8"> - <input id="autoAssignLPN" name="autoAssignLPN" class="form-control" type="text" th:field="*{autoAssignLPN}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{autoAssignLPN}" class="onoffswitch-checkbox" id="autoAssignLPN" name="autoAssignLPN"> + <label class="onoffswitch-label" for="autoAssignLPN"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">允许越库:</label> <div class="col-sm-8"> - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowCross1" name="allowCross" value="true" th:field="*{allowCross}" - class="radio_select"> - <label for="allowCross1">是</label> - </div> - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowCross2" name="allowCross" value="false" th:field="*{allowCross}"> - <label for="allowCross2">否</label> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{allowCross}" class="onoffswitch-checkbox" id="allowCross" name="allowCross"> + <label class="onoffswitch-label" for="allowCross"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">允许未质检的出库:</label> <div class="col-sm-8"> - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowQcCheckResult1" name="allowQcCheckResult" value="true" th:field="*{allowQcCheckResult}" - class="radio_select"> - <label for="allowQcCheckResult1">是</label> - </div> - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> - <input type="radio" id="allowQcCheckResult2" name="allowQcCheckResult" value="false" th:field="*{allowQcCheckResult}"> - <label for="allowQcCheckResult2">否</label> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{allowQcCheckResult}" class="onoffswitch-checkbox" id="allowQcCheckResult" name="allowQcCheckResult"> + <label class="onoffswitch-label" for="allowQcCheckResult"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">显示库存数量:</label> <div class="col-sm-8"> - <input id="showInventoryQty" name="showInventoryQty" class="form-control" type="text" th:field="*{showInventoryQty}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{showInventoryQty}" class="onoffswitch-checkbox" id="showInventoryQty" name="showInventoryQty"> + <label class="onoffswitch-label" for="showInventoryQty"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF组车收货:</label> <div class="col-sm-8"> - <input id="groupPickup" name="groupPickup" class="form-control" type="text" th:field="*{groupPickup}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{groupPickup}" class="onoffswitch-checkbox" id="groupPickup" name="groupPickup"> + <label class="onoffswitch-label" for="groupPickup"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">人工组盘:</label> <div class="col-sm-8"> - <input id="manuallyBuildLPN" name="manuallyBuildLPN" class="form-control" type="text" th:field="*{manuallyBuildLPN}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{manuallyBuildLPN}" class="onoffswitch-checkbox" id="manuallyBuildLPN" name="manuallyBuildLPN"> + <label class="onoffswitch-label" for="manuallyBuildLPN"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF逐件收货:</label> <div class="col-sm-8"> - <input id="checkinByPiece" name="checkinByPiece" class="form-control" type="text" th:field="*{checkinByPiece}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{checkinByPiece}" class="onoffswitch-checkbox" id="checkinByPiece" name="checkinByPiece"> + <label class="onoffswitch-label" for="checkinByPiece"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">RF快速上架:</label> <div class="col-sm-8"> - <input id="allowQuickPickup" name="allowQuickPickup" class="form-control" type="text" th:field="*{allowQuickPickup}"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="*{allowQuickPickup}" class="onoffswitch-checkbox" id="allowQuickPickup" name="allowQuickPickup"> + <label class="onoffswitch-label" for="allowQuickPickup"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> </div> </div> <!--<div class="form-group"> @@ -243,6 +275,14 @@ }, submitHandler: function(form) { var tableValue = $.common.getTableValue("#form-shipmentPreference-edit"); + tableValue = formValueReplace(tableValue, "autoAssignLPN", $("input[name='autoAssignLPN']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowCross", $("input[name='allowCross']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowQcCheckResult", $("input[name='allowQcCheckResult']").is(':checked')); + tableValue = formValueReplace(tableValue, "showInventoryQty", $("input[name='showInventoryQty']").is(':checked')); + tableValue = formValueReplace(tableValue, "groupPickup", $("input[name='groupPickup']").is(':checked')); + tableValue = formValueReplace(tableValue, "manuallyBuildLPN", $("input[name='manuallyBuildLPN']").is(':checked')); + tableValue = formValueReplace(tableValue, "checkinByPiece", $("input[name='checkinByPiece']").is(':checked')); + tableValue = formValueReplace(tableValue, "allowQuickPickup", $("input[name='allowQuickPickup']").is(':checked')); $.operate.save(prefix + "/edit", tableValue); } }); diff --git a/src/main/resources/templates/config/shipmentPreference/shipmentPreference.html b/src/main/resources/templates/config/shipmentPreference/shipmentPreference.html index 6cc75c5..3e1b1aa 100644 --- a/src/main/resources/templates/config/shipmentPreference/shipmentPreference.html +++ b/src/main/resources/templates/config/shipmentPreference/shipmentPreference.html @@ -77,13 +77,17 @@ title : '名称' }, { + field : 'warehouseCode', + title : '仓库编码', + visible : false + }, + { field : 'shippingFlow', title : '出库流程' }, { - field : 'warehouseCode', - title : '仓库编码', - visible : false + field : 'allocationRule', + title : '库存分配规则', }, { field : 'shipmentPickingRule', @@ -94,12 +98,16 @@ title : '拣货库位范围规则', }, { - field : 'allocationRule', - title : '库存分配规则', - }, - { field : 'autoAssignLPN', - title : '自动生成托盘号' + title : '自动生成托盘号', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'allowCross', @@ -127,23 +135,63 @@ }, { field : 'showInventoryQty', - title : '显示库存数量' + title : '显示库存数量', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'groupPickup', - title : 'RF组车拣货' + title : 'RF组车拣货', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'manuallyBuildLPN', - title : '人工组盘' + title : '人工组盘', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'checkinByPiece', - title : 'RF逐件拣货' + title : 'RF逐件拣货', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'allowQuickPickup', - title : 'RF快速拣货' + title : 'RF快速拣货', + formatter: function (value, item, index) { + if (value==true) { + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; + } + else if (value==false) { + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; + } + } }, { field : 'created', diff --git a/src/main/resources/templates/config/statusFlowDetail/add.html b/src/main/resources/templates/config/statusFlowDetail/add.html index 3c5d9c3..0b63952 100644 --- a/src/main/resources/templates/config/statusFlowDetail/add.html +++ b/src/main/resources/templates/config/statusFlowDetail/add.html @@ -16,7 +16,9 @@ <div class="form-group"> <label class="col-sm-3 control-label">模块:</label> <div class="col-sm-8"> - <input id="moduleType" name="moduleType" class="form-control" type="text"> + <select id="moduleType" name="moduleType" class="form-control" th:with="moduleType=${@dict.getType('moduleType')}"> + <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> + </select> </div> </div> <div class="form-group"> diff --git a/src/main/resources/templates/config/statusFlowDetail/edit.html b/src/main/resources/templates/config/statusFlowDetail/edit.html index a6076ee..8535794 100644 --- a/src/main/resources/templates/config/statusFlowDetail/edit.html +++ b/src/main/resources/templates/config/statusFlowDetail/edit.html @@ -16,7 +16,7 @@ <div class="form-group"> <label class="col-sm-3 control-label">模块:</label> <div class="col-sm-8"> - <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}"> + <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}" readonly="readonly"> </div> </div> <div class="form-group"> diff --git a/src/main/resources/templates/config/statusFlowHeader/add.html b/src/main/resources/templates/config/statusFlowHeader/add.html index e5e8f7a..ba86cef 100644 --- a/src/main/resources/templates/config/statusFlowHeader/add.html +++ b/src/main/resources/templates/config/statusFlowHeader/add.html @@ -20,7 +20,7 @@ <div class="form-group"> <label class="col-sm-3 control-label">模块:</label> <div class="col-sm-8"> - <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}"> + <select id="moduleType" name="moduleType" class="form-control" th:with="moduleType=${@dict.getType('moduleType')}"> <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> </select> </div> @@ -83,6 +83,7 @@ var tableValue = $.common.getTableValue("#form-statusFlowHeader-add"); tableValue = formValueReplace(tableValue, "companyCode", $("#companyCode option:selected").val()); tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); + $.operate.save(prefix + "/add", tableValue); } }); diff --git a/src/main/resources/templates/config/statusFlowHeader/edit.html b/src/main/resources/templates/config/statusFlowHeader/edit.html index 38fe41d..6b1c43d 100644 --- a/src/main/resources/templates/config/statusFlowHeader/edit.html +++ b/src/main/resources/templates/config/statusFlowHeader/edit.html @@ -21,9 +21,7 @@ <div class="form-group"> <label class="col-sm-3 control-label">模块:</label> <div class="col-sm-8"> - <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}" th:field="*{moduleType}"> - <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> - </select> + <input id="moduleType" name="moduleType" class="form-control" readonly="readonly"> </div> </div> <div class="form-group"> diff --git a/src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html b/src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html index fec3bd1..27614b7 100644 --- a/src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html +++ b/src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html @@ -144,8 +144,10 @@ formatter: function(value, row, index) { var actions = []; actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); - if (row.status == 0) { + if (row.status < 10){ + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); + } + if (row.status == 0) { actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); } return actions.join(''); diff --git a/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html b/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html index f3868ab..16ee09c 100644 --- a/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html +++ b/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html @@ -196,7 +196,7 @@ var prefix = ctx + "receipt/receiptHeader"; var detailPrefix = ctx + "receipt/receiptDetail"; var datas = [[${@dict.getType('sys_normal_disable')}]]; - var receiptTypes = [[${@dict.getType('receiptType')}]]; + var receiptTypes = [[${@receiptTypeService.getType()}]]; var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]]; var uploadStatus = [[${@dict.getType('uploadStatus')}]]; var detailCreateUrl = detailPrefix+"/add"; @@ -260,8 +260,8 @@ formatter: function(value, row, index) { var actions = []; $.each(receiptTypes, function(index, dict) { - if (dict.dictValue == value) { - actions.push("<span class='badge badge-info'>" + dict.dictLabel + "</span>"); + if (dict.code == value) { + actions.push("<span class='badge badge-info'>" + dict.name + "</span>"); return false; } }); @@ -744,7 +744,7 @@ function Toreceiving(code) { let storage=window.localStorage; storage.receiving_code=code; - createMenuItem(ctx + "receipt/receiving","入库组盘"); + createMenuItem(ctx + "receipt/receiving","收货"); parent.$('.tabReload').click(); } diff --git a/src/main/resources/templates/receipt/receiving/add.html b/src/main/resources/templates/receipt/receiving/add.html index 17e553b..2b9cc16 100644 --- a/src/main/resources/templates/receipt/receiving/add.html +++ b/src/main/resources/templates/receipt/receiving/add.html @@ -99,9 +99,6 @@ qty:{ required:true, number:true - }, - containerCode:{ - required:true } }, submitHandler: function(form) {