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

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

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