|
@@ -464,7 +464,11 @@ async function submitForm() {
|
|
|
// 适用员工范围
|
|
// 适用员工范围
|
|
|
applicable_scope: formData.applicable_scope,
|
|
applicable_scope: formData.applicable_scope,
|
|
|
scope_owner_type: "PHONE",
|
|
scope_owner_type: "PHONE",
|
|
|
- scope_owner_id_list: formData.employee_ids || formData.department_id ? [formData.department_id] : undefined,
|
|
|
|
|
|
|
+ scope_owner_id_list: formData.applicable_scope === "employee"
|
|
|
|
|
+ ? (formData.employee_ids || [])
|
|
|
|
|
+ : formData.applicable_scope === "department" && formData.department_id
|
|
|
|
|
+ ? [formData.department_id]
|
|
|
|
|
+ : undefined,
|
|
|
// 额度发放与周期参数
|
|
// 额度发放与周期参数
|
|
|
grant_mode: formData.grant_mode,
|
|
grant_mode: formData.grant_mode,
|
|
|
period_type: formData.period_type || "monthly",
|
|
period_type: formData.period_type || "monthly",
|
|
@@ -473,9 +477,6 @@ async function submitForm() {
|
|
|
effective_time_type: formData.effective_time_type || "unlimited",
|
|
effective_time_type: formData.effective_time_type || "unlimited",
|
|
|
expense_type: formData.expense_type,
|
|
expense_type: formData.expense_type,
|
|
|
};
|
|
};
|
|
|
- if (formData.applicable_scope === "department" && formData.department_id) {
|
|
|
|
|
- modifyData.scope_owner_id_list = [formData.department_id];
|
|
|
|
|
- }
|
|
|
|
|
await InstitutionAPI.updateInstitution(props.institutionId, modifyData);
|
|
await InstitutionAPI.updateInstitution(props.institutionId, modifyData);
|
|
|
}
|
|
}
|
|
|
emit("success");
|
|
emit("success");
|