Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-08 14:53:21 +07:00
commit d99577d99f
3 changed files with 29 additions and 18 deletions

View file

@ -314,6 +314,7 @@ function onSubmit() {
http
.put(config.API.developmentMainTab("tab3", projectId.value), {
...formData,
totalDate: formData.totalDate === "" ? null : formData.totalDate,
reasonPlanned70: reasonPlanned70.value,
reasonPlanned20: reasonPlanned20.value,
reasonPlanned10: reasonPlanned10.value,
@ -376,14 +377,11 @@ const filterSelector = (val: string, update: Function) => {
});
};
watch(
() => [formData.dateStart, formData.dateEnd],
() => {
if (formData.dateStart && formData.dateEnd) {
formData.totalDate = diffDay(formData.dateStart, formData.dateEnd);
}
function updatetotalDate() {
if (formData.dateStart && formData.dateEnd) {
formData.totalDate = diffDay(formData.dateStart, formData.dateEnd);
}
);
}
/**
* function ไปย Tab อไป
@ -586,7 +584,9 @@ defineExpose({
:enableTimePicker="false"
week-start="0"
:max-date="formData.dateEnd"
@update:model-value="props.onCheckChangeData()"
@update:model-value="
props.onCheckChangeData(), updatetotalDate()
"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
@ -628,7 +628,9 @@ defineExpose({
:enableTimePicker="false"
week-start="0"
:min-date="formData.dateStart"
@update:model-value="props.onCheckChangeData()"
@update:model-value="
props.onCheckChangeData(), updatetotalDate()
"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{

View file

@ -89,7 +89,7 @@ interface FormProjectDetail {
strategyChildActualNode: number | null; //node ยุทธศาสตร์เป้าหมายตามจริง
dateStart: Date | null; //วันที่เริ่มต้น
dateEnd: Date | null; //วันที่สิ้นสุด
totalDate: number | null; //รวมระยะเวลา (วัน)
totalDate: number | null | string; //รวมระยะเวลา (วัน)
developmentAddresss: [{ address: string; provinceId: string }]; //ที่อยู่ ,จังหวัด
}

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, onMounted, reactive, watch } from "vue";
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
import http from "@/plugins/http";
import config from "@/app.config";
@ -27,7 +28,9 @@ const nodeTree = ref<DataTree[]>([]);
const posmasterId = ref<string>("");
const isAll = ref<boolean>(false);
/** function เรียกข้อมูลโครงสร้าง แบบปัจุบัน*/
/**
* function เรยกขอมลโครงสราง แบบป
*/
function fetchOrganizationActive() {
showLoader();
http
@ -140,7 +143,9 @@ const columns = ref<QTableProps["columns"]>([
]);
const keyword = ref<string>("");
/** function fetch รายชื่อ*/
/**
* function fetch รายช
*/
function fetchPosMaster() {
showLoader();
http
@ -185,11 +190,13 @@ function selectPosition(data: ListPerson) {
});
}
/** รายชื่อคนรักษาการ*/
/********** รายชื่อคนรักษาการ **************/
const rowListPerson = ref<ListPerson[]>([]);
const keywordAct = ref<string>("");
/** function fetch รายชื่อรักษาการ */
/**
* function fetch รายชอรกษาการ
*/
function fetchListAct() {
showLoader();
http
@ -304,8 +311,11 @@ onMounted(() => {
<template v-slot:default-body="prop">
<div v-if="prop.node.posMaster">
<q-list dense v-for="col in prop.node.posMaster">
{{ checkPermission($route)?.attrIsGet }}
<q-item
clickable
:clickable="
checkPermission($route)?.attrIsGet ? false : true
"
:active="posmasterId == col.posmasterId"
:class="posmasterId !== col.posmasterId ? 'text-info' : ''"
active-class="my-list-link text-primary text-weight-medium"
@ -479,7 +489,7 @@ onMounted(() => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td auto-width v-if="rowListPerson.length !== 1">
<q-btn
dense
@ -539,7 +549,6 @@ onMounted(() => {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<!-- <template v-slot:pagination="scope">