Commit 667dd594 authored by yaya's avatar yaya

feat:添加财务管理模块

parent e30bc103
......@@ -66,4 +66,27 @@ export function requestTransferDetail(data) {
data
})
}
export function findOrderBillDetail(data) {
return request({
url: '/sysFinance/findOrderBillDetail',
method: 'post',
data
})
}
export function findUserBill(data) {
return request({
url: '/sysFinance/findUserBill',
method: 'post',
data
})
}
export function findUserBillDetail(data) {
return request({
url: '/sysFinance/findUserBillDetail',
method: 'post',
data
})
}
......@@ -626,6 +626,54 @@ export const asyncRouterMap = [
}
]
},
{
path: '/finance',
component: Layout,
redirect: 'noredirect',
alwaysShow: true,
name: 'finance',
meta: {
title: '财务管理',
icon: 'shopping'
},
children: [
{
path: 'orderDetail',
component: () => import('@/views/finance/orderDetail'),
name: 'orderDetail',
meta: {
perms: [],
title: '订单明细',
icon: 'drag',
noCache: true,
keepAlive: true
}
}, {
path: 'financeList',
component: () => import('@/views/finance/financeList'),
name: 'financeList',
meta: {
perms: [],
title: '账单列表',
icon: 'drag',
noCache: true,
keepAlive: true
}
}, {
path: 'FinanceDetail',
component: () => import('@/views/finance/FinanceDetail'),
name: 'FinanceDetail',
meta: {
perms: [],
title: '账单明细',
icon: 'drag',
noCache: true,
keepAlive: true
},
hidden: true
}
]
},
/* {
path: '/service',
component: Layout,
......
<template>
<el-dialog
v-if="showFinishFinanceDialog"
:visible.sync="showFinishFinanceDialog"
:before-close="handleCancelConsignDialog"
width="600px"
height="600px"
title="完成账单">
<el-form ref="cancel" :model="finishForm">
<el-form-item label="藏家ID:" label-width="80px">
<div>{{ fianceItem.userId }}</div>
</el-form-item>
<el-form-item label="藏家昵称:" label-width="80px">
<div>{{ fianceItem.userName }}</div>
</el-form-item>
<el-form-item label="结款金额:" label-width="80px">
<div>{{ `${fianceItem.totalEntryAmount ? `¥ ${fianceItem.totalEntryAmount}` : '-'}` }}</div>
</el-form-item>
<el-form-item label="凭证:" label-width="80px" required>
<el-upload
:action="uploadPath"
:headers="headers"
:limit="3"
:file-list="itemImages"
:on-exceed="uploadOverrun"
:on-success="handleGalleryUrl"
:on-remove="handleRemove"
multiple
accept=".jpg,.jpeg,.png,.gif"
list-type="picture-card">
<div>+上传凭证</div>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelConsignDialog"> </el-button>
<el-button type="primary" @click="handleCancelValue"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentify } from '@/api/business/order'
import { uploadPath } from '@/api/business/storage'
import { getToken } from '@/utils/auth'
export default {
name: 'FinishFinanceDialog',
props: {
showFinishFinanceDialog: {
type: Boolean,
default: false
},
fianceItem: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
uploadPath,
finishForm: {
remark: ''
},
itemImages: []
}
},
computed: {
headers() {
return {
'X-Dts-Admin-Token': getToken()
}
}
},
methods: {
handleCancelConsignDialog() {
this.$emit('cancelDialog')
},
/**
* 取消
*/
handleCancelValue() {
if (this.distributionOrderId) {
const params = { ...this.cancelForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId, approved: 0 }
this.$refs.cancel.validate((valid) => {
if (valid) {
requestIdentify(params)
.then(response => {
this.$notify.success({
message: '操作成功'
})
this.cancelForm = {}
this.$emit('refreshItem', this.distributionOrderId)
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
},
uploadOverrun: function() {
this.$message({
type: 'error',
message: '上传文件个数超出限制!最多上传1张图片!'
})
},
handleGalleryUrl(response, file, fileList) {
if (response.errno === 0) {
this.finishForm.images.push(response.data.url)
}
},
handleRemove: function(file, fileList) {
for (var i = 0; i < this.finishForm.images.length; i++) {
// 这里存在两种情况
// 1. 如果所删除图片是刚刚上传的图片,那么图片地址是file.response.data.url
// 此时的file.url虽然存在,但是是本机地址,而不是远程地址。
// 2. 如果所删除图片是后台返回的已有图片,那么图片地址是file.url
var url
if (file.response === undefined) {
url = file.url
} else {
url = file.response.data.url
}
if (this.finishForm.images[i] === url) {
this.finishForm.images.splice(i, 1)
}
}
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-form-item {
margin-bottom: 0px;
}
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<el-dialog
v-if="showLoadFinanceDialog"
:visible.sync="showLoadFinanceDialog"
:before-close="handleCancelConsignDialog"
width="600px"
height="600px"
title="下载账单">
<el-form ref="cancel" :model="loadForm">
<el-form-item label="藏家ID:" label-width="80px" prop="userId">
<div>{{ fianceItem.userId }}</div>
</el-form-item>
<el-form-item label="藏家昵称:" label-width="80px" prop="userName">
<div>{{ fianceItem.userName }}</div>
</el-form-item>
<el-form-item label="银行卡:" label-width="80px" prop="bankCardId">
<div>{{ fianceItem.bankCardId }}</div>
</el-form-item>
<el-form-item label="真实姓名:" label-width="80px" prop="realName">
<div>{{ fianceItem.realName }}</div>
</el-form-item>
<el-form-item label="金额:" label-width="80px" prop="totalEntryAmount">
<div>{{ `${fianceItem.totalEntryAmount ? `¥ ${fianceItem.totalEntryAmount}` : '-'}` }}</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelConsignDialog"> </el-button>
<el-button type="primary" @click="handleCancelValue"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentify } from '@/api/business/order'
export default {
name: 'LoadFinanceDialog',
props: {
showLoadFinanceDialog: {
type: Boolean,
default: false
},
fianceItem: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
loadForm: {
remark: ''
}
}
},
methods: {
handleCancelConsignDialog() {
this.$emit('cancelDialog')
},
/**
* 取消
*/
handleCancelValue() {
if (this.distributionOrderId) {
const params = { ...this.cancelForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId, approved: 0 }
this.$refs.cancel.validate((valid) => {
if (valid) {
requestIdentify(params)
.then(response => {
this.$notify.success({
message: '操作成功'
})
this.cancelForm = {}
this.handleCancelConsignDialog()
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-form-item {
margin-bottom: 0px;
}
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入订单编号" />
<el-select v-model="listQuery.type" placeholder="请选择收入类型" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini" />
</el-select>
<el-date-picker
v-model="timeValue"
:picker-options="pickerOptions"
class="filter-item"
style="width: 400px; "
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
align="right"/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
style="margin-left: 12px"
@click="handleFilter">查找
</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="accountPeriod" label="账期" />
<el-table-column align="center" label="订单编号" prop="distributionOrderId" />
<el-table-column align="center" label="商品图片" prop="homePageImage">
<template slot-scope="scope">
<img
v-if="scope.row.homePageImage && scope.row.homePageImage.url"
:src="scope.row.homePageImage.url"
width="60px"
height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="商品标题" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.amount ? `¥ ${scope.row.amount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="平台到账(1%手续费)" prop="realAmount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.realAmount ? `¥ ${scope.row.realAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单类型" prop="orderTypeName" />
<el-table-column align="center" label="订单时间" prop="createTime" />
<el-table-column align="center" label="收入类型" prop="typeName" />
<el-table-column align="center" label="已入账" prop="enrtyAmount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.enrtyAmount ? `¥ ${scope.row.enrtyAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="待入账" prop="waitEnrtyAmount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.waitEnrtyAmount ? `¥ ${scope.row.waitEnrtyAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { findUserBillDetail } from '@/api/business/order'
export default {
name: 'FinanceDetail',
components: {
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '订单收入'
}, {
value: 2,
label: '介绍佣金'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20
},
list: [],
total: 0,
userId: '',
accountPeriod: '',
timeValue: '',
pickerOptions: {
disabledDate(date) {
return date.getTime() > Date.now() // 禁用大于今天的日期
}
}
}
},
created() {
if (this.$route.query.userId == null) {
return
}
this.userId = this.$route.query.userId
this.accountPeriod = this.$route.query.accountPeriod
this.getList()
},
methods: {
resetSearchForm() {
this.timeValue = ''
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
if (this.timeValue && this.timeValue.length > 0) {
this.listQuery.startCreateTime = this.timeValue[0]
this.listQuery.endCreateTime = this.timeValue[1]
} else {
this.listQuery.startCreateTime = ''
this.listQuery.endCreateTime = ''
}
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
this.listQuery.userId = this.userId
this.listQuery.accountPeriod = this.accountPeriod
findUserBillDetail(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.sellerId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入藏家ID" />
<el-date-picker
v-model="listQuery.time"
class="filter-item"
type="month"
style="width: 200px;"
placeholder="选择帐期"
format="yyyy-MM"
value-format="yyyy-MM" />
<el-select v-model="listQuery.state" placeholder="请选择是否结款" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini" />
</el-select>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
style="margin-left: 12px"
@click="handleFilter">查找
</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="accountPeriod" label="账期" fixed="left"/>
<el-table-column align="center" label="藏家" prop="userName" />
<el-table-column align="center" label="藏家ID" min-width="150px" prop="userId">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.userId ? scope.row.userId : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column label="总收入" align="center">
<el-table-column prop="totalEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.totalEntryAmount ? `¥ ${scope.row.totalEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="totalWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.totalWaitEntryAmount ? `¥ ${scope.row.totalWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="订单收入" align="center">
<el-table-column prop="orderEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.orderEntryAmount ? `¥ ${scope.row.orderEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="orderWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.orderWaitEntryAmount ? `¥ ${scope.row.orderWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="介绍佣金" align="center">
<el-table-column prop="introduceEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introduceEntryAmount ? `¥ ${scope.row.introduceEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="totalWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introduceWaitEntryAmount ? `¥ ${scope.row.introduceWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" label="是否结款" prop="state" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.state === 1 ? `` : scope.row.state === 1 ? '否' : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="银行卡账号" width="200" prop="bankCardId" />
<el-table-column align="center" label="真实姓名" prop="realName" />
<el-table-column align="center" label="查看凭证" prop="voucher" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.voucher ? `查看凭证` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300" fixed="right">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="handleToDetail(scope.row)">查看明细
</el-button>
<el-button
type="primary"
size="mini"
@click="handleToLoad(scope.row)">下载账单
</el-button>
<el-button
type="primary"
size="mini"
@click="handleToFinish(scope.row)">完成结款
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
<LoadFinanceDialog
v-if="showLoadFinanceDialog"
:show-load-finance-dialog="showLoadFinanceDialog"
:fiance-item="fianceItem"
@cancelDialog="showLoadFinanceDialog = false"/>
<FinishFinanceDialog
v-if="showFinishFinanceDialog"
:show-finish-finance-dialog="showFinishFinanceDialog"
:fiance-item="fianceItem"
@cancelDialog="showFinishFinanceDialog = false"/>
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { findUserBill } from '@/api/business/order'
import LoadFinanceDialog from './components/LoadFinanceDialog'
import FinishFinanceDialog from './components/FinishFinanceDialog'
export default {
name: 'FinanceList',
components: {
FinishFinanceDialog,
LoadFinanceDialog,
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: ''
}, {
value: 2,
label: ''
}],
listLoading: true,
listQuery: {
page: 1,
size: 20
},
list: [],
total: 0,
showLoadFinanceDialog: false,
fianceItem: {},
showFinishFinanceDialog: false
}
},
created() {
this.getList()
},
methods: {
/**
* 跳转账单明细
*/
handleToDetail(item) {
this.$router.push({ path: '/finance/financeDetail', query: { userId: item.userId, accountPeriod: item.accountPeriod }})
},
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
findUserBill(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
},
/**
* 下载账单
*/
handleToLoad(row) {
this.showLoadFinanceDialog = true
this.fianceItem = row
},
/**
* 完成结款
*/
handleToFinish(row) {
this.showFinishFinanceDialog = true
this.fianceItem = row
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.sellerId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入藏家ID" />
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入订单编号" />
<el-select v-model="listQuery.state" placeholder="请选择订单状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini" />
</el-select>
<el-date-picker
v-model="timeValue"
:picker-options="pickerOptions"
class="filter-item"
style="width: 400px; "
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
align="right"/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
style="margin-left: 12px"
@click="handleFilter">查找
</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
<el-button type="primary" class="filter-item" @click="resetSearchForm">导出明细</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" fixed="left"/>
<!-- <el-table-column align="center" label="商品图片" prop="homePageImage">-->
<!-- <template slot-scope="scope">-->
<!-- <img-->
<!-- v-if="scope.row.homePageImage && scope.row.homePageImage.url"-->
<!-- :src="scope.row.homePageImage.url"-->
<!-- width="60px"-->
<!-- height="60px">-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="商品图片" prop="homePageImage">
<template slot-scope="scope">
<div v-if="scope.row.homePageImage && scope.row.homePageImage.url" class="image_preview">
<el-image
:preview-src-list="[scope.row.homePageImage.url]"
:src="scope.row.homePageImage.url"
class="table-td-thumb"
/>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="商品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.amount ? `¥ ${scope.row.amount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="平台到账(1%手续费)" prop="startPrice">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.startPrice ? `¥ ${scope.row.startPrice}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="藏家" prop="sellerName" />
<el-table-column align="center" label="藏家ID" prop="sellerId" />
<el-table-column align="center" label="订单类型" prop="typeName" />
<el-table-column align="center" label="订单创建时间" prop="createTime" width="160" />
<el-table-column label="藏家订单收入" align="center" >
<el-table-column prop="sellerEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.sellerEntryAmount ? `¥ ${scope.row.sellerEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="sellerWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.sellerWaitEntryAmount ? `¥ ${scope.row.sellerWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="平台收入" align="center" >
<el-table-column prop="systemEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.systemEntryAmount ? `¥ ${scope.row.systemEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="systemWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.systemWaitEntryAmount ? `¥ ${scope.row.systemWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="介绍佣金" align="center" >
<el-table-column prop="introduceEntryAmount" label="已入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introduceEntryAmount ? `¥ ${scope.row.introduceEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="introduceWaitEntryAmount" label="待入账" width="120" align="center" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introduceWaitEntryAmount ? `¥ ${scope.row.introduceWaitEntryAmount}` : '-'}` }}</span>
</template>
</el-table-column>
<el-table-column prop="introducerName" label="佣金归属" width="120" align="center" />
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { findOrderBillDetail, requestLogisticsList } from '@/api/business/order'
export default {
name: 'OrderDetail',
components: {
Pagination,
Line2Hidden
},
data() {
return {
itemKey: 0,
options: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20
},
list: [],
total: 0,
timeValue: '',
pickerOptions: {
disabledDate(date) {
return date.getTime() > Date.now() // 禁用大于今天的日期
}
}
}
},
created() {
this.getList()
this.getLogisticsList()
},
methods: {
/**
* 获取物流公司列表
*/
getLogisticsList() {
requestLogisticsList().then((response) => {
console.log('==response===', response)
this.logisticList = response.data.data
}).catch((err) => {
console.log('==err===', err)
})
},
resetSearchForm() {
this.timeValue = ''
this.listQuery = {
page: 1,
limit: 20
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
if (this.timeValue && this.timeValue.length > 0) {
this.listQuery.startCreateTime = this.timeValue[0]
this.listQuery.endCreateTime = this.timeValue[1]
} else {
this.listQuery.startCreateTime = ''
this.listQuery.endCreateTime = ''
}
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
findOrderBillDetail(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
}
</style>
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