Merge branch 'develop' into dev-tee
This commit is contained in:
commit
f02ddcf93a
4 changed files with 1174 additions and 383 deletions
|
|
@ -72,7 +72,7 @@ export default {
|
|||
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
|
||||
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
|
||||
createOrder: () => `${order}/order/detail`,
|
||||
examroundOrder: () => `${order}/order/detail/exam-round`,
|
||||
examroundOrder: (commandCode: string) => `${order}/order/detail/exam-round/${commandCode}`,
|
||||
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
|
||||
personsselectedOrder: (orderId: string) =>
|
||||
`${order}/order/persons-selected/${orderId}`,
|
||||
|
|
@ -150,5 +150,11 @@ export default {
|
|||
otherReport: (id: string) => `${placemenOther}/report/${id}`,
|
||||
otherByid: (id: string) => `${placemenOther}/${id}`,
|
||||
|
||||
userPlacement:(id:string) => `${placement}/user/${id}`
|
||||
userPlacement: (id: string) => `${placement}/user/${id}`,
|
||||
|
||||
// orderForm
|
||||
orderCPM: (type: string) => `${order}/order/${type}/detail`,
|
||||
orderCPMUpdate: (type: string, id: string) => `${order}/order/${type}/detail/${id}`,
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@
|
|||
*/
|
||||
import env from "../index";
|
||||
const reportOrder = `${env.API_REPORT2_URI}/report/order`;
|
||||
const reportRetire = `${env.API_REPORT2_URI}/report/retire`;
|
||||
|
||||
export default {
|
||||
reportOrderCover: (fileType: string, id: string) => `${reportOrder}/cover/${fileType}/${id}`,
|
||||
reportOrderAttachment: (fileType: string, id: string) => `${reportOrder}/attachment/${fileType}/${id}`,
|
||||
reportOrderCover: (fileType: string, id: string) =>
|
||||
`${reportOrder}/cover/${fileType}/${id}`,
|
||||
reportOrderAttachment: (fileType: string, id: string) =>
|
||||
`${reportOrder}/attachment/${fileType}/${id}`,
|
||||
reportRetireList: (fileType: string, id: string) =>
|
||||
`${reportRetire}/${fileType}/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ const { showLoader, hideLoader, messageError, success } = mixin;
|
|||
// const type_params = route.params.type;
|
||||
// const year_params = route.params.year;
|
||||
const retireld_params = route.params.retirementId;
|
||||
|
||||
const orderCoverDocs = ref<string>("");
|
||||
const orderCoverPdf = ref<string>("");
|
||||
const modalNote = ref<boolean>(false);
|
||||
const note = ref<string>("");
|
||||
const retireProfileId = ref<string>("");
|
||||
|
|
@ -149,10 +150,14 @@ const visibleColumns = ref<string[]>([
|
|||
|
||||
const action = ref<string>("");
|
||||
const fileUpload = ref<any>(null);
|
||||
const clickOpenDownloadPDF =() =>{window.open(orderCoverPdf.value);}
|
||||
const clickOpenDownloadDoc =() =>{window.open(orderCoverDocs.value);}
|
||||
|
||||
onMounted(() => {
|
||||
retireld.value = retireld_params.toString();
|
||||
fecthlistprofile(retireld.value);
|
||||
fetchReportCover("pdf", retireld.value);
|
||||
fetchReportCover("docx", retireld.value);
|
||||
});
|
||||
const round = ref<number>();
|
||||
const typeReport = ref<string>("");
|
||||
|
|
@ -320,6 +325,25 @@ const uploadFile = async (event: any) => {
|
|||
});
|
||||
};
|
||||
|
||||
const fetchReportCover = async (type: string, orderId: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportRetireList(type, orderId))
|
||||
.then(async (res) => {
|
||||
if (type == "pdf") {
|
||||
orderCoverPdf.value = res.data.result;
|
||||
} else {
|
||||
orderCoverDocs.value = res.data.result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
// const classrow = (prop: any) => {
|
||||
// if (profileId.value !== "" && prop.profileId === profileId.value) {
|
||||
// return "color: #26a69a;";
|
||||
|
|
@ -374,17 +398,29 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
<q-btn color="primary" flat round icon="download">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="mdi-file-pdf" />
|
||||
</q-item-section>
|
||||
<q-item-section>ไฟล .PDF</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
type="a"
|
||||
@click="clickOpenDownloadPDF"
|
||||
target="_blank"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="mdi-file-excel" />
|
||||
</q-item-section>
|
||||
<q-item-section>ไฟล .xls</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
type="a"
|
||||
@click="clickOpenDownloadDoc"
|
||||
target="_blank"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue