fix convertDate command
This commit is contained in:
parent
5450a034b7
commit
c91a08fc4d
4 changed files with 9 additions and 30 deletions
|
|
@ -28,6 +28,7 @@ const {
|
|||
dialogConfirm,
|
||||
hideLoader,
|
||||
date2Thai,
|
||||
convertDateToAPI,
|
||||
} = mixin;
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
|
@ -145,8 +146,8 @@ function onSubmit() {
|
|||
showLoader();
|
||||
const body = {
|
||||
commandTypeId: commandType.value,
|
||||
commandAffectDate: commandAffectDate.value,
|
||||
commandExcecuteDate: commandExcecuteDate.value,
|
||||
commandAffectDate: convertDateToAPI(commandAffectDate.value),
|
||||
commandExcecuteDate: convertDateToAPI(commandExcecuteDate.value),
|
||||
commandYear: commandYear.value,
|
||||
commandNo: commandNo.value,
|
||||
persons: selected.value ? dataMapToSend.value : [],
|
||||
|
|
|
|||
|
|
@ -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, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -47,31 +47,6 @@ function checkCommandSysId() {
|
|||
readonly.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// const chechCommandCode = computed(() => {
|
||||
// const listCommandCode = [
|
||||
// "C-PM-01",
|
||||
// "C-PM-02",
|
||||
// "C-PM-03",
|
||||
// "C-PM-04",
|
||||
// "C-PM-05",
|
||||
// "C-PM-07",
|
||||
// "C-PM-08",
|
||||
// "C-PM-09",
|
||||
// "C-PM-21",
|
||||
// "C-PM-22",
|
||||
// "C-PM-24",
|
||||
// "C-PM-29",
|
||||
// "C-PM-38",
|
||||
// "C-PM-39",
|
||||
// ];
|
||||
// if (listCommandCode.includes(props.commandCode)) {
|
||||
// return true;
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
|
|
|
|||
|
|
@ -238,8 +238,6 @@ function onConfirmOrder() {
|
|||
})
|
||||
.then(async () => {
|
||||
await router.push(`/command/view/${commandId.value}`);
|
||||
// fetchData?.();
|
||||
// isCheckAuthority.value = true;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue