fixing bug organization set isOffice
This commit is contained in:
parent
d659b0930d
commit
6a471aa3f9
1 changed files with 8 additions and 21 deletions
|
|
@ -110,7 +110,7 @@ function onSubmit() {
|
|||
rootId = level.value === 0 ? store.draftId : props.dataNode?.orgRootId;
|
||||
}
|
||||
|
||||
const body = {
|
||||
let body = {
|
||||
["org" + type + "Name"]: formData.orgName,
|
||||
["org" + type + "ShortName"]: formData.orgShortName,
|
||||
["org" + type + "Code"]: formData.orgCode,
|
||||
|
|
@ -122,9 +122,15 @@ function onSubmit() {
|
|||
[nameId]: rootId,
|
||||
responsibility:
|
||||
formData.responsibility != null ? formData.responsibility : "",
|
||||
isOfficer: formData.isOfficer,
|
||||
};
|
||||
|
||||
if (type === "Child1") {
|
||||
body = {
|
||||
...body,
|
||||
isOfficer: formData.isOfficer,
|
||||
};
|
||||
}
|
||||
|
||||
//เพิ่มข้อมูล
|
||||
if (actionType.value === "ADD") {
|
||||
await http
|
||||
|
|
@ -352,25 +358,6 @@ function onChangeIsOfficer() {
|
|||
);
|
||||
}
|
||||
}
|
||||
// watch(
|
||||
// () => formData.isOfficer,
|
||||
// (newData, oldData) => {
|
||||
// if (
|
||||
// newData === true &&
|
||||
// oldData === false &&
|
||||
// checkIsOfficer.value === true &&
|
||||
// props.modal === true
|
||||
// ) {
|
||||
// dialogConfirm(
|
||||
// $q,
|
||||
// () => (formData.isOfficer = true),
|
||||
// "ยืนยันการแก้ไข",
|
||||
// "คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?",
|
||||
// () => (formData.isOfficer = false)
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue