เพิ่ม api เเก้คำ เพิ่ม ฟิลเตอร์ status

This commit is contained in:
setthawutttty 2023-08-30 14:39:35 +07:00
parent 9ea5056e36
commit 769db85cb1
5 changed files with 49 additions and 50 deletions

View file

@ -157,4 +157,5 @@ export default {
orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`, orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`,
}; };

View file

@ -6,6 +6,7 @@ const reportOrder = `${env.API_REPORT2_URI}/report/order`;
const reportRetire = `${env.API_REPORT2_URI}/report/retire`; const reportRetire = `${env.API_REPORT2_URI}/report/retire`;
const reportProbation = `${env.API_REPORT2_URI}/report/probation`; const reportProbation = `${env.API_REPORT2_URI}/report/probation`;
const reportResign = `${env.API_REPORT2_URI}/report/resign/33`; const reportResign = `${env.API_REPORT2_URI}/report/resign/33`;
const reportTransfer = `${env.API_REPORT2_URI}/report/transfer`;
export default { export default {
reportOrderCover: (fileType: string, id: string, commandCode: string) => reportOrderCover: (fileType: string, id: string, commandCode: string) =>
@ -30,5 +31,8 @@ export default {
reportEvaluate:(type:string, id:string) => `${reportProbation}/16/${type}/${id}`, reportEvaluate:(type:string, id:string) => `${reportProbation}/16/${type}/${id}`,
reportEvaluateChairman:(type:string, id:string) => `${reportProbation}/17/${type}/${id}`, reportEvaluateChairman:(type:string, id:string) => `${reportProbation}/17/${type}/${id}`,
reportEvaluateResult:(type:string, id:string) => `${reportProbation}/18/${type}/${id}`, reportEvaluateResult:(type:string, id:string) => `${reportProbation}/18/${type}/${id}`,
reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}` reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}`,
};
//filetransfer
reportTransferFile:(no:number,type:string,id:string) => `${reportTransfer}/${no}/${type}/${id}`
};

View file

@ -89,7 +89,7 @@ const fecthlistappointment = async () => {
console.log(res); console.log(res);
let response = res.data.result; let response = res.data.result;
listRecevice.value = response; listRecevice.value = response;
// console.log(response); console.log(response);
rows.value = response.map((e: any) => ({ rows.value = response.map((e: any) => ({
personalId: e.id, personalId: e.id,
citizenId: e.citizenId, citizenId: e.citizenId,
@ -112,7 +112,7 @@ const fecthlistappointment = async () => {
birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth), birthday: e.dateOfBirth == null ? "-" : date2Thai(e.dateOfBirth),
})); }));
// console.log(rows.value); // console.log(rows.value);
rows2.value = rows.value.filter((e: any) => e.orgName !== null); rows2.value = rows.value.filter((e: any) => e.orgName !== null && e.status !== 'ส่งรายชื่อไปออกคำสั่ง'&& e.status !== 'ออกคำสั่งเสร็จแล้ว');
}) })
.catch((e) => { .catch((e) => {
console.log(typeof e); console.log(typeof e);

View file

@ -167,10 +167,10 @@
{{ props.row.fileName }} {{ props.row.fileName }}
</q-td> </q-td>
<q-td key="btnMicrosoft" :props="props"> <q-td key="btnMicrosoft" :props="props">
<q-btn flat dense round color="red" icon="picture_as_pdf" @click="filePdf(props.row.id,'pdf')"> <q-btn flat dense round color="red" icon="picture_as_pdf" @click="fileDownload(props.row.no,'pdf')">
<q-tooltip>ไฟล PDF</q-tooltip> <q-tooltip>ไฟล PDF</q-tooltip>
</q-btn> </q-btn>
<q-btn flat dense round color="blue" icon="mdi-file-word" @click="fileDoc(props.row.id,'docx')"> <q-btn flat dense round color="blue" icon="mdi-file-word" @click="fileDownload(props.row.no,'docx')">
<q-tooltip>ไฟล WORD</q-tooltip> <q-tooltip>ไฟล WORD</q-tooltip>
</q-btn> </q-btn>
</q-td> </q-td>
@ -423,8 +423,9 @@ const $q = useQuasar();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const id = ref<string>("")
const dataId = (route.params.id as string);
const dataId = route.params.id;
const { const {
date2Thai, date2Thai,
messageError, messageError,
@ -463,41 +464,34 @@ const responseData = ref<ResponseDataDetail>({
status: "", status: "",
fullname: "", fullname: "",
}); });
const filePdf = (id:number,type:string) =>{ const downloadFile = (response: any, filename: string) => {
const link = document.createElement("a");
} var fileName = filename;
const fileDoc = (id:number,type:string) =>{ link.href = window.URL.createObjectURL(new Blob([response.data]));
link.setAttribute("download", fileName);
} document.body.appendChild(link);
// const downloadFile = (response: any, filename: string) => { link.click();
// const link = document.createElement("a"); document.body.removeChild(link);
// var fileName = filename; };
// link.href = window.URL.createObjectURL(new Blob([response.data])); const fileDownload = async (no:number,type:string) =>{
// link.setAttribute("download", fileName); showLoader();
// document.body.appendChild(link); await http
// link.click(); .get(config.API.reportTransferFile(no,type,id.value), {
// document.body.removeChild(link); responseType: "blob",
// }; })
.then(async (res) => {
// const FileDownload = async (type: string) => { downloadFile(
// showLoader(); res,
// await http `_ครั้งที่.${type}`
// .get(config.API.reportEvaluateRecord1(type, numTab.id), { );
// responseType: "blob", })
// }) .catch((e) => {
// .then(async (res) => { messageError($q, e);
// downloadFile( })
// res, .finally(() => {
// `()_${fullname.value}_.${type}` hideLoader();
// ); });
// }) };
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
// };
const rows = ref<TypeFile[]>([]); const rows = ref<TypeFile[]>([]);
const columns = ref<QTableProps["columns"]>([ const columns = ref<QTableProps["columns"]>([
{ {
@ -538,27 +532,27 @@ onMounted(async () => {
}); });
const rowsFileDownload = ref<any[]>([{ const rowsFileDownload = ref<any[]>([{
id:1, no:1,
fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน", fileName: "คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน",
pathName: "" pathName: ""
},{ },{
id:2, no:2,
fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน", fileName: "หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน",
pathName: "" pathName: ""
},{ },{
id:3, no:3,
fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน", fileName: "หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน",
pathName: "" pathName: ""
},{ },{
id:4, no:4,
fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์", fileName: "หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์",
pathName: "" pathName: ""
},{ },{
id:5, no:5,
fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ", fileName: "หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ",
pathName: "" pathName: ""
},{ },{
id:6, no:6,
fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร", fileName: "หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร",
pathName: "" pathName: ""
}]); }]);
@ -569,7 +563,7 @@ const getData = async () => {
.get(config.API.transferId(dataId.toString())) .get(config.API.transferId(dataId.toString()))
.then((res: any) => { .then((res: any) => {
const data = res.data.result; const data = res.data.result;
// console.log(data); id.value = data.id
let list: TypeFile[] = []; let list: TypeFile[] = [];
if (data.docs.length > 0) { if (data.docs.length > 0) {
data.docs.map((doc: TypeFile) => { data.docs.map((doc: TypeFile) => {

View file

@ -488,7 +488,7 @@ const saveOrder = async () => {
<q-dialog v-model="modal"> <q-dialog v-model="modal">
<q-card style="width: 1200px; max-width: 80vw"> <q-card style="width: 1200px; max-width: 80vw">
<DialogHeader title="ส่งไปออกคำสั่งโอนออก" :close="closeModal" /> <DialogHeader title="ส่งไปออกคำสั่ง" :close="closeModal" />
<q-separator /> <q-separator />
<q-card-section class="q-pt-none"> <q-card-section class="q-pt-none">
<div class="row justify-end"> <div class="row justify-end">