updated structure organization fact
This commit is contained in:
parent
760d467d0d
commit
41359b8c81
4 changed files with 35 additions and 5 deletions
|
|
@ -80,6 +80,7 @@ const formData = reactive<FormDataAgency>({
|
|||
orgLevel: "",
|
||||
orgLevelSub: "",
|
||||
responsibility: "",
|
||||
isOfficer: false,
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -90,7 +91,7 @@ const formData = reactive<FormDataAgency>({
|
|||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
const type = store.checkLevel(level.value);
|
||||
const type = await store.checkLevel(level.value);
|
||||
const nameId =
|
||||
level.value === 0
|
||||
? "orgRevisionId"
|
||||
|
|
@ -121,6 +122,7 @@ function onSubmit() {
|
|||
[nameId]: rootId,
|
||||
responsibility:
|
||||
formData.responsibility != null ? formData.responsibility : "",
|
||||
isOfficer: formData.isOfficer,
|
||||
};
|
||||
|
||||
//เพิ่มข้อมูล
|
||||
|
|
@ -187,6 +189,7 @@ function closeClear() {
|
|||
formData.orgFax = "";
|
||||
formData.orgLevel = "";
|
||||
formData.responsibility = "";
|
||||
formData.isOfficer = false;
|
||||
props.close?.();
|
||||
}
|
||||
|
||||
|
|
@ -304,6 +307,7 @@ watch(
|
|||
formData.orgLevel = props.dataNode.orgTreeRank;
|
||||
formData.orgLevelSub = props.dataNode.orgTreeRankSub;
|
||||
formData.responsibility = props.dataNode.responsibility;
|
||||
formData.isOfficer = props.dataNode.isOfficer ?? false;
|
||||
orgLevelOption.value =
|
||||
props.dataNode.orgTreeRank === "DEPARTMENT"
|
||||
? orgLevelOptionMain.value
|
||||
|
|
@ -485,6 +489,22 @@ watch(
|
|||
rows="4"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
(actionType === 'ADD' && props.dataNode?.orgLevel === 0) ||
|
||||
(actionType === 'EDIT' && props.dataNode?.orgLevel === 1)
|
||||
"
|
||||
class="col-12"
|
||||
>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="formData.isOfficer"
|
||||
label="สกจ."
|
||||
class="q-ml-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue