oil-station/fuintAdmin/src/views/member/userInfo.vue

1577 lines
58 KiB
Vue
Raw Normal View History

2023-10-17 19:01:29 +08:00
<template>
2023-10-18 18:31:46 +08:00
<div class="app-container">
<el-card>
2023-10-19 18:47:09 +08:00
<div slot="header" style="display: flex;justify-content: space-between;padding-right: 0px">
2023-10-18 18:31:46 +08:00
<div>
2023-10-19 18:47:09 +08:00
<el-page-header @back="goBack" content="详情页面"></el-page-header>
</div>
<div>
<el-button type="primary" plain round @click="subCard">子卡管理<i class="el-icon-bank-card el-icon--right"></i></el-button>
2023-10-18 18:31:46 +08:00
<el-button type="primary" plain round>会员码</el-button>
</div>
</div>
<div>基础资料</div>
<div style="display: flex;margin-top: 20px">
<div class="left">
<div>
<img v-if="form.avatar" :src="form.avatar" style="width: 80px;height: 80px">
<img v-else src="@/assets/images/avatar.png" style="width: 80px;height: 80px">
</div>
2023-10-20 18:42:38 +08:00
<el-button type="warning" plain round size="mini" style="margin: 10px" @click="bindIdCard">绑定实体卡</el-button><br>
<el-button type="primary" icon="el-icon-bank-card" round style="margin: 10px;width: 50%;height: 40px" @click="userRecharge">会员充值</el-button>
2023-10-18 18:31:46 +08:00
</div>
<div class="right">
<el-descriptions>
<el-descriptions-item label="手机号">{{form.mobile}}
<el-tag size="mini" @click="replaceMobile">更换</el-tag>
</el-descriptions-item>
<el-descriptions-item label="会员昵称">{{form.name}}</el-descriptions-item>
<el-descriptions-item label="实体卡号">{{form.idcard}}</el-descriptions-item>
<el-descriptions-item label="绑定信息"></el-descriptions-item>
<el-descriptions-item label="会员状态">
<dict-tag :options="dict.type.zhzt" :value="form.status"/>
</el-descriptions-item>
<el-descriptions-item label="加油次数">{{form.consumeNum}}</el-descriptions-item>
<el-descriptions-item label="加油总金额">{{form.refuelMoney}}</el-descriptions-item>
<el-descriptions-item label="所属油站">{{ store.name }}</el-descriptions-item>
<el-descriptions-item label="注册时间">{{form.createTime}}</el-descriptions-item>
2023-10-19 18:47:09 +08:00
<el-descriptions-item label="关联副卡">
<span style="color: #00afff" @click="secondCard">副卡管理</span>
</el-descriptions-item>
<el-descriptions-item label="会员等级">
2023-10-20 18:42:38 +08:00
{{ grade.name }}
2023-10-19 18:47:09 +08:00
</el-descriptions-item>
2023-10-18 18:31:46 +08:00
<el-descriptions-item label="储值优惠"></el-descriptions-item>
2023-10-19 18:47:09 +08:00
<el-descriptions-item label="每日笔数">
<span style="color: #00afff" @click="configuration">跟随全局总配置</span>
</el-descriptions-item>
<el-descriptions-item label="固定等级">
<span style="color: #00afff" @click="level">
<dict-tag :options="dict.type.zcrzdj" :value="form.fixingLevel"/></span>
</el-descriptions-item>
2023-10-18 18:31:46 +08:00
<el-descriptions-item label="备注信息">{{ form.description }}</el-descriptions-item>
</el-descriptions>
</div>
</div>
</el-card>
<el-card style="margin: 20px 0">
<div>会员资产</div>
<div>
<template>
<div>
<el-row :gutter="20">
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:value="form.point"
title="累计积分"
></el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:value="form.refuelMoney"
title="加油金">
</el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:precision="2"
:value="form.balance"
title="账户余额"
></el-statistic>
</div>
</el-col>
<el-col :span="4">
<div class="sta">
<el-statistic
group-separator=","
:precision="2"
:value="form.literCard"
title="升数卡余额"
></el-statistic>
</div>
</el-col>
</el-row>
</div>
</template>
</div>
</el-card>
<el-card>
<template>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="加油订单" name="refuelOrder">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="订单时间" align="center"/>
<el-table-column label="交易终端" align="center" prop="userNo"/>
<el-table-column label="油品/油枪" align="center" prop="name" />
<el-table-column label="订单金额" align="center" prop="mobile"/>
<el-table-column label="优惠金额" align="center" prop="gradeId"/>
<el-table-column label="实付金额" align="center" prop="balance"/>
<el-table-column label="付款类型" align="center" prop="balance"/>
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="订单类型" align="center" prop="point"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="商品订单" name="shopOrder">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="订单时间" align="center"/>
<el-table-column label="订单金额" align="center" prop="userNo"/>
<el-table-column label="商品数量" align="center" prop="name" />
<el-table-column label="储值卡" align="center" prop="mobile"/>
<el-table-column label="实付金额" align="center" prop="balance"/>
<el-table-column label="付款类型" align="center" prop="balance"/>
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="订单类型" align="center" prop="point"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="余额记录" name="balanceRecord">
<!-- <el-tabs v-model="balanceRecord" type="card" @tab-click="handleClick">-->
<!-- <el-tab-pane label="储值卡记录" name="first">储值卡记录</el-tab-pane>-->
<!-- <el-tab-pane label="升数卡记录" name="second">升数卡记录</el-tab-pane>-->
<!-- </el-tabs>-->
<el-radio-group v-model="tabPosition" size="mini" style="margin-bottom: 30px;">
<el-radio-button label="giftCard">储值卡记录</el-radio-button>
<el-radio-button label="literCard">升数卡记录</el-radio-button>
</el-radio-group>
<div v-if="tabPosition=='giftCard'">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="所属油站"/>
<el-table-column prop="date" label="变动账户"/>
<el-table-column prop="date" label="类型"/>
<el-table-column label="详细信息">
<el-table-column prop="name" label="变动金额"/>
<el-table-column prop="address" label="变动前余额"/>
<el-table-column prop="address" label="变动后余额"/>
</el-table-column>
<el-table-column prop="date" label="订单号"/>
<el-table-column prop="date" label="描述"/>
<el-table-column prop="date" label="变动时间"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<div v-else>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动账户" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动升数" align="center" prop="name" />
<el-table-column label="订单号" align="center" prop="balance"/>
<el-table-column label="描述" align="center" prop="balance"/>
<el-table-column label="变动时间" align="center" prop="point"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-tab-pane>
<el-tab-pane label="积分记录" name="pointRecord">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动积分" align="center" prop="name" />
<el-table-column label="描述" align="center" prop="balance"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane label="卡券列表" name="cardList">
<el-radio-group v-model="cardList" size="mini" style="margin-bottom: 30px;">
<el-radio-button label="notUse">未使用</el-radio-button>
<el-radio-button label="used">已使用</el-radio-button>
<el-radio-button label="expired">已过期</el-radio-button>
<el-radio-button label="whole">全部</el-radio-button>
</el-radio-group>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="所属油站"/>
<el-table-column prop="date" label="优惠券名称"/>
<el-table-column prop="date" label="卡券类型"/>
<el-table-column prop="date" label="满减金额"/>
<el-table-column prop="date" label="券面额"/>
<el-table-column prop="date" label="适用油品"/>
<el-table-column prop="date" label="状态"/>
<el-table-column label="卡券可用规则">
<el-table-column prop="name" label="有效期"/>
<el-table-column prop="address" label="周期与时段"/>
</el-table-column>
<el-table-column prop="date" label="领取时间"/>
<el-table-column prop="date" label="描述"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-tab-pane>
<el-tab-pane label="成长值记录" name="growthValue">
<el-radio-group v-model="growthValue" size="mini" style="margin-bottom: 30px;">
<el-radio-button label="whole">全部</el-radio-button>
<el-radio-button label="gasoline">汽油成长值</el-radio-button>
<el-radio-button label="diesel">柴油成长值</el-radio-button>
<el-radio-button label="naturalGas">天然气成长值</el-radio-button>
</el-radio-group>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动成长值" align="center" prop="name" />
<el-table-column label="描述" align="center" prop="balance"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-tab-pane>
<el-tab-pane label="加油金记录" name="refuelMoney">
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="id" align="center"/>
<el-table-column label="变动时间" align="center"/>
<el-table-column label="类型" align="center" prop="userNo"/>
<el-table-column label="变动数据" align="center" prop="name" />
<el-table-column label="记录单号" align="center" prop="name" />
<el-table-column label="变动描述" align="center" prop="balance"/>
<el-table-column label="场景来源" align="center" prop="balance"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</template>
</el-card>
2023-10-20 18:42:38 +08:00
<!-- 会员充值-->
2023-10-31 18:18:30 +08:00
<el-dialog :close-on-click-modal="false" width="60%" :title="title" :visible.sync="openRecharge" append-to-body>
2023-10-20 18:42:38 +08:00
<template>
<el-tabs v-model="activeRecharge" type="card" @tab-click="handleClick">
<el-tab-pane label="储值卡" name="balance">
<div>
2023-11-13 16:54:15 +08:00
<!-- <el-row>
2023-10-20 18:42:38 +08:00
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%;line-height: 40px">油品类型</div>
<el-radio-button>储值卡充值</el-radio-button>
</div>
</el-col>
2023-11-13 16:54:15 +08:00
</el-row> -->
2023-10-20 18:42:38 +08:00
<el-row>
2023-11-13 16:54:15 +08:00
<!--
.conten-bottom{
box-sizing: border-box;
padding: 20px 20px;
display: flex;
flex-wrap: wrap;
} -->
<el-col :span="1.5">
<div style="height: 50px;line-height: 50px">充值金额</div>
</el-col>
<el-col :span="22">
<div v-if="cardValueList.length>0" style="display: flex;margin: 13px 5px;box-sizing: border-box;flex-wrap: wrap; ">
2023-10-20 18:42:38 +08:00
<div class="mon"
2023-11-13 16:54:15 +08:00
v-for="(item,index) in cardValueList" :key="index"
2023-10-20 18:42:38 +08:00
:class="activeKey === index ? 'select' : ''"
2023-11-13 16:54:15 +08:00
@click="rechargeCard(index)">
<div class="top1"><span class="amount1">{{ item.rechargeBalance }}</span></div>
<div>赠送<span class="amount">{{ item.giftBalance }}</span></div>
2023-10-20 18:42:38 +08:00
</div>
</div>
2023-11-13 16:54:15 +08:00
<div style="width: 30%;margin-left: 13px;margin-top: 8px;"
:class="activeKey === cardValueList.length ? 'select' : ''"
@click="rechargeCard(cardValueList.length,-1)">
2023-10-20 18:42:38 +08:00
<el-input placeholder="请输入充值金额"
2023-10-31 18:18:30 +08:00
size="medium"
2023-11-13 16:54:15 +08:00
v-model.number="cardValueForm.amount"
2023-11-21 18:11:49 +08:00
@input="valueAmoutChange(cardValueForm.amount)">
2023-10-20 18:42:38 +08:00
<template slot="prepend">自定义</template>
<template slot="append"></template>
</el-input>
</div>
</el-col>
</el-row>
2023-11-13 16:54:15 +08:00
2023-10-20 18:42:38 +08:00
<el-row>
<el-col :span="24">
<div style="display: flex;justify-content: space-between;margin: 20px 0">
<div class="jine">
<div class="zeng">赠送金额</div>
<div>
<el-input placeholder="0.00"
2023-11-13 16:54:15 +08:00
v-model="cardValueForm.giftBalance"
2023-10-20 18:42:38 +08:00
disabled>
<template slot="append"></template>
</el-input>
<span class="bom">赠送金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span>
</div>
</div>
2023-11-13 16:54:15 +08:00
2023-10-20 18:42:38 +08:00
<div class="jine">
2023-11-13 16:54:15 +08:00
<div class="zeng">赠送积分</div>
2023-10-20 18:42:38 +08:00
<div>
2023-11-13 16:54:15 +08:00
<el-input placeholder="0"
v-model="cardValueForm.points"
2023-10-20 18:42:38 +08:00
disabled>
2023-11-13 16:54:15 +08:00
<template slot="append">积分</template>
2023-10-20 18:42:38 +08:00
</el-input>
2023-11-13 16:54:15 +08:00
<span class="bom">赠送积分 仅自定义金额模式下可手动输入,活动充值赠送积分不可手动更改[需开启积分活动有效]</span>
2023-10-20 18:42:38 +08:00
</div>
</div>
2023-11-13 16:54:15 +08:00
2023-10-20 18:42:38 +08:00
<div class="jine">
2023-11-13 16:54:15 +08:00
<div class="zeng" style="width: 100px;">赠成长值</div>
2023-10-20 18:42:38 +08:00
<div>
<el-input placeholder="0"
2023-11-13 16:54:15 +08:00
v-model="cardValueForm.growthValue"
2023-10-20 18:42:38 +08:00
disabled>
2023-11-13 16:54:15 +08:00
<template slot="append">成长值</template>
2023-10-20 18:42:38 +08:00
</el-input>
2023-11-13 16:54:15 +08:00
<!-- <span class="bom">赠送加油金金额 仅自定义金额模式下可手动输入赠送活动充值赠送金额不可手动更改</span> -->
2023-10-20 18:42:38 +08:00
</div>
</div>
2023-11-13 16:54:15 +08:00
2023-10-20 18:42:38 +08:00
<div class="jine">
<div class="zeng">提成员工</div>
<div>
2023-11-13 16:54:15 +08:00
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardValueForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button>
2023-10-20 18:42:38 +08:00
</el-input>
2023-11-13 16:54:15 +08:00
<span class="bom">仅系统储值档次支持提成员工选择自定义充值金额匹配低一档次</span>
2023-10-20 18:42:38 +08:00
</div>
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%">充值备注</div>
<el-input
type="textarea"
placeholder=""
2023-11-13 16:54:15 +08:00
v-model="cardValueForm.remark"
2023-10-20 18:42:38 +08:00
maxlength="255"
show-word-limit
>
</el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div style="width: 7%">支付方式</div>
<div>
2023-11-14 18:53:58 +08:00
<el-radio v-for="dict in payList" v-model="cardValueForm.paymentType" :key="dict.dictValue" :label="dict.dictValue" :value="dict.dictValue" border >{{ dict.dictLabel }}</el-radio>
2023-10-20 18:42:38 +08:00
</div>
</div>
</el-col>
</el-row>
<div style="margin: 20px 0;text-align: center">
2023-11-13 16:54:15 +08:00
<el-button type="primary" @click="confirm(1)">确认充值</el-button>
2023-10-20 18:42:38 +08:00
<el-button @click="cancel"> </el-button>
</div>
</div>
</el-tab-pane>
2023-11-13 16:54:15 +08:00
<el-tab-pane label="存油卡" name="literCard">
2023-10-20 18:42:38 +08:00
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%;line-height: 40px">油品类型</div>
2023-11-13 16:54:15 +08:00
<el-radio-group v-model="tabOilType" style="margin-bottom: 30px;">
2023-11-22 18:05:02 +08:00
<el-radio-button v-for="item,index in oilTypeList" :label="item.oilType" @click.native="tabOilTypeClick(item.status)">{{ item.type }}</el-radio-button>
2023-10-20 18:42:38 +08:00
</el-radio-group>
</div>
</el-col>
</el-row>
<el-row>
2023-11-13 16:54:15 +08:00
<el-col :span="1.5">
<div style="height: 50px;line-height: 50px;">充值金额</div>
</el-col>
<el-col :span="22">
<div style="display: flex;margin: 20px 5px;box-sizing: border-box;flex-wrap: wrap;">
2023-10-20 18:42:38 +08:00
<div class="mon2"
2023-11-13 16:54:15 +08:00
v-for="(item,index) in cardFuelDieselList" :key="index"
:class="activeKey === index ? 'select' : ''"
2023-10-20 18:42:38 +08:00
@click="recharge(index)">
2023-11-13 16:54:15 +08:00
<div class="top1"><span class="amount1">{{ item.incomeLitres }}</span>L</div>
<div>售价<span class="amount">{{ item.rechargeBalance }}</span></div>
<div>锁价<span class="amount">{{ item.lockupPrice }}</span>/</div>
2023-10-20 18:42:38 +08:00
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div class="jine">
<div class="zeng">赠送积分</div>
<div>
2023-11-13 16:54:15 +08:00
<el-input placeholder="0" disabled v-model="cardFuelDieselForm.points">
2023-10-20 18:42:38 +08:00
<template slot="append">积分</template>
</el-input>
<span class="bom">升数卡充值不支持自定义积分,选择对应充值活动获得对应积分[需开启积分活动有效]</span>
</div>
</div>
2023-11-14 18:53:58 +08:00
<!-- <div style="display:flex;margin-left: 20px">
2023-10-20 18:42:38 +08:00
<div style="line-height: 40px;width: 20%">提成员工</div>
<div>
2023-11-13 16:54:15 +08:00
<el-input :readonly="true" placeholder="请选择提成员工" v-model="cardFuelDieselForm.realName">
<el-button slot="append" @click="chooseStaff">选择员工</el-button>
2023-10-20 18:42:38 +08:00
</el-input>
</div>
2023-11-14 18:53:58 +08:00
</div> -->
2023-10-20 18:42:38 +08:00
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex">
<div style="width: 7%">充值备注</div>
<el-input
type="textarea"
placeholder=""
v-model="rechargeDesc"
maxlength="255"
show-word-limit
>
</el-input>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div style="display: flex;margin: 20px 0">
<div style="width: 7%">支付方式</div>
<div>
2023-11-14 18:53:58 +08:00
<el-radio v-for="dict in dict.type.payment_type" v-model="cardFuelDieselForm.paymentType" :key="dict.value" :label="dict.value" :value="dict.value" border>{{ dict.label }}</el-radio>
2023-10-20 18:42:38 +08:00
</div>
</div>
</el-col>
</el-row>
<div style="margin: 20px 0;text-align: center">
2023-11-13 16:54:15 +08:00
<el-button type="primary" @click="confirm(2)">确认充值</el-button>
2023-10-20 18:42:38 +08:00
<el-button @click="cancel"> </el-button>
</div>
</el-tab-pane>
</el-tabs>
</template>
</el-dialog>
2023-11-13 16:54:15 +08:00
<!-- 选择员工-->
<el-dialog :close-on-click-modal="false" width="50%" height="50%" title="选择员工" :visible.sync="openStaff" append-to-body>
<select-staff @send-data="handleDataFromChild">
2023-10-18 18:31:46 +08:00
2023-11-13 16:54:15 +08:00
</select-staff>
</el-dialog>
2023-10-20 18:42:38 +08:00
<!-- 确认充值-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openConfirm" width="500px" append-to-body>
2023-11-13 16:54:15 +08:00
<div v-if="isPay == true"
v-loading="loading">
2023-10-20 18:42:38 +08:00
<div style="text-align: center;font-size: 15px;font-weight: bold">付款金额</div>
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
2023-11-23 18:33:25 +08:00
{{ realyPayBills }}
2023-11-13 16:54:15 +08:00
<!-- <el-tag
2023-10-20 18:42:38 +08:00
effect="dark">
汽油
2023-11-13 16:54:15 +08:00
</el-tag> -->
2023-10-20 18:42:38 +08:00
</div>
2023-11-14 18:53:58 +08:00
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
2023-10-20 18:42:38 +08:00
<div>
2023-11-14 18:53:58 +08:00
<el-input v-model="authCode" @keydown.enter.native="collection" placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
2023-10-20 18:42:38 +08:00
<i
slot="suffix">
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
</i>
</el-input>
</div>
<div class="demo-image">
<div class="block" style="text-align: center">
<el-image
style="width: 200px; height: 200px"
fit="cover"
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
</div>
</div>
<el-divider></el-divider>
<div style="display: flex;justify-content: space-around">
<el-button @click="cancelCollection">取消收款</el-button>
2023-11-13 16:54:15 +08:00
<el-button type="primary" @click="collection">确定收款</el-button>
</div>
</div>
<div v-else>
<div v-if="isPaySuccess">
<el-result icon="success" title="收款成功">
<template slot="extra">
<el-button type="primary" @click="handClose"> </el-button>
</template>
</el-result>
</div>
<div v-else>
<el-result icon="error" title="支付失败,请重新支付">
<template slot="extra">
<el-button type="primary" @click="handClose"> </el-button>
</template>
</el-result>
2023-10-20 18:42:38 +08:00
</div>
2023-11-13 16:54:15 +08:00
</div>
2023-10-20 18:42:38 +08:00
</el-dialog>
<!-- 更换手机号对话框-->
2023-10-18 18:31:46 +08:00
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openMobile" style="margin-top: 200px" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="新手机号" prop="mobile" style="width: 420px">
<el-input v-model="form.mobile" placeholder="请输入新手机号" maxlength="30" />
<span style="font-size: 12px;color: grey">
手机号更换后,旧手机号将无法使用,更换后实时生效
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
2023-10-19 18:47:09 +08:00
<!-- 副卡管理-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openSecondCard" width="60%" append-to-body>
<div style="display: flex;justify-content: space-between;margin: 10px 0">
<div style="font-size: 16px">副卡账户</div>
<el-button type="primary">创建副卡账户</el-button>
</div>
<div>
<el-alert
type="error"
title="关于副卡"
:closable="false">
<p v-for="(item,index) in aboutSecondCard" :id="index">
{{item}}
</p>
</el-alert>
</div>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="账户ID"/>
<el-table-column prop="date" label="账户名称"/>
<el-table-column label="余额">
<el-table-column prop="name" label="储值卡"/>
<el-table-column prop="address" label="升数卡"/>
</el-table-column>
<el-table-column label="会员等级">
<el-table-column prop="name" label="汽油"/>
<el-table-column prop="address" label="柴油"/>
</el-table-column>
<el-table-column label="统计">
<el-table-column prop="name" label="可用积分"/>
<el-table-column prop="address" label="消费次数"/>
</el-table-column>
<el-table-column prop="date" label="实体卡号"/>
<el-table-column prop="date" label="状态"/>
<el-table-column prop="date" label="创建时间"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-dialog>
2023-10-20 18:42:38 +08:00
<!-- 绑定实体卡-->
<el-dialog :close-on-click-modal="false" :title="title" width="450px" :visible.sync="openBindIdCard" append-to-body>
<div style="text-align: center">
<img v-if="form.avatar" :src="form.avatar" style="width: 80px;height: 80px">
<img v-else src="@/assets/images/avatar.png" style="width: 80px;height: 80px">
</div>
<p class="idcard" style="color: #00afff">{{form.name}}</p>
<p class="idcard" style="font-size: 16px">{{form.mobile}}</p>
<p class="idcard" style="font-size: 16px">请绑定实体卡号</p>
2023-10-19 18:47:09 +08:00
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
2023-10-20 18:42:38 +08:00
<div style="width: 80%;margin: 0 auto">
<el-input v-model="form.idcard" placeholder="请读卡或输入卡号"></el-input>
<p style="font-size: 12px;color: grey;">实体卡号最低5位且不可重复绑定后不可删除如需更换卡号请在会员详情页面内进行卡片重新绑定</p>
</div>
2023-10-19 18:47:09 +08:00
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 子卡管理-->
<el-dialog :close-on-click-modal="false" width="60%" :title="title" :visible.sync="openSubCard" append-to-body>
<el-tabs v-model="subCardActive" @tab-click="handleClick">
<el-tab-pane label="子卡管理" name="subCardManage">
<div style="display: flex;justify-content: space-between;margin: 10px 0">
<div style="font-size: 16px">会员信息{{form.mobile}}</div>
<el-button type="primary">新增子卡</el-button>
</div>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="子卡卡号"/>
<el-table-column label="基础信息">
<el-table-column prop="name" label="子卡姓名"/>
<el-table-column prop="address" label="手机号"/>
<el-table-column prop="address" label="车牌号"/>
</el-table-column>
<el-table-column label="额度管理">
<el-table-column prop="name" label="配额额度"/>
<el-table-column prop="address" label="已用额度"/>
<el-table-column prop="address" label="可用额度"/>
</el-table-column>
<el-table-column prop="date" label="状态"/>
<el-table-column prop="date" label="操作"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<el-alert
title="关于子卡"
type="info"
description="子卡为会员子母卡功能,子卡共享母卡的储值额度及信息,子卡为实体会员卡信息,消费需在PC或手持机中才可进行使用">
</el-alert>
</el-tab-pane>
<el-tab-pane label="子卡消费记录" name="consumption">
<div style="display: flex;justify-content: space-between;margin: 10px 0">
<div style="font-size: 16px">
<el-form ref="form" :model="subCardList" :rules="rules" label-width="120px">
<el-row>
<el-col :span="8">
<el-form-item label="子卡卡号" prop="userNo">
<el-input
v-model="subCardList.idCard"
placeholder="请输入卡号信息"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联单号">
<el-input
v-model="subCardList.orderId"
placeholder="关联单号信息"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary">新增子卡</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column prop="date" label="子卡卡号"/>
<el-table-column prop="date" label="消费金额"/>
<el-table-column label="消费信息">
<el-table-column prop="name" label="关联单号"/>
<el-table-column prop="address" label="描述信息"/>
</el-table-column>
<el-table-column prop="date" label="消费时间"/>
</el-table>
<pagination
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
<el-alert
title="关于子卡"
type="info"
description="当前会员的所有子卡消费记录信息,可根据对应子卡卡号进行检索查询">
</el-alert>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!-- 每日交易次数-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openConfig" style="margin-top: 200px" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<div style="margin-bottom: 20px">
{{transaction}}
</div>
<el-input v-model="config" />
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 固定等级-->
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="openLevel" style="margin-top: 200px" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
2023-10-20 18:42:38 +08:00
<el-form-item label="变更认证" prop="fixingLevel" style="width: 420px">
2023-10-19 18:47:09 +08:00
<el-select
v-model="form.fixingLevel"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.zcrzdj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
2023-10-17 19:01:29 +08:00
</div>
</template>
<script>
2023-10-18 18:31:46 +08:00
import {getUser, updateUser} from "@/api/staff/user/user";
import {ljStoreInfo} from "@/api/staff/store";
import {getUserGrade} from "@/api/staff/user/usergrade";
2023-11-13 16:54:15 +08:00
import {getList} from "@/api/EventMarketing/oilBlock";
2023-11-14 18:53:58 +08:00
import {getCountOilTypeApi,getCardValueListApi,getPrepaidCardTopUpApi,getCheckTheStatusOfYourPaymentApi,getDicts,getPrepaidFuelTopUpApi,getCheckTheStatusOfYourPaymentByFuelApi} from "@/api/EventMarketing/cardSet";
2023-10-19 18:47:09 +08:00
import {getSysConfig} from "@/api/staff/user/sysconfig";
2023-10-20 18:42:38 +08:00
import item from "../../layout/components/Sidebar/Item.vue";
2023-11-13 16:54:15 +08:00
import SelectStaff from "@/components/local/selectStaff";
2023-11-14 18:53:58 +08:00
import BigNumber from 'bignumber.js';
2023-10-18 18:31:46 +08:00
2023-10-17 19:01:29 +08:00
export default {
2023-11-13 16:54:15 +08:00
components: {SelectStaff},
2023-10-20 18:42:38 +08:00
computed: {
item() {
return item
}
},
2023-11-13 16:54:15 +08:00
dicts: ['official','zhzt','zcrzdj','payment_type'],
2023-10-18 18:31:46 +08:00
data(){
return{
2023-11-13 16:54:15 +08:00
flag:null,
// 充值余额列表
cardValueList:[],
cardValueForm: {
cardValueId:'', // 储值卡id
mtStaffId: '', //
realName: '',
staffMobile: '',
amount:'', // 自定义充值字段
bidBalance:'', // 储值卡面值
rechargeBalance:'', // 实际支付
giftBalance:'',// 赠送金额
points:'', //赠送积分
growthValue:'', // 赠送成长值
remark:'',
2023-11-14 18:53:58 +08:00
paymentType:'', // 支付方式
royaltyType: '',// 提成类型
percentageCommissions:null,
2023-11-23 18:33:25 +08:00
amountCommission:null,
rechargeType:'0'
2023-10-20 18:42:38 +08:00
},
2023-11-13 16:54:15 +08:00
// 存油卡列表
cardFuelDieselList:[],
sourceCardFuelDieselList:[],
cardFuelDieselForm: {
mtStaffId: '',
realName: '',
staffMobile: '',
points:'',
remark:'',
2023-11-14 18:53:58 +08:00
rechargeBalance:'', //实际支付
paymentType:'',
oilType:'',
type:'',
chainStorId:'',
incomeLitres:'',
2023-11-13 16:54:15 +08:00
},
authCode:'', // 支付码
2023-11-13 18:58:31 +08:00
timer: null,
2023-11-23 18:33:25 +08:00
realyPayBills:0,
2023-11-13 16:54:15 +08:00
oilTypeList: {},
isPay:true,
isPaySuccess:false,
2023-11-14 18:53:58 +08:00
isQuery:true,
2023-11-13 16:54:15 +08:00
2023-11-14 18:53:58 +08:00
payList:[],
2023-10-20 18:42:38 +08:00
// 升数卡
literCard:[
{liter:73.75,amount:500,lockPrice:6.78,point:50},
{liter:151.98,amount:1000,lockPrice:6.58,point:100},
{liter:318.47,amount:2000,lockPrice:6.28,point:200},
{liter:493.42,amount:3000,lockPrice:6.08,point:300},
{liter:896.06,amount:5000,lockPrice:5.58,point:500},
{liter:1968.50,amount:10000,lockPrice:5.08,point:1000},
],
// 充值金额
amount:'',
// 充值备注
rechargeDesc:'',
// 支付方式
payment:'扫码支付',
activeKey:0,
2023-10-19 18:47:09 +08:00
// 每日交易介绍
transaction:"",
config:'-1',
num:1,
// 操作类型
type:'add',
2023-10-18 18:31:46 +08:00
title:'',
// 是否显示修改对话框
openMobile: false,
2023-10-20 18:42:38 +08:00
openRecharge: false,
2023-10-19 18:47:09 +08:00
openSecondCard:false,
2023-10-20 18:42:38 +08:00
openBindIdCard:false,
2023-10-19 18:47:09 +08:00
openSubCard:false,
openConfig:false,
openLevel:false,
2023-10-20 18:42:38 +08:00
openConfirm:false,
2023-11-13 16:54:15 +08:00
openStaff:false,
2023-10-18 18:31:46 +08:00
growthValue:'whole',
cardList:'notUse',
tabPosition: 'giftCard',
balanceRecord: 'first',
2023-10-20 18:42:38 +08:00
tabOilType: '92',
2023-10-19 18:47:09 +08:00
// 关于副卡信息
aboutSecondCard:[],
2023-10-18 18:31:46 +08:00
// 遮罩层
loading: false,
id:'',
// 会员信息
form:{},
// 店铺信息
store:'',
// 会员等级信息
grade:'',
activeName: 'refuelOrder',
2023-10-19 18:47:09 +08:00
subCardActive:'subCardManage',
2023-10-20 18:42:38 +08:00
activeRecharge:'balance',
2023-10-18 18:31:46 +08:00
tableData:[],
2023-10-19 18:47:09 +08:00
total:0,
2023-10-18 18:31:46 +08:00
queryParams: {
page: 1,
pageSize: 10,
mobile: '',
id: '',
name: '',
status: '',
},
2023-10-19 18:47:09 +08:00
subCardList:[],
2023-10-18 18:31:46 +08:00
list: [],
// 表单校验
rules: {
mobile: [{ required: true, message: "请输入手机号", trigger: "blur" }],
2023-10-19 18:47:09 +08:00
type: [{ required: true, message: "请选择操作类型", trigger: "blur" }],
2023-10-20 18:42:38 +08:00
fixingLevel: [{ required: true, message: "请选择认证信息", trigger: "blur" }],
2023-10-18 18:31:46 +08:00
}
}
},
2023-11-13 16:54:15 +08:00
mounted() {
if (this.oilTypeList.length > 0) {
this.selectOilType(this.oilTypeList[0].oilType);
}
},
2023-10-18 18:31:46 +08:00
created() {
this.id = this.$route.query.id;
this.getUserInfo();
2023-10-19 18:47:09 +08:00
this.getInformation();
2023-10-18 18:31:46 +08:00
},
methods: {
2023-10-31 18:18:30 +08:00
// 选择员工
chooseStaff(){
2023-11-13 16:54:15 +08:00
this.openStaff = true
2023-10-31 18:18:30 +08:00
},
2023-10-18 18:31:46 +08:00
// 更换手机号
replaceMobile(){
this.openMobile = true;
this.title = '更换手机号'
},
2023-10-19 18:47:09 +08:00
// 副卡管理
secondCard(){
this.openSecondCard = true;
this.title = this.form.secondCard+'-副卡账户管理'
},
2023-10-20 18:42:38 +08:00
// 实体卡绑定
bindIdCard(){
this.openBindIdCard = true;
this.title = '实体卡绑定'
2023-10-19 18:47:09 +08:00
},
// 子卡管理
subCard(){
this.openSubCard = true;
this.title = '子卡管理'
},
// 每日笔数
configuration(){
this.openConfig = true;
this.title = '每日交易次数'
},
// 固定等级
level(){
this.openLevel = true;
this.title = '固定等级(原专车认证)'
},
2023-11-13 16:54:15 +08:00
// 储值卡查询
2023-11-14 18:53:58 +08:00
async getCardValueList() {
2023-11-13 16:54:15 +08:00
let quy = {
pageNo: 1,
pageSize: 10000,
isonline: 0
}
2023-11-14 18:53:58 +08:00
await getCardValueListApi(quy).then(res=>{
2023-11-13 16:54:15 +08:00
this.cardValueList = res.data.records;
this.cardValueList.sort((a, b) => a.rechargeBalance - b.rechargeBalance);
2023-11-22 18:05:02 +08:00
2023-11-13 16:54:15 +08:00
})
2023-11-14 18:53:58 +08:00
if (this.cardValueList.length > 0) {
2023-11-22 18:05:02 +08:00
// 过滤
this.cardValueList = this.cardValueList.filter(item => {
return item.membershipLevel.includes(this.grade.name);
});
2023-11-14 18:53:58 +08:00
this.rechargeCard(0);
}
2023-11-13 16:54:15 +08:00
},
valueAmoutChange(data) {
2023-11-21 18:11:49 +08:00
this.cardValueForm.points = ''
2023-11-23 18:33:25 +08:00
this.cardValueForm.bidBalance =''
this.cardValueForm.giftBalance =''
this.cardValueForm.growthValue = ''
this.cardValueForm.rechargeBalance = ''
this.cardValueForm.royaltyType = ''
this.cardValueForm.percentageCommissions = ''
this.cardValueForm.amountCommission = ''
this.cardValueForm.rechargeType = 1
2023-11-21 18:11:49 +08:00
2023-11-13 16:54:15 +08:00
this.cardValueForm.rechargeBalance = data
if (this.cardValueList.length > 0){
// const changeList = this.cardValueList
this.cardValueList.forEach(change=>{
if (data >= change.rechargeBalance) {
this.cardValueForm.points = change.points
this.cardValueForm.bidBalance = change.bidBalance
this.cardValueForm.giftBalance = change.giftBalance
this.cardValueForm.growthValue = change.growthValue
2023-11-14 18:53:58 +08:00
this.cardValueForm.rechargeBalance = change.rechargeBalance
this.cardValueForm.royaltyType = change.royaltyType
this.cardValueForm.percentageCommissions = change.percentageCommissions
this.cardValueForm.amountCommission = change.amountCommission
2023-11-23 18:33:25 +08:00
// this.cardValueForm.rechargeBalance
2023-11-14 18:53:58 +08:00
// 计算员工提成金额
if (change.royaltyType === "3") {
// 当按比例提成时 计算对应的金额
const percentageCommissions = new BigNumber(change.percentageCommissions);
const totalAmount = new BigNumber(data);
const commissionAmount = totalAmount.multipliedBy(percentageCommissions).dividedBy(100).decimalPlaces(2);
this.cardValueForm.amountCommission = commissionAmount
}
2023-11-13 16:54:15 +08:00
}
})
}
console.log("data",data)
2023-11-21 18:11:49 +08:00
console.log("this.cardValueForm",this.cardValueForm)
2023-11-13 16:54:15 +08:00
},
// 存油卡查询
2023-11-23 18:33:25 +08:00
async getCardFuelDieselList() {
2023-11-13 16:54:15 +08:00
let quy = {
pageNo: 1,
pageSize: 10000,
activeStatus: 1,
status:1,
activityProgress:1
}
2023-11-23 18:33:25 +08:00
await getList(quy).then(res=> {
2023-11-13 16:54:15 +08:00
this.sourceCardFuelDieselList = res.data.records
})
},
handleDataFromChild(data) {
this.openStaff = false
this.cardFuelDieselForm= {
mtStaffId: data.mtStaffId,
realName: data.realName,
staffMobile: data.staffMobile,
},
2023-11-14 18:53:58 +08:00
this.cardValueForm= {
mtStaffId: data.mtStaffId,
realName: data.realName,
staffMobile: data.staffMobile,
},
2023-11-13 16:54:15 +08:00
console.log('Received data in parent:', data);
},
// 查询参加存油卡油品
getCountOilType() {
getCountOilTypeApi().then(res => {
this.oilTypeList = res.data
if (this.oilTypeList.length > 0) {
// 默认选中第一个
this.tabOilType = this.oilTypeList[0].oilType
2023-11-22 18:05:02 +08:00
this.selectOilType(this.oilTypeList[0].status,this.oilTypeList[0].oilType);
2023-11-13 16:54:15 +08:00
}
})
},
// 根据油品过滤查询存油卡
2023-11-23 18:33:25 +08:00
async tabOilTypeClick(data){
console.log("aaaaaaaaaaaaaa",data)
await this.getCardFuelDieselList()
2023-11-22 18:05:02 +08:00
2023-11-13 16:54:15 +08:00
this.cardFuelDieselList = this.sourceCardFuelDieselList.filter(item => {
return item.oilType === data;
});
if (this.cardFuelDieselList.length > 0) {
this.recharge(0)
}
},
2023-11-22 18:05:02 +08:00
selectOilType(status,oilType) {
2023-11-13 16:54:15 +08:00
this.tabOilType = oilType;
2023-11-22 18:05:02 +08:00
this.tabOilTypeClick(status);
2023-11-13 16:54:15 +08:00
},
// 查询员工
2023-10-20 18:42:38 +08:00
// 会员充值
userRecharge(){
2023-11-14 18:53:58 +08:00
2023-11-13 16:54:15 +08:00
this.getCardFuelDieselList()
this.getCardValueList()
this.getCountOilType()
2023-11-14 18:53:58 +08:00
this.getPayList();
2023-10-20 18:42:38 +08:00
this.openRecharge = true;
this.title = '会员充值'
2023-11-13 16:54:15 +08:00
// 存油卡列表
2023-10-20 18:42:38 +08:00
},
// 确认充值
2023-11-13 16:54:15 +08:00
confirm(flag){
this.flag = flag
2023-11-23 18:33:25 +08:00
2023-11-13 16:54:15 +08:00
if (flag ===1) {
2023-11-14 18:53:58 +08:00
if (this.cardValueForm.paymentType == '') {
2023-11-23 18:33:25 +08:00
this.$message.error('请选择支付方式');
return
}
if (this.cardValueForm.amount != null) {
this.cardValueForm.rechargeType = 1
this.realyPayBills = this.cardValueForm.amount
} else {
this.cardValueForm.rechargeType = 0
this.realyPayBills = this.cardValueForm.rechargeBalance
}
2023-11-14 18:53:58 +08:00
}else if(flag === 2) {
if (this.cardFuelDieselForm.paymentType == '') {
this.$message.error('请选择支付方式');
return
}
2023-11-23 18:33:25 +08:00
this.realyPayBills = this.cardFuelDieselForm.rechargeBalance
2023-11-13 16:54:15 +08:00
}
this.isPay = true
2023-10-20 18:42:38 +08:00
this.openConfirm = true;
this.title = this.payment
},
2023-11-13 16:54:15 +08:00
// 支付方式
payMethod(payType,flag){
// this.map.payType = payType;
2023-11-14 18:53:58 +08:00
if (falg === 1) {
}
console.log("payType",payType)
this.cardValueForm.paymentType = payType
2023-11-13 16:54:15 +08:00
},
2023-10-19 18:47:09 +08:00
// 获取副卡信息
getInformation(){
getSysConfig('second_card').then(response => {
this.aboutSecondCard = response.data.split(";")
});
getSysConfig('transaction').then(response => {
this.transaction = response.data
});
},
2023-10-18 18:31:46 +08:00
getList(){
2023-10-17 19:01:29 +08:00
2023-10-18 18:31:46 +08:00
},
// 获取详情
getUserInfo(){
let _this = this;
// 获取会员详情
getUser(this.id).then(response => {
this.form = response.data;
this.getGrade(response.data.gradeId);
});
// 获取店铺详情
ljStoreInfo().then(response => {
this.store = response.data;
});
},
2023-10-20 18:42:38 +08:00
// 获取会员等级详情
2023-10-18 18:31:46 +08:00
getGrade(id){
getUserGrade(id).then(response => {
this.grade = response.data;
});
},
2023-11-13 16:54:15 +08:00
// 选择余额充值金额
rechargeCard(index,item){
2023-11-14 18:53:58 +08:00
console.log("index",index)
2023-11-23 18:33:25 +08:00
this.cardValueForm.amount = null,
this.cardValueForm.rechargeType = 0
2023-11-13 16:54:15 +08:00
this.activeKey = index;
if (item === -1) {
this.cardValueForm.points = 0
this.cardValueForm.giftBalance = 0
this.cardValueForm.growthValue = 0
this.cardValueForm.bidBalance = 0
2023-11-14 18:53:58 +08:00
// this.cardValueForm.bidBalance = 1
2023-11-13 16:54:15 +08:00
// this.cardValueForm.amount = 0
}else {
let file={}
// 拿到金额
file = this.cardValueList[index]
2023-11-23 18:33:25 +08:00
this.realyPayBills = file.rechargeBalance
2023-11-13 16:54:15 +08:00
this.cardValueForm.rechargeBalance = file.rechargeBalance
this.cardValueForm.bidBalance = file.bidBalance
this.cardValueForm.points = file.points
this.cardValueForm.giftBalance = file.giftBalance
this.cardValueForm.growthValue = file.growthValue
this.cardValueForm.amount = null
2023-11-14 18:53:58 +08:00
this.cardValueForm.royaltyType = file.royaltyType
this.cardValueForm.percentageCommissions = file.percentageCommissions
this.cardValueForm.amountCommission = file.amountCommission
console.log("file.royaltyType ", file.royaltyType )
// 计算员工提成金额
if (file.royaltyType === "3") {
// 当按比例提成时 计算对应的金额
const percentageCommissions = new BigNumber(file.percentageCommissions);
const totalAmount = new BigNumber(file.rechargeBalance);
const commissionAmount = totalAmount.multipliedBy(percentageCommissions).dividedBy(100).decimalPlaces(2);
this.cardValueForm.amountCommission = commissionAmount
}
2023-11-13 16:54:15 +08:00
}
},
2023-10-20 18:42:38 +08:00
// 选择充值金额
2023-11-13 16:54:15 +08:00
recharge(index,item){
2023-10-20 18:42:38 +08:00
this.activeKey = index;
2023-11-13 16:54:15 +08:00
let file={}
// 拿到金额
file = this.cardFuelDieselList[index]
this.cardFuelDieselForm.points = file.points
this.cardFuelDieselForm.rechargeBalance = file.rechargeBalance
2023-11-14 18:53:58 +08:00
this.cardFuelDieselForm.oilType = file.oilType
this.cardFuelDieselForm.type = file.type
this.cardFuelDieselForm.chainStorId = file.chainStorId
this.cardFuelDieselForm.incomeLitres = file.incomeLitres
2023-11-23 18:33:25 +08:00
// this.realyPayBills = file.rechargeBalance
2023-10-20 18:42:38 +08:00
},
2023-11-13 16:54:15 +08:00
async collection(){
2023-11-14 18:53:58 +08:00
let userForm = this.form
2023-11-13 16:54:15 +08:00
if (this.flag === 1) {
// 会员id 会员名字会员手机号码
this.cardValueForm.mtUserId = userForm.id
this.cardValueForm.name = userForm.name
this.cardValueForm.mobile = userForm.mobile
// 支付码
this.cardValueForm.authCode = this.authCode
2023-11-23 18:33:25 +08:00
this.cardValueForm.realyPayBills = this.realyPayBills
2023-11-13 18:58:31 +08:00
let id ;
2023-11-14 18:53:58 +08:00
await getPrepaidCardTopUpApi(this.cardValueForm).then(response=> {
if (response.data!=null){
this.loading = true;
id = response.data.id
// if (response.data.payStatus == "paid"){
// this.isPaySuccess = true;
// }
}
2023-11-13 16:54:15 +08:00
});
2023-11-14 18:53:58 +08:00
let this_ = this
2023-11-13 16:54:15 +08:00
2023-11-14 18:53:58 +08:00
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentApi(id).then(response => {
if (response.data!=null){
if (response.data.payStatus == "unpaid"){
this_.isQuery = true;
}
if (response.data.payStatus == "paid"){
this_.isPaySuccess = true;
this_.isQuery = false;
}
if (response.data.payStatus == "payFail"){
this_.isPaySuccess = false;
this_.isQuery = false;
}
}
})
}, 500);
2023-11-13 18:58:31 +08:00
2023-11-14 18:53:58 +08:00
let timer2 = setInterval(function () {
if (this_.isQuery == false) {
this_.loading = false;
this_.isPay = false;
clearInterval(timer);
}
},500)
2023-11-13 18:58:31 +08:00
2023-11-14 18:53:58 +08:00
setTimeout(function (){
clearInterval(timer2);
clearInterval(timer);
this_.loading = false;
this_.isPay = false;
this.isPaySuccess = false;
2023-11-13 16:54:15 +08:00
2023-11-14 18:53:58 +08:00
},30000)
2023-11-13 16:54:15 +08:00
}else if (this.flag === 2){
2023-11-14 18:53:58 +08:00
console.log("cardFuelDieselForm",this.cardFuelDieselForm)
this.cardFuelDieselForm.mtUserId = userForm.id
this.cardFuelDieselForm.name = userForm.name
this.cardFuelDieselForm.mobile = userForm.mobile
this.cardFuelDieselForm.authCode = this.authCode
let id ;
await getPrepaidFuelTopUpApi(this.cardFuelDieselForm).then(response=> {
if (response.data!=null){
this.loading = true;
id = response.data.id
}
});
let timer = setInterval(async () => {
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
if (response.data!=null){
if (response.data.payStatus == "unpaid"){
this_.isQuery = true;
}
if (response.data.payStatus == "paid"){
this_.isPaySuccess = true;
this_.isQuery = false;
}
if (response.data.payStatus == "payFail"){
this_.isPaySuccess = false;
this_.isQuery = false;
}
}
})
}, 500);
let timer2 = setInterval(function () {
if (this_.isQuery == false) {
this_.loading = false;
this_.isPay = false;
clearInterval(timer);
clearInterval(timer2);
}
},500)
2023-11-13 16:54:15 +08:00
2023-11-14 18:53:58 +08:00
setTimeout(function (){
clearInterval(timer2);
clearInterval(timer);
this_.loading = false;
this_.isPay = false;
this.isPaySuccess = false;
},30000)
let this_ = this
2023-11-13 16:54:15 +08:00
}
2023-11-14 18:53:58 +08:00
},
getPayList(){
console.log("payment_type1")
getDicts("payment_type").then( response => {
console.log("payment_type2",response.data)
this.payList = response.data;
})
2023-11-13 16:54:15 +08:00
},
2023-11-14 18:53:58 +08:00
// 关闭支付窗口
handClose(){
this.isPay = true;
this.openConfirm = false
this.openRecharge = false
this.isPaySuccess = false;
this.authCode = null
this.activeRecharge='balance',
this.cardValueForm = {}
this.cardFuelDieselForm = {}
},
2023-10-18 18:31:46 +08:00
// 提交按钮
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openMobile = false;
2023-10-20 18:42:38 +08:00
this.openConfig = false;
this.openLevel = false;
this.openBindIdCard = false;
2023-10-18 18:31:46 +08:00
this.getUserInfo();
});
}
}
});
},
// 表单重置
reset() {
this.resetForm("form");
this.form= {}
},
// 取消按钮
cancel() {
this.openMobile = false;
2023-10-19 18:47:09 +08:00
this.openConfig = false;
this.openLevel = false;
2023-10-20 18:42:38 +08:00
this.openBindIdCard = false;
this.openRecharge = false;
2023-11-14 18:53:58 +08:00
this.isPay = true;
this.openConfirm = false
this.openRecharge = false
this.isPaySuccess = false;
this.authCode = null
this.activeRecharge='balance',
this.cardValueForm = {}
this.cardFuelDieselForm = {}
2023-10-20 18:42:38 +08:00
},
cancelCollection(){
this.openConfirm = false;
2023-10-18 18:31:46 +08:00
},
handleClick(tab, event) {
2023-10-23 15:03:48 +08:00
// console.log(tab, event);
2023-11-23 18:33:25 +08:00
this.realyPayBills = 0
2023-10-18 18:31:46 +08:00
},
2023-10-19 18:47:09 +08:00
handleChange(value) {
2023-10-23 15:03:48 +08:00
// console.log(value);
2023-10-19 18:47:09 +08:00
},
2023-10-18 18:31:46 +08:00
// 返回
goBack() {
this.$router.back(-1);
}
2023-10-20 18:42:38 +08:00
// 积分表、储值卡详情表、积分详情表、储值卡表、储值卡模板表、用户储值卡关联表、
2023-10-18 18:31:46 +08:00
}
2023-10-17 19:01:29 +08:00
}
</script>
<style lang="scss" scoped>
2023-10-18 18:31:46 +08:00
.app-container{
width: 100%;
height: 100%;
background: #f6f8f9;
}
.left{
width: 20%;
display: table-cell;
/*垂直居中 */
vertical-align: middle;
/*水平居中*/
text-align: center;
}
.right{
flex: 1;
}
.sta{
height: 100px;
margin-top: 10px;
padding-top: 30px;
}
2023-10-20 18:42:38 +08:00
.idcard{
text-align: center;
font-weight: bold
}
.mon{
width: 20%;
height: 50px;
border: 0.5px #dadfe6 solid;
line-height: 25px;
border-radius: 5px;
text-align: center;
margin: 0 10px;
2023-11-13 16:54:15 +08:00
margin-bottom: 10px;
2023-10-20 18:42:38 +08:00
}
.select {
position: relative;
background-color: #fff;
box-shadow: 0px 2px 7px 0px rgba(85, 110, 97, 0.35);
border-radius: 5px;
border: 1px solid #00aaff;
}
.select:before {
content: '';
position: absolute;
right: 0;
bottom: 0;
border: 10px solid #00aaff;
border-top-color: transparent;
border-left-color: transparent;
}
.select:after {
content: '';
width: 4px;
height: 6px;
position: absolute;
right: 4px;
bottom: 3px;
border: 2px solid #fff;
border-top-color: transparent;
border-left-color: transparent;
transform: rotate(45deg);
}
.amount{
color: #00afff;
}
.amount1{
color: #00afff;
font-size: 20px;
}
.top1{
font-size: 16px;
}
.jine{
width: 24%;
display: flex;
}
.bom{
font-size: 12px;
color: grey;
}
.zeng{
2023-10-31 18:18:30 +08:00
width: 255px;
2023-10-20 18:42:38 +08:00
line-height: 40px;
}
.mon2{
width: 20%;
height: 75px;
border: 0.5px #dadfe6 solid;
line-height: 25px;
border-radius: 5px;
text-align: center;
margin: 0 10px;
2023-11-13 16:54:15 +08:00
margin-bottom: 20px;
2023-10-20 18:42:38 +08:00
}
2023-10-17 19:01:29 +08:00
</style>