Commit 813a7806 by zhuzhequan

新增功能

parent f6235c0b
......@@ -11,3 +11,9 @@ export function listShopPlateformData() {
export function deleteData(data) {
return axios.post('/order/loseOrderInfo/deleteLoseOrderInfoByIds?ids=' + data)
}
export function downloadData(data) {
return axios.get('/order/loseOrderInfo/downloadOrderAgain?ids=' + data)
}
export function convertOrderAgain(data) {
return axios.get('/order/loseOrderInfo/convertOrderAgain?ids=' + data)
}
......@@ -69,6 +69,24 @@
>删除</el-button
>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="small"
icon="el-icon-download"
@click="downloadData()"
>重新下载</el-button
>
</el-form-item>
<el-form-item>
<el-button
type="default"
size="small"
icon="el-icon-refresh"
@click="transformData()"
>重新转化</el-button
>
</el-form-item>
</el-form>
</div>
<div class="table-wrap" v-loading="loading">
......@@ -119,6 +137,14 @@
>
</el-table-column>
<el-table-column
label="namespace"
prop="namespace"
header-align="center"
align="center"
width="180"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="所属平台"
prop="salesPlatform"
header-align="center"
......@@ -142,6 +168,18 @@
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="失败类型"
prop="failType"
header-align="center"
align="center"
min-width="50"
:show-overflow-tooltip="true"
>
<template #default="{row}">
{{['下载失败','转化失败'][row.failType-1]}}
</template>
</el-table-column>
<el-table-column
label="失败原因"
prop="failReason"
header-align="center"
......@@ -192,6 +230,8 @@
<script>
import {
listTableData,
downloadData,
convertOrderAgain,
deleteData, // eslint-disable-line no-unused-vars
listShopPlateformData,
} from '@/common/api/operation/lossOrder'
......@@ -242,6 +282,80 @@ export default {
search() {
this.getList()
},
async downloadData(row) {
let ids = []
let arr = [] // eslint-disable-line no-unused-vars
if (row) {
arr.push(row)
} else {
arr = this.selection
}
console.log(this.selection)
if (arr.length === 0) {
this.$message.error('请至少选择一条记录')
return
}
try {
await this.$confirm('确认重新下载?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
ids = this.selection.map((item) => item.id)
ids = ids.join()
const l = this.$loading({
background: 'rgba(0, 0, 0, 0.3)',
})
try {
await downloadData(ids)
this.selection = []
this.getList()
} catch (e) {
console.error(e)
} finally {
l.close()
}
},
async transformData(row) {
let ids = []
let arr = [] // eslint-disable-line no-unused-vars
if (row) {
arr.push(row)
} else {
arr = this.selection
}
console.log(this.selection)
if (arr.length === 0) {
this.$message.error('请至少选择一条记录')
return
}
try {
await this.$confirm('确认重新转化?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
}
ids = this.selection.map((item) => item.id)
ids = ids.join()
const l = this.$loading({
background: 'rgba(0, 0, 0, 0.3)',
})
try {
await convertOrderAgain(ids)
this.selection = []
this.getList()
} catch (e) {
console.error(e)
} finally {
l.close()
}
},
async deleteData(row) {
let ids = []
let arr = [] // eslint-disable-line no-unused-vars
......
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