|
@@ -894,11 +894,37 @@ export default {
|
|
|
new Date(this.gongZuoTiem) <= new Date(this.form.endTime)
|
|
|
) {
|
|
|
this.form.bdglWeekworkRegisterList = this.tomList;
|
|
|
- updateBdglweekwork(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ var num = 0;
|
|
|
+ var num1 = this.form.bdglWeekworkRegisterList.length;
|
|
|
+ for (
|
|
|
+ let index = 0;
|
|
|
+ index < this.form.bdglWeekworkRegisterList.length;
|
|
|
+ index++
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ this.form.bdglWeekworkRegisterList[index].peopleIds == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].peopleIds == null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].address == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].address == null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].contents == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].contents == null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].organizer == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].organizer == null
|
|
|
+ ) {
|
|
|
+ return this.$modal.msgWarning(
|
|
|
+ "请填写工作登记内容,组织人,参加人,地点"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ num += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num1 === num) {
|
|
|
+ pdateBdglweekwork(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$modal.msgWarning("请选择开始时间与结束时间区级内的日期");
|
|
|
}
|
|
@@ -909,13 +935,42 @@ export default {
|
|
|
) {
|
|
|
this.form.bdglWeekworkRegisterList = this.tomList;
|
|
|
if (this.code != 200) {
|
|
|
- if (this.form.unitId) {
|
|
|
+ var num2 = 0;
|
|
|
+ var num3 = this.form.bdglWeekworkRegisterList.length;
|
|
|
+ for (
|
|
|
+ let index = 0;
|
|
|
+ index < this.form.bdglWeekworkRegisterList.length;
|
|
|
+ index++
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ this.form.bdglWeekworkRegisterList[index].peopleIds == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].peopleIds ==
|
|
|
+ null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].address == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].address == null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].contents == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].contents ==
|
|
|
+ null ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].organizer == "" ||
|
|
|
+ this.form.bdglWeekworkRegisterList[index].organizer == null
|
|
|
+ ) {
|
|
|
+ return this.$modal.msgWarning(
|
|
|
+ "请填写工作登记内容,组织人,参加人,地点"
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ num2 += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num2 === num3) {
|
|
|
+ console.log(1);
|
|
|
addBdglweekwork(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
}
|
|
|
+ // if (this.form.unitId) {
|
|
|
+ // }
|
|
|
}
|
|
|
} else {
|
|
|
this.$modal.msgWarning("请选择开始时间与结束时间区级内的日期");
|