2023-11-23 16:17:22 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
2024-03-05 09:08:28 +08:00
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
|
|
|
|
|
label-width="68px">
|
2023-11-23 16:17:22 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="会员ID" prop="memberId">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-input v-model="queryParams.memberId" placeholder="请输入会员ID" clearable
|
2024-03-01 16:49:16 +08:00
|
|
|
|
@keyup.enter.native="handleQuery" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="手机号" prop="mobileNumber">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-input v-model="queryParams.mobileNumber" placeholder="请输入手机号" clearable
|
2024-03-01 16:49:16 +08:00
|
|
|
|
@keyup.enter.native="handleQuery" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-col :span="1.5">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
v-hasPermi="['member:merchantVip:add']">开卡
|
2023-12-01 16:25:44 +08:00
|
|
|
|
</el-button>
|
2023-11-24 14:36:59 +08:00
|
|
|
|
</el-col>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<!--<el-col :span="1.5">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-button
|
2023-11-23 16:17:22 +08:00
|
|
|
|
type="success"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="single"
|
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
|
v-hasPermi="['member:info:edit']"
|
2023-11-27 14:54:22 +08:00
|
|
|
|
>修改</el-button>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-col>-->
|
|
|
|
|
|
<!--<el-col :span="1.5">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-button
|
2023-11-23 16:17:22 +08:00
|
|
|
|
type="danger"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
|
v-hasPermi="['member:info:remove']"
|
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
|
</el-col>-->
|
|
|
|
|
|
<!--<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="warning"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
|
v-hasPermi="['member:info:export']"
|
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
|
</el-col>-->
|
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
<el-table-column label="卡号" align="center" prop="walletCode" />
|
|
|
|
|
|
<el-table-column label="运营商" align="center" prop="merchantName" />
|
|
|
|
|
|
<el-table-column label="会员id" align="center" prop="memberId" />
|
2023-11-27 15:41:53 +08:00
|
|
|
|
<el-table-column label="头像" align="center" prop="avatarUrl">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<!-- <el-image v-if="scope.row.avatarUrl === null" :src="defaultImg" />-->
|
|
|
|
|
|
<el-image style="height: 50px;width: 50px"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
:src="scope.row.avatarUrl === null ? defaultImg[0].img : scope.row.avatarUrl"
|
|
|
|
|
|
:preview-src-list='[scope.row.avatarUrl === null ? defaultImg[0].img : scope.row.avatarUrl]' />
|
2023-11-27 15:41:53 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<el-table-column label="昵称" align="center" prop="nickName">
|
2024-03-05 09:08:28 +08:00
|
|
|
|
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<template slot-scope="scope">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<router-link :to="'/member/detail/index/' + scope.row.memberId" class="link-type">
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<span>{{ scope.row.nickName }}</span>
|
|
|
|
|
|
</router-link>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-table-column label="手机号" align="center" prop="mobileNumber" />
|
|
|
|
|
|
<el-table-column label="本金余额" align="center" prop="principalBalance" />
|
|
|
|
|
|
<el-table-column label="赠送余额" align="center" prop="giftBalance" />
|
|
|
|
|
|
<el-table-column label="总余额" align="center" prop="totalAccountAmount" />
|
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
2024-03-05 09:08:28 +08:00
|
|
|
|
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<template slot-scope="scope">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateBalance(scope.row)"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
v-hasPermi="['member:merchantVip:update']">充值/扣款
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-table-column label="查看" align="center" class-name="small-padding fixed-width">
|
2024-03-05 09:08:28 +08:00
|
|
|
|
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button size="mini" type="text" @click="viewDetails(scope.row)">明细</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-table>
|
|
|
|
|
|
|
2024-03-05 09:08:28 +08:00
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
|
|
|
|
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改会员基础信息对话框 -->
|
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-form ref="form" :model="createMerchantVip" :rules="rules" label-width="100px">
|
|
|
|
|
|
<el-form-item label="选择运营商">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-select v-model="createMerchantVip.targetMerchantId" clearable placeholder="请选择运营商"
|
|
|
|
|
|
@change="$forceUpdate()">
|
|
|
|
|
|
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName"
|
|
|
|
|
|
:value="item.merchantId">
|
2023-11-24 14:36:59 +08:00
|
|
|
|
</el-option>
|
|
|
|
|
|
</el-select>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-form-item label="手机号码">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-input v-model="createMerchantVip.mobileNumber" placeholder="请输入手机号码" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-form-item label="操作类型">
|
|
|
|
|
|
<el-radio v-model="createMerchantVip.type" label="1" border>充值</el-radio>
|
|
|
|
|
|
<el-radio v-model="createMerchantVip.type" label="2" border>扣款</el-radio>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-form-item label="金额" prop="balance">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-input-number v-model="createMerchantVip.updatePrincipalBalance" placeholder="请输入金额" :min="0"
|
|
|
|
|
|
:controls="false" :precision="2" />
|
2023-11-27 15:11:15 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="赠送金" prop="balance">
|
|
|
|
|
|
<el-input-number v-model="createMerchantVip.updateGiftBalance" placeholder="请输入赠送金" :min="0"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
:controls="false" :precision="2" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
2023-11-24 14:36:59 +08:00
|
|
|
|
<el-button type="primary" @click="submitCreateMerchantVip">确 定</el-button>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改会员余额对话框 -->
|
|
|
|
|
|
<el-dialog title="会员充值/扣款" @close="closeUpdateBalance" :visible.sync="openUpdateBalance" width="500px"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
append-to-body>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
<p>线下充值本金,客户直接在线下付款给商家</p>
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
|
<el-form-item label="选择运营商">
|
2023-11-27 14:54:22 +08:00
|
|
|
|
<el-select v-model="forbid" clearable disabled placeholder="请选择运营商"></el-select>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="操作类型">
|
|
|
|
|
|
<el-radio v-model="type" label="1" border>充值</el-radio>
|
|
|
|
|
|
<el-radio v-model="type" label="2" border>扣款</el-radio>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="金额" prop="balance">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-input-number v-model="updatePrincipalBalance" placeholder="请输入金额" :min="0" :controls="false"
|
|
|
|
|
|
:precision="2" />
|
2023-11-27 15:11:15 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="赠送金" prop="balance">
|
2023-11-28 09:08:14 +08:00
|
|
|
|
<el-input-number v-model="updateGiftBalance" placeholder="请输入赠送金" :min="0" :controls="false"
|
2024-03-01 16:49:16 +08:00
|
|
|
|
:precision="2" />
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="submitUpdateBalance">确 定</el-button>
|
|
|
|
|
|
<el-button @click="resetBalance">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<!-- 明细 -->
|
2024-03-05 09:08:28 +08:00
|
|
|
|
<el-dialog title="交易明细" :visible.sync="vehicleDetails" :before-close="closeDetails" width="1200px"
|
|
|
|
|
|
append-to-body>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<el-form :model="detailParameters" size="small" :inline="true">
|
|
|
|
|
|
<el-form-item label="选择日期" prop="tradeDate">
|
|
|
|
|
|
<el-date-picker v-model="createTimeRange" type="month" value-format="yyyy-MM" range-separator="-"
|
|
|
|
|
|
placeholder="选择日期">
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item style="margin-left: 10px;">
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="getDetails">搜索</el-button>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="充值余额:"> {{ totalRechargeAmount }} </el-form-item>
|
|
|
|
|
|
<el-form-item label="消费金额:" style="padding-left: 50px;">{{ totalConsumption }}</el-form-item>
|
2024-06-06 13:31:10 +08:00
|
|
|
|
<el-form-item label="累计充值金额:" style="padding-left: 50px;">{{ totalRechargeAmount }}</el-form-item>
|
|
|
|
|
|
<el-form-item label="累计消费金额:" style="padding-left: 50px;">{{ totalConsumption }}</el-form-item>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<el-table :data="detailList" stripe style="width: 100%" v-loading="loadings">
|
2024-03-11 15:49:06 +08:00
|
|
|
|
<el-table-column label="支付金" align="center" prop="amount">
|
2024-03-25 11:40:01 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span v-if="scope.row.subType == '订单付款'">一</span>
|
|
|
|
|
|
<span v-else>{{ scope.row.amount }}</span>
|
|
|
|
|
|
</template>
|
2024-03-01 16:49:16 +08:00
|
|
|
|
</el-table-column>
|
2024-03-11 15:49:06 +08:00
|
|
|
|
<el-table-column label="操作类型" align="center" prop="subType">
|
|
|
|
|
|
<!-- <template slot-scope="scope">
|
2024-03-01 16:49:16 +08:00
|
|
|
|
<span v-if="scope.row.subType == '后管扣款'">{{ scope.row.amount }}</span>
|
2024-03-11 15:49:06 +08:00
|
|
|
|
</template> -->
|
2024-03-01 16:49:16 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="支付金额" align="center" prop="payAmount" />
|
|
|
|
|
|
<el-table-column label="订单金额" align="center" prop="orderAmount" />
|
|
|
|
|
|
<el-table-column label="已退款" align="center" prop="refundAmount" />
|
|
|
|
|
|
<el-table-column label="时间" align="center" prop="transactionTime" />
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<!--分页-->
|
|
|
|
|
|
<pagination v-show="closeTotal > 0" :total="closeTotal" :page.sync="detailParameters.pageNum"
|
|
|
|
|
|
:limit.sync="detailParameters.pageSize" @pagination="getDetails" style="margin-bottom: 20px" />
|
|
|
|
|
|
</el-dialog>
|
2023-11-23 16:17:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
getInfo,
|
|
|
|
|
|
delInfo,
|
|
|
|
|
|
addInfo,
|
|
|
|
|
|
updateInfo,
|
|
|
|
|
|
updateMemberBalance,
|
2024-03-01 16:49:16 +08:00
|
|
|
|
getMerchantList, queryMerchantVipList, createMerchantVip, getMemberBalanceChangesV2
|
2023-11-23 16:17:22 +08:00
|
|
|
|
} from "@/api/member/info";
|
2024-03-01 16:49:16 +08:00
|
|
|
|
import { parseTime } from "@/utils/common";
|
2023-11-23 16:17:22 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "Info",
|
|
|
|
|
|
dicts: ['member_status'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-03-01 16:49:16 +08:00
|
|
|
|
defaultImg: [{ img: require('../../../assets/images/headPort.png') }],
|
2023-11-23 16:17:22 +08:00
|
|
|
|
// 遮罩层
|
|
|
|
|
|
loading: true,
|
2024-03-01 16:49:16 +08:00
|
|
|
|
loadings: true,
|
2023-11-23 16:17:22 +08:00
|
|
|
|
// 选中数组
|
|
|
|
|
|
ids: [],
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
single: true,
|
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
|
multiple: true,
|
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
|
showSearch: true,
|
|
|
|
|
|
// 总条数
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
// 会员基础信息表格数据
|
|
|
|
|
|
infoList: [],
|
|
|
|
|
|
// 运营商列表
|
|
|
|
|
|
merchantList: [],
|
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
|
title: "",
|
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
openUpdateBalance: false, // 控制充值扣款对话框
|
|
|
|
|
|
updatePrincipalBalance: "", // 充值扣款金额
|
2023-11-27 15:11:15 +08:00
|
|
|
|
updateGiftBalance: "",
|
2023-11-23 16:17:22 +08:00
|
|
|
|
updateBalanceMemberId: "", // 需要充值扣款的会员id
|
|
|
|
|
|
type: '1', // 操作类型 1-充值;2-扣款
|
|
|
|
|
|
targetMerchantId: "", // 目标运营商id
|
|
|
|
|
|
// 查询参数
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
merchantId: null,
|
|
|
|
|
|
nickName: null,
|
|
|
|
|
|
status: null,
|
|
|
|
|
|
avatarUrl: null,
|
|
|
|
|
|
mobileNumber: null,
|
|
|
|
|
|
memberId: null,
|
|
|
|
|
|
principalBalance: null,
|
|
|
|
|
|
giftBalance: null,
|
|
|
|
|
|
vinCode: null,
|
|
|
|
|
|
},
|
|
|
|
|
|
// 表单参数
|
|
|
|
|
|
form: {},
|
|
|
|
|
|
// 表单校验
|
2023-11-24 14:36:59 +08:00
|
|
|
|
rules: {},
|
|
|
|
|
|
// 开卡参数
|
|
|
|
|
|
createMerchantVip: {},
|
2023-11-24 16:22:45 +08:00
|
|
|
|
// 充值/扣款
|
|
|
|
|
|
updateMerchantVip: {},
|
2023-11-27 14:54:22 +08:00
|
|
|
|
forbid: '', //充值/扣款参数
|
2023-11-27 15:11:15 +08:00
|
|
|
|
selectedValue: null, // 设置默认选中第一条数据
|
2024-03-01 16:49:16 +08:00
|
|
|
|
vehicleDetails: false,
|
|
|
|
|
|
detailList: [],
|
|
|
|
|
|
totalConsumption: 0,
|
|
|
|
|
|
totalRechargeAmount: 0,
|
|
|
|
|
|
accumulatedRechargeAmount: 0,
|
|
|
|
|
|
accumulatedConsumptionAmount: 0,
|
|
|
|
|
|
closeTotal: 0,
|
|
|
|
|
|
detailParameters: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
walletCode: null,
|
|
|
|
|
|
tradeDate: null,
|
|
|
|
|
|
memberId: null
|
|
|
|
|
|
},
|
|
|
|
|
|
createTimeRange: [],
|
2023-11-23 16:17:22 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
// 子类型 进账:10-充值, 11-赠送, 12-订单结算退款 出账:20-后管扣款, 21-订单付款, 22-用户退款
|
|
|
|
|
|
subType() {
|
|
|
|
|
|
return this.type === '1' ? '10' : '20';
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
|
|
|
this.getList();
|
2023-11-24 14:36:59 +08:00
|
|
|
|
this.getMerchantList();
|
2023-11-23 16:17:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
/** 查询会员基础信息列表 */
|
|
|
|
|
|
getList() {
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
pageNum: this.queryParams.pageNum,
|
|
|
|
|
|
pageSize: this.queryParams.pageSize,
|
|
|
|
|
|
memberId: this.queryParams.memberId,
|
|
|
|
|
|
mobileNumber: this.queryParams.mobileNumber,
|
|
|
|
|
|
}
|
|
|
|
|
|
console.log("params", params)
|
2023-11-24 11:06:00 +08:00
|
|
|
|
queryMerchantVipList(params).then(response => {
|
2023-11-23 16:17:22 +08:00
|
|
|
|
this.infoList = response.rows;
|
|
|
|
|
|
console.log(this.infoList);
|
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取运营商列表
|
|
|
|
|
|
getMerchantList() {
|
2023-11-27 14:54:22 +08:00
|
|
|
|
getMerchantList().then((response) => {
|
|
|
|
|
|
console.log("response", response)
|
|
|
|
|
|
this.merchantList = response.obj;
|
2023-12-01 16:25:44 +08:00
|
|
|
|
this.createMerchantVip.targetMerchantId = this.merchantList[0].merchantId
|
2023-11-23 16:17:22 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
|
cancel() {
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
|
reset() {
|
|
|
|
|
|
this.form = {
|
|
|
|
|
|
nickName: null,
|
|
|
|
|
|
status: "0",
|
|
|
|
|
|
avatarUrl: null,
|
|
|
|
|
|
mobileNumber: null,
|
|
|
|
|
|
remark: null,
|
|
|
|
|
|
principalBalance: null,
|
|
|
|
|
|
giftBalance: null,
|
|
|
|
|
|
};
|
|
|
|
|
|
this.resetForm("form");
|
2023-12-01 16:25:44 +08:00
|
|
|
|
if (this.merchantList.length > 0) {
|
|
|
|
|
|
this.createMerchantVip.targetMerchantId = this.merchantList[0].merchantId;
|
|
|
|
|
|
}
|
2023-11-23 16:17:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
|
handleQuery() {
|
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
|
resetQuery() {
|
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
handleAdd() {
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
this.open = true;
|
2023-11-24 14:36:59 +08:00
|
|
|
|
this.title = "添加运营商VIP";
|
2023-11-23 16:17:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
|
console.log("修改按钮", row);
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
const id = row.memberId || this.ids
|
|
|
|
|
|
getInfo(id).then(response => {
|
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
|
this.title = "修改会员基础信息";
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// 重置 充值赠送金额相关
|
|
|
|
|
|
resetBalance() {
|
|
|
|
|
|
// console.log("重置 充值赠送金额相关");
|
|
|
|
|
|
this.openUpdateBalance = false;
|
|
|
|
|
|
this.updatePrincipalBalance = "";
|
2023-11-27 15:11:15 +08:00
|
|
|
|
this.updateGiftBalance = "";
|
2023-11-23 16:17:22 +08:00
|
|
|
|
this.updateBalanceMemberId = "";
|
|
|
|
|
|
this.type = "1";
|
|
|
|
|
|
},
|
|
|
|
|
|
// changeInput() {
|
|
|
|
|
|
// const pattern = /^[1-9][0-9]*$/; // 正整数的正则表达式
|
|
|
|
|
|
// // 不符合正整数时
|
|
|
|
|
|
// if (!pattern.test(this.updateBalance)) {
|
|
|
|
|
|
// // input 框绑定的内容为空
|
|
|
|
|
|
// this.updateBalance = ''
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭赠送余额 对话框
|
|
|
|
|
|
closeUpdateBalance() {
|
|
|
|
|
|
console.log("关闭赠送余额 对话框");
|
|
|
|
|
|
this.resetBalance();
|
|
|
|
|
|
},
|
|
|
|
|
|
// 点击充值按钮
|
|
|
|
|
|
handleUpdateBalance(row) {
|
2023-11-27 14:54:22 +08:00
|
|
|
|
console.log(row);
|
|
|
|
|
|
this.forbid = row.merchantName
|
2023-11-27 15:18:54 +08:00
|
|
|
|
this.targetMerchantId = row.merchantId
|
2023-11-23 16:17:22 +08:00
|
|
|
|
this.openUpdateBalance = true;
|
|
|
|
|
|
this.updateBalanceMemberId = row.memberId;
|
|
|
|
|
|
},
|
|
|
|
|
|
// 点击对话框确认按钮
|
|
|
|
|
|
submitUpdateBalance() {
|
|
|
|
|
|
const param = {
|
|
|
|
|
|
memberId: this.updateBalanceMemberId,
|
|
|
|
|
|
updatePrincipalBalance: this.updatePrincipalBalance,
|
2023-11-27 15:11:15 +08:00
|
|
|
|
updateGiftBalance: this.updateGiftBalance,
|
2023-11-23 16:17:22 +08:00
|
|
|
|
type: this.type,
|
|
|
|
|
|
subType: this.subType,
|
2023-11-27 15:18:54 +08:00
|
|
|
|
targetMerchantId: this.targetMerchantId
|
2023-11-23 16:17:22 +08:00
|
|
|
|
};
|
|
|
|
|
|
console.log("修改会员本金余额 param:", param);
|
|
|
|
|
|
updateMemberBalance(param).then(response => {
|
|
|
|
|
|
console.log("修改会员本金余额 response:", response);
|
|
|
|
|
|
this.$modal.msgSuccess("充值成功");
|
|
|
|
|
|
this.openUpdateBalance = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2023-11-24 14:36:59 +08:00
|
|
|
|
/* 开卡确定按钮 */
|
|
|
|
|
|
submitCreateMerchantVip() {
|
|
|
|
|
|
console.log("submitCreateMerchantVip", this.createMerchantVip);
|
|
|
|
|
|
createMerchantVip(this.createMerchantVip).then(response => {
|
|
|
|
|
|
console.log("开卡确定按钮 response:", response);
|
|
|
|
|
|
this.$modal.msgSuccess("开卡成功");
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2023-11-23 16:17:22 +08:00
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
|
submitForm() {
|
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
|
updateInfo(this.form).then(response => {
|
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
addInfo(this.form).then(response => {
|
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
|
this.open = false;
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
|
this.$modal.confirm('是否确认删除会员基础信息编号为"' + ids + '"的数据项?').then(function () {
|
|
|
|
|
|
return delInfo(ids);
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
handleExport() {
|
|
|
|
|
|
this.download('member/info/export', {
|
|
|
|
|
|
...this.queryParams
|
|
|
|
|
|
}, `info_${new Date().getTime()}.xlsx`)
|
2024-03-01 16:49:16 +08:00
|
|
|
|
},
|
|
|
|
|
|
viewDetails(row) {
|
|
|
|
|
|
console.log(row);
|
|
|
|
|
|
this.detailParameters.walletCode = row.walletCode;
|
|
|
|
|
|
this.detailParameters.memberId = row.memberId;
|
|
|
|
|
|
this.detailParameters.tradeDate = parseTime(new Date(), '{y}-{m}'); //设置默认日期
|
|
|
|
|
|
this.createTimeRange = this.detailParameters.tradeDate;
|
|
|
|
|
|
this.vehicleDetails = true;
|
|
|
|
|
|
this.getDetails();
|
|
|
|
|
|
},
|
|
|
|
|
|
closeDetails() {
|
|
|
|
|
|
this.vehicleDetails = false;
|
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
|
this.totalConsumption = 0;
|
|
|
|
|
|
this.totalRechargeAmount = 0;
|
|
|
|
|
|
},
|
|
|
|
|
|
getDetails() {
|
|
|
|
|
|
this.loadings = true;
|
|
|
|
|
|
console.log(this.detailParameters);
|
|
|
|
|
|
getMemberBalanceChangesV2(this.detailParameters).then(response => {
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
|
this.loadings = false;
|
|
|
|
|
|
this.detailList = response.obj.pageResponse.list;
|
|
|
|
|
|
this.totalRechargeAmount = response.obj.totalRechargeAmount;
|
|
|
|
|
|
this.accumulatedRechargeAmount = response.obj.accumulatedRechargeAmount;
|
|
|
|
|
|
this.accumulatedConsumptionAmount = response.obj.accumulatedConsumptionAmount;
|
|
|
|
|
|
this.totalConsumption = response.obj.totalConsumption;
|
|
|
|
|
|
this.closeTotal = response.obj.pageResponse.total;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
createTimeRange(newValue, oldValue) {
|
|
|
|
|
|
console.log("createTimeRange发生变化", newValue, oldValue);
|
|
|
|
|
|
if (newValue != null && newValue.length > 0) {
|
|
|
|
|
|
this.detailParameters.tradeDate = newValue;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.detailParameters.tradeDate = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2023-11-23 16:17:22 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|