|
@@ -819,14 +819,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
trigger: 'change',
|
|
trigger: 'change',
|
|
|
}],
|
|
}],
|
|
|
|
|
+ /* 隶属部门:非必填(2026-10-29 用户要求),保留校验器仅为占位口径统一,空值直接放行 */
|
|
|
deptIds: [{
|
|
deptIds: [{
|
|
|
- required: true,
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
validator: (rule, value, callback) => {
|
|
|
if (this._skipFormValidate) return callback();
|
|
if (this._skipFormValidate) return callback();
|
|
|
- if (!this.normalizeDeptIds(value).length) {
|
|
|
|
|
- callback(new Error('请选择隶属部门'));
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
callback();
|
|
callback();
|
|
|
},
|
|
},
|
|
|
trigger: 'change',
|
|
trigger: 'change',
|
|
@@ -1065,8 +1061,9 @@ export default {
|
|
|
return Boolean(this.form.positionSequenceId);
|
|
return Boolean(this.form.positionSequenceId);
|
|
|
},
|
|
},
|
|
|
requiredProgress() {
|
|
requiredProgress() {
|
|
|
- // 与 form rules 一一对应(含主所属部门 / 身份证 / 隶属部门 / 岗位序列 / 岗位性质 / 岗位层级),保证「必填 x/y」口径准确
|
|
|
|
|
- const keys = ['name', 'employeeNo', 'gender', 'idCard', 'groupId', 'primaryDeptId', 'deptIds', 'status', 'hireDate', 'positionSequenceId', 'positionId', 'employmentType', 'staffingLevel', 'phone'];
|
|
|
|
|
|
|
+ // 与 form rules 一一对应(含主所属部门 / 身份证 / 岗位序列 / 岗位性质 / 岗位层级),保证「必填 x/y」口径准确
|
|
|
|
|
+ // 隶属部门 deptIds 已改非必填(2026-10-29),不进必填计数(仍留在 sectionProgress 完整度统计里)
|
|
|
|
|
+ const keys = ['name', 'employeeNo', 'gender', 'idCard', 'groupId', 'primaryDeptId', 'status', 'hireDate', 'positionSequenceId', 'positionId', 'employmentType', 'staffingLevel', 'phone'];
|
|
|
return { base: `${keys.filter((key) => { const value = this.form[key]; return Array.isArray(value) ? value.length : Boolean(value); }).length}/${keys.length}` };
|
|
return { base: `${keys.filter((key) => { const value = this.form[key]; return Array.isArray(value) ? value.length : Boolean(value); }).length}/${keys.length}` };
|
|
|
},
|
|
},
|
|
|
sectionProgress() {
|
|
sectionProgress() {
|