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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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;
|
||||
}
|
||||
|
||||
// 批量删除前获取提示信息
|
||||
@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)
|
||||
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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
@@ -142,7 +143,14 @@ public class IpCommGroupController extends BaseController {
|
||||
|
||||
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")
|
||||
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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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;
|
||||
}
|
||||
|
||||
// 批量删除前获取提示信息
|
||||
@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)
|
||||
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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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;
|
||||
}
|
||||
|
||||
// 批量删除前获取提示信息
|
||||
@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)
|
||||
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.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -318,5 +319,43 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
||||
cfgs.clear();
|
||||
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.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -306,4 +307,42 @@ public class IpCommGroupCfgService extends BaseService {
|
||||
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.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -319,5 +320,43 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
||||
cfgs.clear();
|
||||
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.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -319,5 +320,43 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
||||
cfgs.clear();
|
||||
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}"
|
||||
$("#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 cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
@@ -81,9 +77,9 @@
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
if(ids.length >0){ // 选中单个或多个
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
@@ -112,15 +108,42 @@
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||
}else{ // 未选中任何 批量
|
||||
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"){
|
||||
$("#searchForm").attr("action",url);
|
||||
page();
|
||||
}
|
||||
});
|
||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return; */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,9 +78,9 @@
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
if(ids.length >0){ // 选中单个或多个
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
@@ -109,15 +109,42 @@
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||
}else{ // 未选中任何 批量
|
||||
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"){
|
||||
$("#searchForm").attr("action",url);
|
||||
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}"
|
||||
$("#importForm1").attr("action","${ctx}/basics/scriberId/import?importPath="+importPath);
|
||||
|
||||
$(".groupId").find("option:first").each(function(){
|
||||
/* $(".groupId").find("option:first").each(function(){
|
||||
$(this).hide();
|
||||
$(".groupId").selectpicker("refresh");
|
||||
});
|
||||
}); */
|
||||
});
|
||||
var edit=function(url){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
@@ -81,9 +81,9 @@
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
if(ids.length >0){ // 选中单个或多个
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
@@ -112,15 +112,42 @@
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||
}else{ // 未选中任何 批量
|
||||
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"){
|
||||
$("#searchForm").attr("action",url);
|
||||
page();
|
||||
}
|
||||
});
|
||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return; */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
str = str.substr(1);
|
||||
groupIds = groupIds.substr(1);
|
||||
|
||||
if(ids.length >0){
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
var tipInfoAdd = "";
|
||||
var tipCompileIds = "";
|
||||
if(ids.length >0){ // 选中单个或多个
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/commonGroup/ajaxCheckIsLastOneCfg',
|
||||
@@ -107,15 +107,42 @@
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
|
||||
}else{
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||
}else{ // 未选中任何 批量
|
||||
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"){
|
||||
$("#searchForm").attr("action",url);
|
||||
page();
|
||||
}
|
||||
});
|
||||
/* top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return; */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user