updated & fix bug
This commit is contained in:
parent
704fce71ed
commit
84bb5b20a0
4 changed files with 92 additions and 38 deletions
|
|
@ -112,6 +112,7 @@ const reqMaster = reactive<FilterMaster>({
|
|||
page: 1,
|
||||
pageSize: 10,
|
||||
keyword: "",
|
||||
revisionId: store.activeId
|
||||
});
|
||||
const totalRow = ref<number>(0);
|
||||
const selectedPos = ref<PosMaster[]>([]);
|
||||
|
|
@ -232,7 +233,7 @@ function clearForm() {
|
|||
<q-card
|
||||
bordered
|
||||
class="col-12 col-sm-4 scroll q-pa-sm"
|
||||
style="height: 750px"
|
||||
style="height: 75vh"
|
||||
>
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@ const props = defineProps({
|
|||
type: Function,
|
||||
},
|
||||
});
|
||||
const typeOp = ref<DataOption[]>([
|
||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||
{ id: "HAFT", name: "ครึ่งขั้น" },
|
||||
{ id: "FULL", name: "1ขั้น" },
|
||||
{ id: "FULLHAFT", name: "1.5ขั้น" },
|
||||
]);
|
||||
|
||||
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
|
||||
function validateForm() {
|
||||
|
|
@ -90,7 +84,7 @@ function inputEdit(val: boolean) {
|
|||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="typeOp.filter((e) => e.id !== store.tabType)"
|
||||
:options="store.typeRangeOps.filter((e) => e.id !== store.tabType)"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือก ขั้น'}`]"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
|
|
|
|||
|
|
@ -44,28 +44,63 @@ const itemsTabGroup = ref([
|
|||
},
|
||||
]);
|
||||
|
||||
const itemsTabType = ref([
|
||||
{
|
||||
lable: "รายชื่อคนครอง",
|
||||
name: "tab1",
|
||||
type: "PENDING",
|
||||
},
|
||||
{
|
||||
lable: "1 ขั้น",
|
||||
name: "tab2",
|
||||
type: "FULL",
|
||||
},
|
||||
{
|
||||
lable: "0.5 ขั้น",
|
||||
name: "tab3",
|
||||
type: "HAFT",
|
||||
},
|
||||
{
|
||||
lable: "ไม่ได้เลื่อน",
|
||||
name: "tab4",
|
||||
type: "NONE",
|
||||
},
|
||||
]);
|
||||
const itemsTabType = ref(
|
||||
store.roundCode === "OCT"
|
||||
? [
|
||||
{
|
||||
lable: "รายชื่อคนครอง",
|
||||
name: "tab1",
|
||||
type: "PENDING",
|
||||
},
|
||||
{
|
||||
lable: "1 ขั้น",
|
||||
name: "tab2",
|
||||
type: "FULL",
|
||||
},
|
||||
{
|
||||
lable: "0.5 ขั้น",
|
||||
name: "tab3",
|
||||
type: "HAFT",
|
||||
},
|
||||
{
|
||||
lable: "1.5 ขั้น",
|
||||
name: "tab4",
|
||||
type: "FULLHAFT",
|
||||
},
|
||||
{
|
||||
lable: "ไม่ได้เลื่อน",
|
||||
name: "tab4",
|
||||
type: "NONE",
|
||||
},
|
||||
{
|
||||
lable: "รายชื่อผู้เกษียณอายุราชการ",
|
||||
name: "tab5",
|
||||
type: "RETIRE",
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
lable: "รายชื่อคนครอง",
|
||||
name: "tab1",
|
||||
type: "PENDING",
|
||||
},
|
||||
{
|
||||
lable: "1 ขั้น",
|
||||
name: "tab2",
|
||||
type: "FULL",
|
||||
},
|
||||
{
|
||||
lable: "0.5 ขั้น",
|
||||
name: "tab3",
|
||||
type: "HAFT",
|
||||
},
|
||||
{
|
||||
lable: "ไม่ได้เลื่อน",
|
||||
name: "tab4",
|
||||
type: "NONE",
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
const itemsCard = ref([
|
||||
{
|
||||
|
|
@ -240,13 +275,7 @@ onMounted(async () => {
|
|||
v-for="(item, index) in itemsTabType"
|
||||
:key="index"
|
||||
class="row"
|
||||
:style="
|
||||
index == 1
|
||||
? 'border-top: 1px solid #ccc;'
|
||||
: index == 3
|
||||
? 'border-bottom: 1px solid #ccc'
|
||||
: ''
|
||||
"
|
||||
:style="index == 0 ? 'border-bottom: 1px solid #c8d3db;' : ''"
|
||||
>
|
||||
<q-tab
|
||||
class="col-12"
|
||||
|
|
@ -301,6 +330,20 @@ onMounted(async () => {
|
|||
v-model:formFilter="formFilter"
|
||||
:updatePagination="updatePagination"
|
||||
/>
|
||||
<TableTabType2
|
||||
v-if="index + 1 === 5"
|
||||
:rows="rows"
|
||||
v-model:maxPage="maxPage"
|
||||
v-model:formFilter="formFilter"
|
||||
:updatePagination="updatePagination"
|
||||
/>
|
||||
<TableTabType2
|
||||
v-if="index + 1 === 6"
|
||||
:rows="rows"
|
||||
v-model:maxPage="maxPage"
|
||||
v-model:formFilter="formFilter"
|
||||
:updatePagination="updatePagination"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
},
|
||||
{
|
||||
label: "ย้ายขั้น",
|
||||
icon: "mdi-account-arrow-left-outline",
|
||||
icon: "mdi-swap-vertical-bold",
|
||||
color: "green-6",
|
||||
type: "moveLevel",
|
||||
},
|
||||
|
|
@ -47,6 +47,21 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
},
|
||||
]);
|
||||
|
||||
const typeRangeOps = ref<DataOption[]>(
|
||||
roundCode.value === "OCT"
|
||||
? [
|
||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||
{ id: "FULL", name: "1 ขั้น" },
|
||||
{ id: "FULLHAFT", name: "1.5 ขั้น" },
|
||||
]
|
||||
: [
|
||||
{ id: "NONE", name: "ไม่ได้เลื่อน" },
|
||||
{ id: "HAFT", name: "0.5 ขั้น" },
|
||||
{ id: "FULL", name: "1 ขั้น" },
|
||||
]
|
||||
);
|
||||
|
||||
function fetchPeriodLatest(data: DataPeriodLatest, type: string) {
|
||||
groupId.value = type === "group1" ? data.group1id : data.group2id;
|
||||
roundCode.value = data.period;
|
||||
|
|
@ -62,5 +77,6 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
rootId,
|
||||
roundCode,
|
||||
groupOp,
|
||||
typeRangeOps,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue