ผูก API ประวัติออกคำสั่ง
This commit is contained in:
parent
c1cf17bf14
commit
63d7f8c1d2
3 changed files with 39 additions and 90 deletions
|
|
@ -93,6 +93,7 @@ export default {
|
||||||
`${order}/order/attachment/file/${orderId}`,
|
`${order}/order/attachment/file/${orderId}`,
|
||||||
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
orderReady: (id: string) => `${order}/order/ready/${id}`,
|
||||||
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
|
||||||
|
searchOrderprofile: () => `${order}/order/search/profile/command`,
|
||||||
|
|
||||||
//receive ระบบรับโอน
|
//receive ระบบรับโอน
|
||||||
receiveData: () => `${receive}`,
|
receiveData: () => `${receive}`,
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
class="col-12 q-my-md q-mt-sm rounded-borders"
|
class="col-12 q-my-md q-mt-sm rounded-borders"
|
||||||
v-if="loadView == tr"
|
v-if="loadView == true"
|
||||||
>
|
>
|
||||||
<q-tabs
|
<q-tabs
|
||||||
dense
|
dense
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,11 @@ const props = defineProps({
|
||||||
const OrderTypeOption = ref<any>([]);
|
const OrderTypeOption = ref<any>([]);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const employeeClass = ref<string>("");
|
const employeeClass = ref<string>("");
|
||||||
const typeKeyword = ref<string>("");
|
|
||||||
const Keyword = ref<string>("");
|
|
||||||
const positionKeyword = ref<string>("");
|
|
||||||
|
|
||||||
const reportType = ref<string>("");
|
const reportType = ref<string>("");
|
||||||
const reportYear = ref<number | null>();
|
const reportYear = ref<number | null>();
|
||||||
const reportNo = ref<string>("");
|
const reportNo = ref<string>("");
|
||||||
|
|
||||||
const positionOps = ref<DataOption[]>([]);
|
|
||||||
const columns = ref<any["columns"]>([
|
const columns = ref<any["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -85,100 +81,52 @@ const clickOpenpopup = () => {
|
||||||
let currentDate = new Date();
|
let currentDate = new Date();
|
||||||
let currentYear = currentDate.getFullYear();
|
let currentYear = currentDate.getFullYear();
|
||||||
reportYear.value = currentYear;
|
reportYear.value = currentYear;
|
||||||
|
rows.value = [];
|
||||||
|
reportNo.value = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const clickSearch = async () => {
|
||||||
// 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) => {
|
|
||||||
await myForm.value!.validate().then((result: boolean) => {
|
await myForm.value!.validate().then((result: boolean) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
console.log(reportType.value);
|
let body = {
|
||||||
console.log(reportYear.value);
|
commandTypeId: reportType.value,
|
||||||
console.log(reportNo.value);
|
year: reportYear.value,
|
||||||
// showLoader();
|
posno: reportNo.value,
|
||||||
// let body = {};
|
};
|
||||||
// if (typeKeyword.value === "no") {
|
// console.log(body);
|
||||||
// Object.assign(body, {
|
showLoader();
|
||||||
// posNo: Keyword.value,
|
http
|
||||||
// });
|
.post(config.API.searchOrderprofile(), body)
|
||||||
// } else if (typeKeyword.value === "position") {
|
.then((res) => {
|
||||||
// Object.assign(body, {
|
let data = res.data.result;
|
||||||
// positionId: positionKeyword.value,
|
console.log(data);
|
||||||
// });
|
|
||||||
// }
|
if (data.length !== 0) {
|
||||||
// http
|
rows.value = data.map((e: any) => ({
|
||||||
// .post(config.API.profileHistory(type), body)
|
id: e.id,
|
||||||
// .then((res) => {
|
citizenId: e.citizenId,
|
||||||
// let data = res.data.result;
|
name: e.fullName,
|
||||||
// if (data.length !== 0) {
|
posNo: e.posNo,
|
||||||
// rows.value = data.map((e: any) => ({
|
position: e.position,
|
||||||
// id: e.id,
|
}));
|
||||||
// citizenId: e.citizenId,
|
} else {
|
||||||
// name: e.firstName + " " + e.lastName,
|
notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
|
||||||
// posNo: e.posNo,
|
rows.value = [];
|
||||||
// position: e.position,
|
}
|
||||||
// date: date2Thai(e.date),
|
})
|
||||||
// }));
|
.catch((err) => {
|
||||||
// } else {
|
messageError($q, err);
|
||||||
// notifyError($q, "ไม่มีข้อมูลที่ต้องการค้นหา");
|
rows.value = [];
|
||||||
// rows.value = [];
|
})
|
||||||
// }
|
.finally(() => {
|
||||||
// })
|
hideLoader();
|
||||||
// .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) => {
|
const clickRedirect = (id: string) => {
|
||||||
router.push(`/registry/${id}`);
|
router.push(`/registry/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "citizenId",
|
sortBy: "citizenId",
|
||||||
|
|
@ -302,7 +250,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
icon="mdi-magnify"
|
icon="mdi-magnify"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
class="q-px-md"
|
class="q-px-md"
|
||||||
@click="clickSearch(employeeClass)"
|
@click="clickSearch"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue