Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop
* 'develop' of github.com:Frappet/bma-ehr-frontend: KPI => รายงาน ออกคำสั่ง => fix bug
This commit is contained in:
commit
0d544bfd3b
5 changed files with 70 additions and 11 deletions
|
|
@ -39,7 +39,7 @@ export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
|||
(DataMainOrigOrder.value = val);
|
||||
|
||||
const DataUpdateOrder = (
|
||||
filter_1: string,
|
||||
filter_1: string | null,
|
||||
filter_2: string,
|
||||
filterYear: number | null
|
||||
) => {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ const fiscalYearFilter = async () => {
|
|||
};
|
||||
|
||||
// รายการข้อมูลประเภทคำสั่ง
|
||||
const OrderType = ref<string>("");
|
||||
const OrderType = ref<string | null>("");
|
||||
const OrderTypeFilter1 = ref<any>([]);
|
||||
const OrderTypeOption = ref<DataOption1[]>([{ id: "", name: "ทั้งหมด" }]);
|
||||
|
||||
|
|
@ -278,6 +278,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
switch (refData) {
|
||||
case "fiscalyearOP":
|
||||
update(() => {
|
||||
fiscalyear.value = null;
|
||||
fiscalyearOP.value = fiscalyearFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -285,6 +286,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
break;
|
||||
case "OrderTypeOption":
|
||||
update(() => {
|
||||
OrderType.value = null;
|
||||
OrderTypeOption.value = OrderTypeFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -292,6 +294,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
break;
|
||||
case "OrderStatusOption":
|
||||
update(() => {
|
||||
OrderStatus.value = "";
|
||||
OrderStatusOption.value = OrderStatusFilter1.value.filter(
|
||||
(v: any) => v.name.indexOf(val) > -1
|
||||
);
|
||||
|
|
@ -342,6 +345,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<q-item-section class="text-grey"> ไม่มีข้อมูล </q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="fiscalyear !== 0" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(fiscalyearOP = fiscalyearFilter1),
|
||||
(fiscalyear = 0),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
<!-- use-input -->
|
||||
<div>
|
||||
|
|
@ -427,6 +441,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="OrderType !== ''" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderTypeOption = OrderTypeFilter1),
|
||||
(OrderType = ''),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
|
|
@ -458,6 +483,17 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="OrderStatus !== 'ทั้งหมด'" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderStatusOption = OrderStatusFilter1),
|
||||
(OrderStatus = 'ทั้งหมด'),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-space />
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export const useOrderStore = defineStore("DisciplineOrder", () => {
|
|||
}
|
||||
|
||||
function filterListOrder(
|
||||
filter_1: string,
|
||||
filter_1: string | null,
|
||||
filter_2: string,
|
||||
filterYear: number | null
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ async function fetchOrderlist() {
|
|||
.get(config.API.listOrder())
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
|
||||
const typeid = OrderTypeOption.value.map((e: DataOption1) => e.id);
|
||||
const filterListOrder = data.filter((e: ResListOrder) =>
|
||||
typeid.includes(e.orderTypeValue)
|
||||
|
|
@ -238,9 +239,7 @@ async function OrderTypeFilter() {
|
|||
|
||||
/** ฟังชั่นฟิลเตอร์ตามค่า ประเภท สถานะ ปี */
|
||||
async function searchFilterTable() {
|
||||
if (OrderType.value) {
|
||||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||
}
|
||||
stroe.filterListOrder(OrderType.value, OrderStatus.value, fiscalyear.value);
|
||||
}
|
||||
|
||||
/** fucnction หาสถานะทั่งหมด*/
|
||||
|
|
@ -373,7 +372,9 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(fiscalyearOP = fiscalyearFilter1), (fiscalyear = 0)
|
||||
(fiscalyearOP = fiscalyearFilter1),
|
||||
(fiscalyear = 0),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
@ -467,7 +468,9 @@ onMounted(async () => {
|
|||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderTypeOption = OrderTypeFilter1), (OrderType = '')
|
||||
(OrderTypeOption = OrderTypeFilter1),
|
||||
(OrderType = ''),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
@ -508,7 +511,8 @@ onMounted(async () => {
|
|||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(OrderStatusOption = OrderStatusFilter1),
|
||||
(OrderStatus = 'ทั้งหมด')
|
||||
(OrderStatus = 'ทั้งหมด'),
|
||||
searchFilterTable()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ const formFilter = reactive({
|
|||
const maxPage = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
|
||||
const roundRef = ref<any>(null);
|
||||
|
||||
const rowsPerson = ref<ResPerson[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
|
|
@ -398,8 +400,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
* function เปิด popup เลือกราชชื่อ
|
||||
*/
|
||||
function onClickModal() {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
if (typeReport.value === "KPI8") {
|
||||
roundRef.value.validate();
|
||||
|
||||
if (!roundRef.value.hasError) {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
}
|
||||
} else {
|
||||
modal.value = true;
|
||||
fetchListPerson();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -592,11 +603,13 @@ onMounted(() => {
|
|||
</template>
|
||||
</datepicker>
|
||||
<q-select
|
||||
ref="roundRef"
|
||||
class="bg-white"
|
||||
v-model="round"
|
||||
outlined
|
||||
label="รอบการประเมิน"
|
||||
dense
|
||||
hide-bottom-space
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="roundOp"
|
||||
|
|
@ -605,6 +618,12 @@ onMounted(() => {
|
|||
map-options
|
||||
:disable="roundOp.length === 0"
|
||||
@update:model-value="changOption(typeReport)"
|
||||
lazy-rules
|
||||
:rules="
|
||||
typeReport === 'KPI8'
|
||||
? [(val) => !!val || 'กรุณาเลือกรอบการประเมิน']
|
||||
: []
|
||||
"
|
||||
/>
|
||||
<q-select
|
||||
v-if="typeReport !== 'KPI8'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue