เพิ่มฟิล เลขที่คำสั่ง
This commit is contained in:
parent
a354e8cc73
commit
adcb1f034f
2 changed files with 107 additions and 67 deletions
|
|
@ -336,14 +336,14 @@ onMounted(() => {
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="edit"
|
:icon="props.row.topic == 'ขออัปเดตข้อมูลจากกรมการปกครอง' ? 'mdi-sync-circle':'edit'"
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
color="edit"
|
:color="props.row.topic == 'ขออัปเดตข้อมูลจากกรมการปกครอง' ? 'info':'edit'"
|
||||||
@click.pervent="onclickEdit(props.row.id)"
|
@click.pervent="onclickEdit(props.row.id)"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขสถานะคำร้อง</q-tooltip>
|
<q-tooltip>{{props.row.topic == 'ขออัปเดตข้อมูลจากกรมการปกครอง' ? 'ขออัปเดตข้อมูลจากกรมการปกครอง':'แก้ไขสถานะคำร้อง'}}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ const filterRef2 = ref<any>(null);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const paging2 = ref<boolean>(true);
|
const paging2 = ref<boolean>(true);
|
||||||
const fillterStatus = ref<any>([]);
|
const fillterStatus = ref<any>([]);
|
||||||
const fillter = ref<any>('');
|
const fillter = ref<any>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterKeyword2 = ref<string>("");
|
const filterKeyword2 = ref<string>("");
|
||||||
const rows = ref<FormMainProbation[]>([]);
|
const rows = ref<FormMainProbation[]>([]);
|
||||||
|
|
@ -218,6 +218,15 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "refCommandNo",
|
||||||
|
align: "center",
|
||||||
|
label: "เลขที่คําสั่งบรรจุแต่งตั้ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "refCommandNo",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** get ข้อมูล */
|
/** get ข้อมูล */
|
||||||
|
|
@ -282,31 +291,55 @@ async function filterKeyword2Fn(page: number) {
|
||||||
* @param data personal data
|
* @param data personal data
|
||||||
*/
|
*/
|
||||||
function clickAdd(data: any) {
|
function clickAdd(data: any) {
|
||||||
|
const body = {
|
||||||
|
id: data.id,
|
||||||
|
prefix: data.prefix,
|
||||||
|
rank: data.rank,
|
||||||
|
firstName: data.firstName,
|
||||||
|
lastName: data.lastName,
|
||||||
|
position: data.position,
|
||||||
|
idcard: data.idcard,
|
||||||
|
order_number: data.refCommandNo ? data.refCommandNo:'',
|
||||||
|
posLevelName: data.posLevelName,
|
||||||
|
posTypeName: data.posTypeName,
|
||||||
|
posNo: data.posNo,
|
||||||
|
positionField: data.positionField,
|
||||||
|
positionArea: data.positionArea,
|
||||||
|
posExecutiveName: data.posExecutiveName,
|
||||||
|
positionExecutiveField: data.positionExecutiveField,
|
||||||
|
isProbation: data.isProbation,
|
||||||
|
orgRootName: data.orgRootName,
|
||||||
|
orgChild1Name: data.orgChild1Name,
|
||||||
|
orgChild2Name: data.orgChild2Name,
|
||||||
|
orgChild3Name: data.orgChild3Name,
|
||||||
|
orgChild4Name: data.orgChild4Name,
|
||||||
|
};
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.personalAdd(), data)
|
.post(config.API.personalAdd(), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.orgProfileStatus(data.id))
|
.get(config.API.orgProfileStatus(data.id))
|
||||||
.then((res) => {
|
.then(async(res) => {
|
||||||
getpersonalList();
|
await getpersonalList();
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
messageError($q, e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
clickClose();
|
clickClose();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
hideLoader();
|
||||||
|
})
|
||||||
|
.finally(() => {});
|
||||||
},
|
},
|
||||||
"ยันยันการเพิ่มข้อมูล",
|
"ยันยันการเพิ่มข้อมูล",
|
||||||
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||||
|
|
@ -412,9 +445,7 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<template v-slot:no-option>
|
<template v-slot:no-option>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section class="text-grey">
|
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||||
ไม่มีข้อมูล
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
@ -717,6 +748,15 @@ onMounted(async () => {
|
||||||
}${props.row.orgRootName ? props.row.orgRootName : ""}`
|
}${props.row.orgRootName ? props.row.orgRootName : ""}`
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'refCommandNo'">
|
||||||
|
{{
|
||||||
|
props.row.refCommandNo
|
||||||
|
? props.row.refCommandNo != "xx/2566"
|
||||||
|
? props.row.refCommandNo
|
||||||
|
: "-"
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue