updated
This commit is contained in:
parent
bad1ce07f0
commit
5868658e84
3 changed files with 69 additions and 43 deletions
|
|
@ -40,7 +40,19 @@ const listMenu = ref<ListMenu[]>([
|
|||
label: "คัดลอก",
|
||||
icon: "mdi-content-copy",
|
||||
type: "copy",
|
||||
color: "orange",
|
||||
color: "blue-6",
|
||||
},
|
||||
{
|
||||
label: "แก้ไข",
|
||||
icon: "edit",
|
||||
type: "edit",
|
||||
color: "primary",
|
||||
},
|
||||
{
|
||||
label: "ลบ",
|
||||
icon: "delete",
|
||||
type: "remove",
|
||||
color: "red",
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
@ -60,6 +72,7 @@ const formData = reactive<FormDataPosition>({
|
|||
});
|
||||
|
||||
const formPositionSelect = reactive<FormPositionSelect>({
|
||||
positionId: "",
|
||||
positionName: "",
|
||||
positionField: "",
|
||||
positionType: "",
|
||||
|
|
@ -203,9 +216,14 @@ function onSubmit() {
|
|||
}
|
||||
/** ฟังชั่น บันทึก */
|
||||
function onSubmitSelectEdit() {
|
||||
dialogConfirm($q, () => {
|
||||
console.log(formPositionSelect);
|
||||
});
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
console.log(formPositionSelect);
|
||||
},
|
||||
"ยืนยันการเพิ่มตำแหน่ง",
|
||||
"ต้องการยืนยันการเพิ่มตำแหน่งนี้ใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
/** update เมื่อเปลี่ยน option */
|
||||
|
|
@ -221,31 +239,34 @@ async function searchInput() {
|
|||
// จำลอง
|
||||
const dataList = [
|
||||
{
|
||||
positionName: "test1",
|
||||
positionField: "test1",
|
||||
positionType: "test1",
|
||||
positionLevel: "test1",
|
||||
positionExecutive: "test1",
|
||||
positionExecutiveField: "test1",
|
||||
positionArea: "test1",
|
||||
positionId: "x1",
|
||||
positionName: "นักกายภาพบำบัด",
|
||||
positionField: "จัดการงานทั่วไป",
|
||||
positionType: "วิชาการ",
|
||||
positionLevel: "ชำนาญการ",
|
||||
positionExecutive: "การพยาบาลทั่วไป",
|
||||
positionExecutiveField: "การพยาบาลทั่วไป",
|
||||
positionArea: "การพยาบาลทั่วไป",
|
||||
},
|
||||
{
|
||||
positionName: "test2",
|
||||
positionField: "test2",
|
||||
positionType: "test2",
|
||||
positionLevel: "test2",
|
||||
positionExecutive: "test2",
|
||||
positionExecutiveField: "test2",
|
||||
positionArea: "test2",
|
||||
positionId: "x2",
|
||||
positionName: "นักทรัพยากรบุคคล",
|
||||
positionField: "จัดการงานทั่วไป",
|
||||
positionType: "ทั่วไป",
|
||||
positionLevel: "ชำนาญการ",
|
||||
positionExecutive: "-",
|
||||
positionExecutiveField: "-",
|
||||
positionArea: "-",
|
||||
},
|
||||
{
|
||||
positionName: "test3",
|
||||
positionField: "test3",
|
||||
positionType: "test3",
|
||||
positionLevel: "test3",
|
||||
positionExecutive: "test3",
|
||||
positionExecutiveField: "test3",
|
||||
positionArea: "test3",
|
||||
positionId: "x3",
|
||||
positionName: "นักทรัพยากรบุคคล",
|
||||
positionField: "จัดการงานทั่วไป",
|
||||
positionType: "วิชาการ",
|
||||
positionLevel: "ชำนาญการพิเศษ",
|
||||
positionExecutive: "-",
|
||||
positionExecutiveField: "-",
|
||||
positionArea: "-",
|
||||
},
|
||||
];
|
||||
rowsPositionSelect.value = dataList;
|
||||
|
|
@ -257,6 +278,7 @@ async function searchInput() {
|
|||
* @param data ข้อมูลตำแหน่ง
|
||||
*/
|
||||
function copyDetiail(data: RowDetailPositions) {
|
||||
formPositionSelect.positionId = data.positionId;
|
||||
formPositionSelect.positionName = data.positionName;
|
||||
formPositionSelect.positionField = data.positionField;
|
||||
formPositionSelect.positionType = data.positionType;
|
||||
|
|
@ -304,7 +326,7 @@ watch(
|
|||
|
||||
<q-card-section class="q-pa-sm">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-5">
|
||||
<div class="col-12">
|
||||
<form @submit.prevent="validateForm">
|
||||
<q-card
|
||||
bordered
|
||||
|
|
@ -314,7 +336,7 @@ watch(
|
|||
<div
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||
>
|
||||
รายการตำแหน่ง
|
||||
เลขที่ตำแหน่ง
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row q-col-gutter-sm col-12 q-pa-sm">
|
||||
|
|
@ -429,8 +451,10 @@ watch(
|
|||
</q-card>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-5">
|
||||
<div class="row q-col-gutter-sm q-mt-sm">
|
||||
<div class="col-7">
|
||||
<q-card bordered class="col-12" style="border: 1px solid #d6dee1">
|
||||
<div
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||
|
|
@ -487,7 +511,7 @@ watch(
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rowsPositionSelect"
|
||||
row-key="positionName"
|
||||
row-key="positionId"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
|
|
@ -602,7 +626,7 @@ watch(
|
|||
</q-card>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<div class="col-5">
|
||||
<form @submit.prevent="validateFormPositionEdit">
|
||||
<q-card
|
||||
bordered
|
||||
|
|
@ -612,11 +636,11 @@ watch(
|
|||
<div
|
||||
class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md"
|
||||
>
|
||||
เลือกตำแหน่ง
|
||||
เพิ่มข้อมูลตำแหน่ง
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row q-col-gutter-sm col-12 q-pa-sm">
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionName"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -626,7 +650,7 @@ watch(
|
|||
label="ตำแหน่งในสายงาน"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionField"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -636,7 +660,7 @@ watch(
|
|||
label="สายงาน"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionType"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -646,7 +670,7 @@ watch(
|
|||
label="ประเภทตำแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionLevel"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -656,7 +680,7 @@ watch(
|
|||
label="ระดับตำแหน่ง"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionExecutive"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -666,7 +690,7 @@ watch(
|
|||
label="ตำแหน่งทางการบริหาร"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionExecutiveField"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -676,7 +700,7 @@ watch(
|
|||
label="ด้านทางการบริหาร"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-6">
|
||||
<q-input
|
||||
v-model="formPositionSelect.positionArea"
|
||||
:class="inputEdit(isReadonly)"
|
||||
|
|
@ -692,7 +716,7 @@ watch(
|
|||
align="right"
|
||||
class="bg-white text-teal q-pa-xs"
|
||||
>
|
||||
<q-btn type="submit" :label="`บันทึก`" color="public" />
|
||||
<q-btn type="submit" label="เพิ่มตำแหน่ง" color="public" />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
{
|
||||
name: "namePosition",
|
||||
align: "left",
|
||||
label: "ชื่อตำแหน่ง",
|
||||
label: "ตำแหน่งในสายงาน",
|
||||
field: "namePosition",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
|
|
@ -95,10 +95,10 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
const rows = ref<any>([
|
||||
{
|
||||
noPosition: "00011",
|
||||
namePosition: "กองบริหารทั่วไป",
|
||||
noPosition: "สกง.1",
|
||||
namePosition: "นักทรัพยากรบุคคล",
|
||||
typePosition: "ทั่วไป",
|
||||
levelPositoion: " ระดับกอง",
|
||||
levelPositoion: "ชำนาญการ / ?",
|
||||
isStatus: "ไม่มี",
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ interface HistoryType {
|
|||
}
|
||||
|
||||
interface FormPositionSelect {
|
||||
positionId: string,
|
||||
positionName: string;
|
||||
positionField: string;
|
||||
positionType: string;
|
||||
|
|
@ -86,6 +87,7 @@ interface FormPositionSelect {
|
|||
}
|
||||
|
||||
interface RowDetailPositions {
|
||||
positionId: string,
|
||||
positionName: string
|
||||
positionField: string
|
||||
positionType: string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue