แก้ตาม issue
This commit is contained in:
parent
c38990f6ed
commit
0295ec3e5f
5 changed files with 124 additions and 102 deletions
|
|
@ -30,6 +30,7 @@ const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const checkStatusResult = ref<boolean>(false);
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineInvestigatefactsDetail"
|
||||
);
|
||||
|
|
@ -184,6 +185,8 @@ async function getData() {
|
|||
data.disciplineInvestigateRelevantDocs =
|
||||
dataList.disciplineInvestigateRelevantDocs;
|
||||
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||
checkStatusResult.value =
|
||||
dataList.investigationStatusResult == "NO_CAUSE" ? true : false;
|
||||
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||
data.isDisciplinary = dataList.isDisciplinary;
|
||||
|
|
@ -375,7 +378,7 @@ onMounted(async () => {
|
|||
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
v-if="data.status === 'NEW'"
|
||||
v-if="data.status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปสอบสวน"
|
||||
color="public"
|
||||
@click="sentInvestigate"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const store = useInvestigateDisStore();
|
|||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const checkStatusResult = ref<boolean>(false);
|
||||
const isSaveInfo = ref<boolean>(false);
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
|
|
@ -127,9 +128,16 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryByGetId(id.value,mainStore.pathDiscip(route.name as string)))
|
||||
.get(
|
||||
config.API.disciplineDisciplinaryByGetId(
|
||||
id.value,
|
||||
mainStore.pathDiscip(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
data.value = res.data.result;
|
||||
checkStatusResult.value =
|
||||
res.data.result.disciplinaryStatusResult == "NO_CAUSE" ? true : false;
|
||||
status.value = res.data.result.status;
|
||||
idComplaint.value = res.data.result.idComplaint;
|
||||
idInvestigate.value = res.data.result.idInvestigate;
|
||||
|
|
@ -146,7 +154,12 @@ async function fetchDetailDisciplinary() {
|
|||
async function fetchDetailInvestigate() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.investigateByGetId(idInvestigate.value,mainStore.pathInves(route.name as string)))
|
||||
.get(
|
||||
config.API.investigateByGetId(
|
||||
idInvestigate.value,
|
||||
mainStore.pathInves(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataInvestigatefacts.id = dataList.id;
|
||||
|
|
@ -191,7 +204,12 @@ async function fetchDetailInvestigate() {
|
|||
async function fetchDetailComplaints() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.complaintbyGetId(idComplaint.value,mainStore.pathComplaints(route.name as string)))
|
||||
.get(
|
||||
config.API.complaintbyGetId(
|
||||
idComplaint.value,
|
||||
mainStore.pathComplaints(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataComplaints.id = dataList.id;
|
||||
|
|
@ -227,7 +245,7 @@ async function fetchDetailComplaints() {
|
|||
* @param data ข้อมูล ใน form
|
||||
*/
|
||||
async function onSubmitDisciplinary(data: any) {
|
||||
console.log("🚀 ~ onSubmitDisciplinary ~ data:", data)
|
||||
console.log("🚀 ~ onSubmitDisciplinary ~ data:", data);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
||||
|
|
@ -345,8 +363,8 @@ function emitPerson(data: PersonsArray[]) {
|
|||
.put(config.API.disciplinarySuspend(id.value), {
|
||||
persons: dataMapId,
|
||||
})
|
||||
.then(async(res) => {
|
||||
modalPopup.value = false
|
||||
.then(async (res) => {
|
||||
modalPopup.value = false;
|
||||
success($q, "ส่งไปพักราชการสำเร็จ");
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
await fetchDetailDisciplinary();
|
||||
|
|
@ -407,14 +425,14 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
v-if="status === 'NEW'"
|
||||
v-if="status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปสรุปผลการพิจารณา"
|
||||
color="public"
|
||||
@click="sentIssueGate"
|
||||
:disable="isSaveInfo"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="status === 'NEW'"
|
||||
v-if="status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปพักราชการ"
|
||||
color="primary"
|
||||
@click="sentIssue"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue