fix เงินเดือน สำนักปลัด
This commit is contained in:
parent
9a76465f78
commit
2276b2022c
4 changed files with 65 additions and 46 deletions
|
|
@ -36,6 +36,8 @@ const agencyFilter = ref<string>(""); //หน่วยงาน
|
|||
const snapFilter = ref<string>(""); //รอบ
|
||||
const periodLatest = ref<DataPeriodLatest>();
|
||||
const salaryPeriodId = ref<string>("");
|
||||
const dataOrg = ref<any[]>([]);
|
||||
const isDeputy = ref<boolean>(false); // สำนักงานปลัด
|
||||
|
||||
//ตัวเลือก
|
||||
const roundOptions = ref<DataOptionShort[]>([]); //ตัวเลือกรอบการขึ้นเงินเดือน
|
||||
|
|
@ -181,6 +183,7 @@ async function getAgency(id: string) {
|
|||
.get(config.API.activeOrganizationRootById(id))
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
dataOrg.value = data;
|
||||
agencyOptions.value = [];
|
||||
agencyOptionsMain.value = [];
|
||||
agencyOptionsMain.value = await [
|
||||
|
|
@ -222,6 +225,10 @@ async function getAgencyPosition(id: string) {
|
|||
);
|
||||
|
||||
agencyFilter.value = position ? position.id : "ALL";
|
||||
isDeputy.value = position
|
||||
? dataOrg.value.find((e) => e.id === position.id)?.isDeputy
|
||||
: false;
|
||||
|
||||
if (agencyFilter.value && roundFilter.value.id && snapFilter.value) {
|
||||
await fetchSalalyPeriod(
|
||||
agencyFilter.value,
|
||||
|
|
@ -319,6 +326,9 @@ async function onChangeSnap() {
|
|||
/** function เปลี่ยนหน่วยงาน*/
|
||||
async function onChangeAgency() {
|
||||
store.rootId = agencyFilter.value;
|
||||
isDeputy.value = dataOrg.value.find(
|
||||
(e) => e.id === agencyFilter.value
|
||||
)?.isDeputy;
|
||||
if (
|
||||
agencyFilter.value !== "ALL" &&
|
||||
roundFilter.value.id &&
|
||||
|
|
@ -577,6 +587,7 @@ onMounted(async () => {
|
|||
:command-type-code-array="['C-PM-33', 'C-PM-34', 'C-PM-35']"
|
||||
:salary-period-id="salaryPeriodId"
|
||||
:title-command="titleCommand"
|
||||
:is-deputy="isDeputy"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue