详情显示分控信息

This commit is contained in:
墨大叔 2024-09-20 16:00:41 +08:00
parent d05af92ad9
commit 3a8c23b0b2
6 changed files with 122 additions and 30 deletions

View File

@ -0,0 +1,36 @@
<template>
<el-tag :type="value ? trueType : falseType" :size="size">{{value ? trueText : falseText}}</el-tag>
</template>
<script>
export default {
name: "BooleanTag",
props: {
value: {
type: Boolean,
default: null,
required: true
},
size: {
type: String,
default: null,
},
trueText: {
type: String,
default: '是'
},
falseText: {
type: String,
default: '否'
},
trueType: {
type: String,
default: 'success'
},
falseType: {
type: String,
default: 'danger'
}
},
}
</script>

View File

@ -66,6 +66,13 @@
<el-descriptions-item label="设备总用电量">
{{deviceData.totalElectriQuantity | money | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="限制充值时间">
{{deviceData.limitRechargeTime | defaultValue}}
<boolean-tag :value="!isLimitRecharge" size="small" true-text="限制充值中" false-text="已解封"/>
</el-descriptions-item>
<el-descriptions-item label="限制充值原因">
{{deviceData.limitRechargeReason | defaultValue}}
</el-descriptions-item>
</el-descriptions>
</el-card>
@ -147,11 +154,13 @@ import StoreLink from '@/components/Business/Store/StoreLink.vue'
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import { $serviceType, $view } from '@/utils/mixins'
import Recharge from '@/views/system/recharge/index.vue'
import BooleanTag from '@/components/BooleanTag/index.vue'
export default {
name: 'Device/:deviceId',
mixins: [$serviceType, $view],
components: {
BooleanTag,
Recharge,
UserLink,
StoreLink,
@ -192,6 +201,13 @@ export default {
},
isOpen() {
return this.deviceData != null && this.deviceData.powerStatus === '1';
},
//
isLimitRecharge() {
if (this.deviceData == null || this.deviceData.limitRechargeTime == null) {
return false;
}
return new Date(this.deviceData.limitRechargeTime).getTime() < new Date();
}
},
created() {

View File

@ -438,6 +438,11 @@ export default {
...this.query,
...this.$route.query
}
if (this.view != null) {
this.showSearch = false;
}
this.getList();
},
methods: {

View File

@ -2,24 +2,30 @@
<div class="app-container" v-loading="loading">
<template v-if="userData != null">
<el-row :gutter="12">
<el-col :lg="8" :md="12" :xs="24">
<el-col :lg="10" :md="12" :xs="24">
<el-card class="box-card" header="用户详情">
<div class="user-detail">
<div class="user-header">
<el-avatar :size="64" :src="userData.avatar"></el-avatar>
<el-row type="flex" class="name-box">
<span class="user-name">{{userData.nickName}}</span>
<el-tag type="primary" v-if="userData.isMch">商户</el-tag>
<el-tag type="primary" style="margin-left: 8px;" v-if="userData.isMch">商户</el-tag>
</el-row>
<div class="phone-number">{{userData.phonenumber}}</div>
</div>
<el-row type="flex" style="margin-top: 16px;">
<el-statistic title="店铺数" :value="userData.storeCount" :precision="0" suffix="家"/>
<el-statistic title="设备数" :value="userData.deviceCount" :precision="0" suffix="台"/>
<el-statistic title="账户余额" :value="userData.balance" :precision="2" suffix="元"/>
<el-statistic title="总收入" :value="userData.totalIncome" :precision="2" suffix="元"/>
<el-statistic title="总提现" :value="userData.withDrawlAmount" :precision="2" suffix="元"/>
<el-statistic title="总消费" :value="userData.rechargeAmount" :precision="2" suffix="元"/>
</el-row>
<div class="user-description">
<el-descriptions :column="2">
<el-descriptions-item label="微信" :span="2">{{userData.wxOpenId | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="店铺数">{{userData.storeCount | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="设备数">{{userData.deviceCount | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="设备服务费">
<el-descriptions :column="3">
<el-descriptions-item label="充值服务费">
<template v-if="userData.serviceRate == null || userData.serviceType == null">跟随渠道</template>
<template v-else>
<dict-tag :options="dict.type.service_type" :value="userData.serviceType" size="mini"/>
@ -33,16 +39,25 @@
{{userData.withdrawServiceRate}} {{serviceUnit(userData.withdrawServiceType)}}
</template>
</el-descriptions-item>
<el-descriptions-item label="账户余额">{{userData.balance | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="总收入">{{userData.totalIncome | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="总充值">{{userData.rechargeAmount | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="总提现">{{userData.withDrawlAmount | money | defaultValue}} </el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{userData.remark | defaultValue}}</el-descriptions-item>
<el-descriptions-item label="是否限制提现">
<boolean-tag :value="userData.limitWithdraw" size="small" true-type="danger" false-type="success"/>
</el-descriptions-item>
<el-descriptions-item label="限制提现原因" :span="2">
{{userData.limitWithdrawReason | defaultValue}}
</el-descriptions-item>
<el-descriptions-item label="是否限制退款">
<boolean-tag :value="userData.limitRefund" size="small" true-type="danger" false-type="success"/>
</el-descriptions-item>
<el-descriptions-item label="限制退款原因" :span="2">
{{userData.limitRefundReason | defaultValue}}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</el-card>
</el-col>
<el-col :lg="16" :md="12" :xs="24">
<el-col :lg="14" :md="12" :xs="24">
<el-card class="box-card">
<user-recharge-report :mch-id="userData.userId"/>
</el-card>
@ -66,6 +81,9 @@
<el-tab-pane label="收入订单" lazy>
<recharge :query="{mchId: userData.userId}" :view="views.mch"/>
</el-tab-pane>
<el-tab-pane label="提现列表" lazy>
<withdraw :query="{userId: userData.userId}" :view="views.user"/>
</el-tab-pane>
<el-tab-pane label="账变记录" lazy>
<record-balance :query="{userId: userData.userId}" :view="views.user"/>
</el-tab-pane>
@ -96,11 +114,13 @@ import Account from '@/views/ss/account/index.vue'
import Suit from '@/views/ss/suit/index.vue'
import Device from '@/views/system/device/index.vue'
import Recharge from '@/views/system/recharge/index.vue'
import BooleanTag from '@/components/BooleanTag/index.vue'
import Withdraw from '@/views/system/withdraw/index.vue'
export default {
name: 'User/:userId',
mixins: [$view, $serviceType],
components: { Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
components: { Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart},
dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'],
computed: {
serviceUnit() {
@ -139,7 +159,6 @@ export default {
font-size: 18px;
line-height: 30px;
vertical-align: center;
margin-right: 0.5em;
}
.phone-number {
font-size: 18px;
@ -162,6 +181,6 @@ export default {
}
.user-detail .user-description {
flex: 1;
margin-top: 32px;
margin-top: 16px;
}
</style>

View File

@ -217,10 +217,10 @@
<el-input v-model="form.phonenumber" placeholder="请输入手机号" :maxlength="11" show-word-limit
clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
</form-col>
<form-col :span="span * 2" label="设备服务费" prop="serviceRate" label-width="7em">
<el-input v-model="form.serviceRate" placeholder="请输入设备服务费" type="number">
<form-col :span="span * 2" label="充值服务费" prop="serviceRate" label-width="7em">
<el-input v-model="form.serviceRate" placeholder="请输入充值服务费" type="number">
<template #prepend>
<el-select v-model="form.serviceType" placeholder="请选择设备服务费收取方式" style="width: 10em">
<el-select v-model="form.serviceType" placeholder="请选择充值服务费收取方式" style="width: 10em">
<el-option
v-for="dict in dict.type.service_type"
:key="dict.value"
@ -316,11 +316,11 @@ export default {
{key: 'isMch', visible: true, label: '用户类型', align: 'center', minWidth: null, sortable: true},
{key: 'remark', visible: true, label: '备注', align: 'center', minWidth: null, sortable: false, overflow: true},
{key: 'status', visible: true, label: '账号状态', align: 'center', minWidth: null, sortable: true},
{key: 'createTime', visible: true, label: '创建时间', align: 'center', minWidth: "120", sortable: true},
{key: 'createTime', visible: true, label: '注册时间', align: 'center', minWidth: "120", sortable: true},
{key: 'rechargeAmount', visible: true, label: '充值金额', align: 'center', minWidth: null, sortable: true},
{key: 'withDrawlAmount', visible: true, label: '提现金额', align: 'center', minWidth: null, sortable: true},
{key: 'balance', visible: true, label: '账户余额', align: 'center', minWidth: null, sortable: true},
{key: 'serviceRate', visible: true, label: '设备服务费', align: 'center', minWidth: null, sortable: true},
{key: 'serviceRate', visible: true, label: '充值服务费', align: 'center', minWidth: null, sortable: true},
{key: 'withdrawServiceRate', visible: true, label: '提现服务费', align: 'center', minWidth: null, sortable: true},
{key: 'storeCount', visible: true, label: '店铺数量', align: 'center', minWidth: null, sortable: false},
{key: 'deviceCount', visible: true, label: '设备数量', align: 'center', minWidth: null, sortable: false},

View File

@ -14,7 +14,7 @@
<el-option v-for="dict in dict.type.withdraw_status" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="用户名称" prop="userName">
<el-form-item label="用户名称" prop="userName" v-if="notHasView(views.user)">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
@ -44,11 +44,11 @@
@change="handleQuery"
/>
</el-form-item>
<el-form-item label="提现方式" prop="channelId">
<el-select v-model="queryParams.channelId" clearable placeholder="请选择提现方式" @change="handleQuery">
<el-option v-for="dict in dict.type.withdraw_channel" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<!-- <el-form-item label="提现方式" prop="channelId">-->
<!-- <el-select v-model="queryParams.channelId" clearable placeholder="请选择提现方式" @change="handleQuery">-->
<!-- <el-option v-for="dict in dict.type.withdraw_channel" :key="dict.value" :label="dict.label" :value="dict.value"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="打款方式" prop="withdrawType">
<el-select v-model="queryParams.withdrawType" clearable placeholder="请选择打款方式" @change="handleQuery">
<el-option v-for="dict in dict.type.withdraw_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
@ -76,12 +76,12 @@
<el-table v-loading="loading" :data="billList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="billId" width="80"/>
<!-- <el-table-column label="ID" align="center" prop="billId" width="80"/>-->
<el-table-column label="提现单号" align="center" prop="billNo" width="200">
<el-link slot-scope="d" @click="handleView(d.row)" type="primary">{{d.row.billNo}}</el-link>
</el-table-column>
<el-table-column label="申请时间" align="center" prop="createTime" width="180"/>
<el-table-column label="申请用户" align="center" prop="mchName" width="160">
<el-table-column label="申请用户" align="center" prop="mchName" width="160" v-if="notHasView(views.user)">
<user-link slot-scope="d" :id="d.row.mchId" :name="d.row.mchName"/>
</el-table-column>
<el-table-column label="提现金额" align="center" min-width="100">
@ -176,11 +176,21 @@ import {
} from "@/api/system/withdraw";
import UserLink from '@/components/Business/SmUser/UserLink.vue'
import WithdrawDetail from '@/views/system/withdraw/detail.vue'
import { $view } from '@/utils/mixins'
export default {
name: "Bill",
components: { WithdrawDetail, UserLink },
name: "Withdraw",
mixins: [$view],
dicts: ['withdraw_status', 'withdraw_type', 'channel_type'],
components: { WithdrawDetail, UserLink },
props: {
query: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
showDetail: false,
@ -230,8 +240,14 @@ export default {
created() {
this.queryParams = {
...this.queryParams,
...this.query,
...this.$route.query
}
if (this.view != null) {
this.showSearch = false;
}
this.getList();
},
methods: {