丽知中台报表更新

This commit is contained in:
hyt 2024-11-06 09:19:33 +08:00
parent 6bb1807091
commit 240ae5dd2e
5 changed files with 66 additions and 160 deletions

View File

@ -114,14 +114,14 @@
style=" margin: 5px 5px" style=" margin: 5px 5px"
>查询 >查询
</el-button> </el-button>
<!-- <el-button--> <el-button
<!-- type="primary"--> type="primary"
<!-- @click="downLoad"--> @click="downLoad"
<!-- :loading="loading"--> :loading="loading"
<!-- size="small"--> size="small"
<!-- style=" margin: 5px 5px"--> style=" margin: 5px 5px"
<!-- >excel导出--> >excel导出
<!-- </el-button>--> </el-button>
<el-button <el-button
type="warning" type="warning"
@click="reset" @click="reset"
@ -362,39 +362,21 @@ export default {
}, },
methods: { methods: {
async downLoad() { async downLoad() {
if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
let startDate = new Date(this.queryCriteria.business_date_start)
let endDate = new Date(this.queryCriteria.business_date_end)
let differenceInMillis = endDate - startDate
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24)
// 15
if (!isNaN(differenceInDays) && differenceInDays < 31) {
} else {
this.$vmNews('开始时间和结束时间范围请选择在30天内')
return
}
} else {
this.$vmNews('请选择开始时间和结束时间')
return
}
let params = { let params = {
...this.queryCriteria, ...this.queryCriteria,
...this.pageModel, };
pageSize: 9999,
pageNum: 1
}
this.openLoading('detail') this.openLoading('detail')
const res = await authApi('busidataTocsalesServiceImpl', 'busidataTocsalesServiceImpl', 'queryToCSalesReportExcel', '', 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.attribute)
// console.log(res) // console.log(res)
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) const url = window.URL.createObjectURL(new Blob([response]), {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
const link = document.createElement('a') const link = document.createElement('a');
link.href = url link.href = url;
link.setAttribute('download', 'toc正向流程报表.xlsx') // link.setAttribute('download', 'TOB销售核对表.xlsx'); //
document.body.appendChild(link) document.body.appendChild(link);
link.click() link.click();
} }
return return

View File

@ -115,14 +115,14 @@
style=" margin: 5px 5px" style=" margin: 5px 5px"
>查询 >查询
</el-button> </el-button>
<!-- <el-button--> <el-button
<!-- type="primary"--> type="primary"
<!-- @click="downLoad"--> @click="downLoad"
<!-- :loading="loading"--> :loading="loading"
<!-- size="small"--> size="small"
<!-- style=" margin: 5px 5px"--> style=" margin: 5px 5px"
<!-- >excel导出--> >excel导出
<!-- </el-button>--> </el-button>
<el-button <el-button
type="warning" type="warning"
@click="reset" @click="reset"
@ -368,42 +368,18 @@ export default {
}, },
methods: { methods: {
async downLoad() { async downLoad() {
if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
let startDate = new Date(this.queryCriteria.business_date_start)
let endDate = new Date(this.queryCriteria.business_date_end)
let differenceInMillis = endDate - startDate
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24)
// 15
if (!isNaN(differenceInDays) && differenceInDays < 31) {
} else {
this.$vmNews('开始时间和结束时间范围请选择在30天内')
return
}
} else {
this.$vmNews('请选择开始时间和结束时间')
return
}
let params = { let params = {
...this.queryCriteria, ...this.queryCriteria,
...this.pageModel,
pageSize: 9999,
pageNum: 1
} }
this.openLoading('detail') this.openLoading('detail')
const res = await authApi('busidataTocsalesServiceImpl', 'busidataTocsalesServiceImpl', 'queryToCSalesReportExcel', '', params) const response = 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.attribute) link.href = url
// console.log(res) link.setAttribute('download', 'TOB销售核对报表.xlsx') //
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) 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()
}
return return
}, },
reset() { reset() {
this.pageModel.pageNum = 1 this.pageModel.pageNum = 1

View File

@ -125,14 +125,14 @@
style=" margin: 5px 5px" style=" margin: 5px 5px"
>查询 >查询
</el-button> </el-button>
<!-- <el-button--> <el-button
<!-- type="primary"--> type="primary"
<!-- @click="downLoad"--> @click="downLoad"
<!-- :loading="loading"--> :loading="loading"
<!-- size="small"--> size="small"
<!-- style=" margin: 5px 5px"--> style=" margin: 5px 5px"
<!-- >excel导出--> >excel导出
<!-- </el-button>--> </el-button>
<el-button <el-button
type="warning" type="warning"
@click="reset" @click="reset"
@ -403,21 +403,6 @@ export default {
}, },
methods: { methods: {
async downLoad() { async downLoad() {
if (this.queryCriteria.business_date_start && this.queryCriteria.business_date_end) {
let startDate = new Date(this.queryCriteria.business_date_start)
let endDate = new Date(this.queryCriteria.business_date_end)
let differenceInMillis = endDate - startDate
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24)
// 15
if (!isNaN(differenceInDays) && differenceInDays < 31) {
} else {
this.$vmNews('开始时间和结束时间范围请选择在30天内')
return
}
} else {
this.$vmNews('请选择开始时间和结束时间')
return
}
let params = { let params = {
...this.queryCriteria, ...this.queryCriteria,
...this.pageModel, ...this.pageModel,
@ -425,20 +410,14 @@ export default {
pageNum: 1 pageNum: 1
} }
this.openLoading('detail') this.openLoading('detail')
const res = await authApi('busidataTocsalesServiceImpl', 'busidataTocsalesServiceImpl', 'queryToCSalesReportExcel', '', params) const response = 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.attribute) link.href = url
// console.log(res) link.setAttribute('download', 'TOC退货核对报表.xlsx') //
const url = window.URL.createObjectURL(new Blob([response]), { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) 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()
}
return return
}, },
reset() { reset() {
this.pageModel.pageNum = 1 this.pageModel.pageNum = 1

View File

@ -140,14 +140,14 @@
style="margin: 5px 5px" style="margin: 5px 5px"
>查询 >查询
</el-button> </el-button>
<!-- <el-button--> <el-button
<!-- type="primary"--> type="primary"
<!-- @click="downLoad"--> @click="downLoad"
<!-- :loading="loading"--> :loading="loading"
<!-- size="small"--> size="small"
<!-- style=" margin: 5px 5px"--> style=" margin: 5px 5px"
<!-- >excel导出--> >excel导出
<!-- </el-button>--> </el-button>
<el-button <el-button
type="warning" type="warning"
@click="reset" @click="reset"
@ -401,52 +401,21 @@ export default {
}, },
methods: { methods: {
async downLoad() { async downLoad() {
if (
this.queryCriteria.business_date_start &&
this.queryCriteria.business_date_end
) {
let startDate = new Date(this.queryCriteria.business_date_start);
let endDate = new Date(this.queryCriteria.business_date_end);
let differenceInMillis = endDate - startDate;
let differenceInDays = differenceInMillis / (1000 * 60 * 60 * 24);
// 15
if (!isNaN(differenceInDays) && differenceInDays < 31) {
} else {
this.$vmNews("开始时间和结束时间范围请选择在30天内");
return;
}
} else {
this.$vmNews("请选择开始时间和结束时间");
return;
}
let params = { let params = {
...this.queryCriteria, ...this.queryCriteria,
...this.pageModel, ...this.pageModel,
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
};
this.openLoading("detail");
const res = await authApi(
"busidataTocsalesServiceImpl",
"busidataTocsalesServiceImpl",
"queryToCSalesReportExcel",
"",
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 link = document.createElement("a");
link.href = url;
link.setAttribute("download", "toc正向流程报表.xlsx"); //
document.body.appendChild(link);
link.click();
} }
return; 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()
return
}, },
reset() { reset() {
this.pageModel.pageNum = 1; this.pageModel.pageNum = 1;

View File

@ -40,7 +40,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://hzya.ufyct.com:9067/`, // target: `http://hzya.ufyct.com:9067/`,
target: `http://ufidahz.com.cn:9067/`, // target: `http://ufidahz.com.cn:9067/`,
// target: `http://127.0.0.1:9081/`, // target: `http://127.0.0.1:9081/`,
// target: `http://192.168.2.78:9999`, // target: `http://192.168.2.78:9999`,
// target: `http://192.168.2.85:9999`, // target: `http://192.168.2.85:9999`,
@ -48,7 +48,7 @@ module.exports = {
// target: `http://192.168.2.78:10086`, // target: `http://192.168.2.78:10086`,
// target: `http://192.168.2.185:10086`, // target: `http://192.168.2.185:10086`,
// target: `http://192.168.2.83:9999`, // target: `http://192.168.2.83:9999`,
// target:'http://39.170.109.90:8081/', target:'http://39.170.109.90:8081/',
// target:'http://192.168.2.75:1024/', // target:'http://192.168.2.75:1024/',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {