Object List批量删除增加提示信息
This commit is contained in:
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
@@ -135,6 +136,13 @@ public class DomainCommGroupController extends BaseController{
|
|||||||
return "redirect:" + adminPath +"/basics/domain/list?functionId="+functionId;
|
return "redirect:" + adminPath +"/basics/domain/list?functionId="+functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除前获取提示信息
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value="ajaxCheckIsLastOneCfgBatch",method=RequestMethod.POST)
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(Model model, DomainCommCfg searchCfg){
|
||||||
|
return domainCommGroupService.ajaxCheckIsLastOneCfgBatch(searchCfg);
|
||||||
|
}
|
||||||
|
|
||||||
// 数据导入
|
// 数据导入
|
||||||
@RequestMapping(value = "import", method=RequestMethod.POST)
|
@RequestMapping(value = "import", method=RequestMethod.POST)
|
||||||
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
@@ -143,6 +144,13 @@ public class IpCommGroupController extends BaseController {
|
|||||||
return "redirect:" + adminPath + "/basics/ip/list?functionId=" + functionId;
|
return "redirect:" + adminPath + "/basics/ip/list?functionId=" + functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除前获取提示信息
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value="ajaxCheckIsLastOneCfgBatch",method=RequestMethod.POST)
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(Model model, IpCommCfg searchCfg){
|
||||||
|
return ipCommGroupCfgService.ajaxCheckIsLastOneCfgBatch(searchCfg);
|
||||||
|
}
|
||||||
|
|
||||||
// 数据导出
|
// 数据导出
|
||||||
@RequestMapping(value = "/exportIpComm")
|
@RequestMapping(value = "/exportIpComm")
|
||||||
public void exportIpCommonCfg(Model model, @ModelAttribute("cfg") IpCommCfg entity, String ids, RedirectAttributes redirectAttributes,
|
public void exportIpCommonCfg(Model model, @ModelAttribute("cfg") IpCommCfg entity, String ids, RedirectAttributes redirectAttributes,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
@@ -135,6 +136,13 @@ public class ScriberIdCommGroupController extends BaseController{
|
|||||||
return "redirect:" + adminPath +"/basics/scriberId/list?functionId="+functionId;
|
return "redirect:" + adminPath +"/basics/scriberId/list?functionId="+functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除前获取提示信息
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value="ajaxCheckIsLastOneCfgBatch",method=RequestMethod.POST)
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(Model model, ScriberIdCommCfg searchCfg){
|
||||||
|
return scriberIdCommGroupService.ajaxCheckIsLastOneCfgBatch(searchCfg);
|
||||||
|
}
|
||||||
|
|
||||||
// 数据导入
|
// 数据导入
|
||||||
@RequestMapping(value = "import", method=RequestMethod.POST)
|
@RequestMapping(value = "import", method=RequestMethod.POST)
|
||||||
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
@@ -135,6 +136,13 @@ public class UrlCommGroupController extends BaseController{
|
|||||||
return "redirect:" + adminPath +"/basics/url/list?functionId="+functionId;
|
return "redirect:" + adminPath +"/basics/url/list?functionId="+functionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量删除前获取提示信息
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value="ajaxCheckIsLastOneCfgBatch",method=RequestMethod.POST)
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(Model model, UrlCommCfg searchCfg){
|
||||||
|
return urlCommGroupService.ajaxCheckIsLastOneCfgBatch(searchCfg);
|
||||||
|
}
|
||||||
|
|
||||||
// 数据导入
|
// 数据导入
|
||||||
@RequestMapping(value = "import", method=RequestMethod.POST)
|
@RequestMapping(value = "import", method=RequestMethod.POST)
|
||||||
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
public String importIp(HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.nis.web.service.basics;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -319,4 +320,42 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
|||||||
cfgs=null;
|
cfgs=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取会配置取消的CompileId
|
||||||
|
* @param searchCfg 携带列表检索条件
|
||||||
|
* @return List<Integer> CompileId集合
|
||||||
|
*/
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(DomainCommCfg searchCfg) {
|
||||||
|
List<Integer> resultList = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
// 获取所有准备删除的数据,并组织格式 {"groupId1":[cfgId1, cfgId2, ...], ...}
|
||||||
|
Map<Integer, String> map = new HashMap<Integer, String>();
|
||||||
|
List<DomainCommCfg> cfgList = domainCommGroupDao.findAllPageList(searchCfg);
|
||||||
|
for (DomainCommCfg cfg : cfgList) {
|
||||||
|
Integer groupId = cfg.getGroupId();
|
||||||
|
String value = "";
|
||||||
|
if(map.containsKey(groupId)) {
|
||||||
|
value = map.get(groupId);
|
||||||
|
}
|
||||||
|
value += ","+cfg.getCfgId();
|
||||||
|
map.put(groupId, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验执行删除后分组下是否还有域配置,若没有则获取引用该分组的CompileId
|
||||||
|
for (Integer groupId : map.keySet()) {
|
||||||
|
String cfgIds = map.get(groupId).substring(1);
|
||||||
|
Integer size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds, DomainCommCfg.getTablename());
|
||||||
|
if(size == 0) { // 0为分组下的最后一条配置,获取配置ID提示
|
||||||
|
Map<String,String> searchMap = new HashMap<String,String>();
|
||||||
|
searchMap.put("domainGroup", ","+groupId+",");
|
||||||
|
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(gsonToJson(searchMap));
|
||||||
|
if(compileId != null) {
|
||||||
|
resultList.add(compileId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.nis.web.service.basics;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -306,4 +307,42 @@ public class IpCommGroupCfgService extends BaseService {
|
|||||||
cfgs=null;
|
cfgs=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取会配置取消的CompileId
|
||||||
|
* @param searchCfg 携带列表检索条件
|
||||||
|
* @return List<Integer> CompileId集合
|
||||||
|
*/
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(IpCommCfg searchCfg) {
|
||||||
|
List<Integer> resultList = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
// 获取所有准备删除的数据,并组织格式 {"groupId1":[cfgId1, cfgId2, ...], ...}
|
||||||
|
Map<Integer, String> map = new HashMap<Integer, String>();
|
||||||
|
List<IpCommCfg> cfgList = ipCommGroupCfgDao.findPage(searchCfg);
|
||||||
|
for (IpCommCfg cfg : cfgList) {
|
||||||
|
Integer groupId = cfg.getGroupId();
|
||||||
|
String value = "";
|
||||||
|
if(map.containsKey(groupId)) {
|
||||||
|
value = map.get(groupId);
|
||||||
|
}
|
||||||
|
value += ","+cfg.getCfgId();
|
||||||
|
map.put(groupId, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验执行删除后分组下是否还有域配置,若没有则获取引用该分组的CompileId
|
||||||
|
for (Integer groupId : map.keySet()) {
|
||||||
|
String cfgIds = map.get(groupId).substring(1);
|
||||||
|
Integer size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds, IpCommCfg.getIndexTable());
|
||||||
|
if(size == 0) { // 0为分组下的最后一条配置,获取配置ID提示
|
||||||
|
Map<String,String> searchMap = new HashMap<String,String>();
|
||||||
|
searchMap.put("ipGroup", ","+groupId+",");
|
||||||
|
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(gsonToJson(searchMap));
|
||||||
|
if(compileId != null) {
|
||||||
|
resultList.add(compileId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.nis.web.service.basics;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -320,4 +321,42 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
|||||||
cfgs=null;
|
cfgs=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取会配置取消的CompileId
|
||||||
|
* @param searchCfg 携带列表检索条件
|
||||||
|
* @return List<Integer> CompileId集合
|
||||||
|
*/
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(ScriberIdCommCfg searchCfg) {
|
||||||
|
List<Integer> resultList = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
// 获取所有准备删除的数据,并组织格式 {"groupId1":[cfgId1, cfgId2, ...], ...}
|
||||||
|
Map<Integer, String> map = new HashMap<Integer, String>();
|
||||||
|
List<ScriberIdCommCfg> cfgList = scriberIdCommGroupDao.findAllPageList(searchCfg);
|
||||||
|
for (ScriberIdCommCfg cfg : cfgList) {
|
||||||
|
Integer groupId = cfg.getGroupId();
|
||||||
|
String value = "";
|
||||||
|
if(map.containsKey(groupId)) {
|
||||||
|
value = map.get(groupId);
|
||||||
|
}
|
||||||
|
value += ","+cfg.getCfgId();
|
||||||
|
map.put(groupId, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验执行删除后分组下是否还有域配置,若没有则获取引用该分组的CompileId
|
||||||
|
for (Integer groupId : map.keySet()) {
|
||||||
|
String cfgIds = map.get(groupId).substring(1);
|
||||||
|
Integer size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds, ScriberIdCommCfg.getTablename());
|
||||||
|
if(size == 0) { // 0为分组下的最后一条配置,获取配置ID提示
|
||||||
|
Map<String,String> searchMap = new HashMap<String,String>();
|
||||||
|
searchMap.put("subscribeIdGroup", ","+groupId+",");
|
||||||
|
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(gsonToJson(searchMap));
|
||||||
|
if(compileId != null) {
|
||||||
|
resultList.add(compileId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.nis.web.service.basics;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -320,4 +321,42 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
|||||||
cfgs=null;
|
cfgs=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取会配置取消的CompileId
|
||||||
|
* @param searchCfg 携带列表检索条件
|
||||||
|
* @return List<Integer> CompileId集合
|
||||||
|
*/
|
||||||
|
public List<Integer> ajaxCheckIsLastOneCfgBatch(UrlCommCfg searchCfg) {
|
||||||
|
List<Integer> resultList = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
// 获取所有准备删除的数据,并组织格式 {"groupId1":[cfgId1, cfgId2, ...], ...}
|
||||||
|
Map<Integer, String> map = new HashMap<Integer, String>();
|
||||||
|
List<UrlCommCfg> cfgList = urlCommGroupDao.findAllPageList(searchCfg);
|
||||||
|
for (UrlCommCfg cfg : cfgList) {
|
||||||
|
Integer groupId = cfg.getGroupId();
|
||||||
|
String value = "";
|
||||||
|
if(map.containsKey(groupId)) {
|
||||||
|
value = map.get(groupId);
|
||||||
|
}
|
||||||
|
value += ","+cfg.getCfgId();
|
||||||
|
map.put(groupId, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验执行删除后分组下是否还有域配置,若没有则获取引用该分组的CompileId
|
||||||
|
for (Integer groupId : map.keySet()) {
|
||||||
|
String cfgIds = map.get(groupId).substring(1);
|
||||||
|
Integer size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds, UrlCommCfg.getTablename());
|
||||||
|
if(size == 0) { // 0为分组下的最后一条配置,获取配置ID提示
|
||||||
|
Map<String,String> searchMap = new HashMap<String,String>();
|
||||||
|
searchMap.put("urlGroup", ","+groupId+",");
|
||||||
|
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(gsonToJson(searchMap));
|
||||||
|
if(compileId != null) {
|
||||||
|
resultList.add(compileId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,10 +43,6 @@
|
|||||||
var importPath="/basics/domain/list?functionId=${cfg.functionId}"
|
var importPath="/basics/domain/list?functionId=${cfg.functionId}"
|
||||||
$("#importForm1").attr("action","${ctx}/basics/domain/import?importPath="+importPath);
|
$("#importForm1").attr("action","${ctx}/basics/domain/import?importPath="+importPath);
|
||||||
|
|
||||||
$(".groupId").find("option:first").each(function(){
|
|
||||||
$(this).hide();
|
|
||||||
$(".groupId").selectpicker("refresh");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
var edit=function(url){
|
var edit=function(url){
|
||||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||||
@@ -81,9 +77,9 @@
|
|||||||
str = str.substr(1);
|
str = str.substr(1);
|
||||||
groupIds = groupIds.substr(1);
|
groupIds = groupIds.substr(1);
|
||||||
|
|
||||||
if(ids.length >0){
|
var tipInfoAdd = "";
|
||||||
var tipInfoAdd = "";
|
var tipCompileIds = "";
|
||||||
var tipCompileIds = "";
|
if(ids.length >0){ // 选中单个或多个
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||||
@@ -112,15 +108,42 @@
|
|||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{
|
}else{ // 未选中任何 批量
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
var myData = {};
|
||||||
|
var groupId = $("#groupId").val();
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
myData[$("#seltype").val()] = $("#intype").val();
|
||||||
|
}
|
||||||
|
if(groupId != ''){
|
||||||
|
myData["groupId"] = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
url:'${ctx}/basics/domain/ajaxCheckIsLastOneCfgBatch',
|
||||||
|
data:myData,
|
||||||
|
async:false,
|
||||||
|
success:function(data,textStatus){// 处理返回结果
|
||||||
|
if(data.length > 0){
|
||||||
|
canDel = false;
|
||||||
|
for(var index in data){
|
||||||
|
tipCompileIds += ","+data[index]
|
||||||
|
}
|
||||||
|
tipCompileIds = tipCompileIds.substr(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!canDel){
|
||||||
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
|
}
|
||||||
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
page();
|
page();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
||||||
return; */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,9 +78,9 @@
|
|||||||
str = str.substr(1);
|
str = str.substr(1);
|
||||||
groupIds = groupIds.substr(1);
|
groupIds = groupIds.substr(1);
|
||||||
|
|
||||||
if(ids.length >0){
|
var tipInfoAdd = "";
|
||||||
var tipInfoAdd = "";
|
var tipCompileIds = "";
|
||||||
var tipCompileIds = "";
|
if(ids.length >0){ // 选中单个或多个
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||||
@@ -109,15 +109,42 @@
|
|||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{
|
}else{ // 未选中任何 批量
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
var myData = {};
|
||||||
|
var groupId = $("#groupId").val();
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
myData[$("#seltype").val()] = $("#intype").val();
|
||||||
|
}
|
||||||
|
if(groupId != ''){
|
||||||
|
myData["groupId"] = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
url:'${ctx}/basics/ip/ajaxCheckIsLastOneCfgBatch',
|
||||||
|
data:myData,
|
||||||
|
async:false,
|
||||||
|
success:function(data,textStatus){// 处理返回结果
|
||||||
|
if(data.length > 0){
|
||||||
|
canDel = false;
|
||||||
|
for(var index in data){
|
||||||
|
tipCompileIds += ","+data[index]
|
||||||
|
}
|
||||||
|
tipCompileIds = tipCompileIds.substr(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!canDel){
|
||||||
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
|
}
|
||||||
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
page();
|
page();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
||||||
return; */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,10 +43,10 @@
|
|||||||
var importPath="/basics/scriberId/list?functionId=${cfg.functionId}"
|
var importPath="/basics/scriberId/list?functionId=${cfg.functionId}"
|
||||||
$("#importForm1").attr("action","${ctx}/basics/scriberId/import?importPath="+importPath);
|
$("#importForm1").attr("action","${ctx}/basics/scriberId/import?importPath="+importPath);
|
||||||
|
|
||||||
$(".groupId").find("option:first").each(function(){
|
/* $(".groupId").find("option:first").each(function(){
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
$(".groupId").selectpicker("refresh");
|
$(".groupId").selectpicker("refresh");
|
||||||
});
|
}); */
|
||||||
});
|
});
|
||||||
var edit=function(url){
|
var edit=function(url){
|
||||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||||
@@ -81,9 +81,9 @@
|
|||||||
str = str.substr(1);
|
str = str.substr(1);
|
||||||
groupIds = groupIds.substr(1);
|
groupIds = groupIds.substr(1);
|
||||||
|
|
||||||
if(ids.length >0){
|
var tipInfoAdd = "";
|
||||||
var tipInfoAdd = "";
|
var tipCompileIds = "";
|
||||||
var tipCompileIds = "";
|
if(ids.length >0){ // 选中单个或多个
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||||
@@ -112,15 +112,42 @@
|
|||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{
|
}else{ // 未选中任何 批量
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
var myData = {};
|
||||||
|
var groupId = $("#groupId").val();
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
myData[$("#seltype").val()] = $("#intype").val();
|
||||||
|
}
|
||||||
|
if(groupId != ''){
|
||||||
|
myData["groupId"] = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
url:'${ctx}/basics/scriberId/ajaxCheckIsLastOneCfgBatch',
|
||||||
|
data:myData,
|
||||||
|
async:false,
|
||||||
|
success:function(data,textStatus){// 处理返回结果
|
||||||
|
if(data.length > 0){
|
||||||
|
canDel = false;
|
||||||
|
for(var index in data){
|
||||||
|
tipCompileIds += ","+data[index]
|
||||||
|
}
|
||||||
|
tipCompileIds = tipCompileIds.substr(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!canDel){
|
||||||
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
|
}
|
||||||
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
page();
|
page();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
||||||
return; */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,9 @@
|
|||||||
str = str.substr(1);
|
str = str.substr(1);
|
||||||
groupIds = groupIds.substr(1);
|
groupIds = groupIds.substr(1);
|
||||||
|
|
||||||
if(ids.length >0){
|
var tipInfoAdd = "";
|
||||||
var tipInfoAdd = "";
|
var tipCompileIds = "";
|
||||||
var tipCompileIds = "";
|
if(ids.length >0){ // 选中单个或多个
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||||
@@ -107,15 +107,42 @@
|
|||||||
},{buttonsFocus:1});
|
},{buttonsFocus:1});
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
|
||||||
}else{
|
}else{ // 未选中任何 批量
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
var myData = {};
|
||||||
|
var groupId = $("#groupId").val();
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
myData[$("#seltype").val()] = $("#intype").val();
|
||||||
|
}
|
||||||
|
if(groupId != ''){
|
||||||
|
myData["groupId"] = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type:'post',
|
||||||
|
url:'${ctx}/basics/url/ajaxCheckIsLastOneCfgBatch',
|
||||||
|
data:myData,
|
||||||
|
async:false,
|
||||||
|
success:function(data,textStatus){// 处理返回结果
|
||||||
|
if(data.length > 0){
|
||||||
|
canDel = false;
|
||||||
|
for(var index in data){
|
||||||
|
tipCompileIds += ","+data[index]
|
||||||
|
}
|
||||||
|
tipCompileIds = tipCompileIds.substr(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!canDel){
|
||||||
|
var shortStr = tipCompileIds.length > 6? tipCompileIds.substr(0,6)+"..." : tipCompileIds ;
|
||||||
|
tipInfoAdd = $.validator.messages.cancel_config_warn.replace("{0}","<b title='"+tipCompileIds+"'>'"+shortStr+"'</b>")+",";
|
||||||
|
}
|
||||||
|
top.$.jBox.confirm(tipInfoAdd+"<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||||
if(v=="ok"){
|
if(v=="ok"){
|
||||||
$("#searchForm").attr("action",url);
|
$("#searchForm").attr("action",url);
|
||||||
page();
|
page();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
|
||||||
return; */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user