diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeListController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeListController.java index 028e671..5b11019 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeListController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeListController.java @@ -62,4 +62,14 @@ public class TdPropertyChangeListController extends BaseController { mmap.put("useId",useId); return "system/property/propertychange/changeproperty"; } + /** + * 添加密品条目 + */ + @RequiresPermissions("system:change:detail") + @GetMapping("/ementChDetail/{useId}") + public String ementChDetail(@PathVariable("useId") String useId, ModelMap mmap) + { + mmap.put("useId",useId); + return "system/property/ementChange/ementChange"; + } } diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementChange/destory.html b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/destory.html new file mode 100644 index 0000000..a3272ac --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/destory.html @@ -0,0 +1,49 @@ +<!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-info-edit" th:object="${tdPropertyEment}"> + <input name="id" th:field="*{id}" type="hidden"> + <div class="form-group"> + <label class="col-sm-3 control-label">登记编号:</label> + <div class="col-sm-8"> + <input name="id" disabled th:field="*{id}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">名称:</label> + <div class="col-sm-8"> + <input name="name" disabled th:field="*{name}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">报废类型:</label> + <div class="col-sm-8"> + <select name="destoryType" class="form-control m-b" th:with="type=${@dict.getType('sys_baofei_type')}"> + <option value="">---请选择---</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{destoryType}"></option> + </select> + </div> + </div> + </form> +</div> +<th:block th:include="include :: footer" /> +<th:block th:include="include :: datetimepicker-js" /> +<script th:inline="javascript"> + var prefix = ctx + "system/ementChange"; + $("#form-info-edit").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/destorySave", $('#form-info-edit').serialize()); + } + } +</script> +</body> +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementChange.html b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementChange.html new file mode 100644 index 0000000..6082d8f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementChange.html @@ -0,0 +1,135 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<head> + <th:block th:include="include :: header('设备登记列表')" /> +</head> +<body class="gray-bg"> +<div class="container-div"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label>登记编号:</label> + <input type="text" name="id"/> + </li> + <li> + <label>设备品牌:</label> + <input type="text" name="propertyBrand"/> + </li> + <li> + <label>密品型号:</label> + <input type="text" name="propertyNo"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="btn-group-sm" id="toolbar" role="group"> + <a class="btn btn-danger" onclick="closeItem()"> + <i class="fa fa-reply-all"></i> 关闭 + </a> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> +</div> +<th:block th:include="include :: footer" /> +<script th:inline="javascript"> + var editFlag = [[${@permission.hasPermi('system:changeproperty:change')}]]; + var destoryFlag = [[${@permission.hasPermi('system:changeproperty:destory')}]]; + var removeFlag = [[${@permission.hasPermi('system:changeproperty:remove')}]]; + var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]]; + var destoryTypeDatas = [[${@dict.getType('sys_baofei_type')}]]; + var destoryStartsDatas = [[${@dict.getType('sys_maintain_state')}]]; + var prefix = ctx + "system/ementChange"; + + $(function() { + var options = { + url: prefix + "/list", + updateUrl: prefix + "/edit/{id}", + destoryUrl: prefix + "/destory/{id}", + queryParams: queryParams, + modalName: "涉密设备维修", + columns: [ + { + field: 'id', + title: '登记编号' + }, + { + field: 'name', + title: '名称' + }, + { + field: 'maintainDepart', + title: '维修部门' + }, + { + field: 'maintainUser', + title: '维修人员' + }, + { + field: 'maintainDate', + title: '维修日期', + formatter: function(value, row, index) { + const date = new Date(value); + const year = date.getFullYear(); + const month = ('0' + (date.getMonth() + 1)).slice(-2); + const day = ('0' + date.getDate()).slice(-2); + return `${year}-${month}-${day}` + } + }, + { + field: 'maintainState', + title: '维修状态', + formatter: function(value, row, index) { + return $.table.selectDictLabel(destoryStartsDatas, value); + } + }, + { + field: 'destoryType', + title: '报废状态', + formatter: function(value, row, index) { + return $.table.selectDictLabel(destoryTypeDatas, value); + } + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + if (row.destoryState===null){ + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>维修</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + destoryFlag + '" href="javascript:void(0)" onclick="destory(\'' + row.id + '\')"><i class="fa fa-remove"></i>报废</a>'); + }else{ + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" disabled><i class="fa fa-edit"></i>维修</a> '); + actions.push('<a class="btn btn-danger btn-xs ' + destoryFlag + '" href="javascript:void(0)" disabled><i class="fa fa-remove"></i>报废</a>'); + } + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + + + function queryParams(params) { + var search = $.table.queryParams(params); + search.useId = [[${useId}]]; + return search; + } + + function destory(id) { + var url = prefix + '/destory/' + id; + $.modal.open("密品报废", url); + } +</script> +</body> +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementEdit.html b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementEdit.html new file mode 100644 index 0000000..9988afe --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/property/ementChange/ementEdit.html @@ -0,0 +1,79 @@ +<!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-info-edit" th:object="${tdPropertyEment}"> + <input name="id" th:field="*{id}" type="hidden"> + <div class="form-group"> + <label class="col-sm-3 control-label">登记编号:</label> + <div class="col-sm-8"> + <input name="id" disabled th:field="*{id}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">名称:</label> + <div class="col-sm-8"> + <input name="useId" disabled th:field="*{name}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">维修人员:</label> + <div class="col-sm-8"> + <input name="maintainUser" required th:field="*{maintainUser}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">维修部门:</label> + <div class="col-sm-8"> + <input name="maintainDepart" required th:field="*{maintainDepart}" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">维修日期:</label> + <div class="col-sm-8"> + <div class="input-group date"> + <input name="maintainDate" required th:value="${#dates.format(tdPropertyEment.maintainDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> + <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"> + <textarea name="maintainRemark" class="form-control">[[*{maintainRemark}]]</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 + "system/ementChange"; + $("#form-info-edit").validate({ + focusCleanup: true + }); + + function submitHandler() { + if ($.validate.form()) { + $.operate.save(prefix + "/update", $('#form-info-edit').serialize()); + } + } + + $("input[name='maintainDate']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); + + $("input[name='destoryDate']").datetimepicker({ + format: "yyyy-mm-dd", + minView: "month", + autoclose: true + }); +</script> +</body> +</html> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/list/property.html b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/list/property.html index 9b0d47d..f8a4706 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/list/property.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/list/property.html @@ -113,7 +113,8 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.useId + '\')"><i class="fa fa-list-ul"></i>密品维修</a> '); + var rowData = encodeURIComponent(JSON.stringify(row)); + actions.push('<a class="btn btn-info btn-xs ' + listFlag + '" href="javascript:void(0)" data-row=\'' + rowData + '\' onclick="detail(this)"><i class="fa fa-list-ul"></i>密品维修</a> '); return actions.join(''); } }] @@ -162,10 +163,16 @@ } } }) - /*密品列表-详细*/ - function detail(useId) { - var url = prefix + '/detail/' + useId; - $.modal.openTab("密品列表数据", url); + function detail(element) { + var rowData = $(element).data('row'); + var row = JSON.parse(decodeURIComponent(rowData)); + if (row.secretsType == '1'){ + var url = prefix + '/detail/' + row.useId; + $.modal.openTab("涉密信息设备登记列表", url); + }else{ + var url = prefix + '/ementChDetail/' + row.useId; + $.modal.openTab("涉密设备登记列表", url); + } } </script> </body>