|
@@ -185,6 +185,7 @@ layui.use('layer', function() {
|
|
//修改弹框信息
|
|
//修改弹框信息
|
|
$('.edit').click(function() {
|
|
$('.edit').click(function() {
|
|
arr99 = [];
|
|
arr99 = [];
|
|
|
|
+ arrDelPd = [];
|
|
filterAll();
|
|
filterAll();
|
|
let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
|
|
let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
|
|
if (!$('.pure-table tr').has('.checked').length) {
|
|
if (!$('.pure-table tr').has('.checked').length) {
|
|
@@ -262,19 +263,19 @@ $('#addData').click(function() {
|
|
allParam.phone = phone;
|
|
allParam.phone = phone;
|
|
|
|
|
|
let userName = [];
|
|
let userName = [];
|
|
- // $(".pure-table-inner #dataList2 td.checked").each(function() {
|
|
|
|
- // userName.push($(this).attr("data-username"));
|
|
|
|
- // });
|
|
|
|
userName = arr99;
|
|
userName = arr99;
|
|
allParam.RY_LIST = userName;
|
|
allParam.RY_LIST = userName;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
// 验证通过 请求ajax
|
|
// 验证通过 请求ajax
|
|
ajaxRequest(TEAM_ADD, "POST", allParam, function(result) {
|
|
ajaxRequest(TEAM_ADD, "POST", allParam, function(result) {
|
|
layer.close(layerCreateIndex);
|
|
layer.close(layerCreateIndex);
|
|
- layer.msg('添加成功!', { icon: 6 });
|
|
|
|
|
|
+ layer.msg('新增成功!', { icon: 6 });
|
|
getListDataAjax();
|
|
getListDataAjax();
|
|
$('#addTeamForm')[0].reset();
|
|
$('#addTeamForm')[0].reset();
|
|
|
|
+
|
|
|
|
+
|
|
}, function(errorMsg) {
|
|
}, function(errorMsg) {
|
|
alert("异常错误!");
|
|
alert("异常错误!");
|
|
}, 3)
|
|
}, 3)
|
|
@@ -297,32 +298,43 @@ $('#dataUpdate').click(function() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//验证组织人员
|
|
//验证组织人员
|
|
- if (!$('.pure-table.pure-table-inner tr').has('.checked').length) {
|
|
|
|
- layer.msg('请选择一条需要修改的信息!', { icon: 5 });
|
|
|
|
- return
|
|
|
|
- } else {
|
|
|
|
|
|
+ // if (!$('.pure-table.pure-table-inner tr').has('.checked').length) {
|
|
|
|
+ // layer.msg('请选择一条需要修改的信息!', { icon: 5 });
|
|
|
|
+ // return
|
|
|
|
+ // } else {
|
|
|
|
|
|
- let phone = $('.editTeamOut').find("option:selected").attr("data-phone")
|
|
|
|
- allParam.phone = phone;
|
|
|
|
|
|
|
|
- let userName = [];
|
|
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ let phone = $('.editTeamOut').find("option:selected").attr("data-phone")
|
|
|
|
+ allParam.phone = phone;
|
|
|
|
+
|
|
|
|
+ let userName = [];
|
|
|
|
+ userName = arr99;
|
|
|
|
+ allParam.RY_LIST = userName;
|
|
|
|
+
|
|
|
|
+ let delete_id = [];
|
|
|
|
+ delete_id = arrDelPd;
|
|
|
|
+ allParam.delete_id = delete_id;
|
|
|
|
+
|
|
|
|
|
|
- userName = arr99;
|
|
|
|
- // $(".editTeamOut .pure-table tr td.checked").each(function() {
|
|
|
|
- // userName.push($(this).attr("data-username"));
|
|
|
|
- // });
|
|
|
|
- allParam.RY_LIST = userName;
|
|
|
|
- }
|
|
|
|
let dataId = $('.pure-table tr').find('.checked').data('id');
|
|
let dataId = $('.pure-table tr').find('.checked').data('id');
|
|
|
|
|
|
allParam.id = dataId;
|
|
allParam.id = dataId;
|
|
|
|
|
|
ajaxRequest(TEAM_EDIT, "POST", allParam, function(result) {
|
|
ajaxRequest(TEAM_EDIT, "POST", allParam, function(result) {
|
|
- innerPage = 1;
|
|
|
|
- $('#editTeamForm')[0].reset();
|
|
|
|
- layer.close(layerUpdateIndex);
|
|
|
|
- layer.msg('修改成功!', { icon: 6 });
|
|
|
|
- getListDataAjax();
|
|
|
|
|
|
+
|
|
|
|
+ if (result.success == false) {
|
|
|
|
+ //服务端返回报错
|
|
|
|
+ alert(result.MSG);
|
|
|
|
+ } else {
|
|
|
|
+ innerPage = 1;
|
|
|
|
+ $('#editTeamForm')[0].reset();
|
|
|
|
+ layer.close(layerUpdateIndex);
|
|
|
|
+ layer.msg('修改成功!', { icon: 6 });
|
|
|
|
+ getListDataAjax();
|
|
|
|
+ }
|
|
|
|
+
|
|
}, function(errorMsg) {
|
|
}, function(errorMsg) {
|
|
alert("数据修改失败!");
|
|
alert("数据修改失败!");
|
|
}, 2)
|
|
}, 2)
|