ปรับโครงสร้างและเปลี่ยนสถานะทดลองงาน
This commit is contained in:
parent
8d438e9bc7
commit
4c0c0551f8
3 changed files with 37 additions and 29 deletions
|
|
@ -34,8 +34,6 @@ export default {
|
||||||
changestatusProbations: (personalId: string) =>
|
changestatusProbations: (personalId: string) =>
|
||||||
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
`${evaluate}/report/change-status?personal_id=${personalId}`,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// probationGetAssignList: (personalId: string) =>
|
// probationGetAssignList: (personalId: string) =>
|
||||||
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
// `${finish}/probation-assign-list?personal_id=${personalId}`,
|
||||||
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
||||||
|
|
@ -86,4 +84,6 @@ export default {
|
||||||
summaryReportDetail: (id: string) => `${evaluate}/report?assign_id=${id}`,
|
summaryReportDetail: (id: string) => `${evaluate}/report?assign_id=${id}`,
|
||||||
|
|
||||||
orgProfilePlacement: (id: string) => `${orgProfile}/profile/placement/${id}`,
|
orgProfilePlacement: (id: string) => `${orgProfile}/profile/placement/${id}`,
|
||||||
|
orgProfileStatus: (profileId: string) =>
|
||||||
|
`${orgProfile}/profile/probation/${profileId}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,10 @@ const orgLevelOptionMain = ref<DataOption[]>([
|
||||||
{ name: "ระดับฝ่าย/กลุ่มงาน", id: "SECTION" },
|
{ name: "ระดับฝ่าย/กลุ่มงาน", id: "SECTION" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const orgLevelSubOptionMain = ref<DataOption[]>([]);
|
const orgLevelSubOptionMain = ref<DataOption[]>([
|
||||||
|
{ name: "สำนัก/สำนักงาน", id: "OFFICER" },
|
||||||
|
{ name: "สำนักงานเขต", id: "DISTRICT" },
|
||||||
|
]);
|
||||||
|
|
||||||
const orgLevelOption = ref<DataOption[]>([]);
|
const orgLevelOption = ref<DataOption[]>([]);
|
||||||
|
|
||||||
|
|
@ -143,8 +146,7 @@ function onSubmit() {
|
||||||
["org" + type + "PhoneIn"]: formData.orgPhoneIn,
|
["org" + type + "PhoneIn"]: formData.orgPhoneIn,
|
||||||
["org" + type + "Fax"]: formData.orgFax,
|
["org" + type + "Fax"]: formData.orgFax,
|
||||||
["org" + type + "Rank"]: formData.orgLevel,
|
["org" + type + "Rank"]: formData.orgLevel,
|
||||||
["org" + type + "RankSub"]:
|
["org" + type + "RankSub"]: formData.orgLevelSub,
|
||||||
level.value !== 0 ? formData.orgLevelSub : undefined,
|
|
||||||
[nameId]: rootId,
|
[nameId]: rootId,
|
||||||
responsibility:
|
responsibility:
|
||||||
formData.responsibility != null ? formData.responsibility : "",
|
formData.responsibility != null ? formData.responsibility : "",
|
||||||
|
|
@ -276,7 +278,7 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "OFFICE":
|
case "OFFICE":
|
||||||
orgLevelSubOptionMain.value = [
|
orgLevelSubOptionMain.value = [
|
||||||
{ name: "ระดับกอง", id: "DIVISION" },
|
{ name: "กอง", id: "DIVISION" },
|
||||||
{
|
{
|
||||||
name: "สำนักงาน",
|
name: "สำนักงาน",
|
||||||
id: "OFFICE",
|
id: "OFFICE",
|
||||||
|
|
@ -289,7 +291,7 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
break;
|
break;
|
||||||
case "DIVISION":
|
case "DIVISION":
|
||||||
orgLevelSubOptionMain.value = [
|
orgLevelSubOptionMain.value = [
|
||||||
{ name: "ระดับส่วน", id: "SECTION" },
|
{ name: "ส่วน", id: "SECTION" },
|
||||||
{
|
{
|
||||||
name: "กลุ่มภารกิจ",
|
name: "กลุ่มภารกิจ",
|
||||||
id: "MISSION",
|
id: "MISSION",
|
||||||
|
|
@ -298,7 +300,7 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
|
|
||||||
case "SECTION":
|
case "SECTION":
|
||||||
orgLevelSubOptionMain.value = [
|
orgLevelSubOptionMain.value = [
|
||||||
{ name: "ระดับฝ่าย", id: "FACTION" },
|
{ name: "ฝ่าย", id: "FACTION" },
|
||||||
{
|
{
|
||||||
name: "กลุ่มงาน",
|
name: "กลุ่มงาน",
|
||||||
id: "WORK",
|
id: "WORK",
|
||||||
|
|
@ -419,9 +421,8 @@ function selectOrgLevele(val: string, status: boolean = true) {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4" v-if="formData.orgLevel !== '' && level !== 0">
|
<div class="col-4" v-if="formData.orgLevel !== ''">
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="level === 0 || formData.orgLevel === 'DEPARTMENT'"
|
|
||||||
ref="orgLevelSubRef"
|
ref="orgLevelSubRef"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
|
||||||
|
|
@ -327,22 +327,22 @@ async function filterKeyword2Fn(page: number) {
|
||||||
* @param id string
|
* @param id string
|
||||||
* @param data type
|
* @param data type
|
||||||
*/
|
*/
|
||||||
async function fecthlistProbation(id: string, data: any) {
|
// async function fecthlistProbation(id: string, data: any) {
|
||||||
try {
|
// try {
|
||||||
probationlist.value = [];
|
// probationlist.value = [];
|
||||||
const res = await http.post(
|
// const res = await http.post(
|
||||||
config.API.profileSearchNewOcIdType(id, "officer"),
|
// config.API.profileSearchNewOcIdType(id, "officer"),
|
||||||
{
|
// {
|
||||||
criterias: data,
|
// criterias: data,
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
return res.data.result;
|
// return res.data.result;
|
||||||
} catch (err) {
|
// } catch (err) {
|
||||||
messageError($q, err);
|
// messageError($q, err);
|
||||||
} finally {
|
// } finally {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ค้นหาข้อมูลตามไอดี
|
* ค้นหาข้อมูลตามไอดี
|
||||||
|
|
@ -389,9 +389,16 @@ function clickAdd(data: any) {
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.personalAdd(), data)
|
.post(config.API.personalAdd(), data)
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
getpersonalList();
|
await http
|
||||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
.get(config.API.orgProfileStatus(data.id))
|
||||||
|
.then((res) => {
|
||||||
|
getpersonalList();
|
||||||
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue