Преглед изворни кода

fix: 编辑员工提交未调用updateEmployee接口

alphah пре 1 дан
родитељ
комит
f41fd09719

+ 3 - 1
frontend/src/views/module_payment/employee/components/EmployeeForm.vue

@@ -225,8 +225,10 @@ async function submitForm() {
       profiles: formData.profiles,
     };
 
-    if (props.type === "create") {  
+    if (props.type === "create") {
       await EmployeeAPI.createEmployee(submitData as unknown as EmployeeForm);
+    } else if (props.type === "update") {
+      await EmployeeAPI.updateEmployee(props.employeeId!, submitData);
     }
 
     emit("success");