You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

579 lines
22 KiB

2 months ago
<template>
<div class="main-content12">
<!-- page header -->
<div class="pageheader">
<span class="pagetitle">查重订单</span>
</div>
2 months ago
<div class="elementWrap mb-10">
<el-form>
<div class="flex-between operateBtns">
<b>筛选及导出列表</b>
<div class="flex gap24">
<GuipButton size="table" type="ignore" @click="resetSearchParams">清空</GuipButton>
<GuipButton size="table" type="system" @click="getFilterParams">筛选</GuipButton>
<GuipButton size="table" type="primary">导出</GuipButton>
</div>
</div>
2 months ago
<div class="flex">
<p class="mr-12">时间范围</p>
<el-date-picker class="mr-32" v-model="searchDate" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期">
2 months ago
</el-date-picker>
<GuipSelect class="mr-32" label="服务类型" v-model="searchType" :options="siteList" valueKey="uid"
labelKey="name" defaultValue="" placeholder="不限" clearable />
2 months ago
<GuipSelect class="mr-32" label="站点" v-model="searchUid" :options="siteList" valueKey="uid"
labelKey="name" defaultValue="" placeholder="不限" clearable />
<GuipSelect class="mr-32" width="100px" label="报告状态" v-model="searchStatus"
:options="searchStatusList" valueKey="uid" labelKey="name"
:extraItem="{ label: '全部', value: 'all' }" defaultValue="" placeholder="不限" clearable />
2 months ago
</div>
</el-form>
</div>
2 months ago
<!-- page content -->
<div class="elementWrap">
<div>
<el-form>
2 months ago
<div class="flex" style="justify-content: space-between;">
<div class="flex">
<h3 class="checktitle mr-24">查重列表</h3>
<GuipSelect class="mr-32" label="报告格式" v-model="searchUid" :options="siteList"
valueKey="uid" labelKey="name" @change="changeSearchSite()" defaultValue=""
placeholder="不限" clearable />
2 months ago
</div>
<GuipInput label="订单号" v-model="searchTid" @blur="changeSearchTid()" placeholder="请输入订单号"
ref="GuipInput" />
2 months ago
</div>
2 months ago
<PromptText class="my-32" text='订单提示:电商订单,提交检测后会自动发货,请勿手动发货、代收款订单,退款须由平台操作,不可私自退款' :type="2" />
<GuipTable :tableData="orderList" ref="multipleTable" autoColumn="true" :loading="tableLoading"
max-height="400px">
2 months ago
<el-table-column prop="sitename" label="站点" fixed="left" min-width="60px">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="scope.row.sitename">
<img class="wh-16" src="@/assets/site.svg" alt="">
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="sale_id" label="ID" fixed="left" min-width="120px">
<template slot-scope="scope">
<div class="flex">
<p>{{ scope.row.sale_id }}</p>
<GuipToolTip class="ml-7" v-if="scope.row.ispublic == 1" content="自供货">
2 months ago
<img class="wh-16" src="@/assets/self_supply.svg" />
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="type_desc" label="检测类型" fixed="left" min-width="160px"></el-table-column>
<el-table-column prop="pay_type" label="买家" min-width="60px">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="scope.row.pay_type_desc">
<img class="wh-16" :src="getPayImg(scope.row.pay_type)" alt="">
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="tids" label="订单号" min-width="220px">
<template slot-scope="scope">
<div class="flex" v-if="scope.row.status == 1">
<GuipToolTip :content="'下载报告 作者:' + scope.row.author + ' 标题:' + scope.row.title">
<a :href="'http://' + scope.row.domain + '/report/tid/' + tid + '/sid/' + scope.row.sale_id"
target="_blank" v-for="tid in scope.row.tids" :key="tid">{{ tid }}</a>
2 months ago
</GuipToolTip>
</div>
<div class="" v-else>
<p v-for="tid in scope.row.tids" :key="tid">
{{ tid }}
<GuipToolTip content="待发货">
<img v-if="scope.row.pay_type == 11 && scope.row.pdd_is_wait_deliver_goods[tid] == true"
class="wh-16 ml-7" src="@/assets/wait_deliver_goods.svg" />
2 months ago
</GuipToolTip>
</p>
2 months ago
</div>
</template>
</el-table-column>
<el-table-column prop="author" label="作者">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="'作者:' + scope.row.author + ' 标题:' + scope.row.title">
2 months ago
<p>{{ scope.row.author }}</p>
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="src" label="渠道" min-width="60px">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="scope.row.src_desc">
<img class="wh-16" :src="getChannelImg(scope.row.src)" alt="">
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="ip" label="IP" min-width="150px"></el-table-column>
<el-table-column prop="sale_date" label="销售日期" min-width="200px"></el-table-column>
<el-table-column prop="wordnum" label="字数"></el-table-column>
<el-table-column prop="similarity" label="相似度">
<template slot-scope="scope">
<div class="flex">
<p v-if="scope.row.similarity > 0">{{ scope.row.similarity }}%</p>
2 months ago
<p v-else>-</p>
</div>
</template>
</el-table-column>
<el-table-column prop="income" label="实际收入"></el-table-column>
2 months ago
<el-table-column prop="cost" label="成本"></el-table-column>
<el-table-column prop="status_desc" label="状态" min-width="150px">
<template slot-scope="scope">
<div class="flex">
<div v-if="scope.row.status == 1" class="status-item divgreen">
2 months ago
<span class="fontgreen">{{ scope.row.status_desc }}</span>
</div>
<div v-else-if="scope.row.status == 3 || scope.row.status == 11 || scope.row.status == 12"
class="status-item divblue">
2 months ago
<span class="fontblue">{{ scope.row.status_desc }}</span>
</div>
<div v-else-if="scope.row.status == 2 || scope.row.status == 10 || scope.row.status == 4"
class="status-item divred">
2 months ago
<span class="fontred">{{ scope.row.status_desc }}</span>
</div>
<div v-else-if="scope.row.status == 0 || scope.row.status == 8"
class="status-item divgray">
2 months ago
<span class="fontgray">{{ scope.row.status_desc }}</span>
</div>
<div v-else-if="scope.row.status == 5" class="status-item divorange">
2 months ago
<span class="fontorange">{{ scope.row.status_desc }}</span>
</div>
<div v-else-if="scope.row.status == 6 || scope.row.status == 7"
class="status-item divpurple">
2 months ago
<span class="fontpurple">{{ scope.row.status_desc }}</span>
</div>
<GuipToolTip v-if="scope.row.status == 1 && scope.row.is_downloaded_report == 1"
content="已下载报告标识">
2 months ago
<img class="wh-16 ml-7" src="@/assets/downloaded.svg" />
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="120px">
2 months ago
<template slot-scope="scope">
<div class="flex">
<el-button v-if="scope.row.status == 1" @click="showConfirmDelReport(scope.row)"
type="text">删报告</el-button>
</div>
2 months ago
</template>
</el-table-column>
</GuipTable>
<Page :current-page="orderListCurrentPage" :has-next-page="isHasNextPage"
:total-records="orderListTotalRecords" :page-size="orderListPageSize" :is-loading="tableLoading"
@page-change="handlePageChange" />
2 months ago
</el-form>
</div>
<GuipDialog :dialogVisible="dialogVisibleDelReport" title="删除报告" confirmText="删除" cancelText="取消"
:show-close-button="false" :show-cancel-button="true" @confirm="confirmDelReport" @cancel="handleCancel"
2 months ago
@close="handleClose" @dialogVisibleChange="dialogVisibleChange">
<!-- 自定义内容 -->
<p class="mx-24 mt12 flex">是否删除 ID:{{ delReportId }} 报告删除后无法恢复</p>
2 months ago
</GuipDialog>
</div>
</div>
</template>
<script>
import GuipTable from '@/components/GuipTable.vue';
import GuipSelect from '@/components/GuipSelect.vue';
import GuipInput from '@/components/GuipInput.vue';
import GuipButton from '@/components/GuipButton.vue';
2 months ago
import GuipToolTip from '@/components/GuipToolTip.vue';
import GuipDialog from '@/components/GuipDialog.vue';
import Page from '@/components/Page.vue';
2 months ago
import PromptText from '@/components/PromptText.vue';
2 months ago
export default {
name: 'siteList',
components: {
GuipTable,
GuipSelect,
GuipButton,
2 months ago
GuipInput,
GuipToolTip,
GuipDialog,
Page,
2 months ago
PromptText,
2 months ago
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
2 months ago
// 表格加载
tableLoading: false,
2 months ago
// 订单列表
orderList: [],
2 months ago
orderListTotalRecords: 0,
isHasNextPage: true,
2 months ago
orderListCurrentPage: 1,
orderListPageSize: 10,
orderListNextMinId: 0,
orderListPrevMaxId: 0,
orderListEndPage: 0,
orderListJumpToPage: 0,
2 months ago
siteList: [],
2 months ago
searchDate: '',
searchStatus: '',
2 months ago
searchStatusList: [],
searchUid: 0,
2 months ago
searchTid: 0,
searchType: 0,
2 months ago
dialogVisibleDelReport: false,
delReportId: '',
2 months ago
}
},
mounted() {
this.getOrderList()
2 months ago
},
methods: {
getFilterParams(){
console.log(this.searchDate,'searchDate===');
// this.getOrderList({
// searchDate:this.searchDate,
// searchStatus:this.searchStatus,
// searchType:this.searchType,
// })
},
resetSearchParams(){
this.searchDate = ''
this.searchStatus = ''
this.searchType = ''
// 或者使用 $set
},
handleError(error) {
console.error('分页错误:', error)
// 可以在这里显示错误提示
},
getOrderList(params) {
2 months ago
this.tableLoading = true
try {
const requestParams = {
pagesize: this.orderListPageSize,
page: this.orderListCurrentPage,
...params
2 months ago
}
console.log(requestParams, 'requestParams===');
this.$http('POST', '/agentnew/ajax_get_check_order_list', requestParams, {
headers: {
'Auth': this.token
}
}).then(response => {
this.tableLoading = false
this.$nextTick(() => {
this.orderList = response.data.list
this.searchStatusList = response.data.search_check_status
this.orderListTotalRecords = response.data.total_records
// 更新minId和maxId
if (response.data.minid) this.orderListNextMinId = response.data.minid
if (response.data.maxid) this.orderListPrevMaxId = response.data.maxid
this.isHasNextPage = response.data.is_has_next_page;
if (this.orderListTotalRecords > 0) {
// 计算总页数
this.orderListCurrentPage = Math.ceil(this.orderListTotalRecords / this.orderListPageSize)
// this.page = this.totalPages || 1
// this.jumpPage = this.page
// this.end_page = 1;
}
// console.log(this.isHasNextPage, 'isHasNextPage')
})
}).catch(error => {
console.error(error, 'error')
2 months ago
})
} catch (error) {
console.error('数据加载失败:', error)
} finally {
this.tableLoading = false
}
2 months ago
},
2 months ago
getPayImg(pay_type) {
return require('@/assets/pay/pay_' + pay_type + '.svg');
2 months ago
},
getChannelImg(src) {
return require('@/assets/channel_' + src + '.svg');
2 months ago
},
changeSearchSite() {
console.log(this.searchUid)
// this.getOrderList()
2 months ago
},
2 months ago
changeSearchTid() {
console.log(this.searchTid,'this.searchTid')
this.getOrderList({tid:this.searchTid})
2 months ago
},
// 弹框相关方法---start
showConfirmDelReport(row) {
this.dialogVisibleDelReport = true;
this.delReportId = row.sale_id;
},
// 确认按钮事件
confirmDelReport() {
this.$http('POST', '/agentnew/ajax_del_report', {
saleid: this.delReportId,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.dialogVisibleDelReport = false;
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
},
// 取消按钮事件
handleCancel() {
this.dialogVisibleDelReport = false;
},
// 关闭弹框事件
handleClose() {
this.dialogVisibleDelReport = false;
},
dialogVisibleChange(data) {
console.log(data, 'data098908090');
},
// 弹框相关方法---end
handlePageChange({ page, endPage, direction }) {
console.log(endPage, 'endPage===');
this.orderListCurrentPage = page
const params = { page }
// 根据翻页方向设置参数
if (direction === 'prev') {
params.maxid = this.orderListPrevMaxId
if (this.orderListNextMinId) params.minid = null
} else if (direction === 'next') {
params.minid = this.orderListNextMinId
if (this.orderListPrevMaxId) params.maxid = null
} else if (direction === 'last') {
params.end_page = 1
params.page = null
params.minid = null
params.maxid = null
2 months ago
}
this.getOrderList(params)
2 months ago
}
},
computed: {
},
2 months ago
}
</script>
<style lang="scss" scoped>
.pageheader {
display: flex;
justify-content: space-between;
/* 关键属性 */
align-items: center;
margin: 0px 0px 16px 0px;
}
.pagetitle {
font-size: 16px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
margin-top: 8px;
}
.elementWrap {
padding: 32px 36px;
background: #fff;
}
.operateBtns {
padding: 17px 0;
}
2 months ago
::v-deep .custom-popover {
position: fixed !important;
// max-height: 290px;
// overflow-y: auto;
margin-top: 0 !important;
margin-left: 0 !important;
transform: none !important;
}
.wh-16 {
width: 16px;
height: 16px;
z-index: 1;
}
2 months ago
.mb-10 {
margin-bottom: 10px;
}
.mr-12 {
margin-right: 12px;
}
2 months ago
.mr-24 {
margin-right: 24px;
}
2 months ago
.mr-32 {
margin-right: 32px;
}
2 months ago
.my-32 {
margin-bottom: 32px;
margin-top: 32px;
}
2 months ago
a {
text-decoration: none;
color: #006AFF;
}
2 months ago
a:hover {
text-decoration: underline;
}
.ml-7 {
margin-left: 7px;
}
.status-item {
height: 22px;
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
z-index: 0;
padding: 2px 10px;
border-radius: 4px;
2 months ago
}
.divgreen {
background: rgba(239, 255, 224, 0.5);
box-sizing: border-box;
border: 1px solid rgba(0, 194, 97, 0.6);
}
2 months ago
.fontgreen {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
text-align: center;
letter-spacing: 0.08em;
color: #0DAF49;
}
2 months ago
.divblue {
background: #F2F7FF;
box-sizing: border-box;
border: 1px solid #BFDAFF;
}
2 months ago
.fontblue {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
text-align: center;
letter-spacing: 0.08em;
color: #006AFF;
}
.divred {
background: #FFF1F0;
box-sizing: border-box;
border: 1px solid #FFA39E;
}
2 months ago
.fontred {
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: normal;
line-height: normal;
text-align: center;
letter-spacing: 0.08em;
color: #FF4D4F;
}
2 months ago
.divgray {
background: #F6F7FA;
box-sizing: border-box;
border: 1px solid #DFE2E6;
}
.fontgray {
2 months ago
color: #626573;
}
2 months ago
.divorange {
background: #FFFBF2;
box-sizing: border-box;
border: 1px solid rgba(251, 131, 45, 0.38);
}
2 months ago
.fontorange {
color: #FB832D;
}
2 months ago
.divpurple {
background: #F9F2FF;
box-sizing: border-box;
border: 1px solid rgba(126, 118, 253, 0.28);
}
.fontpurple {
2 months ago
color: #6258FF;
}
2 months ago
.checktitle {
/* body/body 2_bold */
font-family: Microsoft YaHei UI;
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
/* text/text_1 */
color: #1E2226;
}
2 months ago
.el-form-item {
margin-bottom: 0px
}
2 months ago
</style>