|
|
@@ -638,16 +638,18 @@
|
|
|
if (emptyNew) {
|
|
|
continue;
|
|
|
}
|
|
|
- if (
|
|
|
- !row.positionId ||
|
|
|
- !row.positionName ||
|
|
|
- !row.positionLevelId ||
|
|
|
- row.establishmentCount === undefined ||
|
|
|
- row.establishmentCount === null ||
|
|
|
- row.establishmentCount === ''
|
|
|
- ) {
|
|
|
- this.$message.warning('请完善部门岗位信息');
|
|
|
- return false;
|
|
|
+ if (isNew) {
|
|
|
+ if (
|
|
|
+ !row.positionId ||
|
|
|
+ !row.positionName ||
|
|
|
+ !row.positionLevelId ||
|
|
|
+ row.establishmentCount === undefined ||
|
|
|
+ row.establishmentCount === null ||
|
|
|
+ row.establishmentCount === ''
|
|
|
+ ) {
|
|
|
+ this.$message.warning('请完善部门岗位信息');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
rows.push({
|
|
|
...(row.id ? { id: row.id } : {}),
|
|
|
@@ -671,11 +673,10 @@
|
|
|
);
|
|
|
},
|
|
|
addDeptPosition() {
|
|
|
- if (
|
|
|
- this.departmentPositionList.some(
|
|
|
- (item) => !this.isDeptPositionFilled(item)
|
|
|
- )
|
|
|
- ) {
|
|
|
+ const hasEmptyNew = this.departmentPositionList
|
|
|
+ .filter((item) => !item.id)
|
|
|
+ .some((item) => !this.isDeptPositionFilled(item));
|
|
|
+ if (hasEmptyNew) {
|
|
|
this.$message.warning('请先填写岗位名称、岗位层级和编制人数');
|
|
|
return;
|
|
|
}
|