พัฒนา ==> ตำแหน่งทางการบริหาร
This commit is contained in:
parent
b8e269f9b5
commit
783c121bc1
2 changed files with 49 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
divdiv
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
|
@ -80,6 +81,7 @@ const formGroupTarget = reactive<FormGroupTargetPlannedGoal>({
|
|||
position: "",
|
||||
posTypeId: null,
|
||||
posLevelId: null,
|
||||
posExecutive: "",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -95,6 +97,7 @@ const addGroupTargetData = async () => {
|
|||
position: "",
|
||||
posTypeId: null,
|
||||
posLevelId: null,
|
||||
posExecutive: "",
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -148,6 +151,15 @@ const columnsPlannedGoals = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "posExecutive",
|
||||
align: "left",
|
||||
label: "ตำแหน่งทางการบริหาร",
|
||||
sortable: true,
|
||||
field: "posExecutive",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "amount",
|
||||
align: "left",
|
||||
|
|
@ -256,6 +268,7 @@ async function fetchData(id: string) {
|
|||
plannedGoals.value = data.plannedGoals;
|
||||
plannedGoalsData.value = data.plannedGoals;
|
||||
plannedPeoples.value = data.plannedPeoples;
|
||||
console.log(plannedGoals.value);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -275,6 +288,7 @@ function onClickOpenDialog(type: string, target: string) {
|
|||
position: "",
|
||||
posTypeId: null,
|
||||
posLevelId: null,
|
||||
posExecutive: "",
|
||||
},
|
||||
]),
|
||||
(newModalGroupTarget.value = true);
|
||||
|
|
@ -306,6 +320,7 @@ function onSubmitGroup() {
|
|||
position: v.position ? v.position : "",
|
||||
posTypePlannedId: v.posTypeId ? v.posTypeId : null,
|
||||
posLevelPlannedId: v.posLevelId ? v.posLevelId : null,
|
||||
posExecutive: v.posExecutive ? v.posExecutive : "",
|
||||
}))
|
||||
: [],
|
||||
type:
|
||||
|
|
@ -506,6 +521,7 @@ function onOpenDialog(data: any) {
|
|||
position: pos.position,
|
||||
posTypeId: pos.posTypeId || null,
|
||||
posLevelId: pos.posLevelId || null,
|
||||
posExecutive: pos.posExecutive,
|
||||
}));
|
||||
newModalGroupTarget.value = true;
|
||||
}
|
||||
|
|
@ -618,6 +634,15 @@ onMounted(() => {
|
|||
{{ props.row.type ? `- ${props.row.type}` : "-" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name === 'posExecutive'">
|
||||
<div
|
||||
v-if="props.row.groupTarget !== 'OUTSIDERS'"
|
||||
v-for="row in props.row.position"
|
||||
>
|
||||
{{ `${row.posExecutive ?? "-"}` }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -770,6 +795,7 @@ onMounted(() => {
|
|||
formGroupTarget.position = props.row.position;
|
||||
formGroupTarget.posType = props.row.posTypeId;
|
||||
formGroupTarget.posLevel = props.row.posLevelId;
|
||||
|
||||
modalGroupTarget = true;
|
||||
}
|
||||
"
|
||||
|
|
@ -1070,7 +1096,7 @@ onMounted(() => {
|
|||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="newModalGroupTarget" persistent>
|
||||
<q-card style="width: 700px">
|
||||
<q-card style="min-width: 50%">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmitGroup">
|
||||
<DialogHeader
|
||||
:tittle="isEdit ? 'แก้ไขกลุ่มเป้าหมาย' : 'เพิ่มกลุ่มเป้าหมาย'"
|
||||
|
|
@ -1244,9 +1270,29 @@ onMounted(() => {
|
|||
]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="col-1 q-mt-sm"
|
||||
class="col"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="inputgreen"
|
||||
v-model="items.posExecutive"
|
||||
label="ตำแหน่งทางการบริหาร"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="col-1"
|
||||
v-if="formGroupTarget.groupTarget !== 'OUTSIDERS'"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<q-btn
|
||||
flat
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ interface PositionsType {
|
|||
position: string;
|
||||
posTypeId: string | null;
|
||||
posLevelId: string | null;
|
||||
posExecutive: string;
|
||||
}
|
||||
interface FormGroupRelate {
|
||||
relate: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue