รายการอื่นๆ ==> ตำแหน่งที่บรรจุกลับ
This commit is contained in:
parent
5865438d9d
commit
6fa064bb7c
2 changed files with 136 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ import type { listMain } from "@/modules/05_placement/interface/response/OhterMa
|
||||||
|
|
||||||
/** importcomopnents*/
|
/** importcomopnents*/
|
||||||
import Dialogbody from "@/modules/05_placement/components/Other/DialogOrders.vue";
|
import Dialogbody from "@/modules/05_placement/components/Other/DialogOrders.vue";
|
||||||
|
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -44,6 +45,7 @@ const filterKeyword2 = ref<string>(""); //คำค้นหารายกา
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"fullname",
|
"fullname",
|
||||||
|
"organizationPositionReturn",
|
||||||
"positionLevel",
|
"positionLevel",
|
||||||
"organizationPositionOld",
|
"organizationPositionOld",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
|
|
@ -73,6 +75,19 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
}`;
|
}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "organizationPositionReturn",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง/หน่วยงานที่บรรจุกลับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "organizationPositionReturn",
|
||||||
|
format(val, row) {
|
||||||
|
return row.organizationPositionOld.replace(/\n/g, " ");
|
||||||
|
},
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "positionLevel",
|
name: "positionLevel",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -198,6 +213,65 @@ function clickDelete(id: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const modalSelectOrg = ref<boolean>(false);
|
||||||
|
const type = ref<string | null>(null);
|
||||||
|
const personalId = ref<string>("");
|
||||||
|
|
||||||
|
const posType = ref<string>(""); //ประเภทตำแหน่ง
|
||||||
|
const posLevel = ref<string>(""); //ระดับตำแหน่ง
|
||||||
|
const position = ref<string>(""); //ตำแหน่ง
|
||||||
|
const dataRows = ref<any>(); //ข้อมูลที่ต้องการเลือกหน่วยงานที่รับโอน
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชันเปิด popup เลือกหน่วยงานที่รับโอน
|
||||||
|
* @param id id รายการรับโอนที่เลือกหน่วยงานที่รับโอน
|
||||||
|
* @param data ข้อมูลรายการรับโอน
|
||||||
|
*/
|
||||||
|
function onSelectOrg(data: any) {
|
||||||
|
personalId.value = data.id;
|
||||||
|
// personal.value = dataRecevice.value.filter((e: ResponseData) => e.id === id);
|
||||||
|
dataRows.value = data;
|
||||||
|
posType.value = data.posTypeId;
|
||||||
|
posLevel.value = data.posLevelId;
|
||||||
|
position.value = data.positionId;
|
||||||
|
type.value = null;
|
||||||
|
modalSelectOrg.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onSaveSelectOrg(data: any) {
|
||||||
|
const body = {
|
||||||
|
node: data.node,
|
||||||
|
nodeId: data.nodeId,
|
||||||
|
orgRevisionId: data.orgRevisionId,
|
||||||
|
positionId: data.positionId,
|
||||||
|
posMasterNo: data.posMasterNo,
|
||||||
|
positionName: data.positionName,
|
||||||
|
posTypeId: data.posTypeId,
|
||||||
|
posTypeName: data.posTypeName,
|
||||||
|
posLevelId: data.posLevelId,
|
||||||
|
posLevelName: data.posLevelName,
|
||||||
|
posExecutiveName: data.posExecutiveName,
|
||||||
|
reportingDate: data.reportingDate,
|
||||||
|
posmasterId: data.posmasterId,
|
||||||
|
typeCommand: data.typeCommand,
|
||||||
|
};
|
||||||
|
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.put(config.API.otherPosition(personalId.value), body)
|
||||||
|
.then(async () => {
|
||||||
|
await fecthlistOthet();
|
||||||
|
await success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
modalSelectOrg.value = false;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* redialect รายละเอียดรายการอื่นๆ
|
* redialect รายละเอียดรายการอื่นๆ
|
||||||
* @param id รายการอื่นๆ
|
* @param id รายการอื่นๆ
|
||||||
|
|
@ -220,6 +294,7 @@ onMounted(() => {
|
||||||
fecthlistOthet();
|
fecthlistOthet();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการอื่นๆ</div>
|
<div class="toptitle text-dark col-12 row items-center">รายการอื่นๆ</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm">
|
||||||
|
|
@ -321,6 +396,29 @@ onMounted(() => {
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
v-if="
|
||||||
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
|
checkPermission($route)?.attrIsGet
|
||||||
|
"
|
||||||
|
:disable="
|
||||||
|
props.row.status === 'REPORT' ||
|
||||||
|
props.row.status === 'DONE'
|
||||||
|
"
|
||||||
|
:color="
|
||||||
|
props.row.status === 'REPORT' ||
|
||||||
|
props.row.status === 'DONE'
|
||||||
|
? 'grey'
|
||||||
|
: 'primary'
|
||||||
|
"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
icon="mdi-bookmark-outline"
|
||||||
|
@click="onSelectOrg(props.row)"
|
||||||
|
>
|
||||||
|
<q-tooltip>เลือกหน่วยงานที่บรรจุกลับ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsGet"
|
v-if="checkPermission($route)?.attrIsGet"
|
||||||
flat
|
flat
|
||||||
|
|
@ -357,6 +455,29 @@ onMounted(() => {
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="col.name === 'organizationPositionReturn'">
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">
|
||||||
|
{{ props.row.root !== null ? props.row.root : "-" }}
|
||||||
|
{{
|
||||||
|
props.row.rootShortName !== null
|
||||||
|
? `(${props.row.rootShortName})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-light">
|
||||||
|
{{
|
||||||
|
props.row.nodeName !== null ? props.row.nodeName : ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
props.row.nodeShortName !== null
|
||||||
|
? `(${props.row.nodeShortName}${props.row.posMasterNo})`
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-else-if="col.name === 'organizationPositionOld'"
|
v-else-if="col.name === 'organizationPositionOld'"
|
||||||
class="text-html"
|
class="text-html"
|
||||||
|
|
@ -384,6 +505,17 @@ onMounted(() => {
|
||||||
v-model:rowsData="rows2Data"
|
v-model:rowsData="rows2Data"
|
||||||
:fecthlistOthet="fecthlistOthet"
|
:fecthlistOthet="fecthlistOthet"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<DialogOrgSelect
|
||||||
|
:title="`เลือกหน่วยงานที่บรรจุกลับ`"
|
||||||
|
v-model:modal="modalSelectOrg"
|
||||||
|
v-model:type="type"
|
||||||
|
:pos-type="posType"
|
||||||
|
:pos-level="posLevel"
|
||||||
|
:position="position"
|
||||||
|
:data-rows="dataRows"
|
||||||
|
:onSubmit="onSaveSelectOrg"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,9 @@ const columns = computed(() => [
|
||||||
align: "left",
|
align: "left",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val: number, row: RetirementList) {
|
||||||
|
return val === 0 ? "ว่าง" : val;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "name",
|
name: "name",
|
||||||
|
|
@ -77,7 +80,7 @@ const columns = computed(() => [
|
||||||
field: "name",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
format(val: any, row: any) {
|
format(val: string, row: RetirementList) {
|
||||||
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
return `${row.prefix ?? ""}${row.firstName ?? ""} ${row.lastName ?? ""}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue