fix convertDate command

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-03-14 09:39:04 +07:00
parent 5450a034b7
commit c91a08fc4d
4 changed files with 9 additions and 30 deletions

View file

@ -22,6 +22,7 @@ const {
date2Thai,
success,
dialogConfirm,
convertDateToAPI,
} = useCounterMixin();
/**
@ -70,7 +71,11 @@ async function onSubmit() {
dialogConfirm($q, async () => {
showLoader();
await http
.put(config.API.commandAction(commandId.value, "tab1"), formData)
.put(config.API.commandAction(commandId.value, "tab1"), {
...formData,
commandAffectDate: convertDateToAPI(formData.commandAffectDate),
commandExcecuteDate: convertDateToAPI(formData.commandExcecuteDate),
})
.then(async () => {
await props.fetchDataCommandList();
success($q, "บันทึกข้อมูลสำเร็จ");