master
parent
d45f98403b
commit
1334d445c5
@ -1,184 +1,192 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding: 0 20px;">
|
<div style="padding: 0 20px;">
|
||||||
<div ref="lxHeader">
|
<div ref="lxHeader">
|
||||||
<lx-header icon="md-apps" text="平台财务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
<lx-header icon="md-apps" text="平台财务管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||||
<slot>
|
<slot>
|
||||||
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||||
<Button class="select" icon="ios-add" type="primary" style="margin-right: 10px;"
|
<Button class="select" icon="ios-add" type="primary" style="margin-right: 10px;"
|
||||||
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'recharge'"
|
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'recharge'">商家充值
|
||||||
>商家充值
|
</Button>
|
||||||
</Button>
|
<Button class="select" icon="ios-remove" type="primary" style="margin-right: 10px;"
|
||||||
<Button class="select" icon="ios-remove" type="primary" style="margin-right: 10px;"
|
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'fine'">商家扣款
|
||||||
@click="$refs['rechargeFine'].isShow = true,$refs['rechargeFine'].type = 'fine'"
|
</Button>
|
||||||
>商家罚款
|
|
||||||
</Button>
|
<Select v-model="select.merchantId" class="select" style="width:160px;margin-right: 10px;" :clearable="true"
|
||||||
|
placeholder="所属商家" filterable>
|
||||||
<Select v-model="select.merchantId" class="select" style="width:160px;margin-right: 10px;" :clearable="true"
|
<Option v-for="item in merchants" :value="item.id" :key="item.id">{{ item.username }}</Option>
|
||||||
placeholder="所属商家" filterable
|
</Select>
|
||||||
>
|
<Select v-model="select.type" class="select" style="width:100px;margin-right: 10px;" :clearable="true"
|
||||||
<Option v-for="item in merchants" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
placeholder="类型" filterable>
|
||||||
</Select>
|
<Option
|
||||||
<Select v-model="select.type" class="select" style="width:100px;margin-right: 10px;" :clearable="true"
|
v-for="item in [{label:'佣金',value:'fee'},{label:'充值',value:'recharge'},{label:'退款',value:'refund'},{label:'扣款',value:'fine'},{label:'手工返佣',value:'manually_refund_fee'},{label:'自动返佣',value:'auto_refund_fee'}]"
|
||||||
placeholder="类型" filterable
|
:value="item.value" :key="item.value">{{ item.label }}
|
||||||
>
|
</Option>
|
||||||
<Option v-for="item in [{label:'佣金',value:'fee'},{label:'充值',value:'recharge'},{label:'退款',value:'refund'},{label:'罚款',value:'fine'}]"
|
</Select>
|
||||||
:value="item.value" :key="item.value"
|
<Input v-model="select.serial" style="width: 140px;margin-right: 10px;" clearable placeholder="请输入订单编号" />
|
||||||
>{{ item.label }}
|
|
||||||
</Option>
|
<div>
|
||||||
</Select>
|
<Input v-model="select.money_min" style="width: 90px;" clearable placeholder="开始金额" />
|
||||||
<Input v-model="select.serial" style="width: 140px;margin-right: 10px;" clearable placeholder="请输入订单编号"/>
|
<span>~</span>
|
||||||
|
<Input v-model="select.money_max" style="width: 90px;margin-right: 10px;" clearable placeholder="结束金额" />
|
||||||
<Button icon="ios-search" type="primary" style="margin-right: 10px;" @click="getFlow">搜索</Button>
|
</div>
|
||||||
<Button icon="ios-repeat" type="primary" style="margin-right: 10px;"
|
|
||||||
@click="select = {pageIndex:1,pageSize:10,merchantId:'',type:''},getFlow()"
|
<Button icon="ios-search" type="primary" style="margin-right: 10px;" @click="getFlow">搜索</Button>
|
||||||
>全部
|
<Button icon="ios-repeat" type="primary" style="margin-right: 10px;"
|
||||||
</Button>
|
@click="select = {pageIndex:1,pageSize:10,merchantId:'',type:''},getFlow()">全部
|
||||||
<Button icon="ios-download" type="primary" style="margin-right: 10px;" @click="downloadExel">导出</Button>
|
</Button>
|
||||||
</div>
|
<Button icon="ios-download" type="primary" style="margin-right: 10px;" @click="downloadExel">导出</Button>
|
||||||
</slot>
|
</div>
|
||||||
</lx-header>
|
</slot>
|
||||||
</div>
|
</lx-header>
|
||||||
|
</div>
|
||||||
<xy-table :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :list="list"
|
|
||||||
:table-item="table"
|
<xy-table :total="total" @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :list="list"
|
||||||
>
|
:table-item="table">
|
||||||
<template v-slot:btns>
|
<template v-slot:btns>
|
||||||
<div></div>
|
<div></div>
|
||||||
</template>
|
</template>
|
||||||
</xy-table>
|
</xy-table>
|
||||||
|
|
||||||
<rechargeFine ref="rechargeFine" :merchants="merchants" @refresh="getFlow"></rechargeFine>
|
<rechargeFine ref="rechargeFine" :merchants="merchants" @refresh="getFlow"></rechargeFine>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { index, getMerchants } from '@/api/finance'
|
import {
|
||||||
import { parseTime } from '@/utils'
|
index,
|
||||||
import { download } from '@/utils/downloadRequest'
|
getMerchants
|
||||||
|
} from '@/api/finance'
|
||||||
import rechargeFine from '@/views/finance/component/rechargeFine'
|
import {
|
||||||
|
parseTime
|
||||||
export default {
|
} from '@/utils'
|
||||||
components: {
|
import {
|
||||||
rechargeFine
|
download
|
||||||
},
|
} from '@/utils/downloadRequest'
|
||||||
data() {
|
|
||||||
return {
|
import rechargeFine from '@/views/finance/component/rechargeFine'
|
||||||
select: {
|
|
||||||
pageIndex: 1,
|
export default {
|
||||||
pageSize: 10,
|
components: {
|
||||||
merchantId: '',
|
rechargeFine
|
||||||
type: '',
|
},
|
||||||
serial:''
|
data() {
|
||||||
},
|
return {
|
||||||
|
select: {
|
||||||
merchants: [],
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
total: 0,
|
merchantId: '',
|
||||||
list: [],
|
type: '',
|
||||||
table: [
|
serial: '',
|
||||||
{
|
money_min: '',
|
||||||
prop: 'merchant.name',
|
money_max: ''
|
||||||
label: '商家名称',
|
},
|
||||||
width: 240,
|
|
||||||
align: 'left',
|
merchants: [],
|
||||||
fixed:'left'
|
|
||||||
},
|
total: 0,
|
||||||
{
|
list: [],
|
||||||
prop:'order.serial',
|
table: [{
|
||||||
label:'订单编号',
|
prop: 'merchant.username',
|
||||||
width: 150
|
label: '商家名称',
|
||||||
},
|
width: 240,
|
||||||
{
|
align: 'left',
|
||||||
prop: 'money',
|
fixed: 'left'
|
||||||
label: '金额',
|
},
|
||||||
align: 'right',
|
{
|
||||||
width: 140
|
prop: 'order.serial',
|
||||||
},
|
label: '订单编号',
|
||||||
{
|
width: 150
|
||||||
prop: 'balance',
|
},
|
||||||
label: '实时余额',
|
{
|
||||||
align: 'right',
|
prop: 'money',
|
||||||
width: 140
|
label: '金额',
|
||||||
},
|
align: 'right',
|
||||||
{
|
width: 140
|
||||||
prop: 'recharge.paid_at',
|
},
|
||||||
label: '商户充值时间',
|
{
|
||||||
width: 220,
|
prop: 'balance',
|
||||||
formatter: (cell, data, value, index) => {
|
label: '实时余额',
|
||||||
if(value)
|
align: 'right',
|
||||||
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}:{s}')
|
width: 140
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
prop: 'recharge.paid_at',
|
||||||
prop: 'created_at',
|
label: '商户充值时间',
|
||||||
label: '系统入账时间',
|
width: 220,
|
||||||
width: 220,
|
formatter: (cell, data, value, index) => {
|
||||||
formatter: (cell, data, value, index) => {
|
if (value)
|
||||||
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}:{s}')
|
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}:{s}')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'related_type_name',
|
prop: 'created_at',
|
||||||
label: '发生原因',
|
label: '系统入账时间',
|
||||||
width: 140
|
width: 220,
|
||||||
},
|
formatter: (cell, data, value, index) => {
|
||||||
{
|
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}:{s}')
|
||||||
prop: 'comment',
|
}
|
||||||
label: '备注',
|
},
|
||||||
minWidth:220,
|
{
|
||||||
align: 'left'
|
prop: 'related_type_name',
|
||||||
}
|
label: '发生原因',
|
||||||
]
|
width: 140
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
methods: {
|
prop: 'comment',
|
||||||
downloadExel() {
|
label: '备注',
|
||||||
download(
|
minWidth: 220,
|
||||||
'/api/admin/finance/index',
|
align: 'left'
|
||||||
'get',
|
}
|
||||||
{
|
]
|
||||||
merchant_id: this.select.merchantId,
|
}
|
||||||
type: this.select.type,
|
},
|
||||||
serial: this.select.serial,
|
methods: {
|
||||||
is_export: 1
|
downloadExel() {
|
||||||
},
|
download(
|
||||||
'财务流水.xlsx')
|
'/api/admin/finance/index',
|
||||||
},
|
'get', {
|
||||||
|
merchant_id: this.select.merchantId,
|
||||||
pageChange(e) {
|
type: this.select.type,
|
||||||
this.select.pageIndex = e
|
serial: this.select.serial,
|
||||||
this.getFlow()
|
is_export: 1
|
||||||
},
|
},
|
||||||
|
'财务流水.xlsx')
|
||||||
async getMerchant() {
|
},
|
||||||
const res = await getMerchants()
|
|
||||||
this.merchants = res
|
pageChange(e) {
|
||||||
},
|
this.select.pageIndex = e
|
||||||
async getFlow() {
|
this.getFlow()
|
||||||
const res = await index({
|
},
|
||||||
page: this.select.pageIndex,
|
|
||||||
page_size: this.select.pageSize,
|
async getMerchant() {
|
||||||
merchant_id: this.select.merchantId,
|
const res = await getMerchants({
|
||||||
type: this.select.type,
|
page_size: 9999
|
||||||
serial: this.select.serial
|
})
|
||||||
})
|
this.merchants = res
|
||||||
this.list = res.data
|
},
|
||||||
this.total = res.total
|
async getFlow() {
|
||||||
}
|
const res = await index({
|
||||||
},
|
page: this.select.pageIndex,
|
||||||
mounted() {
|
page_size: this.select.pageSize,
|
||||||
this.getMerchant()
|
merchant_id: this.select.merchantId,
|
||||||
this.getFlow()
|
...this.select
|
||||||
}
|
})
|
||||||
|
this.list = res.data
|
||||||
}
|
this.total = res.total
|
||||||
</script>
|
}
|
||||||
|
},
|
||||||
<style scoped lang="scss">
|
mounted() {
|
||||||
@media screen and (max-width: 1190px) {
|
this.getMerchant()
|
||||||
.select {
|
this.getFlow()
|
||||||
margin-bottom: 6px;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@media screen and (max-width: 1190px) {
|
||||||
|
.select {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in new issue