fix Date เครื่องราช
This commit is contained in:
parent
40ef38f9a3
commit
ca26dc6b53
2 changed files with 15 additions and 7 deletions
|
|
@ -25,6 +25,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
notifyError,
|
notifyError,
|
||||||
|
convertDateToAPI,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -215,15 +216,17 @@ function onSubmit() {
|
||||||
insigniaId: brand.value, // insigniaID
|
insigniaId: brand.value, // insigniaID
|
||||||
number: Advertise.value,
|
number: Advertise.value,
|
||||||
issue: issue.value,
|
issue: issue.value,
|
||||||
dateReceive: receivedate.value, // วันที่ได้รับเครื่องราชฯ
|
dateReceive: receivedate.value
|
||||||
|
? convertDateToAPI(receivedate.value)
|
||||||
|
: "", // วันที่ได้รับเครื่องราชฯ
|
||||||
organizationOrganizationSend: affiliationRequest.value,
|
organizationOrganizationSend: affiliationRequest.value,
|
||||||
organizationOrganizationReceive: affiliationReceived.value,
|
organizationOrganizationReceive: affiliationReceived.value,
|
||||||
date: announceDate.value, // วันที่กิจนุเบก
|
date: announceDate.value ? convertDateToAPI(announceDate.value) : "", // วันที่กิจนุเบก
|
||||||
volumeNo: volume.value, // เล่ม
|
volumeNo: volume.value, // เล่ม
|
||||||
section: episode.value, //ตอนที่
|
section: episode.value, //ตอนที่
|
||||||
page: duty.value, //หน้าที่
|
page: duty.value, //หน้าที่
|
||||||
no: announced.value,
|
no: announced.value,
|
||||||
datePayment: invoiceDate.value, //วันที่จ่าย
|
datePayment: convertDateToAPI(invoiceDate.value), //วันที่จ่าย
|
||||||
typePayment: payment.value, // รูปแบบการจ่าย
|
typePayment: payment.value, // รูปแบบการจ่าย
|
||||||
address: addressPayment.value, //ที่อยู่
|
address: addressPayment.value, //ที่อยู่
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
notifyError,
|
notifyError,
|
||||||
|
convertDateToAPI,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -136,13 +137,15 @@ async function onSubmit() {
|
||||||
if (props.action == "addData") {
|
if (props.action == "addData") {
|
||||||
await http
|
await http
|
||||||
.post(config.API.insigniaManageBorrow(), {
|
.post(config.API.insigniaManageBorrow(), {
|
||||||
borrowDate: receivedate.value,
|
borrowDate: receivedate.value
|
||||||
|
? convertDateToAPI(receivedate.value)
|
||||||
|
: "",
|
||||||
insigniaNoteProfileId: insigniaNoteProfileId.value,
|
insigniaNoteProfileId: insigniaNoteProfileId.value,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await props.closeAndFecth();
|
await props.closeAndFecth();
|
||||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
await clearData();
|
clearData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -151,14 +154,16 @@ async function onSubmit() {
|
||||||
} else {
|
} else {
|
||||||
await http
|
await http
|
||||||
.put(config.API.insigniaManageBorrowReturn(props.profileId), {
|
.put(config.API.insigniaManageBorrowReturn(props.profileId), {
|
||||||
returnDate: returndate.value,
|
returnDate: returndate.value
|
||||||
|
? convertDateToAPI(returndate.value)
|
||||||
|
: "",
|
||||||
returnOrganizationId: OrganazationId.value,
|
returnOrganizationId: OrganazationId.value,
|
||||||
returnReason: reason.value,
|
returnReason: reason.value,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await props.closeAndFecth();
|
await props.closeAndFecth();
|
||||||
await clearData();
|
|
||||||
await success($q, "บันทึกข้อมูลสำเร็จ");
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
clearData();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue