รายการเลื่อนเงินเดือนลูกจ้างประจำ = > ส่งออกคำสั่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-19 14:42:50 +07:00
parent 7d68de4190
commit 9dacfc6835
3 changed files with 21 additions and 7 deletions

View file

@ -7,9 +7,11 @@ import config from "@/app.config";
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue"; // import DialogPopupReason from "@/components/Dialogs/PopupReason.vue"; //
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore";
const $q = useQuasar(); // noti quasar const $q = useQuasar(); // noti quasar
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const store = useSalaryEmployeeListSDataStore();
const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin; const { messageError, dialogConfirm, showLoader, hideLoader, success } = mixin;
const props = defineProps({ const props = defineProps({
@ -173,7 +175,7 @@ function sendAndRecommend(title: string, typeOrder: string) {
<div> <div>
<!-- การเจาหนาทของหนวยงานสงเอกสารให ผอ. หนวยงานตรวจสอบ --> <!-- การเจาหนาทของหนวยงานสงเอกสารให ผอ. หนวยงานตรวจสอบ -->
<q-btn <q-btn
v-if="sendStep == 1" v-if="store.statusQuota == 'PENDING'"
unelevated unelevated
color="public" color="public"
label="ส่งเอกสารให้ ผอ. ตรวจสอบ" label="ส่งเอกสารให้ ผอ. ตรวจสอบ"
@ -182,7 +184,7 @@ function sendAndRecommend(title: string, typeOrder: string) {
<!-- ผอ. หนวยงานทำการยนยนและสงให สกจ. --> <!-- ผอ. หนวยงานทำการยนยนและสงให สกจ. -->
<q-btn <q-btn
v-if="sendStep == 2" v-if="store.statusQuota == 'WAITHEAD1'"
unelevated unelevated
color="public" color="public"
label="ยืนยันและส่งเอกสารให้ สกจ." label="ยืนยันและส่งเอกสารให้ สกจ."
@ -191,7 +193,7 @@ function sendAndRecommend(title: string, typeOrder: string) {
<!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ไมปรบโควต --> <!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ไมปรบโควต -->
<q-btn <q-btn
v-if="sendStep == 3" v-if="store.statusQuota == 'WAITOWNER1'"
unelevated unelevated
color="green" color="green"
label="ยืนยันการตรวจสอบ" label="ยืนยันการตรวจสอบ"
@ -200,7 +202,7 @@ function sendAndRecommend(title: string, typeOrder: string) {
<!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ปรบโควต --> <!-- สกจ. ตรวจสอบเอกสารและขอมลรายการเงนเดอนทแตละหนวยงานสงมา ปรบโควต -->
<q-btn <q-btn
v-if="sendStep == 3" v-if="store.statusQuota == 'WAITOWNER1'"
class="q-ml-sm" class="q-ml-sm"
unelevated unelevated
color="warning" color="warning"
@ -210,19 +212,28 @@ function sendAndRecommend(title: string, typeOrder: string) {
<!-- ผอ.หนวยงานสงคำแนะนำใหการเจาหนาทหนวยงาน --> <!-- ผอ.หนวยงานสงคำแนะนำใหการเจาหนาทหนวยงาน -->
<q-btn <q-btn
v-if="sendStep == 4" v-if="store.statusQuota == 'WAITHEAD2'"
unelevated unelevated
color="public" color="public"
label="ส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน" label="ส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน"
@click="sendAndRecommend('ส่งคำแนะนำให้ ผอ. ตรวจสอบ', 'head')" @click="
sendAndRecommend('ส่งคำแนะนำให้การเจ้าหน้าที่หน่วยงาน', 'head')
"
/> />
<q-btn <q-btn
v-if="sendStep > 4" v-if="store.statusQuota == 'WAITOFFICER2'"
unelevated unelevated
color="public" color="public"
label="ส่งไปออกคำสั่ง" label="ส่งไปออกคำสั่ง"
/> />
<q-btn
v-if="store.statusQuota == 'REPORT'"
unelevated
color="public"
disable
label="รอออกคำสั่ง"
/>
</div> </div>
</q-toolbar> </q-toolbar>

View file

@ -221,6 +221,7 @@ function fetchDataQuota(id: string) {
.then((res) => { .then((res) => {
const data = res.data.result; const data = res.data.result;
store.remaining = data.remaining; store.remaining = data.remaining;
store.statusQuota = data.status;
itemsCard.value[0].total = data.total; itemsCard.value[0].total = data.total;
itemsCard.value[1].total = data.fifteenPercent; itemsCard.value[1].total = data.fifteenPercent;
itemsCard.value[2].total = data.chosen; itemsCard.value[2].total = data.chosen;

View file

@ -26,6 +26,7 @@ export const useSalaryEmployeeListSDataStore = defineStore(
const roundYear = ref<number>(0); const roundYear = ref<number>(0);
const roundCode = ref<string>(""); const roundCode = ref<string>("");
const isClosedRound = ref<boolean>(false); // การปิดรอบ const isClosedRound = ref<boolean>(false); // การปิดรอบ
const statusQuota = ref<string>("");
/** List Menu*/ /** List Menu*/
const itemMenu = ref<ItemsMenu[]>([ const itemMenu = ref<ItemsMenu[]>([
{ {
@ -157,6 +158,7 @@ export const useSalaryEmployeeListSDataStore = defineStore(
remaining, remaining,
isClosedRound, isClosedRound,
roundYear, roundYear,
statusQuota,
}; };
} }
); );