Commit d8b525df authored by dragondean@qq.com's avatar dragondean@qq.com

下载,异常异步导出,空运出货去掉已装单

parent 1d9e0680
......@@ -112,7 +112,7 @@ export function getBmpDetailByBusinessId(businessId) {
// 导出订单异常 Excel
export function exportExcel(params) {
return request({
url: '/ecw/order-exception/export-excel',
url: '/ecw/order-exception/export-excel-async',
method: 'get',
timeout: 30*60*1000,
params,
......
......@@ -21,3 +21,17 @@ export function download(id){
export function downloadFileResponse(url){
return axios.get(url, {responseType: 'blob'})
}
// 重试
export function retry(id){
return request({
url: '/system/download-log/retry/' + id
})
}
// 删除
export function deleteLog(id){
return request({
url: '/system/download-log/del/' + id
})
}
......@@ -302,7 +302,7 @@ export default {
// 下载
downloadList: [
{ title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList", hasPermi: "shipment:box:download:downloadPreloadGoodsList" },
{ title: this.$t("已装单"), serviceName: "downloadLoadGoodsList", hasPermi: "shipment:box:download:downloadLoadGoodsList" },
// { title: this.$t("已装单"), serviceName: "downloadLoadGoodsList", hasPermi: "shipment:box:download:downloadLoadGoodsList" },
{ title: this.$t("应收汇总表"), serviceName: "downloadReceivableList", hasPermi: "shipment:box:download:downloadReceivableList" },
{
title: this.$t("提货单"),
......
......@@ -402,19 +402,9 @@ export default {
return tag
},
exportSearch(){
this.exportExcel(exportExcel, this.queryParams, this.$t('异常订单'))
},
// 通用导出函数
exportExcel(func, params, fileName = null){
this.exportLoading = true;
func(params).then(res => {
if(!fileName){
fileName = this.$t('订单')
}
this.$download.excel(res, fileName + '.xls');
}).finally(() => {
this.exportLoading = false
})
exportExcel(this.queryParams).then(res => {
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
},
}
}
......
......@@ -42,7 +42,11 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope" >
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDownload(scope.row)"
v-hasPermi="['system:notice:update']">{{$t('下载')}}</el-button>
v-hasPermi="['system:notice:update']" v-if="scope.row.status == 2">{{$t('下载')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleRetry(scope.row)"
v-hasPermi="['system:notice:update']" v-if="scope.row.status == 3">{{$t('重试')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDel(scope.row)"
v-hasPermi="['system:notice:update']">{{$t('删除')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -54,13 +58,11 @@
</template>
<script>
import {download, downloadFileArrayBuffer, downloadFileResponse, downloadPage} from "@/api/system/download";
import {deleteLog, download, downloadFileResponse, downloadPage, retry} from "@/api/system/download";
import {parseTime} from "../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
export default {
name: "Download",
components: {Template},
data() {
return {
// 遮罩层
......@@ -103,7 +105,18 @@ export default {
this.loading = false;
})
},
handleRetry(row){
retry(row.id).then(res => {
this.$message.success('重试已提交')
this.getList()
})
},
handleDel(row){
deleteLog(row.id).then(res => {
this.$message.success('删除成功')
this.getList()
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment