字典数据管理去掉停用启用校验下级的限制,并支持级联更新
This commit is contained in:
@@ -185,13 +185,13 @@ public class DictDataController extends BaseController {
|
||||
if (old != null && Global.YES.equals(old.getIsSys()) && !dictData.currentUser().isSuperAdmin()){
|
||||
return renderResult(Global.FALSE, text("越权操作,只有超级管理员才能修改系统数据!"));
|
||||
}
|
||||
DictData where = new DictData();
|
||||
where.setStatus(DictData.STATUS_NORMAL);
|
||||
where.setParentCodes("," + dictData.getId() + ",");
|
||||
long count = dictDataService.findCount(where);
|
||||
if (count > 0) {
|
||||
return renderResult(Global.FALSE, text("该字典包含未停用的子字典!"));
|
||||
}
|
||||
// DictData where = new DictData();
|
||||
// where.setStatus(DictData.STATUS_NORMAL);
|
||||
// where.setParentCodes("," + dictData.getId() + ",");
|
||||
// long count = dictDataService.findCount(where);
|
||||
// if (count > 0) {
|
||||
// return renderResult(Global.FALSE, text("该字典包含未停用的子字典!"));
|
||||
// }
|
||||
dictData.setStatus(DictData.STATUS_DISABLE);
|
||||
dictDataService.updateStatus(dictData);
|
||||
return renderResult(Global.TRUE, text("停用字典成功"));
|
||||
|
||||
@@ -142,7 +142,8 @@ $('#inputForm').validate({
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
(contentWindow.win||contentWindow).$('#dataGrid').dataGrid('refreshTreeChildren',
|
||||
$('#parentCode').val(), '${dictData.id}');
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
|
||||
Reference in New Issue
Block a user