Merge branch 'develop' into dev-tee
This commit is contained in:
commit
13f50ee5f1
5 changed files with 83 additions and 130 deletions
|
|
@ -1330,7 +1330,7 @@ const putformData = () => {
|
|||
<div class="row col-12 q-gutter-lg no-margin justify-center">
|
||||
<div class="col-xs-12 col-sm-11">
|
||||
<div class="col-12 text-top2 row items-center">
|
||||
ผู้บังคับบัญชาผู้มอบหมายงาน {{ commander.name }}
|
||||
ผู้บังคับบัญชาผู้มอบหมายงาน
|
||||
</div>
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<q-select
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ const fecthRound = async () => {
|
|||
.then(async (res) => {
|
||||
let data = res.data.result;
|
||||
if (data.length !== 0) {
|
||||
await fecthInsigniaType();
|
||||
selectRoundAllOption.value = [
|
||||
{
|
||||
name: "ทั้งหมด",
|
||||
|
|
@ -63,6 +62,9 @@ const fecthRound = async () => {
|
|||
selectRound.value = data[0].id;
|
||||
yearRound.value = data[0].year;
|
||||
roundYear.value = data[0].year;
|
||||
if (roundYear.value !== "") {
|
||||
await fecthInsigniaType();
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -381,7 +383,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
flat
|
||||
bordered
|
||||
class="col-12 q-my-md q-mt-sm rounded-borders"
|
||||
v-if="loadView == tr"
|
||||
v-if="loadView == true"
|
||||
>
|
||||
<q-tabs
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<div class="row q-col-gutter-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
class="col-xs-12 col-sm-3 col-md-"
|
||||
v-model="fiscalyear"
|
||||
label="ปีงบประมาณ"
|
||||
dense
|
||||
|
|
@ -404,44 +404,46 @@ const paginationLabel = (start: string, end: string, total: string) => {
|
|||
<div class="col-12">
|
||||
<q-card bordered class="col-12 filter-card q-pa-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
v-model="OrderType"
|
||||
label="ประเภท"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="OrderTypeOption"
|
||||
option-value="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
v-model="OrderStatus"
|
||||
label="สถานะ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="OrderStatusOption"
|
||||
option-value="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||
<q-select
|
||||
v-model="OrderType"
|
||||
label="ประเภท"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="OrderTypeOption"
|
||||
option-value="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||
<q-select
|
||||
v-model="OrderStatus"
|
||||
label="สถานะ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="OrderStatusOption"
|
||||
option-value="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
@update:model-value="searchFilterTable"
|
||||
/>
|
||||
</div>
|
||||
<q-space />
|
||||
<PopupHistory :OrderTypeOption="OrderTypeOption" />
|
||||
<div><PopupHistory :OrderTypeOption="OrderTypeOption" /></div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,15 +21,11 @@ const props = defineProps({
|
|||
const OrderTypeOption = ref<any>([]);
|
||||
const modal = ref<boolean>(false);
|
||||
const employeeClass = ref<string>("");
|
||||
const typeKeyword = ref<string>("");
|
||||
const Keyword = ref<string>("");
|
||||
const positionKeyword = ref<string>("");
|
||||
|
||||
const reportType = ref<string>("");
|
||||
const reportYear = ref<number | null>();
|
||||
const reportNo = ref<string>("");
|
||||
|
||||
const positionOps = ref<DataOption[]>([]);
|
||||
const columns = ref<any["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -85,100 +81,52 @@ const clickOpenpopup = () => {
|
|||
let currentDate = new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
reportYear.value = currentYear;
|
||||
rows.value = [];
|
||||
reportNo.value = "";
|
||||
}
|
||||
};
|
||||
|
||||
// const fecthPositionOfficer = async () => {
|
||||
// await http
|
||||
// .get(config.API.listPositionPathHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result.items;
|
||||
// console.log(data);
|
||||
// positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
|
||||
// options.value = positionOps.value;
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// });
|
||||
// };
|
||||
// const fetchPositionPerm = async () => {
|
||||
// await http
|
||||
// .get(config.API.listPositionEmployeePositionHistory)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result.items;
|
||||
// positionOps.value = data.map((e: any) => ({ id: e.id, name: e.name }));
|
||||
// options.value = positionOps.value;
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// });
|
||||
// };
|
||||
|
||||
const clickSearch = async (type: string) => {
|
||||
const clickSearch = async () => {
|
||||
await myForm.value!.validate().then((result: boolean) => {
|
||||
if (result) {
|
||||
console.log(reportType.value);
|
||||
console.log(reportYear.value);
|
||||
console.log(reportNo.value);
|
||||
// showLoader();
|
||||
// let body = {};
|
||||
// if (typeKeyword.value === "no") {
|
||||
// Object.assign(body, {
|
||||
// posNo: Keyword.value,
|
||||
// });
|
||||
// } else if (typeKeyword.value === "position") {
|
||||
// Object.assign(body, {
|
||||
// positionId: positionKeyword.value,
|
||||
// });
|
||||
// }
|
||||
// http
|
||||
// .post(config.API.profileHistory(type), body)
|
||||
// .then((res) => {
|
||||
// let data = res.data.result;
|
||||
// if (data.length !== 0) {
|
||||
// rows.value = data.map((e: any) => ({
|
||||
// id: e.id,
|
||||
// citizenId: e.citizenId,
|
||||
// name: e.firstName + " " + e.lastName,
|
||||
// posNo: e.posNo,
|
||||
// position: e.position,
|
||||
// date: date2Thai(e.date),
|
||||
// }));
|
||||
// } else {
|
||||
// notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
|
||||
// rows.value = [];
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// rows.value = [];
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
let body = {
|
||||
commandTypeId: reportType.value,
|
||||
year: reportYear.value,
|
||||
posno: reportNo.value,
|
||||
};
|
||||
// console.log(body);
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.searchOrderprofile(), body)
|
||||
.then((res) => {
|
||||
let data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
if (data.length !== 0) {
|
||||
rows.value = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
citizenId: e.citizenId,
|
||||
name: e.fullName,
|
||||
posNo: e.posNo,
|
||||
position: e.position,
|
||||
}));
|
||||
} else {
|
||||
notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
|
||||
rows.value = [];
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
rows.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
// const options = ref<any>([]);
|
||||
// const filterFn = (val: string, update: any) => {
|
||||
// if (val === "") {
|
||||
// update(() => {
|
||||
// options.value = OrderTypeOption.value;
|
||||
// });
|
||||
// return;
|
||||
// } else {
|
||||
// update(() => {
|
||||
// options.value = OrderTypeOption.value.filter(
|
||||
// (e: any) => e.name.search(val) !== -1
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
// console.log(options.value);
|
||||
// };
|
||||
const clickRedirect = (id: string) => {
|
||||
router.push(`/registry/${id}`);
|
||||
};
|
||||
|
||||
const paging = ref<boolean>(true);
|
||||
const pagination = ref({
|
||||
sortBy: "citizenId",
|
||||
|
|
@ -302,7 +250,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
icon="mdi-magnify"
|
||||
label="ค้นหา"
|
||||
class="q-px-md"
|
||||
@click="clickSearch(employeeClass)"
|
||||
@click="clickSearch"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue