Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
zhangsiqi 6 months ago
parent
commit
4bcd9d15cb
  1. 37
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryReportDamageController.java
  2. 126
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/detail.html
  3. 6
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html
  4. 11
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

37
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryReportDamageController.java

@ -112,39 +112,28 @@ public class WarehouseInventoryReportDamageController extends BaseController
return toAjax(warehouseInventoryReportDamageService.updateWarehouseInventoryReportDamage(warehouseInventoryReportDamage)); return toAjax(warehouseInventoryReportDamageService.updateWarehouseInventoryReportDamage(warehouseInventoryReportDamage));
} }
/**
* 删除仓库库存报损
*/
@RequiresPermissions("warehouse:inventoryReportDamage:remove")
@Log(title = "仓库库存报损", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(warehouseInventoryReportDamageService.deleteWarehouseInventoryReportDamageByIds(ids));
}
/** /**
* 作废仓库库存报损 * 仓库库存报损详情
*/ */
@RequiresPermissions("warehouse:inventoryReportDamage:cancel") @GetMapping("/detail/{reportDamageId}")
@Log(title = "仓库库存报损", businessType = BusinessType.CANCEL) public String detail(@PathVariable("reportDamageId") Long reportDamageId, ModelMap mmap)
@GetMapping( "/cancel/{id}") {
@ResponseBody WarehouseInventoryReportDamage warehouseInventoryReportDamage = warehouseInventoryReportDamageService.selectWarehouseInventoryReportDamageById(reportDamageId);
public AjaxResult cancel(@PathVariable("id") Long id){ mmap.put("warehouseInventoryReportDamage", warehouseInventoryReportDamage);
return toAjax(warehouseInventoryReportDamageService.cancelWarehouseInventoryReportDamageById(id)); return prefix + "/detail";
} }
/** /**
* 恢复仓库库存报损 * 保存仓库库存报损详情
*/ */
@RequiresPermissions("warehouse:inventoryReportDamage:restore") @RequiresPermissions("warehouse:inventoryReportDamage:detail")
@Log(title = "仓库库存报损", businessType = BusinessType.RESTORE) @Log(title = "仓库库存报损", businessType = BusinessType.UPDATE)
@GetMapping( "/restore/{id}") @PostMapping("/detail")
@ResponseBody @ResponseBody
public AjaxResult restore(@PathVariable("id")Long id) public AjaxResult detailSave(WarehouseInventoryReportDamage warehouseInventoryReportDamage)
{ {
return toAjax(warehouseInventoryReportDamageService.restoreWarehouseInventoryReportDamageById(id)); return toAjax(warehouseInventoryReportDamageService.updateWarehouseInventoryReportDamage(warehouseInventoryReportDamage));
} }

126
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/detail.html

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改仓库库存报损')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-inventoryReportDamage-edit" th:object="${warehouseInventoryReportDamage}">
<input name="reportDamageId" th:field="*{reportDamageId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">报损单号:</label>
<div class="col-sm-8">
<input name="reportDamageCode" th:field="*{reportDamageCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">报废类型:</label>
<div class="col-sm-8">
<select name="warehousScrapType" class="form-control m-b" th:with="type=${@dict.getType('warehous_scrap_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehousScrapType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联生产单号:</label>
<div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否关联生产单号:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}">
<input type="radio" th:id="${'whetherMakeNo_' + dict.dictCode}" name="whetherMakeNo" th:value="${dict.dictValue}" th:field="*{whetherMakeNo}" disabled>
<label th:for="${'whetherMakeNo_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请部门:</label>
<div class="col-sm-8">
<input name="applyDept" th:field="*{applyDept}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="applyTime" th:value="${#dates.format(warehouseInventoryReportDamage.applyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input name="materialNo" th:field="*{materialNo}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料数合计:</label>
<div class="col-sm-8">
<input name="materialTotal" th:field="*{materialTotal}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数量合计:</label>
<div class="col-sm-8">
<input name="numTotal" th:field="*{numTotal}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库ID:</label>
<div class="col-sm-8">
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库名称:</label>
<div class="col-sm-8">
<input name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">仓库存放地址:</label>
<div class="col-sm-8">
<input name="warehouseStoreAddress" th:field="*{warehouseStoreAddress}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control" disabled>[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "warehouse/inventoryReportDamage";
$("#form-inventoryReportDamage-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-inventoryReportDamage-edit').serialize());
}
}
$("input[name='applyTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

6
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html

@ -8,12 +8,6 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-inventoryReportDamage-edit" th:object="${warehouseInventoryReportDamage}"> <form class="form-horizontal m" id="form-inventoryReportDamage-edit" th:object="${warehouseInventoryReportDamage}">
<input name="reportDamageId" th:field="*{reportDamageId}" type="hidden"> <input name="reportDamageId" th:field="*{reportDamageId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">报损单号:</label>
<div class="col-sm-8">
<input name="reportDamageCode" th:field="*{reportDamageCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <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"> <div class="col-sm-8">

11
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

@ -76,7 +76,7 @@
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:edit')}]]; var editFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:edit')}]];
var detailFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:detail')}]];
var warehousScrapTypeDatas = [[${@dict.getType('warehous_scrap_type')}]]; var warehousScrapTypeDatas = [[${@dict.getType('warehous_scrap_type')}]];
var whetherMakeNoDatas = [[${@dict.getType('yes_or_no')}]]; var whetherMakeNoDatas = [[${@dict.getType('yes_or_no')}]];
@ -181,12 +181,21 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join(''); return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
/*库存报损详情*/
function detail(reportDamageId){
url = ctx + 'warehouse/inventoryReportDamage/detail/' + reportDamageId;
$.modal.open("详情",url);
}
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save