|
@@ -6,16 +6,55 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span class="leftText">财务数据</span>
|
|
|
<span class="leftTip">所有交易成功的金额,微信侧将收取6‰的交易手续费</span>
|
|
|
- <el-button class="rightBtn" type="primary" @click="getMoney">提现</el-button>
|
|
|
+ <el-button class="rightBtn" type="primary" @click="handleWithdrawal">提现</el-button>
|
|
|
</div>
|
|
|
- <div class="cardLIst">
|
|
|
- <div v-for="(item, index) in cardList" :key="index" class="cardItem">
|
|
|
- <div class="cardDetal">
|
|
|
- <div class="cardMoney">{{ item.money }}</div>
|
|
|
- <div class="cardText">
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- <img src="@/assets/images/shuoming.png">
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <div style="font-size: 18px;font-weight: bold;">基本数据</div>
|
|
|
+ <div style="display: flex;justify-content: space-around;align-items: center;text-align: center;">
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.turnover || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">累计营业额(元)</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.frozenMoney || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">冻结金额(元)</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.withdrawableMoney || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">可提现金额(元)</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.withdrawableStayMoney || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">提现中(元)</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.presenterVoucher || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">赠送代金券</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div style="font-size: 18px;font-weight: bold;">交易金相关</div>
|
|
|
+ <div style="display: flex;justify-content: space-around;align-items: center;text-align: center;">
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.beeTurnover || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">营业额</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.beeWithdrawal || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">可提现</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.beeFreeze || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">待到账冻结</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.withdrawn || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">已提现</div>
|
|
|
+ </div>
|
|
|
+ <div style="padding: 16px;">
|
|
|
+ <div style="font-size: 30px;font-weight: bold;color: #ffae11;margin-bottom: 20px;">{{ financialData.withdrawalIn || '0' }}</div>
|
|
|
+ <div style="font-size: 16px;color: #333333;">提现中</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -36,7 +75,7 @@
|
|
|
<!-- 表格 -->
|
|
|
<div class="tableBox">
|
|
|
<el-table
|
|
|
- ref="multipleTable" :data="tableData" border
|
|
|
+ ref="multipleTable" :data="financialData.finances" border
|
|
|
:header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%"
|
|
|
>
|
|
|
<el-table-column label="日期" width="220">
|
|
@@ -54,8 +93,8 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- *****************弹框开始***************** -->
|
|
|
- <el-dialog title="提现" :visible.sync="isVisible" width="30%">
|
|
|
+
|
|
|
+ <el-dialog title="提现" :visible.sync="isVisible" width="50%">
|
|
|
<el-form v-if="show" ref="form" :model="form" label-width="120px" size="small" :rules="rules">
|
|
|
<p class="text_tip">
|
|
|
<span>提现至:</span>
|
|
@@ -63,27 +102,34 @@
|
|
|
<span v-else>{{ getDetails.bankCard }}</span>
|
|
|
<span style="margin-left: 40px;">{{ getDetails.bankName }}</span>
|
|
|
</p>
|
|
|
- <el-form-item label="提现金额" prop="amount">
|
|
|
+ <el-form-item label="提现类型" prop="withdrawalType">
|
|
|
+ <el-radio-group v-model="form.withdrawalType">
|
|
|
+ <el-radio :label="1">正常支付订单</el-radio>
|
|
|
+ <el-radio :label="2">交易金</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="提现金额" prop="withdrawalMoney">
|
|
|
<el-col :span="16">
|
|
|
- <el-input v-model="form.amount" maxlength="9" :placeholder="'可提现金额:' + cardList[2].money" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.withdrawalMoney" maxlength="9"
|
|
|
+ :placeholder="`可提现金额:${form.withdrawalType === 1 ? financialData.withdrawableMoney : form.withdrawalType === 2 ? financialData.beeWithdrawal : '--'}`"
|
|
|
+ />
|
|
|
</el-col>
|
|
|
<el-col :span="6" style="text-align:center">
|
|
|
- <span class="sub_text" @click="getAllAmount">全部提现</span>
|
|
|
+ <span class="sub_text" @click="getAllwithdrawalAmount">全部提现</span>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<p v-else class="tips">您的账户尚未绑定银行卡,无法提现</p>
|
|
|
<p slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="confirm()">确定</el-button>
|
|
|
+ <el-button type="primary" @click="handleConfirm()">确定</el-button>
|
|
|
<el-button @click="isVisible = false">取消</el-button>
|
|
|
</p>
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog title="账单详情" :visible.sync="moneydio" width="80%">
|
|
|
<div class="content">
|
|
|
- <!-- 顶部搜索 -->
|
|
|
<div class="toolbar">
|
|
|
- <!-- 顶部搜索 -->
|
|
|
<el-form :inline="true" :model="moneyForm">
|
|
|
<el-form-item label="汇总日期时间">
|
|
|
<el-date-picker v-model="moneyForm.time" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" />
|
|
@@ -108,7 +154,6 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <!-- 表格 -->
|
|
|
<div class="content_table">
|
|
|
<div class="table">
|
|
|
<el-table
|
|
@@ -148,29 +193,26 @@ import {
|
|
|
getDetails
|
|
|
} from '@/api/finance'
|
|
|
export default {
|
|
|
+ name: 'List',
|
|
|
data() {
|
|
|
return {
|
|
|
moneydio: false,
|
|
|
- cardList: [
|
|
|
- {
|
|
|
- name: '累计营业额(元)',
|
|
|
- money: '0.00'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '冻结金额(元)',
|
|
|
- money: '0.00'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '可提现金额(元)',
|
|
|
- money: '0.00'
|
|
|
- },
|
|
|
- {
|
|
|
- name: '提现中(元)',
|
|
|
- money: '0.00'
|
|
|
- }
|
|
|
- ],
|
|
|
+ financialData: {
|
|
|
+ finances: [],
|
|
|
+ turnover: 0,
|
|
|
+ frozenMoney: 0,
|
|
|
+ withdrawableMoney: 0,
|
|
|
+ withdrawableStayMoney: 0,
|
|
|
+ presenterVoucher: 0,
|
|
|
+ beeTurnover: 0,
|
|
|
+ beeWithdrawal: 0,
|
|
|
+ beeFreeze: 0,
|
|
|
+ withdrawn: 0,
|
|
|
+ withdrawalIn: 0
|
|
|
+ },
|
|
|
form: {
|
|
|
- amount: ''
|
|
|
+ withdrawalType: 1,
|
|
|
+ withdrawalMoney: ''
|
|
|
},
|
|
|
moneyForm: {
|
|
|
time: '',
|
|
@@ -182,13 +224,13 @@ export default {
|
|
|
total: 1,
|
|
|
currentPage: 1,
|
|
|
rules: {
|
|
|
- amount: [ { required: true, message: '请输入提现金额', trigger: 'blur' } ]
|
|
|
+ withdrawalType: [ { required: true, message: '请选择提现类型', trigger: 'blur' } ],
|
|
|
+ withdrawalMoney: [ { required: true, message: '请输入提现金额', trigger: 'blur' } ]
|
|
|
},
|
|
|
formInline: {
|
|
|
condition: '1', // 时间条件 1-日汇总 2-月汇总
|
|
|
time: '' // 时间值
|
|
|
},
|
|
|
- tableData: [],
|
|
|
tableDatas: [],
|
|
|
isVisible: false,
|
|
|
getDetails: [ {} ],
|
|
@@ -233,12 +275,11 @@ export default {
|
|
|
this.getAlls()
|
|
|
},
|
|
|
// 提现
|
|
|
- async getMoney() {
|
|
|
+ async handleWithdrawal() {
|
|
|
this.isVisible = true
|
|
|
- this.form.amount = ''
|
|
|
+ this.form.withdrawalMoney = ''
|
|
|
// const res = await getWithdrawalDetails(this.formInline);
|
|
|
const res = await getBank({})
|
|
|
- console.log(res.data)
|
|
|
if (JSON.stringify(res.data) === '{}') {
|
|
|
this.show = false
|
|
|
} else {
|
|
@@ -247,22 +288,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 提现确定
|
|
|
- async confirm() {
|
|
|
+ async handleConfirm() {
|
|
|
if (this.show) {
|
|
|
- if (this.form.amount <= 0) {
|
|
|
+ if (this.form.withdrawalMoney <= 0) {
|
|
|
this.$message({
|
|
|
message: '请输入正确的提现金额',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+ if (!this.form.withdrawalType) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择提现类型',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
const res = await withdrawal({
|
|
|
shopName: this.getDetails.shopName, // 店铺名称
|
|
|
shopCode: this.getDetails.shopCode, // 店铺编码
|
|
|
bankName: this.getDetails.bankName, // 银行名称
|
|
|
bankCard: this.getDetails.bankCard, // 银行卡号
|
|
|
collectionName: this.getDetails.collectionName, // 收款人姓名
|
|
|
- withdrawalMoney: this.form.amount // 提现金额
|
|
|
+ withdrawalType: this.form.withdrawalType, // 提现类型
|
|
|
+ withdrawalMoney: this.form.withdrawalMoney // 提现金额
|
|
|
})
|
|
|
if (res.code === '') {
|
|
|
this.$message({
|
|
@@ -279,18 +328,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 全部提现
|
|
|
- getAllAmount() {
|
|
|
- this.form.amount = this.cardList[2].money
|
|
|
+ getAllwithdrawalAmount() {
|
|
|
+ if (this.form.withdrawalType === 1) {
|
|
|
+ this.form.withdrawalMoney = this.financialData.withdrawableMoney || 0
|
|
|
+ } else if (this.form.withdrawalType === 2) {
|
|
|
+ this.form.withdrawalMoney = this.financialData.beeWithdrawal || 0
|
|
|
+ }
|
|
|
},
|
|
|
// 初始化查询所有数据
|
|
|
async getAll(formInline) {
|
|
|
const res = await getFinanceCount(formInline)
|
|
|
if (res.code === '') {
|
|
|
- this.tableData = res.data.finances
|
|
|
- this.cardList[0].money = res.data.turnover
|
|
|
- this.cardList[1].money = res.data.frozenMoney
|
|
|
- this.cardList[2].money = res.data.withdrawableMoney
|
|
|
- this.cardList[3].money = res.data.withdrawableStayMoney
|
|
|
+ this.financialData = res.data
|
|
|
}
|
|
|
},
|
|
|
// 查询明细
|
|
@@ -350,39 +399,6 @@ export default {
|
|
|
color: #ffffff;
|
|
|
float: right;
|
|
|
}
|
|
|
-
|
|
|
- .cardLIst {
|
|
|
- padding: 10px;
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .cardItem {
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .cardDetal {
|
|
|
- .cardMoney {
|
|
|
- font-size: 40px;
|
|
|
- font-weight: bold;
|
|
|
- color: #ffae11;
|
|
|
- margin-bottom: 20px;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
-
|
|
|
- .cardText {
|
|
|
- font-size: 18px;
|
|
|
- display: flex;
|
|
|
- color: #333333;
|
|
|
-
|
|
|
- img {
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- margin-left: -7px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.tableBox {
|