更新
This commit is contained in:
parent
c089e0999d
commit
5ab6f8e269
@ -109,24 +109,48 @@ export function transferMarkApi(id) {
|
||||
export function financialLstApi(data) {
|
||||
return request.get(`financial_record/lst`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 列表
|
||||
*/
|
||||
export function financialTransferLstApi(data) {
|
||||
return request.get(`financial_record_transfer/lst`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 详情
|
||||
*/
|
||||
export function financialDetailApi(type, data) {
|
||||
return request.get(`financial_record/detail/${type}`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 详情
|
||||
*/
|
||||
export function financialTransferDetailApi(type, data) {
|
||||
return request.get(`financial_record_transfer/detail/${type}`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 头部数据
|
||||
*/
|
||||
export function finaHeaderDataApi(data) {
|
||||
return request.get(`financial_record/title`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 头部数据
|
||||
*/
|
||||
export function finaHeaderTransferDataApi(data) {
|
||||
return request.get(`financial_record_transfer/title`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 下载账单
|
||||
*/
|
||||
export function downloadFinancialApi(type, data) {
|
||||
return request.get(`financial_record/detail_export/${type}`, data)
|
||||
}
|
||||
/**
|
||||
* @description 财务账单 -- 下载账单
|
||||
*/
|
||||
export function downloadTransferFinancialApi(type, data) {
|
||||
return request.get(`financial_record_transfer/detail_export/${type}`, data)
|
||||
}
|
||||
/**
|
||||
* @description 资金流水 -- 统计数据
|
||||
*/
|
||||
|
@ -33,11 +33,20 @@ const accountsRouter =
|
||||
path: 'statement',
|
||||
name: 'AccountsStatement',
|
||||
meta: {
|
||||
title: '财务账单',
|
||||
title: '账单管理',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/accounts/statement/index')
|
||||
},
|
||||
{
|
||||
path: 'transfer',
|
||||
name: 'AccountsTransfer',
|
||||
meta: {
|
||||
title: '转账账单管理',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/accounts/transfer/index')
|
||||
},
|
||||
{
|
||||
path: 'reconciliation/order/:id',
|
||||
name: 'ReconciliationOrder',
|
||||
@ -62,7 +71,7 @@ const accountsRouter =
|
||||
path: 'transManagement',
|
||||
name: 'AccountsTransManagement',
|
||||
meta: {
|
||||
title: '对账管理',
|
||||
title: '提现管理',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/accounts/transManage/index')
|
||||
|
385
src/views/accounts/transfer/index.vue
Normal file
385
src/views/accounts/transfer/index.vue
Normal file
@ -0,0 +1,385 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="filter-container">
|
||||
<el-form size="small" label-width="120px" :inline="true">
|
||||
<el-form-item label="时间选择:" class="mr10">
|
||||
<el-date-picker
|
||||
v-model="timeVal"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy/MM/dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="onchangeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<cards-data :card-lists="cardLists" />
|
||||
<el-tabs v-if="headeNum.length > 0" v-model="tableForm.type" @tab-click="getList(1)">
|
||||
<el-tab-pane v-for="(item,index) in headeNum" :key="index" :name="item.type.toString()" :label="item.title" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="序号" min-width="90">
|
||||
<template scope="scope">
|
||||
<span>{{ scope.$index+(tableForm.page - 1) * tableForm.limit + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="time"
|
||||
label="日期"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="income"
|
||||
label="账期内收入"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="expend"
|
||||
label="账期内支出"
|
||||
min-width="150"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="charge"
|
||||
label="商户应入账金额"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="onDetails(scope.row.time)">详情</el-button>
|
||||
<el-button type="text" size="small" @click="exports(scope.row.time)">下载账单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block mb20">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="tableForm.limit"
|
||||
:current-page="tableForm.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:title="tableForm.type == 1 ? '日账单详情' : '月账单详情'"
|
||||
:visible.sync="dialogVisible"
|
||||
width="830px"
|
||||
:before-close="handleClose"
|
||||
center
|
||||
>
|
||||
<el-row align="middle" class="ivu-mt mt20">
|
||||
<el-col :span="4">
|
||||
<el-menu
|
||||
default-active="0"
|
||||
class="el-menu-vertical-demo"
|
||||
>
|
||||
<el-menu-item :name="accountDetails.date">
|
||||
<span>{{ accountDetails.date }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-col :span="8">
|
||||
<div class="grid-content">
|
||||
<span class="title">{{ accountDetails.income && accountDetails.income.title }}</span>
|
||||
<span class="color_red">{{ accountDetails.income && accountDetails.income.number }}元</span>
|
||||
<span class="count">{{ accountDetails.income && accountDetails.income.count }}</span>
|
||||
<div v-if="accountDetails.income.data" class="list">
|
||||
<el-row v-for="(item,index) in accountDetails.income.data" :key="index" class="item">
|
||||
<el-col :span="12" class="name">{{ item['0'] }}</el-col>
|
||||
<el-col :span="12" class="cost">
|
||||
<span class="cost_num">{{ item['1'] }}</span>
|
||||
<span class="cost_count">{{ item['2'] }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider direction="vertical" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="grid-content">
|
||||
<span class="title">{{ accountDetails.expend && accountDetails.expend.title }}</span>
|
||||
<span class="color_gray">{{ accountDetails.expend && accountDetails.expend.number }}元</span>
|
||||
<span class="count">{{ accountDetails.expend && accountDetails.expend.count }}</span>
|
||||
<div v-if="accountDetails.expend.data" class="list">
|
||||
<el-row v-for="(item,index) in accountDetails.expend.data" :key="index" class="item">
|
||||
<el-col :span="12" class="name">{{ item['0'] }}</el-col>
|
||||
<el-col :span="12" class="cost">
|
||||
<span class="cost_num">{{ item['1'] }}</span>
|
||||
<span class="cost_count">{{ item['2'] }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider direction="vertical" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="grid-content">
|
||||
<span class="title">{{ accountDetails.charge && accountDetails.charge.title }}</span>
|
||||
<span class="color_gray">{{ accountDetails.charge && accountDetails.charge.number }}元</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false">我知道了</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { financialTransferLstApi, financialTransferDetailApi, finaHeaderTransferDataApi, downloadTransferFinancialApi } from '@/api/accounts'
|
||||
import createWorkBook from '@/utils/newToExcel.js'
|
||||
import { roterPre } from '@/settings'
|
||||
import cardsData from '@/components/cards/index'
|
||||
export default {
|
||||
name: 'Record',
|
||||
components: { cardsData },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
roterPre: roterPre,
|
||||
timeVal: [],
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableForm: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
date: '',
|
||||
type: '1'
|
||||
},
|
||||
ruleForm: {
|
||||
status: '0'
|
||||
},
|
||||
headeNum: [
|
||||
{ type: 1, title: '日账单' },
|
||||
{ type: 2, title: '月账单' }
|
||||
],
|
||||
dialogVisible: false,
|
||||
rules: {
|
||||
status: [
|
||||
{ required: true, message: '请选择对账状态', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
reconciliationId: 0,
|
||||
cardLists: [],
|
||||
accountDetails: {
|
||||
date: '',
|
||||
charge: {},
|
||||
expend: {},
|
||||
income: {}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getList('')
|
||||
this.getHeaderData()
|
||||
},
|
||||
methods: {
|
||||
onDetails(date) {
|
||||
financialTransferDetailApi(this.tableForm.type, { date: date }).then(res => {
|
||||
this.dialogVisible = true
|
||||
this.accountDetails = res.data
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
getHeaderData() {
|
||||
finaHeaderTransferDataApi({ date: this.tableForm.date }).then(res => {
|
||||
this.cardLists = res.data.stat
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
async exports(time) {
|
||||
const excelData = this.tableForm.type; const data = []
|
||||
|
||||
let lebData = {}
|
||||
lebData = await this.downloadAccounts(excelData, time)
|
||||
createWorkBook(lebData.header, lebData.title, lebData.export, lebData.foot, lebData.filename)
|
||||
return
|
||||
},
|
||||
/** 账单 */
|
||||
downloadAccounts(excelData, time) {
|
||||
return new Promise((resolve, reject) => {
|
||||
downloadTransferFinancialApi(excelData, { date: time }).then((res) => {
|
||||
return resolve(res.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 下载账单
|
||||
// downloadAccounts(time) {
|
||||
// downloadTransferFinancialApi(this.tableForm.type, { date: time })
|
||||
// .then((res) => {
|
||||
// const h = this.$createElement
|
||||
// this.$msgbox({
|
||||
// title: '提示',
|
||||
// message: h('p', null, [
|
||||
// h('span', null, '文件正在生成中,请稍后点击"'),
|
||||
// h('span', { style: 'color: teal' }, '导出记录'),
|
||||
// h('span', null, '"查看~ ')
|
||||
// ]),
|
||||
// confirmButtonText: '我知道了'
|
||||
// }).then(action => {
|
||||
// this.$router.push(`${roterPre}/export/list`)
|
||||
// })
|
||||
// }).catch((res) => {
|
||||
// this.$message.error(res.message)
|
||||
// })
|
||||
// },
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableForm.date = this.timeVal ? this.timeVal.join('-') : ''
|
||||
this.getList('')
|
||||
this.getHeaderData()
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableForm.page = num || this.tableForm.page
|
||||
financialTransferLstApi(this.tableForm).then(res => {
|
||||
this.tableData.data = res.data.list
|
||||
this.tableData.total = res.data.count
|
||||
this.listLoading = false
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableForm.page = page
|
||||
this.getList('')
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableForm.limit = val
|
||||
this.chkName = ''
|
||||
this.getList('')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tabBox_tit {
|
||||
width: 60%;
|
||||
font-size: 12px !important;
|
||||
margin: 0 2px 0 10px;
|
||||
letter-spacing: 1px;
|
||||
padding: 5px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.el-menu-item{
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
/deep/.el-dialog__header{
|
||||
text-align: left;
|
||||
}
|
||||
.el-col{
|
||||
position: relative;
|
||||
.el-divider--vertical{
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.grid-content{
|
||||
padding: 0 15px;
|
||||
display: block;
|
||||
.title,.color_red,.color_gray{
|
||||
display: block;
|
||||
line-height: 20px;
|
||||
}
|
||||
.color_red{
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
.color_gray{
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.count{
|
||||
font-size: 12px;
|
||||
}
|
||||
.list{
|
||||
margin-top: 20px;
|
||||
.item{
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.name,.cost{
|
||||
line-height: 20px;
|
||||
}
|
||||
.cost{
|
||||
text-align: right;
|
||||
span{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.name,.cost_count{
|
||||
font-size: 12px;
|
||||
}
|
||||
.cost_count{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.cost_num{
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
489
src/views/accounts/transfer/record.vue
Normal file
489
src/views/accounts/transfer/record.vue
Normal file
@ -0,0 +1,489 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card mb20">
|
||||
<div slot="header" class="clearfix">
|
||||
<router-link :to="{path:roterPre+'/accounts/reconciliation'}">
|
||||
<el-button size="mini" class="mr20 mb20" icon="el-icon-back">返回</el-button>
|
||||
</router-link>
|
||||
<!--<div class="filter-container">-->
|
||||
<!--<el-form :inline="true">-->
|
||||
<!--<el-form-item label="使用状态:" class="mr20">-->
|
||||
<!--<el-select v-model="tableFrom.status" placeholder="请选择评价状态" @change="getList">-->
|
||||
<!--<el-option label="全部" value="" />-->
|
||||
<!--<el-option label="未对账" value="0" />-->
|
||||
<!--<el-option label="已对账" value="1" />-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="时间选择:" class="mr10">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="timeVal"-->
|
||||
<!--type="daterange"-->
|
||||
<!--align="right"-->
|
||||
<!--unlink-panels-->
|
||||
<!--format="yyyy 年 MM 月 dd 日"-->
|
||||
<!--value-format="yyyy/MM/dd"-->
|
||||
<!--range-separator="至"-->
|
||||
<!--start-placeholder="开始日期"-->
|
||||
<!--end-placeholder="结束日期"-->
|
||||
<!--:picker-options="pickerOptions"-->
|
||||
<!--@change="onchangeTime"-->
|
||||
<!--/>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<!–<el-form-item label="优惠劵:" class="mr10">–>-->
|
||||
<!--<!–<el-input v-model="tableFrom.name" placeholder="请输入优惠劵" class="selWidth">–>-->
|
||||
<!--<!–<el-button slot="append" icon="el-icon-search" />–>-->
|
||||
<!--<!–</el-input>–>-->
|
||||
<!--<!–</el-form-item>–>-->
|
||||
<!--</el-form>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand demo-table-expands">
|
||||
<el-form-item label="收货人:">
|
||||
<span>{{ props.row.real_name | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话:">
|
||||
<span>{{ props.row.user_phone | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址:">
|
||||
<span>{{ props.row.user_address | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品总数:">
|
||||
<span>{{ props.row.total_num | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付状态:">
|
||||
<span>{{ props.row.pay_type | payTypeFilter }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付时间:">
|
||||
<span>{{ props.row.pay_time | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="对账备注:">
|
||||
<span>{{ props.row.admin_mark | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="order_id"
|
||||
label="ID"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否对账"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.reconciliation_id | reconciliationFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="order_sn"
|
||||
label="订单编号"
|
||||
min-width="190"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品信息"
|
||||
min-width="330"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-for="(val, i ) in scope.row.orderProduct" :key="i" class="tabBox acea-row row-middle">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.cart_info.product.image"
|
||||
:preview-src-list="[val.cart_info.product.image]"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit">{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="商品总价"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTotal(scope.row.orderProduct) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="佣金金额" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="pay_price"
|
||||
label="实际支付"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="total_postage"
|
||||
label="邮费"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order_rate"
|
||||
label="手续费"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="create_time"
|
||||
label="下单时间"
|
||||
min-width="150"
|
||||
/>
|
||||
</el-table>
|
||||
<div class="block mb20">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataRefund.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand demo-table-expandss">
|
||||
<el-form-item label="订单号:">
|
||||
<span>{{ props.row.order.order_sn }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款商品总价:">
|
||||
<span>{{ getTotalRefund(props.row.refundProduct) }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款商品总数:">
|
||||
<span>{{ props.row.refund_num }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请退款时间:">
|
||||
<span>{{ props.row.create_time | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="对账备注:">
|
||||
<span>{{ props.row.admin_mark | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="refund_order_id"
|
||||
label="ID"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退款单号"
|
||||
min-width="170"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span style="display: block;" v-text="scope.row.refund_order_sn" />
|
||||
<span v-show="scope.row.is_del > 0" style="color: #ED4014;display: block;">用户已删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否对账"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.reconciliation_id | reconciliationFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="user.nickname"
|
||||
label="用户信息"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="refund_price"
|
||||
label="退款金额"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="nickname"
|
||||
label="商品信息"
|
||||
min-width="330"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-for="(val, i ) in scope.row.refundProduct" :key="i" class="tabBox acea-row row-middle">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.product.cart_info.product.image"
|
||||
:preview-src-list="[val.product.cart_info.product.image]"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit">{{ val.product.cart_info.product.store_name + ' | ' }}{{ val.product.cart_info.productAttr.sku }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.product.cart_info.productAttr.price + ' x '+ val.product.product_num }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="serviceScore"
|
||||
label="订单状态"
|
||||
min-width="250"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span style="display: block">{{ scope.row.status | orderRefundFilter }}</span>
|
||||
<span style="display: block">退款原因:{{ scope.row.refund_message }}</span>
|
||||
<span style="display: block">状态变更时间:{{ scope.row.status_time }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableDataRefund.total"
|
||||
@size-change="handleSizeChangeRefund"
|
||||
@current-change="pageChangeRefund"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import { reconciliationOrderApi, reconciliationRefundApi } from '@/api/accounts'
|
||||
import { roterPre } from '@/settings'
|
||||
export default {
|
||||
name: 'Record',
|
||||
data() {
|
||||
return {
|
||||
roterPre: roterPre,
|
||||
chkName: '',
|
||||
chkNameRefund: '',
|
||||
isIndeterminate: true,
|
||||
resource: [],
|
||||
visible: false,
|
||||
timeVal: [],
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableDataRefund: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
// data: '',
|
||||
// status: ''
|
||||
},
|
||||
ids: [],
|
||||
idsRefund: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getRefundList()
|
||||
if (this.$route.params.type === 0) {
|
||||
this.setTagsViewTitle()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.tempRoute = Object.assign({}, this.$route)
|
||||
},
|
||||
methods: {
|
||||
isDisabled(row) {
|
||||
if (row.status !== 3) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.data = this.timeVal ? this.timeVal.join('-') : ''
|
||||
this.getList()
|
||||
this.getRefundList()
|
||||
},
|
||||
getTotalRefund(row) {
|
||||
let sum = 0
|
||||
for (let i = 0; i < row.length; i++) {
|
||||
sum += row[i].product.cart_info.productAttr.price * row[i].refund_num
|
||||
}
|
||||
return sum
|
||||
},
|
||||
getTotal(row) {
|
||||
let sum = 0
|
||||
for (let i = 0; i < row.length; i++) {
|
||||
sum += row[i].cart_info.productAttr.price * row[i].product_num
|
||||
}
|
||||
return sum
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
reconciliationOrderApi(this.$route.params.id, this.tableFrom).then(res => {
|
||||
this.tableData.data = res.data.list
|
||||
this.tableData.total = res.data.count
|
||||
this.tableData.data.map((item) => {
|
||||
this.$set(item, { checked: false })
|
||||
})
|
||||
this.listLoading = false
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.chkName = ''
|
||||
this.getList()
|
||||
},
|
||||
// 退款列表
|
||||
getRefundList() {
|
||||
this.listLoading = true
|
||||
reconciliationRefundApi(this.$route.params.id, this.tableFrom).then(res => {
|
||||
this.tableDataRefund.data = res.data.list
|
||||
this.tableDataRefund.total = res.data.count
|
||||
this.listLoading = false
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChangeRefund(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getRefundList()
|
||||
},
|
||||
handleSizeChangeRefund(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getRefundList()
|
||||
},
|
||||
setTagsViewTitle() {
|
||||
const title = '查看订单'
|
||||
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
|
||||
this.$store.dispatch('tagsView/updateVisitedView', route)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.spBlock{
|
||||
cursor: pointer;
|
||||
}
|
||||
.check{
|
||||
color: #00a2d4;
|
||||
}
|
||||
.tabPop{
|
||||
/deep/ .el-popover{
|
||||
width: 100px !important;
|
||||
}
|
||||
}
|
||||
.fang{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border: 1px solid #DCDFE6;
|
||||
border-radius: 2px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: #fff;
|
||||
z-index: 1;
|
||||
-webkit-transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
||||
transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
|
||||
}
|
||||
.el-table /deep/.DisabledSelection .cell .el-checkbox__inner{
|
||||
margin-left: -30px;
|
||||
position:relative;
|
||||
}
|
||||
.el-table /deep/.DisabledSelection .cell:before{
|
||||
content:"全选";
|
||||
position:absolute;
|
||||
right:11px;
|
||||
}
|
||||
.demo-table-expands{
|
||||
/deep/ label {
|
||||
width: 84px !important;
|
||||
color: #99a9bf;
|
||||
}
|
||||
}
|
||||
.demo-table-expandss{
|
||||
/deep/ label {
|
||||
width: 110px !important;
|
||||
color: #99a9bf;
|
||||
}
|
||||
}
|
||||
.selWidth{
|
||||
width: 300px;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tabBox_tit {
|
||||
width: 60%;
|
||||
font-size: 12px !important;
|
||||
margin: 0 2px 0 10px;
|
||||
letter-spacing: 1px;
|
||||
padding: 5px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user