提交 4793aeff 编写于 作者: W weizhiqiang

【公共】移除集合中指定name的元素

上级 9e491027
...@@ -57,16 +57,7 @@ layui.config({ ...@@ -57,16 +57,7 @@ layui.config({
placeholder: '请选择用品管理人', placeholder: '请选择用品管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 用品管理人选择 // 用品管理人选择
......
...@@ -46,16 +46,7 @@ layui.config({ ...@@ -46,16 +46,7 @@ layui.config({
placeholder: '请选择用品管理人', placeholder: '请选择用品管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 附件回显 // 附件回显
......
...@@ -123,16 +123,7 @@ layui.config({ ...@@ -123,16 +123,7 @@ layui.config({
placeholder: '请选择资产管理人', placeholder: '请选择资产管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
//资产管理人选择 //资产管理人选择
...@@ -152,16 +143,7 @@ layui.config({ ...@@ -152,16 +143,7 @@ layui.config({
placeholder: '请选择资产领用人', placeholder: '请选择资产领用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; employeeuserList = [].concat(arrayUtil.removeArrayPointName(employeeuserList, val));
$.each(employeeuserList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
employeeuserList.splice(inArray, 1);
}
} }
}); });
//资产领用人选择 //资产领用人选择
......
...@@ -100,16 +100,7 @@ layui.config({ ...@@ -100,16 +100,7 @@ layui.config({
placeholder: '请选择资产管理人', placeholder: '请选择资产管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
...@@ -124,16 +115,7 @@ layui.config({ ...@@ -124,16 +115,7 @@ layui.config({
placeholder: '请选择领用人', placeholder: '请选择领用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; employeeuserList = [].concat(arrayUtil.removeArrayPointName(employeeuserList, val));
$.each(employeeuserList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
employeeuserList.splice(inArray, 1);
}
} }
}); });
......
...@@ -71,16 +71,7 @@ layui.config({ ...@@ -71,16 +71,7 @@ layui.config({
placeholder: '请选择会议室管理人', placeholder: '请选择会议室管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -61,16 +61,7 @@ layui.config({ ...@@ -61,16 +61,7 @@ layui.config({
placeholder: '请选择会议室管理人', placeholder: '请选择会议室管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -105,16 +105,7 @@ layui.config({ ...@@ -105,16 +105,7 @@ layui.config({
placeholder: '请选择管理人', placeholder: '请选择管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 管理人选择 // 管理人选择
...@@ -135,16 +126,7 @@ layui.config({ ...@@ -135,16 +126,7 @@ layui.config({
placeholder: '请选择借用人', placeholder: '请选择借用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; borrowList= [].concat(arrayUtil.removeArrayPointName(borrowList, val));
$.each(borrowList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
borrowList.splice(inArray, 1);
}
} }
}); });
// 借用人选择 // 借用人选择
......
...@@ -97,16 +97,7 @@ layui.config({ ...@@ -97,16 +97,7 @@ layui.config({
placeholder: '请选择管理人', placeholder: '请选择管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
...@@ -121,16 +112,7 @@ layui.config({ ...@@ -121,16 +112,7 @@ layui.config({
placeholder: '请选择借用人', placeholder: '请选择借用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; borrowList = [].concat(arrayUtil.removeArrayPointName(borrowList, val));
$.each(borrowList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
borrowList.splice(inArray, 1);
}
} }
}); });
......
...@@ -62,16 +62,7 @@ layui.config({ ...@@ -62,16 +62,7 @@ layui.config({
placeholder: '请选择管理人', placeholder: '请选择管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 管理人选择 // 管理人选择
...@@ -92,16 +83,7 @@ layui.config({ ...@@ -92,16 +83,7 @@ layui.config({
placeholder: '请选择借用人', placeholder: '请选择借用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; borrowuserList = [].concat(arrayUtil.removeArrayPointName(borrowuserList, val));
$.each(borrowuserList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
borrowuserList.splice(inArray, 1);
}
} }
}); });
// 借用人选择 // 借用人选择
......
...@@ -49,16 +49,7 @@ layui.config({ ...@@ -49,16 +49,7 @@ layui.config({
placeholder: '请选择管理人', placeholder: '请选择管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
...@@ -73,16 +64,7 @@ layui.config({ ...@@ -73,16 +64,7 @@ layui.config({
placeholder: '请选择借用人', placeholder: '请选择借用人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; borrowuserList = [].concat(arrayUtil.removeArrayPointName(borrowuserList, val));
$.each(borrowuserList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
borrowuserList.splice(inArray, 1);
}
} }
}); });
// 附件回显 // 附件回显
......
...@@ -115,17 +115,7 @@ layui.config({ ...@@ -115,17 +115,7 @@ layui.config({
placeholder: '请选择车辆管理人', placeholder: '请选择车辆管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
// 如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 车辆管理人选择 // 车辆管理人选择
......
...@@ -82,16 +82,7 @@ layui.config({ ...@@ -82,16 +82,7 @@ layui.config({
placeholder: '请选择车辆管理人', placeholder: '请选择车辆管理人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 附件回显 // 附件回显
......
...@@ -35,16 +35,7 @@ layui.config({ ...@@ -35,16 +35,7 @@ layui.config({
placeholder: '请选择面试官', placeholder: '请选择面试官',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; interviewer = [].concat(arrayUtil.removeArrayPointName(interviewer, val));
$.each(interviewer, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
interviewer.splice(inArray, 1);
}
} }
}); });
......
...@@ -34,11 +34,11 @@ layui.config({ ...@@ -34,11 +34,11 @@ layui.config({
chargePersonId: chargePerson[0].id, chargePersonId: chargePerson[0].id,
enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
}; };
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee002", params: params, type: 'json', method: "POST", callback: function(json){ AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee002", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0){ if (json.returnCode == 0) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}else{ } else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
} }
}}); }});
...@@ -52,16 +52,7 @@ layui.config({ ...@@ -52,16 +52,7 @@ layui.config({
placeholder: '请选择负责人', placeholder: '请选择负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; chargePerson = [].concat(arrayUtil.removeArrayPointName(chargePerson, val));
$.each(chargePerson, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
chargePerson.splice(inArray, 1);
}
} }
}); });
......
...@@ -37,16 +37,7 @@ layui.config({ ...@@ -37,16 +37,7 @@ layui.config({
placeholder: '请选择负责人', placeholder: '请选择负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; chargePerson = [].concat(arrayUtil.removeArrayPointName(chargePerson, val));
$.each(chargePerson, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
chargePerson.splice(inArray, 1);
}
} }
}); });
......
...@@ -36,16 +36,7 @@ layui.config({ ...@@ -36,16 +36,7 @@ layui.config({
placeholder: '请选择责任人', placeholder: '请选择责任人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; personLiable = [].concat(arrayUtil.removeArrayPointName(personLiable, val));
$.each(personLiable, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) {
personLiable.splice(inArray, 1);
}
} }
}); });
......
...@@ -137,16 +137,7 @@ layui.config({ ...@@ -137,16 +137,7 @@ layui.config({
placeholder: '请选择商机负责人', placeholder: '请选择商机负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; responsIdList = [].concat(arrayUtil.removeArrayPointName(responsIdList, val));
$.each(responsIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
responsIdList.splice(inArray, 1);
}
} }
}); });
// 商机负责人选择 // 商机负责人选择
...@@ -167,16 +158,7 @@ layui.config({ ...@@ -167,16 +158,7 @@ layui.config({
placeholder: '请选择商机参与人', placeholder: '请选择商机参与人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; partIdList = [].concat(arrayUtil.removeArrayPointName(partIdList, val));
$.each(partIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
partIdList.splice(inArray, 1);
}
} }
}); });
// 商机参与人选择 // 商机参与人选择
...@@ -197,16 +179,7 @@ layui.config({ ...@@ -197,16 +179,7 @@ layui.config({
placeholder: '请选择商机关注人', placeholder: '请选择商机关注人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; followIdList = [].concat(arrayUtil.removeArrayPointName(followIdList, val));
$.each(followIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
followIdList.splice(inArray, 1);
}
} }
}); });
// 商机关注人选择 // 商机关注人选择
......
...@@ -85,16 +85,7 @@ layui.config({ ...@@ -85,16 +85,7 @@ layui.config({
placeholder: '请选择商机负责人', placeholder: '请选择商机负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; responsIdList = [].concat(arrayUtil.removeArrayPointName(responsIdList, val));
$.each(responsIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
responsIdList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#responsIdSelPeople", function(e){ $("body").on("click", "#responsIdSelPeople", function(e){
...@@ -120,16 +111,7 @@ layui.config({ ...@@ -120,16 +111,7 @@ layui.config({
placeholder: '请选择商机参与人', placeholder: '请选择商机参与人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; partIdList = [].concat(arrayUtil.removeArrayPointName(partIdList, val));
$.each(partIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { // 如果该元素在集合中存在
partIdList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#partIdSelPeople", function(e){ $("body").on("click", "#partIdSelPeople", function(e){
...@@ -155,16 +137,7 @@ layui.config({ ...@@ -155,16 +137,7 @@ layui.config({
placeholder: '请选择商机关注人', placeholder: '请选择商机关注人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; followIdList = [].concat(arrayUtil.removeArrayPointName(followIdList, val));
$.each(followIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { // 如果该元素在集合中存在
followIdList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#followIdSelPeople", function(e){ $("body").on("click", "#followIdSelPeople", function(e){
......
...@@ -66,16 +66,7 @@ layui.config({ ...@@ -66,16 +66,7 @@ layui.config({
placeholder: '请选择关联人员', placeholder: '请选择关联人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
// 关联人员选择选择 // 关联人员选择选择
......
...@@ -75,16 +75,7 @@ layui.config({ ...@@ -75,16 +75,7 @@ layui.config({
placeholder: '请选择关联人员', placeholder: '请选择关联人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -84,16 +84,7 @@ layui.config({ ...@@ -84,16 +84,7 @@ layui.config({
placeholder: '请选择工序操作员', placeholder: '请选择工序操作员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; procedureUser = [].concat(arrayUtil.removeArrayPointName(procedureUser, val));
$.each(procedureUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
procedureUser.splice(inArray, 1);
}
} }
}); });
// 工序操作员选择 // 工序操作员选择
......
...@@ -65,16 +65,7 @@ layui.config({ ...@@ -65,16 +65,7 @@ layui.config({
placeholder: '请选择工序操作员', placeholder: '请选择工序操作员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; procedureUser = [].concat(arrayUtil.removeArrayPointName(procedureUser, val));
$.each(procedureUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
procedureUser.splice(inArray, 1);
}
} }
}); });
......
...@@ -224,16 +224,7 @@ layui.config({ ...@@ -224,16 +224,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
......
...@@ -125,16 +125,7 @@ layui.config({ ...@@ -125,16 +125,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
......
...@@ -140,16 +140,7 @@ layui.config({ ...@@ -140,16 +140,7 @@ layui.config({
initialTags: userNames.split(','), initialTags: userNames.split(','),
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
......
...@@ -233,16 +233,7 @@ layui.config({ ...@@ -233,16 +233,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
......
...@@ -132,16 +132,7 @@ layui.config({ ...@@ -132,16 +132,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
erpOrderUtil.orderEditPageSetBtnBySubmitType(submitType, json.bean.state); erpOrderUtil.orderEditPageSetBtnBySubmitType(submitType, json.bean.state);
......
...@@ -234,16 +234,7 @@ layui.config({ ...@@ -234,16 +234,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
......
...@@ -132,16 +132,7 @@ layui.config({ ...@@ -132,16 +132,7 @@ layui.config({
placeholder: '请选择销售人员', placeholder: '请选择销售人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; salesManList = [].concat(arrayUtil.removeArrayPointName(salesManList, val));
$.each(salesManList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
salesManList.splice(inArray, 1);
}
} }
}); });
erpOrderUtil.orderEditPageSetBtnBySubmitType(submitType, json.bean.state); erpOrderUtil.orderEditPageSetBtnBySubmitType(submitType, json.bean.state);
......
...@@ -60,16 +60,7 @@ layui.config({ ...@@ -60,16 +60,7 @@ layui.config({
placeholder: '请选择仓库负责人', placeholder: '请选择仓库负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; chooseUser = [].concat(arrayUtil.removeArrayPointName(chooseUser, val));
$.each(chooseUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
chooseUser.splice(inArray, 1);
}
} }
}); });
......
...@@ -39,16 +39,7 @@ layui.config({ ...@@ -39,16 +39,7 @@ layui.config({
placeholder: '请选择仓库负责人', placeholder: '请选择仓库负责人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; chooseUser = [].concat(arrayUtil.removeArrayPointName(chooseUser, val));
$.each(chooseUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
chooseUser.splice(inArray, 1);
}
} }
}); });
......
...@@ -64,16 +64,7 @@ layui.config({ ...@@ -64,16 +64,7 @@ layui.config({
placeholder: '请选择标签', placeholder: '请选择标签',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; tagList = [].concat(arrayUtil.removeArrayPointName(tagList, val));
$.each(tagList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
tagList.splice(inArray, 1);
}
} }
}); });
......
...@@ -22,16 +22,7 @@ layui.config({ ...@@ -22,16 +22,7 @@ layui.config({
placeholder: '请选择标签', placeholder: '请选择标签',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; tagList = [].concat(arrayUtil.removeArrayPointName(tagList, val));
$.each(tagList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
tagList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#chooseTag", function(e){ $("body").on("click", "#chooseTag", function(e){
......
...@@ -117,16 +117,7 @@ layui.config({ ...@@ -117,16 +117,7 @@ layui.config({
placeholder: '请选择经手人员', placeholder: '请选择经手人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; handsPersonList = [].concat(arrayUtil.removeArrayPointName(handsPersonList, val));
$.each(handsPersonList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
handsPersonList.splice(inArray, 1);
}
} }
}); });
......
...@@ -84,16 +84,7 @@ layui.config({ ...@@ -84,16 +84,7 @@ layui.config({
placeholder: '请选择经手人员', placeholder: '请选择经手人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; handsPersonList = [].concat(arrayUtil.removeArrayPointName(handsPersonList, val));
$.each(handsPersonList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
handsPersonList.splice(inArray, 1);
}
} }
}); });
} }
......
...@@ -96,16 +96,7 @@ layui.config({ ...@@ -96,16 +96,7 @@ layui.config({
placeholder: '请选择接收人', placeholder: '请选择接收人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
var completedContent = layedit.build('completedcontent', layEditParams); var completedContent = layedit.build('completedcontent', layEditParams);
......
...@@ -96,16 +96,7 @@ layui.config({ ...@@ -96,16 +96,7 @@ layui.config({
placeholder: '请选择接收人', placeholder: '请选择接收人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
var monthCompletedContent = layedit.build('monthCompletedContent', layEditParams); var monthCompletedContent = layedit.build('monthCompletedContent', layEditParams);
......
...@@ -455,16 +455,7 @@ layui.config({ ...@@ -455,16 +455,7 @@ layui.config({
placeholder: '请选择收件人', placeholder: '请选择收件人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
//日报人员选择 //日报人员选择
...@@ -484,16 +475,7 @@ layui.config({ ...@@ -484,16 +475,7 @@ layui.config({
placeholder: '请选择收件人', placeholder: '请选择收件人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
//周报人员选择 //周报人员选择
...@@ -513,16 +495,7 @@ layui.config({ ...@@ -513,16 +495,7 @@ layui.config({
placeholder: '请选择收件人', placeholder: '请选择收件人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
//月报人员选择 //月报人员选择
......
...@@ -95,16 +95,7 @@ layui.config({ ...@@ -95,16 +95,7 @@ layui.config({
placeholder: '请选择接收人', placeholder: '请选择接收人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
var weekCompletedContent = layedit.build('weekCompletedContent', layEditParams); var weekCompletedContent = layedit.build('weekCompletedContent', layEditParams);
......
...@@ -155,16 +155,7 @@ layui.config({ ...@@ -155,16 +155,7 @@ layui.config({
placeholder: '填写完成后直接回车即可', placeholder: '填写完成后直接回车即可',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -75,16 +75,7 @@ layui.config({ ...@@ -75,16 +75,7 @@ layui.config({
placeholder: '填写完成后直接回车即可', placeholder: '填写完成后直接回车即可',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -81,16 +81,7 @@ layui.config({ ...@@ -81,16 +81,7 @@ layui.config({
placeholder: '请选择项目经理', placeholder: '请选择项目经理',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; toProjectManager = [].concat(arrayUtil.removeArrayPointName(toProjectManager, val));
$.each(toProjectManager, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
toProjectManager.splice(inArray, 1);
}
} }
}); });
...@@ -99,16 +90,7 @@ layui.config({ ...@@ -99,16 +90,7 @@ layui.config({
placeholder: '请选择项目赞助人', placeholder: '请选择项目赞助人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; toProjectSponsor = [].concat(arrayUtil.removeArrayPointName(toProjectSponsor, val));
$.each(toProjectSponsor, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
toProjectSponsor.splice(inArray, 1);
}
} }
}); });
...@@ -117,16 +99,7 @@ layui.config({ ...@@ -117,16 +99,7 @@ layui.config({
placeholder: '请选择项目组成员', placeholder: '请选择项目组成员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; toProjectMembers = [].concat(arrayUtil.removeArrayPointName(toProjectMembers, val));
$.each(toProjectMembers, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
toProjectMembers.splice(inArray, 1);
}
} }
}); });
......
...@@ -155,16 +155,7 @@ layui.config({ ...@@ -155,16 +155,7 @@ layui.config({
placeholder: '请选择执行人', placeholder: '请选择执行人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; performIdList = [].concat(arrayUtil.removeArrayPointName(performIdList, val));
$.each(performIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
performIdList.splice(inArray, 1);
}
} }
}); });
......
...@@ -112,16 +112,7 @@ layui.config({ ...@@ -112,16 +112,7 @@ layui.config({
placeholder: '请选择执行人', placeholder: '请选择执行人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; performIdList = [].concat(arrayUtil.removeArrayPointName(performIdList, val));
$.each(performIdList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
performIdList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#performIdSelPeople", function(e) { $("body").on("click", "#performIdSelPeople", function(e) {
......
...@@ -200,16 +200,7 @@ layui.config({ ...@@ -200,16 +200,7 @@ layui.config({
placeholder: '请选择工单协助人', placeholder: '请选择工单协助人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; cooperationUser = [].concat(arrayUtil.removeArrayPointName(cooperationUser, val));
$.each(cooperationUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
cooperationUser.splice(inArray, 1);
}
} }
}); });
//工单协助人选择 //工单协助人选择
......
...@@ -93,16 +93,7 @@ layui.config({ ...@@ -93,16 +93,7 @@ layui.config({
placeholder: '请选择工单协助人', placeholder: '请选择工单协助人',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; cooperationUser = [].concat(arrayUtil.removeArrayPointName(cooperationUser, val));
$.each(cooperationUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
cooperationUser.splice(inArray, 1);
}
} }
}); });
......
...@@ -82,16 +82,7 @@ layui.config({ ...@@ -82,16 +82,7 @@ layui.config({
initialTags: [], initialTags: [],
placeholder: '请选择工单协助人', placeholder: '请选择工单协助人',
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; cooperationUser = [].concat(arrayUtil.removeArrayPointName(cooperationUser, val));
$.each(cooperationUser, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
cooperationUser.splice(inArray, 1);
}
} }
}); });
//工单协助人选择 //工单协助人选择
......
...@@ -118,15 +118,7 @@ layui.config({ ...@@ -118,15 +118,7 @@ layui.config({
placeholder: '请选择企业', placeholder: '请选择企业',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; companyList = [].concat(arrayUtil.removeArrayPointName(companyList, val));
$.each(companyList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) { //如果该元素在集合中存在
companyList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#companySel", function(){ $("body").on("click", "#companySel", function(){
...@@ -158,15 +150,7 @@ layui.config({ ...@@ -158,15 +150,7 @@ layui.config({
placeholder: '请选择部门', placeholder: '请选择部门',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; departmentList = [].concat(arrayUtil.removeArrayPointName(departmentList, val));
$.each(departmentList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) {
departmentList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#departmentSel", function(){ $("body").on("click", "#departmentSel", function(){
...@@ -198,15 +182,7 @@ layui.config({ ...@@ -198,15 +182,7 @@ layui.config({
placeholder: '请选择员工', placeholder: '请选择员工',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; checkStaffList = [].concat(arrayUtil.removeArrayPointName(checkStaffList, val));
$.each(checkStaffList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) { //如果该元素在集合中存在
checkStaffList.splice(inArray, 1);
}
} }
}); });
$("body").on("click", "#userStaffSel", function(){ $("body").on("click", "#userStaffSel", function(){
......
...@@ -64,15 +64,7 @@ layui.config({ ...@@ -64,15 +64,7 @@ layui.config({
placeholder: '请选择企业', placeholder: '请选择企业',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; companyList = [].concat(arrayUtil.removeArrayPointName(companyList, val));
$.each(companyList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) { //如果该元素在集合中存在
companyList.splice(inArray, 1);
}
} }
}); });
...@@ -84,15 +76,7 @@ layui.config({ ...@@ -84,15 +76,7 @@ layui.config({
placeholder: '请选择部门', placeholder: '请选择部门',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; departmentList = [].concat(arrayUtil.removeArrayPointName(departmentList, val));
$.each(departmentList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) {
departmentList.splice(inArray, 1);
}
} }
}); });
...@@ -104,15 +88,7 @@ layui.config({ ...@@ -104,15 +88,7 @@ layui.config({
placeholder: '请选择员工', placeholder: '请选择员工',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; checkStaffList = [].concat(arrayUtil.removeArrayPointName(checkStaffList, val));
$.each(checkStaffList, function(i, item) {
if(val == item.name) {
inArray = i;
}
});
if(inArray != -1) { //如果该元素在集合中存在
checkStaffList.splice(inArray, 1);
}
} }
}); });
......
...@@ -12,8 +12,9 @@ var arrayUtil = { ...@@ -12,8 +12,9 @@ var arrayUtil = {
removeArrayPointName: function (list, name) { removeArrayPointName: function (list, name) {
var inArray = -1; var inArray = -1;
$.each(list, function(i, item) { $.each(list, function(i, item) {
if(name == item.name) { if(name === item.name) {
inArray = i; inArray = i;
return false;
} }
}); });
if(inArray != -1) { if(inArray != -1) {
......
...@@ -257,16 +257,7 @@ layui.config({ ...@@ -257,16 +257,7 @@ layui.config({
placeholder: '请选择指定人员', placeholder: '请选择指定人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -250,16 +250,7 @@ layui.config({ ...@@ -250,16 +250,7 @@ layui.config({
placeholder: '请选择人员', placeholder: '请选择人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -63,16 +63,7 @@ layui.config({ ...@@ -63,16 +63,7 @@ layui.config({
placeholder: '请选择人员', placeholder: '请选择人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -250,16 +250,7 @@ layui.config({ ...@@ -250,16 +250,7 @@ layui.config({
placeholder: '请选择人员', placeholder: '请选择人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -61,16 +61,7 @@ layui.config({ ...@@ -61,16 +61,7 @@ layui.config({
placeholder: '请选择人员', placeholder: '请选择人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
...@@ -63,16 +63,7 @@ layui.config({ ...@@ -63,16 +63,7 @@ layui.config({
placeholder: '请选择指定人员', placeholder: '请选择指定人员',
editorTag: false, editorTag: false,
beforeTagDelete: function(field, editor, tags, val) { beforeTagDelete: function(field, editor, tags, val) {
var inArray = -1; userList = [].concat(arrayUtil.removeArrayPointName(userList, val));
$.each(userList, function(i, item) {
if(val === item.name) {
inArray = i;
return false;
}
});
if(inArray != -1) { //如果该元素在集合中存在
userList.splice(inArray, 1);
}
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册