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