Commit 8b9ea898 authored by 康振飞's avatar 康振飞

调试拆分派工

parent a4fff957
......@@ -520,6 +520,7 @@ export default {
let timebegin = formData[0].beginTime;
let timend = formData[0].endTime;
this.newList = [];
console.log("选中的id",chekids)
chekids.forEach(v => {
var item = formData.filter(u => {
return u.id == v;
......@@ -533,16 +534,16 @@ export default {
this.facilityModal = true;
} else {
this.pentity.taskTime = [timebegin, timend];
if (
formData.map(t => {
this.newList.filter(m => {
if ((m.id = t.id)) {
console.log(m.checked);
}
});
})
) {
}
// if (
// formData.map(t => {
// this.newList.filter(m => {
// if ((m.id = t.id)) {
// console.log(m.checked);
// }
// });
// })
// ) {
// }
this.manModal = true;
}
console.log("选中的数据", this.newList);
......@@ -550,53 +551,55 @@ export default {
// 设备派工
sendSheBei() {
let item = this.newList;
console.log(item)
item.map(u => {
u.userIds = this.entity.userIds;
u.remark = this.entity.remark;
u.equipId = this.shebeiId;
});
this.$refs["formValidate"].validate(valid => {
if (valid) {
Api.saveTeamentry(item).then(res => {
if (res.success) {
this.$Message.success("设备派工成功。");
this.getUserInfoFn();
this.facilityModal = false;
} else {
this.$Message.error("设备派工失败...");
}
});
} else {
this.$Message.error("校验不通过...");
}
});
// this.$refs["formValidate"].validate(valid => {
// if (valid) {
// Api.saveTeamentry(item).then(res => {
// if (res.success) {
// this.$Message.success("设备派工成功。");
// this.getUserInfoFn();
// this.facilityModal = false;
// } else {
// this.$Message.error("设备派工失败...");
// }
// });
// } else {
// this.$Message.error("校验不通过...");
// }
// });
},
// 人员派工
sendUser() {
let item = this.newList;
console.log("派工的数据",item)
item.map(u => {
u.userIds = this.peploeId;
u.remark = this.pentity.remark;
});
this.$refs["formpepole"].validate(valid => {
if (valid) {
let params = {
isDispatch: 1, //派工是1,保存是0
entryList: item
};
Api.saveTeamentry(params).then(res => {
if (res.success) {
this.$Message.success("人员派工成功。");
this.getUserInfoFn();
this.manModal = false;
} else {
this.$Message.error("人员派工失败...");
}
});
} else {
this.$Message.error("校验不通过...");
}
});
// this.$refs["formpepole"].validate(valid => {
// if (valid) {
// let params = {
// isDispatch: 1, //派工是1,保存是0
// entryList: item
// };
// Api.saveTeamentry(params).then(res => {
// if (res.success) {
// this.$Message.success("人员派工成功。");
// this.getUserInfoFn();
// this.manModal = false;
// } else {
// this.$Message.error("人员派工失败...");
// }
// });
// } else {
// this.$Message.error("校验不通过...");
// }
// });
},
// 拆分方法
setChai(item, index) {
......
import axios from 'axios';
import util from '@/libs/util';
import util from '@/libs/util';
import Setting from '@/setting';
import QS from 'querystring';
import { Message, Notice } from 'view-design';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment