Commit 6c722393 authored by dragondean@qq.com's avatar dragondean@qq.com

更新异常订单导出

parent f6a7e7cf
......@@ -101,3 +101,13 @@ export function getBmpDetailByBusinessId(businessId) {
params: {businessId}
})
}
// 导出订单异常 Excel
export function exportExcel(params) {
return request({
url: '/ecw/order-exception/export-excel',
method: 'get',
params,
responseType: 'arraybuffer'
})
}
\ No newline at end of file
......@@ -95,6 +95,9 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="12">
<el-button type="primary" size="mini" @click="exportSearch" v-hasPermi="['ecw:exception:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -181,7 +184,7 @@
</template>
<script>
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getOrderExceptionPage, exportExcel} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
// import { userList } from "@/api/system/user"
......@@ -302,7 +305,22 @@ export default {
tag += this.$t('(空)')
}
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
})
},
}
}
</script>
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