Merge branch 'develop' into devTee
This commit is contained in:
commit
75ada31f85
2 changed files with 38 additions and 7 deletions
|
|
@ -13,6 +13,8 @@ export default {
|
|||
leaveSearch: () => `${leave}/search`,
|
||||
leaveRound: () => `${leave}/round`,
|
||||
leaveRoundById: (id: string) => `${leave}/round/${id}`,
|
||||
leaveWorkByid: (id: string) => `${leave}/admin/work/${id}`,
|
||||
|
||||
/**ลงเวลาพิเศษ */
|
||||
specialTime: () => `${leave}/admin/edit`,
|
||||
specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importType */
|
||||
import type { dataPost } from "@/modules/09_leave/interface/request/changeRound";
|
||||
|
|
@ -14,14 +16,21 @@ import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundSt
|
|||
|
||||
/** useStore */
|
||||
const mixin = useCounterMixin();
|
||||
const { dialogMessageNotify } = mixin;
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
success,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const dataStore = useChangeRoundDataStore();
|
||||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const dateWork = ref<string>("5");
|
||||
const dateWork = ref<string>("NORMAL");
|
||||
const modalFix = ref<boolean>(false);
|
||||
const editCheck = ref<string>("");
|
||||
const DataRow = ref<any>();
|
||||
|
|
@ -47,7 +56,10 @@ function Openmodal(check: string, detail: any) {
|
|||
}
|
||||
}
|
||||
|
||||
const detailByid = ref();
|
||||
function OpenmodalFix(detail: any) {
|
||||
dateWork.value = "NORMAL";
|
||||
detailByid.value = detail;
|
||||
modalFix.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -58,8 +70,23 @@ function closeDialog() {
|
|||
}
|
||||
|
||||
function save() {
|
||||
console.log("dateWork===>", dateWork.value);
|
||||
closeDialog();
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.leaveWorkByid(detailByid.value.profileId), {
|
||||
work: dateWork.value,
|
||||
})
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
closeDialog();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** Function ค้นหาข้อมูล */
|
||||
|
|
@ -212,7 +239,7 @@ function searchData() {
|
|||
</div>
|
||||
</q-card>
|
||||
|
||||
<!-- popup แก้ไขปฏิทินวันทำงาน -->
|
||||
<!-- popup เปลี่ยนรอบการปฏิบัติงาน ,ประวัติการเปลี่ยนรอบการปฏิบัติงาน -->
|
||||
<Dialogform
|
||||
:modal="modal"
|
||||
:closeDialog="closeDialog"
|
||||
|
|
@ -221,6 +248,8 @@ function searchData() {
|
|||
:personId="DataRow == null ? '' : DataRow.profileId"
|
||||
@update:change-page="dataStore.changePage"
|
||||
/>
|
||||
|
||||
<!-- แก้ไขปฏิทินวันทำงาน -->
|
||||
<q-dialog v-model="modalFix" persistent>
|
||||
<q-card style="min-width: 800px"
|
||||
><q-toolbar>
|
||||
|
|
@ -242,13 +271,13 @@ function searchData() {
|
|||
<q-radio
|
||||
name="dateWork"
|
||||
v-model="dateWork"
|
||||
val="5"
|
||||
val="NORMAL"
|
||||
label="ทำงาน 5 วัน"
|
||||
/>
|
||||
<q-radio
|
||||
name="dateWork"
|
||||
v-model="dateWork"
|
||||
val="6"
|
||||
val="6DAY"
|
||||
label="ทำงาน 6 วัน"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue