Browse Source

查重订单列表 AI订单列表

pull/97/head
rainbro 3 months ago
parent
commit
11987b37c1
  1. 4
      src/router/index.js
  2. 4
      src/store/index.js
  3. 160
      src/views/agent/aiOrderList.vue
  4. 143
      src/views/agent/checkOrderList.vue

4
src/router/index.js

@ -85,10 +85,10 @@ const routes = [{
} }
}, },
{ {
path: '/agent/aiOrderList', path: '/agent/checkOrderList',
name: 'AI写作订单', name: 'AI写作订单',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/aiOrderList.vue'), component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/checkOrderList.vue'),
meta: { meta: {
title: 'AI写作订单', title: 'AI写作订单',
breadcrumbParent: '首页', breadcrumbParent: '首页',

4
src/store/index.js

@ -114,12 +114,12 @@ export default new Vuex.Store({
{ {
index: '2-1', index: '2-1',
title: '查重订单', title: '查重订单',
path: '/agent/checkOrderList' path: '/agent/checkOrderList?list=check'
}, },
{ {
index: '2-2', index: '2-2',
title: 'AI写作订单', title: 'AI写作订单',
path: '/agent/aiOrderList' path: '/agent/checkOrderList?list=ai'
}, },
{ {
index: '2-3', index: '2-3',

160
src/views/agent/aiOrderList.vue

@ -1,160 +0,0 @@
<template>
<div class="main-content12">
<!-- page header -->
<div class="pageheader">
<span class="pagetitle">OCPC订单</span>
</div>
<!-- page content -->
<div class="elementWrap">
<div>
<el-form>
<div class="flex">
<GuipInput :label="`ID:`" v-model="searchSaleid" @blur="changeSearchSaleid()" placeholder="" ref="GuipInput" class="searchId" />
<GuipSelect label="站点" v-model="searchUid" :options="siteList" valueKey="uid" labelKey="name" @change="changeSearchSite()" defaultValue="" placeholder="不限" clearable class="searchSite" />
</div>
<GuipTable :tableData="orderList" ref="multipleTable" autoColumn="true" :loading="tableLoading">
<el-table-column prop="sitename" label="站点"></el-table-column>
<el-table-column prop="sale_id" label="ID"></el-table-column>
<el-table-column prop="ocpc_type" label="渠道"></el-table-column>
<el-table-column prop="type_desc" label="类型"></el-table-column>
<el-table-column prop="money" label="销售金额"></el-table-column>
<el-table-column prop="sale_date" label="销售日期"></el-table-column>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="orderListCurrentPage"
:page-size="orderListPageSize"
:total="orderListTotal"
layout="prev, pager, next,jumper">
</el-pagination>
</el-form>
</div>
</div>
</div>
</template>
<script>
import GuipTable from '@/components/GuipTable.vue';
import GuipSelect from '@/components/GuipSelect.vue';
import GuipInput from '@/components/GuipInput.vue';
export default {
name: 'siteList',
components: {
GuipTable,
GuipSelect,
GuipInput,
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
//
tableLoading: true,
//
orderList: [],
orderListTotal: 0,
orderListCurrentPage: 1,
orderListPageSize: 20,
siteList: [],
searchUid: 0,
searchSaleid: 0,
}
},
mounted() {
this.getOcpcList()
},
methods: {
getOcpcList() {
this.tableLoading = true
const that = this
that.orderList = []
this.$http('POST', '/agentnew/ajax_get_ocpc_order_list', {
page: this.orderListCurrentPage,
pagesize: this.orderListPageSize,
uid: this.searchUid,
saleid: this.searchSaleid,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.tableLoading = false
this.$nextTick(() => {
that.orderList = response.data.list
this.orderListTotal = response.data.total
this.siteList = response.data.sitelist
})
}).catch(error => {
console.error(error, 'error')
})
},
handleSizeChange(val) {
this.orderListPageSize = val
this.getOcpcList()
},
handleCurrentChange(val) {
this.orderListCurrentPage = val
this.getOcpcList()
},
changeSearchSite() {
console.log(this.searchUid)
this.getOcpcList()
},
changeSearchSaleid() {
console.log(this.searchSaleid)
this.getOcpcList()
},
},
computed: {
},
}
</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;
}
.searchId {
margin-right: 24px;
width: 200px;
}
.searchSite {
width: 300px;
}
::v-deep .custom-popover {
position: fixed !important;
// max-height: 290px;
// overflow-y: auto;
margin-top: 0 !important;
margin-left: 0 !important;
transform: none !important;
}
</style>

143
src/views/agent/checkOrderList.vue

@ -2,7 +2,7 @@
<div class="main-content12"> <div class="main-content12">
<!-- page header --> <!-- page header -->
<div class="pageheader flex-between"> <div class="pageheader flex-between">
<span class="pagetitle">查重订单</span> <span class="pagetitle">{{ pageTitle }}</span>
<GuipButton size="table" type="ignore" @click="showPddSetting">拼多多发货</GuipButton> <GuipButton size="table" type="ignore" @click="showPddSetting">拼多多发货</GuipButton>
<GuipDialog :dialogVisible="dialogVisiblePddSetting" title="" :confirmText="pddSettingConfirmText" cancelText="取消" <GuipDialog :dialogVisible="dialogVisiblePddSetting" title="" :confirmText="pddSettingConfirmText" cancelText="取消"
@ -61,7 +61,7 @@
:extraItem="{label:'全部',value:'0'}" placeholder="" clearable /> :extraItem="{label:'全部',value:'0'}" placeholder="" clearable />
<GuipSelect class="mr-32" width="100px" label="报告状态" v-model="searchStatus" @change="changeSearchStatus()" <GuipSelect class="mr-32" width="100px" label="报告状态" v-model="searchStatus" @change="changeSearchStatus()"
:options="searchStatusList" :extraItem="{ label: '全部', value: 'all' }" defaultValue="" placeholder="不限" clearable /> :options="searchStatusList" :extraItem="{ label: '全部', value: 'all' }" placeholder="不限" clearable />
</div> </div>
</el-form> </el-form>
</div> </div>
@ -72,13 +72,11 @@
<el-form> <el-form>
<div class="flex" style="justify-content: space-between;"> <div class="flex" style="justify-content: space-between;">
<div class="flex"> <div class="flex">
<h3 class="checktitle mr-24">查重列表</h3> <h3 class="checktitle mr-24">{{ pageTitle }}列表</h3>
<GuipSelect class="mr-32" label="报告格式" v-model="searchUid" :options="siteList" <GuipSelect class="mr-32" label="报告格式" v-model="reportNameFormat" :options="donwReportNameFormat"
valueKey="uid" labelKey="name" @change="changeSearchSite()" defaultValue="" @change="changeReportNameFormat()" clearable v-if="pageTab=='check'" />
placeholder="不限" clearable />
</div> </div>
<GuipInput label="订单号" v-model="searchTid" @blur="changeSearchTid()" placeholder="请输入订单号" <GuipInput label="订单号" v-model="searchTid" @blur="changeSearchTid()" placeholder="请输入订单号" ref="GuipInput" />
ref="GuipInput" />
</div> </div>
@ -135,7 +133,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="author" label="作者"> <el-table-column prop="author" label="作者" v-if="pageTab=='check'">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex"> <div class="flex">
<GuipToolTip :content="'作者:' + scope.row.author + ' 标题:' + scope.row.title"> <GuipToolTip :content="'作者:' + scope.row.author + ' 标题:' + scope.row.title">
@ -144,6 +142,17 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题" v-else-if="pageTab=='ai'" min-width="200px">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="scope.row.title">
<p>{{ scope.row.title }}</p>
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="src" label="渠道" min-width="60px"> <el-table-column prop="src" label="渠道" min-width="60px">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex"> <div class="flex">
@ -154,9 +163,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ip" label="IP" min-width="150px"></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="sale_date_format" label="销售日期" min-width="120px">
<template slot-scope="scope">
<div class="flex">
<GuipToolTip :content="scope.row.sale_date">
<p>{{ scope.row.sale_date_format }}</p>
</GuipToolTip>
</div>
</template>
</el-table-column>
<el-table-column prop="wordnum" label="字数"></el-table-column> <el-table-column prop="wordnum" label="字数"></el-table-column>
<el-table-column prop="similarity" label="相似度"> <el-table-column v-if="pageTab!='ai'" prop="similarity" label="相似度">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex"> <div class="flex">
<p v-if="scope.row.similarity > 0">{{ scope.row.similarity }}%</p> <p v-if="scope.row.similarity > 0">{{ scope.row.similarity }}%</p>
@ -249,6 +266,8 @@ export default {
}, },
data() { data() {
return { return {
pageTab: 'check',
pageTitle: '查重订单',
// AUTH // AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k', token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
// //
@ -284,11 +303,15 @@ export default {
pddDeliveredDelayedSubmitHour: 1, pddDeliveredDelayedSubmitHour: 1,
selectAllowPddDeliveredDelayedSubmit: false, selectAllowPddDeliveredDelayedSubmit: false,
donwReportNameFormat: [],
reportNameFormat: 0,
} }
}, },
mounted() { mounted() {
this.pageTab = this.$route.query.list
this.getOrderList() this.getOrderList()
// this. this.getConfig()
}, },
methods: { methods: {
getFilterParams(){ getFilterParams(){
@ -308,6 +331,15 @@ export default {
this.getOrderList(params) this.getOrderList(params)
}, },
resetPageParams(){
this.orderListTotalRecords = 0
this.isHasNextPage = true
this.orderListCurrentPage = 1
this.orderListPageSize = 100
this.orderListNextMinId = 0
this.orderListPrevMaxId = 0
this.orderListEndPage = 0
},
resetSearchParams(){ resetSearchParams(){
this.searchDate = '' this.searchDate = ''
this.searchStatus = 'all' this.searchStatus = 'all'
@ -319,6 +351,29 @@ export default {
console.error('分页错误:', error) console.error('分页错误:', error)
// //
}, },
getConfig() {
this.$http('POST', '/agentnew/get_agent_config', {
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
if (response.data.pdd_delivered_delayed_submit_hour > 0) {
this.pddDeliveredDelayedSubmitHour = response.data.pdd_delivered_delayed_submit_hour;
this.selectAllowPddDeliveredDelayedSubmit = true;
}
this.reportNameFormat = response.data.report_name_format;
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
},
getOrderList(params) { getOrderList(params) {
console.log(this.searchDate) console.log(this.searchDate)
this.tableLoading = true this.tableLoading = true
@ -326,6 +381,7 @@ export default {
const requestParams = { const requestParams = {
pagesize: this.orderListPageSize, pagesize: this.orderListPageSize,
page: this.orderListCurrentPage, page: this.orderListCurrentPage,
pagetab: this.pageTab,
...params ...params
} }
console.log(requestParams, 'requestParams==='); console.log(requestParams, 'requestParams===');
@ -341,6 +397,8 @@ export default {
this.orderListTotalRecords = response.data.total_records this.orderListTotalRecords = response.data.total_records
this.searchSiteList = response.data.sitelist this.searchSiteList = response.data.sitelist
this.searchTypeList = response.data.type2name this.searchTypeList = response.data.type2name
this.donwReportNameFormat = response.data.donw_report_name_format
console.log(this.donwReportNameFormat, 'donwReportNameFormat')
// minIdmaxId // minIdmaxId
if (response.data.minid) this.orderListNextMinId = response.data.minid if (response.data.minid) this.orderListNextMinId = response.data.minid
if (response.data.maxid) this.orderListPrevMaxId = response.data.maxid if (response.data.maxid) this.orderListPrevMaxId = response.data.maxid
@ -439,6 +497,25 @@ export default {
changeSearchStatus() { changeSearchStatus() {
console.log(this.searchStatus) console.log(this.searchStatus)
}, },
changeReportNameFormat() {
this.$http('POST', '/agentnew/ajax_set_report_name_format', {
report_name_format: this.reportNameFormat,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
},
// ---start // ---start
showConfirmDelReport(row) { showConfirmDelReport(row) {
this.dialogVisibleDelReport = true; this.dialogVisibleDelReport = true;
@ -478,27 +555,7 @@ export default {
}, },
// ---end // ---end
showPddSetting() { showPddSetting() {
this.$http('POST', '/agentnew/get_pdd_setting', { this.dialogVisiblePddSetting = true;
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.dialogVisiblePddSetting = true;
if (response.data.pdd_delivered_delayed_submit_hour > 0) {
this.pddDeliveredDelayedSubmitHour = response.data.pdd_delivered_delayed_submit_hour;
this.selectAllowPddDeliveredDelayedSubmit = true;
}
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
}, },
// //
closePddSetting() { closePddSetting() {
@ -593,11 +650,29 @@ export default {
} }
this.getOrderList(params) this.getOrderList(params)
} },
}, },
computed: { computed: {
}, },
watch: {
'$route.query'(newVal) {
console.log('参数变化:', newVal);
//
this.pageTab = newVal.list
if (this.pageTab === 'check') {
this.pageTitle = '查重订单'
} else if (this.pageTab === 'ai') {
this.pageTitle = 'AI写作订单'
}
this.getOrderList()
this.resetSearchParams()
this.resetPageParams()
}
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save