|
|
@@ -0,0 +1,716 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <third-register></third-register>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <basic-container>
|
|
|
+ <el-col :span="12">
|
|
|
+ <avue-form :option="merchant.accountInfo.option" v-model="merchant.accountInfo.mallData">
|
|
|
+ <template slot-scope="scope" slot="logo">
|
|
|
+ <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
|
|
|
+ :src="merchant.accountInfo.mallData.logo"
|
|
|
+ style="border: 1px solid #eee"/>
|
|
|
+ <span class="mallName">{{ merchant.accountInfo.mallData.mallName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="totalAccountBalance">
|
|
|
+ <span>{{ merchant.accountInfo.yeePayData.totalAccountBalance }} 元</span>
|
|
|
+ <span class="recharge-btn" @click="rechargeForm.isRechargeShow = true">充值</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="intro">
|
|
|
+ <el-popover placement="top-start" title="商场描述:" width="400" trigger="hover"
|
|
|
+ :content="merchant.accountInfo.mallData.intro">
|
|
|
+ <span>{{ merchant.accountInfo.mallData.intro }}</span>
|
|
|
+ <p slot="reference"
|
|
|
+ style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width: 600px; color: #606266;margin: 0;">
|
|
|
+ {{ merchant.accountInfo.mallData.intro }}</p>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ </el-col>
|
|
|
+ <el-drawer
|
|
|
+ title="充值信息" :append-to-body="true"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :wrapperClosable="false"
|
|
|
+ :visible.sync="rechargeForm.isRechargeShow"
|
|
|
+ :direction="rechargeForm.direction"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <avue-form ref="form" :option="rechargeForm.option"
|
|
|
+ @submit="rechargeSubmit">
|
|
|
+ </avue-form>
|
|
|
+ <table border="1" cellpadding="5" bordercolor="#898989" v-if="rechargeTable.status"
|
|
|
+ :style="rechargeTable.style">
|
|
|
+ <tr v-for="(item,index) in rechargeTable.option" :key="`${index}`">
|
|
|
+ <th v-if="item2.type==='th'" v-for="(item2,index2) in item" :key="`${index+index2}`"
|
|
|
+ :colspan="item2.colspan?item2.colspan:1" :style="item2.style">
|
|
|
+ <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}
|
|
|
+ </th>
|
|
|
+ <th v-if="item2.type==='td'" v-for="(item2,index2) in item" :key="`${index+index2}`"
|
|
|
+ :colspan="item2.colspan?item2.colspan:1" :style="item2.style">
|
|
|
+ <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </el-drawer>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div role="tab" aria-expanded="true" aria-controls="el-collapse-content-8236"
|
|
|
+ aria-describedby="el-collapse-content-8236" style="margin-top:4px;border-bottom: 1px solid #eee;">
|
|
|
+ <div role="button" id="el-collapse-head-8236" tabindex="0" class="el-collapse-item__header is-active">
|
|
|
+ <div class="avue-group__header avue-group"><i class="el-icon-s-order avue-group__icon"></i>
|
|
|
+ <h1 class="avue-group__title">账户信息</h1>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table :data="merchant.accountBalanceInfo.data" stripe style="width: 100%">
|
|
|
+ <el-table-column prop="accountType" label="账户类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-text="changeAccountType(scope.row.accountType)"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="balance" label="余额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.balance }} 元</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="accountStatus" label="账户状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-text="changeAccountStatus(scope.row.accountStatus)"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </basic-container>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <basic-container>
|
|
|
+ <el-card class="box-card">
|
|
|
+ <avue-data-panel :option="optionTotal"></avue-data-panel>
|
|
|
+ </el-card>
|
|
|
+ <div style="margin-top: 30px;">
|
|
|
+ <h3>今日新增</h3>
|
|
|
+ <avue-data-display :option="optionToday"></avue-data-display>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 30px;">
|
|
|
+ <h3>新增趋势
|
|
|
+ <el-date-picker
|
|
|
+ size="mini"
|
|
|
+ :picker-options="tenantAddTrend.pickerOptions"
|
|
|
+ v-model="tenantAddTrend.time"
|
|
|
+ type="month"
|
|
|
+ @change="getTenantAddTrend"
|
|
|
+ value-format="yyyy-MM"
|
|
|
+ placeholder="选择月"
|
|
|
+ style="float: right">
|
|
|
+ </el-date-picker>
|
|
|
+ </h3>
|
|
|
+ <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
|
|
|
+ </div>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import moment from "moment";
|
|
|
+import {mapGetters} from "vuex";
|
|
|
+import * as echarts from 'echarts';
|
|
|
+import {
|
|
|
+ getAccountInfo,
|
|
|
+ getTenantAddTrend,
|
|
|
+ getTenantCensusCount,
|
|
|
+ getTenantTodayCensusCount,
|
|
|
+ rechargeSubmit
|
|
|
+} from '@/api/census/census';
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ merchant: {
|
|
|
+ isLimitHeight: true,
|
|
|
+ accountInfo: {
|
|
|
+ yeePayData: {},
|
|
|
+ mallData: {},
|
|
|
+ option: {
|
|
|
+ detail: true,
|
|
|
+ labelPosition: "left",
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ label: '商场信息',
|
|
|
+ prop: 'merchantInfo',
|
|
|
+ icon: 'el-icon-s-custom',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ prop: "logo",
|
|
|
+ span: 24,
|
|
|
+ slot: true,
|
|
|
+ labelWidth: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '易宝商户号',
|
|
|
+ span: 12,
|
|
|
+ prop: 'merchantNo',
|
|
|
+ labelWidth: 90,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '总余额',
|
|
|
+ span: 12,
|
|
|
+ prop: 'totalAccountBalance',
|
|
|
+ slot: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '负责人名称',
|
|
|
+ span: 12,
|
|
|
+ prop: 'personName',
|
|
|
+ labelWidth: 90,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '联系方式',
|
|
|
+ span: 12,
|
|
|
+ prop: 'personTel',
|
|
|
+ labelWidth: 90,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商场描述",
|
|
|
+ prop: "intro",
|
|
|
+ span: 24,
|
|
|
+ slot: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ accountBalanceInfo: {
|
|
|
+ data: [],
|
|
|
+ option: {}
|
|
|
+ },
|
|
|
+ rechargeOption: {
|
|
|
+ data: {},
|
|
|
+ option: {}
|
|
|
+ },
|
|
|
+ },
|
|
|
+ optionTotal: {
|
|
|
+ span: 8,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_shop/shop"});
|
|
|
+ },
|
|
|
+ title: '商店总数',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-s-shop',
|
|
|
+ color: 'rgb(27, 201, 142)',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_user/loginuser"});
|
|
|
+ },
|
|
|
+ title: '用户总数',
|
|
|
+ count: 0,
|
|
|
+ icon: 'el-icon-user-solid',
|
|
|
+ color: 'rgb(230, 71, 88)',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_bills/bills"});
|
|
|
+ },
|
|
|
+ title: '充值总额',
|
|
|
+ count: 0,
|
|
|
+ decimals: 2,
|
|
|
+ icon: 'el-icon-s-finance',
|
|
|
+ color: '#1cbbb4',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionToday: {
|
|
|
+ span: 8,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_shop/shop"});
|
|
|
+ },
|
|
|
+ count: 0,
|
|
|
+ title: '新增商户',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_user/loginuser"});
|
|
|
+ },
|
|
|
+ count: 0,
|
|
|
+ title: '新增用户',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ click: () => {
|
|
|
+ this.$router.push({path: "/ldt_bills/bills"});
|
|
|
+ },
|
|
|
+ count: 0,
|
|
|
+ decimals: 2,
|
|
|
+ title: '今日充值',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ tenantAddTrend: {
|
|
|
+ dom: null,
|
|
|
+ time: moment(Date.now()).format("yyyy-MM"),
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ return time.getTime() > Date.now()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ option: {
|
|
|
+ legend: {},
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ showContent: false
|
|
|
+ },
|
|
|
+ dataset: {
|
|
|
+ source: [
|
|
|
+ ['trend'],
|
|
|
+ ['用户新增'],
|
|
|
+ ['商户新增'],
|
|
|
+ ['会员新增']
|
|
|
+ ],
|
|
|
+ path: ["/ldt_user/loginuser", "/ldt_shop/shop", "/ldt_user/member"]
|
|
|
+ },
|
|
|
+ xAxis: {type: 'category'},
|
|
|
+ yAxis: {gridIndex: 0, splitNumber: 2},
|
|
|
+ grid: {top: '55%'},
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'},
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ seriesLayoutBy: 'row',
|
|
|
+ emphasis: {focus: 'series'}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'pie',
|
|
|
+ id: 'pie',
|
|
|
+ radius: '30%',
|
|
|
+ center: ['50%', '25%'],
|
|
|
+ emphasis: {
|
|
|
+ focus: 'self'
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ formatter: '{b}: {@2012} ({d}%)'
|
|
|
+ },
|
|
|
+ encode: {
|
|
|
+ itemName: 'trend',
|
|
|
+ value: moment(Date.now()).format("yyyy-MM-DD"),
|
|
|
+ tooltip: moment(Date.now()).format("yyyy-MM-DD")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rechargeForm: {
|
|
|
+ isRechargeShow: false,
|
|
|
+ direction: "rtl",
|
|
|
+ option: {
|
|
|
+ labelPosition: "right",
|
|
|
+ group: [
|
|
|
+ {
|
|
|
+ prop: 'rechargeInfo',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '充值金额',
|
|
|
+ span: 24,
|
|
|
+ prop: 'amount',
|
|
|
+ labelWidth: 90,
|
|
|
+ type: 'number',
|
|
|
+ precision: 2,
|
|
|
+ tip: '为保证充值正常入账,银行汇款时汇款金额需为充值金额!',
|
|
|
+ tipPlacement: "top",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入充值金额",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ span: 24,
|
|
|
+ prop: 'remark',
|
|
|
+ type: "textarea",
|
|
|
+ rules: [{
|
|
|
+ required: false,
|
|
|
+ message: "请输入备注",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rechargeTable: {
|
|
|
+ status: false,
|
|
|
+ style: {
|
|
|
+ width: "95%",
|
|
|
+ margin: "100px 20px 10px 10px",
|
|
|
+ color: "#898989",
|
|
|
+ fontSize: "0.7rem",
|
|
|
+ fontWeight: "bold",
|
|
|
+ textAlign: "left"
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ remark: "",
|
|
|
+ orderAmount: 0,
|
|
|
+ remitComment: "",
|
|
|
+ },
|
|
|
+ option: [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "银行汇款单",
|
|
|
+ type: "th",
|
|
|
+ colspan: 2,
|
|
|
+ style: {
|
|
|
+ textAlign: "center",
|
|
|
+ backgroundColor: "#efefef",
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "付款方信息",
|
|
|
+ type: "td",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "收款方信息",
|
|
|
+ type: "td"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "全  称:",
|
|
|
+ type: "td",
|
|
|
+ value: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "全  称:",
|
|
|
+ type: "td",
|
|
|
+ value: "易宝支付有限公司"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "汇出账号:",
|
|
|
+ type: "td",
|
|
|
+ value: "(保密)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "汇款账号:",
|
|
|
+ type: "td",
|
|
|
+ value: "210401294"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "开户银行:",
|
|
|
+ type: "td",
|
|
|
+ value: "(保密)"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "开户银行:",
|
|
|
+ type: "td",
|
|
|
+ value: "中国人民银行"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "汇款金额:",
|
|
|
+ type: "td",
|
|
|
+ value: () => this.rechargeTable.data.orderAmount,
|
|
|
+ colspan: 2
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "用途/摘要/备注:",
|
|
|
+ type: "td",
|
|
|
+ value: () => this.rechargeTable.data.remark,
|
|
|
+ colspan: 2
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "汇款备注码:",
|
|
|
+ type: "td",
|
|
|
+ value: () => this.rechargeTable.data.remitComment,
|
|
|
+ colspan: 2
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: "注意:",
|
|
|
+ type: "td",
|
|
|
+ value: "为保证充值正常入账,银行汇款时务必在附言或备注处填写此码;",
|
|
|
+ colspan: 2,
|
|
|
+ style: {
|
|
|
+ color: "red",
|
|
|
+ textDecoration: "underline"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...
|
|
|
+ mapGetters(["userInfo"]),
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //初始化方法
|
|
|
+ init() {
|
|
|
+ this.getTenantCensusCount();
|
|
|
+ this.getTenantTodayCensusCount();
|
|
|
+ this.getTenantAddTrend();
|
|
|
+ this.getAccountInfo();
|
|
|
+ },
|
|
|
+ //删除数组的某个元素
|
|
|
+ deleteArrayByObj(arr,attrName,...value){
|
|
|
+ value.forEach(ele=>{
|
|
|
+ for (let i = 0;i < arr.length; i++){
|
|
|
+ const column = arr[i];
|
|
|
+ if (ele === column[attrName]){
|
|
|
+ arr.splice(i,1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取租户数据统计
|
|
|
+ getTenantCensusCount() {
|
|
|
+ //获取租户数量
|
|
|
+ getTenantCensusCount().then(res => {
|
|
|
+ this.setArrayObjAttrByObj(this.optionTotal.data,"title","商店总数","count",res.data.data.shopCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionTotal.data,"title","用户总数","count",res.data.data.userCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionTotal.data,"title","充值总数","count",res.data.data.rechargeTotal);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取租户当日数据统计
|
|
|
+ getTenantTodayCensusCount() {
|
|
|
+ //获取租户数量
|
|
|
+ getTenantTodayCensusCount().then(res => {
|
|
|
+ this.setArrayObjAttrByObj(this.optionToday.data,"title","新增商户","count",res.data.data.shopCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionToday.data,"title","新增用户","count",res.data.data.userCount);
|
|
|
+ this.setArrayObjAttrByObj(this.optionToday.data,"title","今日充值","count",res.data.data.rechargeTotal);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //设置数组对象属性值
|
|
|
+ setArrayObjAttrByObj(arr,attrName,attrValue,key,value){
|
|
|
+ arr.forEach(ele=>{
|
|
|
+ if(ele[attrName]===attrValue){
|
|
|
+ ele[key] = value;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取租户平台新增趋势
|
|
|
+ getTenantAddTrend() {
|
|
|
+ let time = moment(this.tenantAddTrend.time);
|
|
|
+ //获取租户数量
|
|
|
+ getTenantAddTrend({
|
|
|
+ time: time.format("yyyy-MM-DD HH:mm:ss")
|
|
|
+ }).then(res => {
|
|
|
+ //清空内容
|
|
|
+ for(let i=0;i<this.tenantAddTrend.option.dataset.source.length;i++){
|
|
|
+ this.tenantAddTrend.option.dataset.source[i].splice(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取某月总天数
|
|
|
+ const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
|
|
|
+ : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
|
|
|
+
|
|
|
+ for (let i = 0; i < day; i++) {
|
|
|
+ //添加日期X坐标
|
|
|
+ const date = time.format("yyyy-MM-DD");
|
|
|
+ this.tenantAddTrend.option.dataset.source[0].push(date);
|
|
|
+
|
|
|
+ //添加Y坐标
|
|
|
+ //添加用户新增
|
|
|
+ this.setAddTrend(res.data.data.userAddCount,date,"用户新增");
|
|
|
+ //添加商户新增
|
|
|
+ this.setAddTrend(res.data.data.shopAddCount,date,"商户新增");
|
|
|
+ //添加会员新增
|
|
|
+ this.setAddTrend(res.data.data.memberAddCount,date,"会员新增");
|
|
|
+
|
|
|
+ //加上一天
|
|
|
+ time.add(1, 'days');
|
|
|
+ }
|
|
|
+
|
|
|
+ //第一次渲染
|
|
|
+ if (this.tenantAddTrend.dom === null) {
|
|
|
+ this.tenantAddTrend.dom = echarts.init(this.$refs.tenantAddTrend);
|
|
|
+
|
|
|
+ //添加坐标点击
|
|
|
+ this.tenantAddTrend.dom.on('updateAxisPointer', (event) => {
|
|
|
+ const xAxisInfo = event.axesInfo[0];
|
|
|
+ if (xAxisInfo) {
|
|
|
+ const dimension = xAxisInfo.value + 1;
|
|
|
+ this.tenantAddTrend.dom.setOption({
|
|
|
+ series: {
|
|
|
+ id: 'pie',
|
|
|
+ label: {
|
|
|
+ formatter: '{b}: {@[' + dimension + ']} ({d}%)'
|
|
|
+ },
|
|
|
+ encode: {
|
|
|
+ value: dimension,
|
|
|
+ tooltip: dimension
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //添加饼图点击
|
|
|
+ this.tenantAddTrend.dom.on('click', (params) => {
|
|
|
+ if (params.componentSubType === "pie") {
|
|
|
+ this.$router.push({path: this.tenantAddTrend.option.dataset.path[params.dataIndex]});
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //适应屏幕变化
|
|
|
+ window.addEventListener("resize", () => {
|
|
|
+ this.tenantAddTrend.dom.resize()
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.tenantAddTrend.dom.setOption(this.tenantAddTrend.option);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //设置趋势
|
|
|
+ setAddTrend(arr,date,attrName){
|
|
|
+ //添加Y坐标
|
|
|
+ let count = 0;
|
|
|
+ //添加用户新增
|
|
|
+ arr.forEach(ele => {
|
|
|
+ if (ele.time === date) {
|
|
|
+ count = ele.count;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.tenantAddTrend.option.dataset.source.forEach(ele=>{
|
|
|
+ if(ele[0]===attrName){
|
|
|
+ ele.push(count);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getAccountInfo() {
|
|
|
+ getAccountInfo({}).then(res => {
|
|
|
+ this.merchant.accountInfo.yeePayData = res.data.data.yeePayInfo;
|
|
|
+ this.merchant.accountBalanceInfo.data = res.data.data.yeePayInfo.accountInfoList;
|
|
|
+ this.merchant.accountInfo.mallData = res.data.data.mall;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeAccountType(res) {
|
|
|
+ switch (res) {
|
|
|
+ case 'SETTLE_ACCOUNT':
|
|
|
+ return "待结算账户";
|
|
|
+ case 'FUND_ACCOUNT':
|
|
|
+ return "商户资金账户";
|
|
|
+ case 'MARKET_ACCOUNT':
|
|
|
+ return "营销账户";
|
|
|
+ case 'DIVIDE_ACCOUNT':
|
|
|
+ return "待分账账户";
|
|
|
+ case 'FEE_ACCOUNT':
|
|
|
+ return "手续费账户";
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeAccountStatus(res) {
|
|
|
+ switch (res) {
|
|
|
+ case 'AVAILABLE':
|
|
|
+ return "可用";
|
|
|
+ case 'FROZEN':
|
|
|
+ return "冻结";
|
|
|
+ case 'FROZEN_CREDIT':
|
|
|
+ return "冻结止收";
|
|
|
+ case 'FROZEN_DEBIT':
|
|
|
+ return "冻结止付";
|
|
|
+ case 'CANCELLATION':
|
|
|
+ return "销户";
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClose(done) {
|
|
|
+ this.$confirm('确认关闭?')
|
|
|
+ .then(_ => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch(_ => {
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rechargeSubmit(row, done) {
|
|
|
+ rechargeSubmit(row).then((res) => {
|
|
|
+ //回显账单
|
|
|
+ this.rechargeTable.data = res.data.data;
|
|
|
+ this.rechargeTable.data.remark = row.remark;
|
|
|
+ this.rechargeTable.status = true;
|
|
|
+
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ }, error => {
|
|
|
+ done();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style scoped="scoped">
|
|
|
+.recharge-btn {
|
|
|
+ color: deepskyblue;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.recharge-btn:hover {
|
|
|
+ cursor: pointer;
|
|
|
+ color: red;
|
|
|
+ text-decoration: underline;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: medium;
|
|
|
+}
|
|
|
+
|
|
|
+.mallName {
|
|
|
+ font-family: inherit;
|
|
|
+ font-size: inherit;
|
|
|
+ border-color: #E4E7ED;
|
|
|
+ color: #606266;
|
|
|
+ margin-left: 15px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+</style>
|