Merge branch 'develop' into devTee
This commit is contained in:
commit
26123c1184
7 changed files with 102 additions and 36 deletions
|
|
@ -18,6 +18,7 @@ const modal = defineModel<boolean>("modal", { required: true });
|
|||
const props = defineProps({
|
||||
stateId: { type: String, require: true },
|
||||
fetchData: { type: Function, require: true },
|
||||
type: { type: String, require: true },
|
||||
});
|
||||
|
||||
/** table*/
|
||||
|
|
@ -72,7 +73,7 @@ const isReasonSetting = ref<boolean>(false);
|
|||
async function fetchLists() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.workflow + `commander`)
|
||||
.get(config.API.workflow + `commander/${props.type}`)
|
||||
.then(async (res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ const $q = useQuasar();
|
|||
const { dialogConfirm, showLoader, hideLoader, messageError } =
|
||||
useCounterMixin();
|
||||
|
||||
const { id, sysName } = defineProps({
|
||||
const isCheckData = defineModel<boolean>("isCheckData", {
|
||||
default: true,
|
||||
});
|
||||
const props = defineProps({
|
||||
id: { type: String, require: true },
|
||||
sysName: { type: String, require: true },
|
||||
});
|
||||
|
|
@ -38,12 +41,13 @@ const itemState = ref<DataListState[]>([]);
|
|||
|
||||
const modalSelectPerson = ref<boolean>(false);
|
||||
const modalApprove = ref<boolean>(false);
|
||||
const typeSelectPerson = ref<string>("");
|
||||
|
||||
async function fetchCheckState() {
|
||||
await http
|
||||
.post(config.API.workflow + `check-user-now`, {
|
||||
refId: id,
|
||||
system: sysName,
|
||||
refId: props.id,
|
||||
system: props.sysName,
|
||||
})
|
||||
.then(async (res) => {
|
||||
await fetchData();
|
||||
|
|
@ -71,8 +75,8 @@ async function fetchCheckState() {
|
|||
async function fetchData() {
|
||||
await http
|
||||
.post(config.API.workflow + `check-state-all`, {
|
||||
refId: id,
|
||||
system: sysName,
|
||||
refId: props.id,
|
||||
system: props.sysName,
|
||||
})
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
|
@ -88,8 +92,8 @@ function onChangeState() {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.workflow + `state-next`, {
|
||||
refId: id,
|
||||
system: sysName,
|
||||
refId: props.id,
|
||||
system: props.sysName,
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchCheckState();
|
||||
|
|
@ -115,7 +119,7 @@ defineExpose({
|
|||
<template>
|
||||
<q-card bordered class="row col-12" v-if="isPermission">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">Workflow</div>
|
||||
<div class="q-pl-sm text-weight-bold text-dark">สถานะการดำเนินเรื่อง</div>
|
||||
<q-space />
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
|
@ -205,16 +209,36 @@ defineExpose({
|
|||
</q-list>
|
||||
</div>
|
||||
|
||||
<div v-if="permission.isOperate && state === index + 1">
|
||||
<div
|
||||
v-if="permission.isOperate && state === index + 1"
|
||||
class="row q-gutter-x-sm"
|
||||
>
|
||||
<q-btn
|
||||
@click.prevent="modalSelectPerson = true"
|
||||
label="ส่งไปผู้บังคับบัญชา/ผู้มีอำนาจ"
|
||||
@click.prevent="
|
||||
(modalSelectPerson = true), (typeSelectPerson = 'operate')
|
||||
"
|
||||
label="ส่งไปผู้บังคับบัญชา"
|
||||
color="public"
|
||||
/>
|
||||
|
||||
<q-btn
|
||||
@click.prevent="
|
||||
(modalSelectPerson = true), (typeSelectPerson = 'sign')
|
||||
"
|
||||
label="ผู้มีอำนาจ"
|
||||
color="public"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="permission.isChangeState && state === index + 1">
|
||||
<q-btn
|
||||
:disable="
|
||||
props.sysName === 'REGISTRY_PROFILE'
|
||||
? state === itemState.length - 1
|
||||
? !isCheckData
|
||||
: false
|
||||
: !isCheckData
|
||||
"
|
||||
@click.prevent="onChangeState"
|
||||
label="ดำเนินการต่อ"
|
||||
color="primary"
|
||||
|
|
@ -231,6 +255,7 @@ defineExpose({
|
|||
v-model:modal="modalSelectPerson"
|
||||
:state-id="stateId"
|
||||
:fetch-data="fetchCheckState"
|
||||
:type="typeSelectPerson"
|
||||
/>
|
||||
|
||||
<DialogApprove
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { onMounted, ref, reactive, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
|
@ -53,6 +53,12 @@ const statusOptionMain = ref<DataOption[]>(
|
|||
);
|
||||
const statusOption = ref<DataOption[]>(statusOptionMain.value); //ตัวเลือกรายการสถานะ
|
||||
|
||||
const isCheckData = computed(() => {
|
||||
if (isReadOnly.value === true) {
|
||||
return true;
|
||||
} else return false;
|
||||
});
|
||||
|
||||
/** function fetch ข้อมูลคำร้องแก้ไข*/
|
||||
async function fetchDataRequest() {
|
||||
showLoader();
|
||||
|
|
@ -447,6 +453,7 @@ onMounted(async () => {
|
|||
|
||||
<div class="col-12">
|
||||
<Workflow
|
||||
v-model:is-check-data="isCheckData"
|
||||
ref="workflowRef"
|
||||
:id="requestId"
|
||||
sys-name="REGISTRY_PROFILE"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { onMounted, ref, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
|
@ -136,10 +136,21 @@ const rowsFileDownload = ref<rowFile[]>([
|
|||
},
|
||||
]);
|
||||
|
||||
/**
|
||||
* ฟังก์ชันดึงข้อมูลรายละเอียดการขอโอนตาม ID ของรายการโอน(transferId)
|
||||
*
|
||||
*/
|
||||
const isCheckData = computed(() => {
|
||||
if (
|
||||
organizationPositionOld.value !== "" &&
|
||||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
organization.value !== "" &&
|
||||
date.value !== null
|
||||
) {
|
||||
return true;
|
||||
} else return false;
|
||||
});
|
||||
|
||||
/** ฟังก์ชันดึงข้อมูลรายละเอียดการขอโอนตาม ID ของรายการโอน(transferId)*/
|
||||
async function getData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -215,9 +226,7 @@ async function fileDownload(no: number, type: string, fileName: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันยืนยันการส่งคำร้องไปยัง สกจ.
|
||||
*/
|
||||
/** ฟังก์ชันยืนยันการส่งคำร้องไปยัง สกจ.*/
|
||||
function confirmMessage() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -241,9 +250,7 @@ function confirmMessage() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันยืนยันการบันทึกการแก้ไขข้อมูล
|
||||
*/
|
||||
/** ฟังก์ชันยืนยันการบันทึกการแก้ไขข้อมูล*/
|
||||
function onSubmit() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
|
|
@ -278,9 +285,7 @@ function onSubmit() {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปิดการแก้ไขข้อมูล
|
||||
*/
|
||||
/** ฟังก์ชันปิดการแก้ไขข้อมูล*/
|
||||
async function cancel() {
|
||||
await getData();
|
||||
edit.value = false;
|
||||
|
|
@ -299,7 +304,6 @@ function getClass(val: boolean) {
|
|||
|
||||
/**
|
||||
* เมื่อ Componets ถูกเรียกใช้งาน
|
||||
*
|
||||
* เช็ต role ผู้ใช่งาน
|
||||
* เรียก getData ดึงข้อมูลรายละเอียดการขอโอน
|
||||
*/
|
||||
|
|
@ -690,6 +694,7 @@ onMounted(async () => {
|
|||
<!-- Workflow -->
|
||||
<WorkFlow
|
||||
ref="workflowRef"
|
||||
v-model:is-check-data="isCheckData"
|
||||
:id="transferId"
|
||||
:sys-name="'PLACEMENT_TRANSFER'"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import axios from "axios";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar, QForm } from "quasar";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -94,6 +94,19 @@ const actionPass = ref<boolean>(false);
|
|||
const reasonReign = ref<string>("");
|
||||
const dateBreak = ref<Date | null>(null);
|
||||
|
||||
const isCheckData = computed(() => {
|
||||
if (
|
||||
organizationPositionOld.value !== "" &&
|
||||
positionTypeOld.value !== "" &&
|
||||
positionLevelOld.value !== "" &&
|
||||
posNo.value !== "" &&
|
||||
salary.value !== 0 &&
|
||||
date.value !== null
|
||||
) {
|
||||
return true;
|
||||
} else return false;
|
||||
});
|
||||
|
||||
/** คอลัมน์ */
|
||||
const rows = ref<TypeFile[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -1284,7 +1297,12 @@ onMounted(async () => {
|
|||
</q-form>
|
||||
</q-card>
|
||||
|
||||
<WorkFlow ref="workflowRef" :id="id" sys-name="RETIREMENT_RESIFNATION" />
|
||||
<WorkFlow
|
||||
ref="workflowRef"
|
||||
v-model:is-check-data="isCheckData"
|
||||
:id="id"
|
||||
sys-name="RETIREMENT_RESIFNATION"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="modal" persistent>
|
||||
|
|
|
|||
|
|
@ -371,10 +371,15 @@ onMounted(() => {
|
|||
<div class="row q-col-gutter-sm items-center q-py-xs">
|
||||
<div>
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="ออกคำสั่ง"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-account-arrow-right"
|
||||
@click.pervent="modalCommand = true"
|
||||
/>
|
||||
>
|
||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<datepicker
|
||||
|
|
|
|||
|
|
@ -373,10 +373,15 @@ onMounted(() => {
|
|||
<div class="row q-col-gutter-sm items-center q-py-xs">
|
||||
<div>
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="ออกคำสั่ง"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="add"
|
||||
icon="mdi-account-arrow-right"
|
||||
@click.pervent="modalCommand = true"
|
||||
/>
|
||||
>
|
||||
<q-tooltip>ส่งไปออกคำสั่ง</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue