liuchen864
6 months ago
4 changed files with 78 additions and 1 deletions
@ -0,0 +1,10 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 导出客户账单中的订单
|
|||
export function exportOut(data) { |
|||
return request({ |
|||
url: '/excel/export/', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
@ -0,0 +1,62 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px"> |
|||
<el-form-item label="订单号" prop="orderNo"> |
|||
<el-input |
|||
v-model="queryParams.orderNo" |
|||
placeholder="请输入订单号" |
|||
clearable |
|||
@keyup.enter="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" icon="Search" @click="handleExport('changchun')">导出长春</el-button> |
|||
<el-button type="primary" icon="Search" @click="handleExport('foshan')">导出佛山青岛</el-button> |
|||
<el-button type="primary" icon="Search" @click="handleExport('guowai')">导出国外</el-button> |
|||
<el-button type="info" plain icon="Refresh" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup name="Excel"> |
|||
import { exportOut } from "@/api/excel"; |
|||
const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/profile/upload"); |
|||
|
|||
const { proxy } = getCurrentInstance(); |
|||
|
|||
const linuxAccessList = ref([]); |
|||
const loading = ref(true); |
|||
|
|||
const data = reactive({ |
|||
queryParams: { |
|||
orderNo: null, |
|||
type: 'changchun' |
|||
}, |
|||
}); |
|||
|
|||
const { queryParams } = toRefs(data); |
|||
|
|||
/** 搜索按钮操作 */ |
|||
function handleQuery() { |
|||
handleExport(); |
|||
} |
|||
|
|||
/** 重置按钮操作 */ |
|||
function resetQuery() { |
|||
proxy.resetForm("queryRef"); |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
function handleExport(type) { |
|||
loading.value = true; |
|||
queryParams.value.type = type; |
|||
exportOut(queryParams.value).then(response => { |
|||
response.data.forEach(item => { |
|||
window.open(uploadImgUrl.value + '/' + item, "_blank") |
|||
}); |
|||
loading.value = false; |
|||
}); |
|||
} |
|||
|
|||
</script> |
Loading…
Reference in new issue