<!--
|
* @Author: wuyue
|
* @Date: 2023-01-19 11:08:17
|
* @LastEditTime: 2023-02-06 17:40:06
|
* @LastEditors: wuyue
|
* @Descripttion:
|
* @version:
|
-->
|
<template>
|
<el-dialog
|
v-if="tipDialogVisible"
|
:visible.sync="tipDialogVisible"
|
title="上传结果"
|
:close-on-click-modal="false"
|
:modal-append-to-body="false"
|
>
|
<div class="tip-text-size" style="margin-bottom: 10px">
|
成功保存{{ tableTotal - tipTableData.length }}条,失败{{
|
tipTableData.length
|
}}条
|
</div>
|
<tablePagination :tableData="tipTableData" :showOperatBtn="false">
|
<el-table-column label="商品主编码" prop="spuNum"> </el-table-column>
|
<el-table-column label="商品名称" prop="spuName"> </el-table-column>
|
<el-table-column label="收货人" prop="contactName"> </el-table-column>
|
<el-table-column label="联系方式" prop="contactPhone"> </el-table-column>
|
<el-table-column label="失败原因" prop="message"> </el-table-column>
|
</tablePagination>
|
<div slot="footer" class="buttonPosition dialog-footer">
|
<el-button
|
size="mini"
|
icon="el-icon-download"
|
type="primary"
|
:loading="errListloading"
|
@click="exportData"
|
>导出失败数据</el-button
|
>
|
<el-button size="mini" @click="tipDialogVisible = false">关闭</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
import { downloadFile } from '@/utils/downloadFile'
|
import tablePagination from '@/views/blindBoxActivity/components/tablePagination.vue'
|
|
export default {
|
props: ['tipTableData', 'tableTotal', 'visible', 'excelId'],
|
components: { tablePagination },
|
data() {
|
return {
|
tipDialogVisible: false,
|
errListloading: false
|
}
|
},
|
created() {
|
this.tipDialogVisible = this.visible
|
},
|
methods: {
|
/**
|
* 导出
|
*/
|
async exportData() {
|
this.errListloading = true
|
const config = {
|
url: `awl-order-service/order/v2/export/manualOrderCreateErrorMsg?excelId=${this.excelId}`,
|
fileName: '手工建单失败数据',
|
type: '.xlsx'
|
}
|
const res = await downloadFile(config)
|
if (res) {
|
this.errListloading = false
|
} else {
|
this.errListloading = false
|
}
|
}
|
}
|
};
|
</script>
|
|
<style>
|
.tip-text-size {
|
font-size: 18px;
|
}
|
</style>
|