diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeController.java index 5a32a94..507efa4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyChangeController.java @@ -24,8 +24,7 @@ public class TdPropertyChangeController extends BaseController { @RequiresPermissions("system:changeproperty:view") @GetMapping() - public String changeProperty() - { + public String changeProperty() { return prefix + "/changeproperty"; } @@ -35,8 +34,7 @@ public class TdPropertyChangeController extends BaseController { @RequiresPermissions("system:changeproperty:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(TdPropertyInfo tdPropertyInfo) - { + public TableDataInfo list(TdPropertyInfo tdPropertyInfo) { startPage(); List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo); return getDataTable(tdPropertyInfos); @@ -47,8 +45,7 @@ public class TdPropertyChangeController extends BaseController { */ @RequiresPermissions("system:changeproperty:change") @GetMapping("/edit/{id}") - public String change(@PathVariable("id") String id, ModelMap mmap) - { + public String change(@PathVariable("id") String id, ModelMap mmap) { TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id); mmap.put("tdPropertyInfo", tdPropertyInfo); return prefix + "/change"; @@ -61,8 +58,8 @@ public class TdPropertyChangeController extends BaseController { @Log(title = "密品变更", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) - { + public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) { + tdPropertyInfo.setMaintainState("2"); return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); } @@ -71,8 +68,7 @@ public class TdPropertyChangeController extends BaseController { */ @RequiresPermissions("system:changeproperty:destory") @GetMapping("/destory/{id}") - public String destory(@PathVariable("id") String id, ModelMap mmap) - { + public String destory(@PathVariable("id") String id, ModelMap mmap) { TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id); mmap.put("tdPropertyInfo", tdPropertyInfo); return prefix + "/destory"; @@ -85,8 +81,7 @@ public class TdPropertyChangeController extends BaseController { @Log(title = "密品变更", businessType = BusinessType.UPDATE) @PostMapping("/destory") @ResponseBody - public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) - { + public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) { return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyInfoController.java index 387babb..6e50e20 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyInfoController.java @@ -87,6 +87,7 @@ public class TdPropertyInfoController extends BaseController public AjaxResult addSave(TdPropertyInfo tdPropertyInfo) { tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType)); + tdPropertyInfo.setMaintainState("1"); return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo)); } diff --git a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/change.html b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/change.html index f0c8c97..9b50862 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/change.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/change.html @@ -59,6 +59,15 @@ <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(tdPropertyInfo.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"> diff --git a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/changeproperty.html b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/changeproperty.html index 08fff1a..1fed1a3 100644 --- a/ruoyi-admin/src/main/resources/templates/system/property/propertychange/changeproperty.html +++ b/ruoyi-admin/src/main/resources/templates/system/property/propertychange/changeproperty.html @@ -48,6 +48,7 @@ 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/propertychange"; $(function() { @@ -81,6 +82,13 @@ field: 'propertySn', title: '密品SN码' }, + { + field: 'maintainState', + title: '维修状态', + formatter: function(value, row, index) { + return $.table.selectDictLabel(destoryStartsDatas, value); + } + }, { field: 'destoryType', title: '报废状态',