fix:维修提交

pg_adapter
wangxy 8 months ago
parent ad9443c7e1
commit 5e6906e313

@ -24,8 +24,7 @@ public class TdPropertyChangeController extends BaseController {
@RequiresPermissions("system:changeproperty:view") @RequiresPermissions("system:changeproperty:view")
@GetMapping() @GetMapping()
public String changeProperty() public String changeProperty() {
{
return prefix + "/changeproperty"; return prefix + "/changeproperty";
} }
@ -35,8 +34,7 @@ public class TdPropertyChangeController extends BaseController {
@RequiresPermissions("system:changeproperty:list") @RequiresPermissions("system:changeproperty:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyInfo tdPropertyInfo) public TableDataInfo list(TdPropertyInfo tdPropertyInfo) {
{
startPage(); startPage();
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo); List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
return getDataTable(tdPropertyInfos); return getDataTable(tdPropertyInfos);
@ -47,8 +45,7 @@ public class TdPropertyChangeController extends BaseController {
*/ */
@RequiresPermissions("system:changeproperty:change") @RequiresPermissions("system:changeproperty:change")
@GetMapping("/edit/{id}") @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); TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo); mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/change"; return prefix + "/change";
@ -61,8 +58,8 @@ public class TdPropertyChangeController extends BaseController {
@Log(title = "密品变更", businessType = BusinessType.UPDATE) @Log(title = "密品变更", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) {
{ tdPropertyInfo.setMaintainState("2");
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
} }
@ -71,8 +68,7 @@ public class TdPropertyChangeController extends BaseController {
*/ */
@RequiresPermissions("system:changeproperty:destory") @RequiresPermissions("system:changeproperty:destory")
@GetMapping("/destory/{id}") @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); TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo); mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/destory"; return prefix + "/destory";
@ -85,8 +81,7 @@ public class TdPropertyChangeController extends BaseController {
@Log(title = "密品变更", businessType = BusinessType.UPDATE) @Log(title = "密品变更", businessType = BusinessType.UPDATE)
@PostMapping("/destory") @PostMapping("/destory")
@ResponseBody @ResponseBody
public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) {
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
} }

@ -87,6 +87,7 @@ public class TdPropertyInfoController extends BaseController
public AjaxResult addSave(TdPropertyInfo tdPropertyInfo) public AjaxResult addSave(TdPropertyInfo tdPropertyInfo)
{ {
tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType)); tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType));
tdPropertyInfo.setMaintainState("1");
return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo));
} }

@ -59,6 +59,15 @@
<input name="maintainDepart" required th:field="*{maintainDepart}" class="form-control" type="text"> <input name="maintainDepart" required th:field="*{maintainDepart}" class="form-control" type="text">
</div> </div>
</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"> <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">

@ -48,6 +48,7 @@
var removeFlag = [[${@permission.hasPermi('system:changeproperty:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:changeproperty:remove')}]];
var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]]; var propertyTypeDatas = [[${@dict.getType('sys_sm_property')}]];
var destoryTypeDatas = [[${@dict.getType('sys_baofei_type')}]]; var destoryTypeDatas = [[${@dict.getType('sys_baofei_type')}]];
var destoryStartsDatas = [[${@dict.getType('sys_maintain_state')}]];
var prefix = ctx + "system/propertychange"; var prefix = ctx + "system/propertychange";
$(function() { $(function() {
@ -81,6 +82,13 @@
field: 'propertySn', field: 'propertySn',
title: '密品SN码' title: '密品SN码'
}, },
{
field: 'maintainState',
title: '维修状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(destoryStartsDatas, value);
}
},
{ {
field: 'destoryType', field: 'destoryType',
title: '报废状态', title: '报废状态',

Loading…
Cancel
Save