丽知中台报表更新
This commit is contained in:
parent
240ae5dd2e
commit
ad7189b2b7
|
@ -1,12 +1,12 @@
|
|||
import request from "@/utils/request";
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function authApi(tl,as,dj,url = '',data){
|
||||
export function authApi(tl, as, dj, url = '', data) {
|
||||
return request({
|
||||
url: 'kangarooDataCenterV3/entranceController/option' + url,
|
||||
headers: {
|
||||
tl:tl,
|
||||
as:as,
|
||||
dj:dj,
|
||||
tl: tl,
|
||||
as: as,
|
||||
dj: dj
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
|
@ -16,85 +16,100 @@ export function authApi(tl,as,dj,url = '',data){
|
|||
//登录
|
||||
export function loginToken(data) {
|
||||
return request({
|
||||
url: "/Api/Token/CreateToken",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
url: '/Api/Token/CreateToken',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function downFilesBasedFileNameFileTypeAPI(data) {
|
||||
return request({
|
||||
url: `/kangarooDataCenterV3/entranceController/option/downFilesBasedFileNameFileType?filename=${data}`,
|
||||
method: 'get',
|
||||
responseType: 'blob' // 设置返回类型为 blob
|
||||
})
|
||||
}
|
||||
|
||||
//token认证
|
||||
export function CheckToken(data) {
|
||||
return request({
|
||||
url: "Api/Base/CheckToken",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
url: 'Api/Base/CheckToken',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//组织机构列表
|
||||
export function GetOrganTree(data) {
|
||||
return request({
|
||||
url: "OrganManage/GetOrganTree",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
url: 'OrganManage/GetOrganTree',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//上传文件管理器
|
||||
export function UploadFiles(data, onUploadProgress) {
|
||||
return request({
|
||||
url: "/Api/Attachments/UploadToMinio",
|
||||
method: "post",
|
||||
url: '/Api/Attachments/UploadToMinio',
|
||||
method: 'post',
|
||||
data,
|
||||
onUploadProgress,
|
||||
});
|
||||
onUploadProgress
|
||||
})
|
||||
}
|
||||
|
||||
//上传服务器本地
|
||||
export function UploadFilesLocal(data, onUploadProgress) {
|
||||
return request({
|
||||
url: "/api/Attachments/UploadFiles",
|
||||
method: "post",
|
||||
url: '/api/Attachments/UploadFiles',
|
||||
method: 'post',
|
||||
data,
|
||||
onUploadProgress,
|
||||
});
|
||||
onUploadProgress
|
||||
})
|
||||
}
|
||||
|
||||
// 上传列表
|
||||
export function UploadList(data, onUploadProgress) {
|
||||
return request({
|
||||
url: "/api/Attachments/GetFileList",
|
||||
method: "post",
|
||||
url: '/api/Attachments/GetFileList',
|
||||
method: 'post',
|
||||
data,
|
||||
onUploadProgress,
|
||||
});
|
||||
onUploadProgress
|
||||
})
|
||||
}
|
||||
|
||||
export function DownloadFiles(data) {
|
||||
return request({
|
||||
url: "/Api/Attachments/DownloadFiles",
|
||||
method: "post",
|
||||
url: '/Api/Attachments/DownloadFiles',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: "blob",
|
||||
});
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 查看
|
||||
export function downloadFromMinio(data) {
|
||||
return request({
|
||||
url: "/api/Attachments/DownloadFromMinio",
|
||||
method: "post",
|
||||
url: '/api/Attachments/DownloadFromMinio',
|
||||
method: 'post',
|
||||
data,
|
||||
responseType: "blob",
|
||||
});
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
//获取token
|
||||
export function getToken(data) {
|
||||
return request({
|
||||
url: "/Api/Token/CreateToken",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
url: '/Api/Token/CreateToken',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function commonFun(url, data) {
|
||||
return request({
|
||||
url: url,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -363,20 +363,21 @@ export default {
|
|||
methods: {
|
||||
async downLoad() {
|
||||
let params = {
|
||||
...this.queryCriteria,
|
||||
};
|
||||
...this.queryCriteria
|
||||
}
|
||||
this.openLoading('detail')
|
||||
const res = await authApi("tocofsSaleoutServiceImplReport", "tocofsSaleoutServiceImplReport", "exportToCSalesReportExcel", "", params);
|
||||
const res = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCSalesReportExcel', '', params)
|
||||
|
||||
if (res.status == 200) {
|
||||
const response = await downFilesBasedFileNameFileTypeAPI(res.attribute)
|
||||
// console.log(res)
|
||||
const url = window.URL.createObjectURL(new Blob([response]), {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
|
||||
const response = await downFilesBasedFileNameFileTypeAPI(res.msg)
|
||||
const blob = new Blob([response]);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', 'TOB销售核对表.xlsx'); // 设置下载的文件名
|
||||
link.setAttribute('download', 'TOB销售核对表.xlsx');
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
window.URL.revokeObjectURL(url); // 释放内存
|
||||
}
|
||||
return
|
||||
|
||||
|
|
|
@ -369,17 +369,24 @@ export default {
|
|||
methods: {
|
||||
async downLoad() {
|
||||
let params = {
|
||||
...this.queryCriteria,
|
||||
...this.queryCriteria
|
||||
}
|
||||
this.openLoading('detail')
|
||||
const response = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCSalesReportExcel', '', params)
|
||||
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', 'TOB销售核对报表.xlsx') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
const res = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCReturnReportExcel', '', params)
|
||||
|
||||
if (res.status == 200) {
|
||||
const response = await downFilesBasedFileNameFileTypeAPI(res.msg)
|
||||
const blob = new Blob([response]);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', 'TOB退货核对表.xlsx');
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
window.URL.revokeObjectURL(url); // 释放内存
|
||||
}
|
||||
return
|
||||
|
||||
},
|
||||
reset() {
|
||||
this.pageModel.pageNum = 1
|
||||
|
|
|
@ -404,20 +404,23 @@ export default {
|
|||
methods: {
|
||||
async downLoad() {
|
||||
let params = {
|
||||
...this.queryCriteria,
|
||||
...this.pageModel,
|
||||
pageSize: 9999,
|
||||
pageNum: 1
|
||||
...this.queryCriteria
|
||||
}
|
||||
this.openLoading('detail')
|
||||
const response = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCReturnReportExcel', '', params)
|
||||
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', 'TOC退货核对报表.xlsx') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
const res = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCSalesReportExcel', '', params)
|
||||
if (res.status == 200) {
|
||||
const response = await downFilesBasedFileNameFileTypeAPI(res.msg)
|
||||
const blob = new Blob([response]);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', 'TOC销售核对表.xlsx');
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
window.URL.revokeObjectURL(url); // 释放内存
|
||||
}
|
||||
return
|
||||
|
||||
},
|
||||
reset() {
|
||||
this.pageModel.pageNum = 1
|
||||
|
|
|
@ -402,20 +402,23 @@ export default {
|
|||
methods: {
|
||||
async downLoad() {
|
||||
let params = {
|
||||
...this.queryCriteria,
|
||||
...this.pageModel,
|
||||
pageSize: 9999,
|
||||
pageNum: 1
|
||||
...this.queryCriteria
|
||||
}
|
||||
this.openLoading('detail')
|
||||
const response = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCSalesReportExcel', '', params)
|
||||
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.setAttribute('download', 'TOC销售核对报表.xlsx') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
const res = await authApi('tocofsSaleoutServiceImplReport', 'tocofsSaleoutServiceImplReport', 'exportToCReturnReportExcel', '', params)
|
||||
if (res.status == 200) {
|
||||
const response = await downFilesBasedFileNameFileTypeAPI(res.msg)
|
||||
const blob = new Blob([response]);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.setAttribute('download', 'TOC退货核对表.xlsx');
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
window.URL.revokeObjectURL(url); // 释放内存
|
||||
}
|
||||
return
|
||||
|
||||
},
|
||||
reset() {
|
||||
this.pageModel.pageNum = 1;
|
||||
|
|
Loading…
Reference in New Issue