Browse Source

[feat]生产管理:新增制程类别详情按钮与详情页面

dev
zhangsiqi 5 months ago
parent
commit
2fc7c46cbd
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProcessCategoryController.java
  2. 68
      ruoyi-admin/src/main/resources/templates/system/processCategory/detail.html
  3. 72
      ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html

8
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProcessCategoryController.java

@ -96,7 +96,13 @@ public class SysProcessCategoryController extends BaseController
mmap.put("sysProcessCategory", sysProcessCategory);
return prefix + "/edit";
}
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") Long id, ModelMap mmap)
{
SysProcessCategory sysProcessCategory = sysProcessCategoryService.selectSysProcessCategoryById(id);
mmap.put("sysProcessCategory", sysProcessCategory);
return prefix + "/detail";
}
/**
* 修改保存制程类别明细
*/

68
ruoyi-admin/src/main/resources/templates/system/processCategory/detail.html

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('制程类别明细详情')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-processCategory-detail" th:object="${sysProcessCategory}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">制程类别id:</label>
<div class="col-sm-8">
<input name="processCategoryId" th:field="*{processCategoryId}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">制程类别编号:</label>
<div class="col-sm-8">
<input name="processCategoryCode" th:field="*{processCategoryCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">制程类别名称:</label>
<div class="col-sm-8">
<input name="processCategoryName" th:field="*{processCategoryName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">制程描述:</label>
<div class="col-sm-8">
<textarea name="processDescription" class="form-control" readonly>[[*{processDescription}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工时产量:</label>
<div class="col-sm-8">
<input name="workHourOutput" th:field="*{workHourOutput}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标准加工费:</label>
<div class="col-sm-8">
<input name="standardConversionCost" th:field="*{standardConversionCost}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">财务实际加工费:</label>
<div class="col-sm-8">
<input name="actualProcessingCost" th:field="*{actualProcessingCost}" class="form-control" type="text" readonly>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/processCategory";
$("#form-processCategory-detail").validate({
focusCleanup: true
});
// function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/edit", $('#form-processCategory-edit').serialize());
// }
// }
</script>
</body>
</html>

72
ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html

@ -59,51 +59,35 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
pageList: [10, 25, 50],
pageSize: 10,
showColumns: false,
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
height: $(window).height() - 100,
modalName: "制程类别明细",
columns: [{
checkbox: true
},
{
title: '主键ID',
field: 'id',
visible: false
},
{
field: 'processCategoryId',
title: '制程类别id'
},
{
field: 'processCategoryCode',
title: '制程类别编号'
},
{
field: 'processCategoryName',
title: '制程类别名称'
},
{
field: 'processDescription',
title: '制程描述'
},
{
field: 'workHourOutput',
title: '工时产量'
},
{
field: 'standardConversionCost',
title: '标准加工费'
},
{
field: 'actualProcessingCost',
title: '财务实际加工费'
},
{
field: 'createTime',
title: '录入时间'
},
{
field: 'updateTime',
title: '上次修改时间'
}]
columns: [
{checkbox: true},
{title: '主键ID',field: 'id',visible: false},
{field: 'processCategoryId',title: '制程类别id'},
{field: 'processCategoryCode',title: '制程类别编号'},
{field: 'processCategoryName',title: '制程类别名称'},
{field: 'processDescription',title: '制程描述'},
{field: 'workHourOutput',title: '工时产量'},
{field: 'standardConversionCost',title: '标准加工费'},
{field: 'actualProcessingCost',title: '财务实际加工费'},
{field: 'createTime',title: '录入时间'},
{field: 'updateTime',title: '上次修改时间'},
{title: '操作',align: 'center',formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="#" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
});

Loading…
Cancel
Save