fix(salary):report [emp-08 ,go1] rootID === ancestorDNA
This commit is contained in:
parent
3e9ff028b3
commit
ed0d84b45c
5 changed files with 23 additions and 3 deletions
|
|
@ -40,6 +40,7 @@ const props = defineProps({
|
||||||
roundFilter: { type: Object, require: true },
|
roundFilter: { type: Object, require: true },
|
||||||
snapShot: { type: String, require: true },
|
snapShot: { type: String, require: true },
|
||||||
revisionId: { type: String, require: true },
|
revisionId: { type: String, require: true },
|
||||||
|
ancestorDNA: { type: String, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const total = ref<number>(0);
|
const total = ref<number>(0);
|
||||||
|
|
@ -350,7 +351,7 @@ function onClickDownload(data: DataOption, type: string = "xlsx") {
|
||||||
data.id === "go1"
|
data.id === "go1"
|
||||||
? `${props?.roundFilter?.year}-03-31`
|
? `${props?.roundFilter?.year}-03-31`
|
||||||
: `${props?.roundFilter?.year}-09-30`,
|
: `${props?.roundFilter?.year}-09-30`,
|
||||||
nodeId: props.rootId,
|
nodeId: data.id === "go1" ? props.ancestorDNA : props.rootId,
|
||||||
isRetirement: data.id === "go2-01" ? true : undefined,
|
isRetirement: data.id === "go2-01" ? true : undefined,
|
||||||
revisionId: props.revisionId,
|
revisionId: props.revisionId,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ const props = defineProps({
|
||||||
roundFilter: { type: Object, require: true },
|
roundFilter: { type: Object, require: true },
|
||||||
snapShot: { type: String, require: true },
|
snapShot: { type: String, require: true },
|
||||||
revisionId: { type: String, require: true },
|
revisionId: { type: String, require: true },
|
||||||
|
ancestorDNA: { type: String, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const splitterModel = ref<number>(13);
|
const splitterModel = ref<number>(13);
|
||||||
|
|
@ -325,7 +326,7 @@ async function onClickDownload(data: DataOption, type: string = "xlsx") {
|
||||||
data.id === "emp-08"
|
data.id === "emp-08"
|
||||||
? `${props?.roundFilter?.year}-03-31`
|
? `${props?.roundFilter?.year}-03-31`
|
||||||
: `${props?.roundFilter?.year}-09-30`,
|
: `${props?.roundFilter?.year}-09-30`,
|
||||||
nodeId: props.rootId,
|
nodeId: data.id === "emp-08" ? props.ancestorDNA : props.rootId,
|
||||||
revisionId: props.revisionId,
|
revisionId: props.revisionId,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ interface DataOption {
|
||||||
type?: string;
|
type?: string;
|
||||||
typeName?: string;
|
typeName?: string;
|
||||||
keyId?: string;
|
keyId?: string;
|
||||||
|
ancestorDNA?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataOptionShort {
|
interface DataOptionShort {
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,13 @@ const commandTypeCodeArray = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ancestorDNA = computed(() => {
|
||||||
|
return (
|
||||||
|
agencyOptionsMain.value.find((e) => e.id === agencyFilter.value)
|
||||||
|
?.ancestorDNA || ""
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
/** function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
/** function เรียกข้อมูลรอบการขึ้นเงินเดือน*/
|
||||||
async function getRound() {
|
async function getRound() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -209,6 +216,7 @@ async function getAgency(id: string) {
|
||||||
data.map((x: DataAgency) => ({
|
data.map((x: DataAgency) => ({
|
||||||
id: x.id,
|
id: x.id,
|
||||||
name: x.orgRootName,
|
name: x.orgRootName,
|
||||||
|
ancestorDNA: x.ancestorDNA,
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
agencyOptions.value = agencyOptionsMain.value;
|
agencyOptions.value = agencyOptionsMain.value;
|
||||||
|
|
@ -562,7 +570,6 @@ onMounted(async () => {
|
||||||
@update:model-value="onChangeSnap"
|
@update:model-value="onChangeSnap"
|
||||||
:disable="!isDisable"
|
:disable="!isDisable"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
:readonly="checkPermission($route)?.attrOwnership === 'STAFF'"
|
:readonly="checkPermission($route)?.attrOwnership === 'STAFF'"
|
||||||
v-model="agencyFilter"
|
v-model="agencyFilter"
|
||||||
|
|
@ -620,6 +627,7 @@ onMounted(async () => {
|
||||||
:round-filter="roundFilter"
|
:round-filter="roundFilter"
|
||||||
:snap-shot="snapFilter"
|
:snap-shot="snapFilter"
|
||||||
:revision-id="roundFilter.revisionId"
|
:revision-id="roundFilter.revisionId"
|
||||||
|
:ancestorDNA="ancestorDNA"
|
||||||
/>
|
/>
|
||||||
<q-card v-else class="q-pa-sm">
|
<q-card v-else class="q-pa-sm">
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,13 @@ const commandTypeCodeArray = computed(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ancestorDNA = computed(() => {
|
||||||
|
return (
|
||||||
|
agencyOptionsMain.value.find((e) => e.id === agencyFilter.value)
|
||||||
|
?.ancestorDNA || ""
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เรียกข้อมูลรอบการขึ้นค่าจ้าง
|
* function เรียกข้อมูลรอบการขึ้นค่าจ้าง
|
||||||
*/
|
*/
|
||||||
|
|
@ -205,6 +212,7 @@ async function getAgency(id: string) {
|
||||||
data.map((x: DataAgency) => ({
|
data.map((x: DataAgency) => ({
|
||||||
id: x.id,
|
id: x.id,
|
||||||
name: x.orgRootName,
|
name: x.orgRootName,
|
||||||
|
ancestorDNA: x.ancestorDNA,
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
agencyOptions.value = agencyOptionsMain.value;
|
agencyOptions.value = agencyOptionsMain.value;
|
||||||
|
|
@ -563,6 +571,7 @@ onMounted(async () => {
|
||||||
:round-filter="roundFilter"
|
:round-filter="roundFilter"
|
||||||
:snap-shot="snapFilter"
|
:snap-shot="snapFilter"
|
||||||
:revision-id="roundFilter.revisionId"
|
:revision-id="roundFilter.revisionId"
|
||||||
|
:ancestorDNA="ancestorDNA"
|
||||||
/>
|
/>
|
||||||
<q-card v-else class="q-pa-sm">
|
<q-card v-else class="q-pa-sm">
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue