Merge branch 'nice' into develop
This commit is contained in:
commit
b194cb2a25
15 changed files with 24 additions and 2 deletions
|
|
@ -70,6 +70,8 @@ async function getReportRecruit() {
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
async function genReport(data: any) {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ function fetchDataReport() {
|
|||
}
|
||||
isLoadPDF.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
const queryParams = {
|
||||
nodeId:
|
||||
reportType.value.type === "probation" && reportType.value.id === "2"
|
||||
|
|
|
|||
|
|
@ -142,6 +142,8 @@ function fetchDataReport() {
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
async function fetchDocumentTemplate(data: any) {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ async function onUpdateFilter() {
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
async function fetchDocumentTemplate(data: any, type: string = "docx") {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/${type}`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ async function updateLeaveday() {
|
|||
isReport.value = false;
|
||||
isLoadPDF.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
|
||||
//เรียกฟังก์ชัน fetchLeaveday
|
||||
fetchLeaveday(
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ async function updateFilterType(type: string) {
|
|||
isReport.value = false;
|
||||
isLoadPDF.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
switch (type) {
|
||||
case "DAY":
|
||||
body = {
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ function onSelectedNode(id: string, level: number) {
|
|||
async function onUpdateFilter() {
|
||||
isLoadPDF.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
if (nodeId) {
|
||||
const body = {
|
||||
nodeId: nodeId.value,
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ function fetchReport() {
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
function genPDf(data: ResReport) {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
showLoader();
|
||||
axios
|
||||
.post(config.API.reportTemplate + `/docx`, data, {
|
||||
|
|
@ -429,7 +431,7 @@ function onCloseModal() {
|
|||
* function fetch รายชื่อข้อมูลทะเบียนประวัติ
|
||||
*/
|
||||
function fetchListPerson() {
|
||||
rowsPerson.value = []
|
||||
rowsPerson.value = [];
|
||||
showLoader();
|
||||
let queryParams = {
|
||||
page: formFilter.page,
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@ async function fetchDataCommand(type: string) {
|
|||
/** ฟังชั่นกำหนดค่าของ PDF*/
|
||||
async function fetchPDF(data: any, type: string = "docx?folder=command") {
|
||||
isLoadView.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
axios
|
||||
.get(data.downloadUrl, {
|
||||
method: "GET",
|
||||
|
|
@ -155,6 +157,7 @@ watch(
|
|||
} else {
|
||||
tab.value = "main";
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ async function fetchDataCommand(type: string) {
|
|||
/** ฟังชั่นกำหนดค่าของ PDF*/
|
||||
async function fetchPDF(data: any, type: string = "docx?folder=command") {
|
||||
isLoadView.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(config.API.reportTemplate + `/${type}`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ async function fetchPDF(type: string = "docx") {
|
|||
function onClose() {
|
||||
modal.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1
|
||||
}
|
||||
|
||||
watch(modal, () => {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ watch(modal, (val) => {
|
|||
fetchPDF(dataFile.value.downloadUrl, dataFile.value.fileType);
|
||||
} else {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
numOfPages.value = 0;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ async function getReport(list: string) {
|
|||
)?.val;
|
||||
const newReport = listFind === "report2" ? "report2-history" : listFind;
|
||||
pdfSrc.value = undefined;
|
||||
numOfPages.value = 1;
|
||||
page.value = 1;
|
||||
isLoadPDF.value = true;
|
||||
if (newReport) {
|
||||
await http
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ async function getReport() {
|
|||
) {
|
||||
loadingBtn.value = true;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await http
|
||||
.get(
|
||||
config.API.developmentReport() +
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ async function fetchReport() {
|
|||
* @param data ข้อมูลบัญชีวันลา
|
||||
*/
|
||||
async function fetchDocumentTemplate(data: any) {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(`${config.API.reportTemplate}/xlsx`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue