|
@@ -0,0 +1,294 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <router-view />
|
|
|
|
+ <template v-if="!$route.query.type">
|
|
|
|
+ <div class="search">
|
|
|
|
+ <div />
|
|
|
|
+ <div class="right">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input v-model="search.name" placeholder="请输入店铺名称" clearable></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="search.platformType"
|
|
|
|
+ placeholder="请选择平台"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in constant.platformType"
|
|
|
|
+ :key="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="leftBtn">
|
|
|
|
+ <el-button type="primary" @click="fetchData('search')">查询</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <cy-comm-table
|
|
|
|
+ ref="commTable"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="tableData"
|
|
|
|
+ :count="total"
|
|
|
|
+ :table-options="tableOptions"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
+import { formatMoney } from '@/utils'
|
|
|
|
+import { getStoreStatisticList } from '@/api/storeManage/storeStatistics'
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: 'CapitalAuth',
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ loading: false,
|
|
|
|
+ tableData: [],
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ total: 0,
|
|
|
|
+ search: {
|
|
|
|
+ name: '',
|
|
|
|
+ platformType: ''
|
|
|
|
+ },
|
|
|
|
+ tableOptions: {
|
|
|
|
+ maxHeight: 'calc(100vh - 336px)',
|
|
|
|
+ height: 'calc(100vh - 336px)'
|
|
|
|
+ },
|
|
|
|
+ columns: [
|
|
|
|
+ {
|
|
|
|
+ label: '序号',
|
|
|
|
+ index: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '平台',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return <div>{ this.getPlatformName(row.platformType) }</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '店铺ID',
|
|
|
|
+ prop: 'platformShopId',
|
|
|
|
+ showTooltip: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '店铺名称',
|
|
|
|
+ prop: 'shopName',
|
|
|
|
+ showTooltip: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '运营时长(天)',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return <div>{ row.operationDay }</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '待结算金额(元)',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 140,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return <div>{ formatMoney(row.pendingSettlementAmount) }</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '月均运营收入(元)',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 150,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return <div>{ formatMoney(row.operationIncomeMonth) }</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '近3月月均运营收入(元)',
|
|
|
|
+ width: 200,
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return <div>{ formatMoney(row.operationIncomeMonthThree) }</div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '总退货率',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return (<div>{ row.returnGoodsRate }</div>)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '7日退货率',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return (<div>{ row.returnGoodsRateSeven }</div>)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '30日退货率',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return (<div>{ row.returnGoodsRateThirty }</div>)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '90日退货率',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return (<div>{ row.returnGoodsRateNinety }</div>)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '发货及时率',
|
|
|
|
+ prop: 'sendGoodsRate',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120,
|
|
|
|
+ render: (h, row) => {
|
|
|
|
+ return (<div>{ row.sendGoodsRate }</div>)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '最后更新日期',
|
|
|
|
+ prop: 'gmtModified',
|
|
|
|
+ showTooltip: true,
|
|
|
|
+ width: 120
|
|
|
|
+ }
|
|
|
|
+ // {
|
|
|
|
+ // label: '操作',
|
|
|
|
+ // show: true,
|
|
|
|
+ // render: (h, row) => {
|
|
|
|
+ // console.log(this)
|
|
|
|
+ // const btnList = [
|
|
|
|
+ // // {
|
|
|
|
+ // // msg: '时间进度轴',
|
|
|
|
+ // // icon: 'iconfont icon-timeAxis',
|
|
|
|
+ // // power: '',
|
|
|
|
+ // // // tabPower: ['all', 'pending'],
|
|
|
|
+ // // category: 'timeAxis'
|
|
|
|
+ // // },
|
|
|
|
+ // {
|
|
|
|
+ // msg: '查看',
|
|
|
|
+ // icon: 'iconfont icon-Magnifier',
|
|
|
|
+ // power: '',
|
|
|
|
+ // // tabPower: ['all'],
|
|
|
|
+ // // rowPower: [],
|
|
|
|
+ // category: 'see'
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // msg: '重新还款',
|
|
|
|
+ // icon: 'iconfont icon-shuaxin',
|
|
|
|
+ // power: '',
|
|
|
|
+ // // tabPower: ['all'],
|
|
|
|
+ // rowPower: ['03'],
|
|
|
|
+ // category: 'rePay'
|
|
|
|
+ // }
|
|
|
|
+ // ]
|
|
|
|
+ // const options = btnList.map(item => {
|
|
|
|
+ // return (
|
|
|
|
+ // this.tablePower({ item, row }) && <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
|
|
|
|
+ // <span class='table-icon-box' v-power={item.power}>
|
|
|
|
+ // <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row, item.msg) }}></i>
|
|
|
|
+ // </span>
|
|
|
|
+ // </el-tooltip>
|
|
|
|
+ // )
|
|
|
|
+ // })
|
|
|
|
+ // return <div>{ options }</div>
|
|
|
|
+ // },
|
|
|
|
+ // width: 150
|
|
|
|
+ // }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapGetters([
|
|
|
|
+ 'constant'
|
|
|
|
+ ]),
|
|
|
|
+ formatMoney() {
|
|
|
|
+ return (val) => {
|
|
|
|
+ return formatMoney(val)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ tablePower() {
|
|
|
|
+ return ({ item, row }) => {
|
|
|
|
+ const { rowPower } = item
|
|
|
|
+ if (rowPower) {
|
|
|
|
+ if (rowPower.includes(row.repayStatus)) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.$store.dispatch('getConstant', ['platformType'])
|
|
|
|
+ this.fetchData()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async fetchData(type) {
|
|
|
|
+ if (type === 'search') {
|
|
|
|
+ this.page = 1
|
|
|
|
+ this.size = 10
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.loading = true
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.search,
|
|
|
|
+ page: this.page || 1,
|
|
|
|
+ rows: this.size || 10
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (params.platformType === '') {
|
|
|
|
+ delete params.platformType
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const res = await getStoreStatisticList(params)
|
|
|
|
+
|
|
|
|
+ this.loading = false
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.tableData = res.rows
|
|
|
|
+ this.total = res.records
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // handlerOperate(type, row, msg) {},
|
|
|
|
+ getRepayStatus(status) {
|
|
|
|
+ const map = {
|
|
|
|
+ '01': '还款成功',
|
|
|
|
+ '02': '还款失败',
|
|
|
|
+ '03': '还款中'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return map[status] || ''
|
|
|
|
+ },
|
|
|
|
+ getPlatformName(type) {
|
|
|
|
+ const map = {
|
|
|
|
+ 'pinduoduo': '拼多多',
|
|
|
|
+ 'kuaishou': '快手',
|
|
|
|
+ 'douyin': '抖音',
|
|
|
|
+ 'meituan': '美团'
|
|
|
|
+ }
|
|
|
|
+ return map[type] || ''
|
|
|
|
+ },
|
|
|
|
+ getShopStatus(status) {
|
|
|
|
+ const map = {
|
|
|
|
+ 0: '关闭',
|
|
|
|
+ 1: '正常'
|
|
|
|
+ }
|
|
|
|
+ return map[status] || ''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped></style>
|