fix ConverDate เงินเดือน
This commit is contained in:
parent
9aee295a3f
commit
5450a034b7
6 changed files with 32 additions and 34 deletions
|
|
@ -22,6 +22,7 @@ const {
|
|||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
convertDateToAPI,
|
||||
} = useCounterMixin();
|
||||
|
||||
/** props*/
|
||||
|
|
@ -85,7 +86,12 @@ function onSubmit() {
|
|||
const url = !props.isStatusEdit
|
||||
? config.API.salaryEmployeeChart
|
||||
: config.API.salaryEmployeeChartByid(props.data.id);
|
||||
await http[!props.isStatusEdit ? "post" : "put"](url, formData);
|
||||
await http[!props.isStatusEdit ? "post" : "put"](url, {
|
||||
...formData,
|
||||
date: convertDateToAPI(formData.date),
|
||||
startDate: convertDateToAPI(formData.startDate),
|
||||
endDate: convertDateToAPI(formData.endDate),
|
||||
});
|
||||
await props.fetchData?.();
|
||||
success($q, "บันทีกข้อมูลสำเร็จ");
|
||||
closeDialog();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue