2024-01-15 09:28:57 +08:00
|
|
|
<template>
|
2024-01-15 11:02:08 +08:00
|
|
|
<div class="app-container">
|
|
|
|
|
<el-row type="flex" justify="space-between">
|
|
|
|
|
<!-- 右侧内容 -->
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-col :span="24">
|
2024-01-15 11:02:08 +08:00
|
|
|
<el-tabs type="border-card">
|
2024-01-15 14:06:42 +08:00
|
|
|
<!-- 客户 -->
|
2024-01-15 11:02:08 +08:00
|
|
|
<el-tab-pane label="客户">
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-col>
|
2024-01-15 11:02:08 +08:00
|
|
|
<el-button type="primary" size="mini" icon="el-icon-plus"
|
|
|
|
|
@click="handleAddMember">添加会员</el-button>
|
|
|
|
|
</el-col>
|
2024-01-15 14:19:59 +08:00
|
|
|
<el-table :data="memberGroupList" stripe style="width: 100%" v-loading="loading">
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-table-column label="会员id" align="center" prop="memberId" />
|
|
|
|
|
<el-table-column label="昵称" align="center" prop="nickName" />
|
2024-01-15 14:06:42 +08:00
|
|
|
<el-table-column label="状态" align="center" prop="status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.member_status" :value="scope.row.status" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-table-column label="头像" align="center" prop="avatarUrl">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-image style="height: 50px;width: 50px"
|
|
|
|
|
:src="scope.row.avatarUrl === null ? defaultImg[0].img : scope.row.avatarUrl"
|
|
|
|
|
:preview-src-list='[scope.row.avatarUrl === null ? defaultImg[0].img : scope.row.avatarUrl]' />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="手机号" align="center" prop="mobileNumber" />
|
|
|
|
|
</el-table>
|
|
|
|
|
<!--分页-->
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
2024-01-15 14:19:59 +08:00
|
|
|
:limit.sync="queryParams.pageSize" @pagination="getMemberList" style="margin-bottom: 20px" />
|
2024-01-15 13:36:20 +08:00
|
|
|
</el-tab-pane>
|
|
|
|
|
<!-- 交易明细 -->
|
|
|
|
|
<el-tab-pane label="交易明细">
|
2024-01-15 14:19:59 +08:00
|
|
|
<el-table :data="details" stripe style="width: 100%" v-loading="loading">
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-table-column label="订单编号" align="center" prop="orderCode" width="280px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<router-link :to="'/order/index/orderDetail/' + scope.row.orderCode" class="link-type">
|
|
|
|
|
<span>{{ scope.row.orderCode }}</span>
|
|
|
|
|
</router-link>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="订单状态描述" align="center" prop="orderStatusDescribe" />
|
|
|
|
|
<el-table-column label="会员昵称" align="center" prop="nickName" width="120px" />
|
|
|
|
|
<el-table-column label="电话号码" align="center" prop="mobileNumber" width="120px" />
|
|
|
|
|
<el-table-column label="站点" align="center" prop="stationName" />
|
|
|
|
|
<el-table-column label="充电桩枪口号" align="center" prop="pileConnectorCode" width="200px" />
|
|
|
|
|
<el-table-column label="微信商户订单号" align="center" prop="outTradeNo" width="165px" />
|
|
|
|
|
<el-table-column label="启动方式" align="center" prop="startMode" width="100px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.start_mode" :value="scope.row.startMode" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="支付方式" align="center" prop="payMode">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.pay_mode" :value="scope.row.payMode" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="支付状态" align="center" prop="payStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.pay_status" :value="scope.row.payStatus" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="支付金额" align="center" prop="payAmount" />
|
|
|
|
|
<el-table-column label="充电度数" align="center" prop="chargingDegree" width="100px" />
|
|
|
|
|
<el-table-column label="起始soc" align="center" prop="startSoc" />
|
|
|
|
|
<el-table-column label="终止soc" align="center" prop="endSoc" />
|
|
|
|
|
<el-table-column label="开始充电时间" align="center" prop="chargeStartTime" width="180" />
|
|
|
|
|
<el-table-column label="结束充电时间" align="center" prop="chargeEndTime" width="180" />
|
|
|
|
|
<el-table-column label="订单总金额" align="center" prop="orderAmount" width="100px" />
|
|
|
|
|
</el-table>
|
|
|
|
|
<!--分页-->
|
|
|
|
|
<pagination v-show="getTotal > 0" :total="getTotal" :page.sync="from.pageNum"
|
2024-01-15 14:19:59 +08:00
|
|
|
:limit.sync="from.pageSize" @pagination="getOrderList" style="margin-bottom: 20px" />
|
2024-01-15 11:02:08 +08:00
|
|
|
</el-tab-pane>
|
2024-01-24 17:07:21 +08:00
|
|
|
<el-tab-pane label="站点">
|
|
|
|
|
<el-col>
|
|
|
|
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addasite">添加站点</el-button>
|
|
|
|
|
</el-col>
|
2024-01-25 15:53:21 +08:00
|
|
|
<el-table :data="sitesList" stripe style="width: 100%" v-loading="loading">
|
2024-02-19 16:27:50 +08:00
|
|
|
<el-table-column label="站点名称" align="center" prop="stationName" width="300" />
|
2024-02-20 17:11:09 +08:00
|
|
|
<el-table-column label="备注" align="center" prop="templateRemark" />
|
|
|
|
|
<el-table-column label="描述" align="center" prop="templateDesc" />
|
2024-02-19 16:27:50 +08:00
|
|
|
<el-table-column label="操作" align="center" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit"
|
|
|
|
|
@click="addasite(scope.row)">修改</el-button>
|
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-01-25 15:53:21 +08:00
|
|
|
</el-table>
|
|
|
|
|
<!--分页-->
|
2024-02-19 16:27:50 +08:00
|
|
|
<pagination v-show="stationTotal > 0" :total="stationTotal" :page.sync="queryStation.pageNum"
|
|
|
|
|
:limit.sync="queryStation.pageSize" @pagination="getStationList" style="margin-bottom: 20px" />
|
2024-01-24 17:07:21 +08:00
|
|
|
</el-tab-pane>
|
2024-01-15 11:02:08 +08:00
|
|
|
</el-tabs>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!--添加会员-->
|
2024-01-15 13:36:20 +08:00
|
|
|
<el-dialog title="添加会员" :visible.sync="openAddMember" :before-close="cancel" width="500px" append-to-body>
|
2024-01-15 11:02:08 +08:00
|
|
|
<el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号"></el-input>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2024-02-19 16:27:50 +08:00
|
|
|
<!-- 添加修改站点 -->
|
2024-01-25 15:53:21 +08:00
|
|
|
<el-dialog title="添加站点" :visible.sync="getSite" :before-close="getCancel" width="1000px" append-to-body>
|
|
|
|
|
<el-form ref="exchangeRate" :model="exchangeRate" :rules="dialogRules">
|
|
|
|
|
<el-form-item label="请选择站点">
|
|
|
|
|
<el-select v-model="selectSite" placeholder="请选择站点" filterable style="width:300px" @change="queryInfo">
|
|
|
|
|
<el-option v-for="(station, index) in stationList" :key="index" :label="station.stationName"
|
|
|
|
|
:value="station.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 15px;">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div class="grid-content bg-purple" style="padding-left: 25px;"> 时段</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div style="text-align: center;" class="grid-content bg-purple">原电费(元/度)</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div style="text-align: center;" class="grid-content bg-purple">原服务费(元/度)</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div style="text-align: center;" class="grid-content bg-purple">电费(元/度)</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<div style="text-align: center;" class="grid-content bg-purple">服务费(元/度)</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 15px;">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button type="danger">尖时段</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="electricityPriceA">
|
|
|
|
|
<el-input v-model="exchangeRate.electricityPriceA" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="servicePriceA">
|
|
|
|
|
<el-input v-model="exchangeRate.servicePriceA" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyServiceA">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyServiceA" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyElectricityA">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyElectricityA" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 峰 -->
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button type="warning">峰时段</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="electricityPriceB">
|
|
|
|
|
<el-input v-model="exchangeRate.electricityPriceB" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="servicePriceB">
|
|
|
|
|
<el-input v-model="exchangeRate.servicePriceB" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyServiceB">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyServiceB" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyElectricityB">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyElectricityB" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 平 -->
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button type="success">平时段</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="electricityPriceC">
|
|
|
|
|
<el-input v-model="exchangeRate.electricityPriceC" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="servicePriceC">
|
|
|
|
|
<el-input v-model="exchangeRate.servicePriceC" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyServiceC">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyServiceC" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyElectricityC">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyElectricityC" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 谷 -->
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-button type="info">谷时段</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="electricityPriceD">
|
|
|
|
|
<el-input v-model="exchangeRate.electricityPriceD" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="servicePriceD">
|
|
|
|
|
<el-input v-model="exchangeRate.servicePriceD" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyServiceD">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyServiceD" type="number" class="clearInputScore"
|
|
|
|
|
placeholder="0" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
<el-form-item prop="modifyElectricityD">
|
|
|
|
|
<el-input v-model="exchangeRate.modifyElectricityD" placeholder="0" clearable type="number"
|
|
|
|
|
class="clearInputScore" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2024-01-31 15:53:39 +08:00
|
|
|
<span>24小时尖峰平谷分布设置</span>
|
|
|
|
|
<div>
|
|
|
|
|
<el-tag v-for="item in tagsTime" :key="item.label" :type="item.type"
|
|
|
|
|
style="margin: 10px 10px 10px 0; width: 160px; height: 30px line-height:30px;text-align: center;"
|
|
|
|
|
effect="dark">
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</div>
|
2024-01-25 15:53:21 +08:00
|
|
|
</el-form>
|
2024-01-24 17:07:21 +08:00
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="getCancel">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="siteConfirmation">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2024-01-15 09:28:57 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-02-19 16:27:50 +08:00
|
|
|
import { addMember, queryMemberList, preferentialTemplates, queryStationList } from "@/api/member/memberGroup";
|
2024-01-18 14:25:27 +08:00
|
|
|
import { listOrder } from "@/api/order/order";
|
2024-01-24 17:07:21 +08:00
|
|
|
import { getStationListByMerchantId } from "@/api/pile/station";
|
2024-01-25 15:53:21 +08:00
|
|
|
import { queryStationBillingTemplateList, getTemplate } from "@/api/billing/template.js";
|
2024-01-15 09:28:57 +08:00
|
|
|
export default {
|
|
|
|
|
name: 'JsowellUiDetail',
|
2024-01-15 14:06:42 +08:00
|
|
|
dicts: ['member_status', 'start_mode', 'pay_mode', 'pay_status'],
|
2024-01-15 09:28:57 +08:00
|
|
|
data() {
|
2024-01-25 15:53:21 +08:00
|
|
|
// 自定义校验
|
|
|
|
|
var validatePassA = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.electricityPriceA) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassB = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.servicePriceA) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassC = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.electricityPriceB) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassD = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.servicePriceB) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassE = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.electricityPriceC) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassF = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.servicePriceC) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassG = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.electricityPriceD) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var validatePassH = (rule, value, callback) => {
|
2024-02-19 14:24:06 +08:00
|
|
|
if (value > this.exchangeRate.servicePriceD) {
|
2024-01-25 15:53:21 +08:00
|
|
|
callback(new Error('输入金额不能大于原金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
2024-01-15 09:28:57 +08:00
|
|
|
return {
|
2024-01-15 14:19:59 +08:00
|
|
|
// 遮罩
|
|
|
|
|
loading: false,
|
2024-01-15 11:02:08 +08:00
|
|
|
openAddMember: false,
|
2024-01-15 13:36:20 +08:00
|
|
|
from: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
2024-01-24 17:07:21 +08:00
|
|
|
groupCode: this.$route.params.groupCode.split('&')[0],
|
2024-01-15 13:36:20 +08:00
|
|
|
merchantId: null,
|
|
|
|
|
stationId: null,
|
|
|
|
|
groupLevel: null,
|
|
|
|
|
groupType: null,
|
|
|
|
|
discount: null,
|
|
|
|
|
phoneNumber: null
|
|
|
|
|
},
|
2024-01-15 11:02:08 +08:00
|
|
|
queryParams: {
|
2024-01-15 13:36:20 +08:00
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
2024-01-24 17:07:21 +08:00
|
|
|
groupCode: this.$route.params.groupCode.split('&')[0],
|
2024-01-15 13:36:20 +08:00
|
|
|
merchantId: null,
|
|
|
|
|
stationId: null,
|
|
|
|
|
groupLevel: null,
|
|
|
|
|
groupType: null,
|
|
|
|
|
discount: null,
|
2024-01-15 11:02:08 +08:00
|
|
|
phoneNumber: null
|
2024-01-15 13:36:20 +08:00
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
memberGroupList: [],
|
|
|
|
|
getTotal: 0,
|
2024-01-18 14:25:27 +08:00
|
|
|
details: [],
|
|
|
|
|
defaultImg: [{ img: require('../../../assets/images/headPort.png') }],//默认头像
|
2024-01-24 17:07:21 +08:00
|
|
|
getSite: false, //添加站点框状态
|
|
|
|
|
stationList: [], //站点列表
|
2024-01-25 15:53:21 +08:00
|
|
|
selectSite: '',//选中的站点
|
|
|
|
|
open: false, //修改费率
|
|
|
|
|
exchangeRate: {
|
|
|
|
|
electricityPriceA: '',
|
|
|
|
|
servicePriceA: '',
|
|
|
|
|
electricityPriceB: '',
|
|
|
|
|
servicePriceB: '',
|
|
|
|
|
electricityPriceC: '',
|
|
|
|
|
servicePriceC: '',
|
|
|
|
|
electricityPriceD: '',
|
|
|
|
|
servicePriceD: '',
|
|
|
|
|
modifyServiceA: '',
|
|
|
|
|
modifyElectricityA: '',
|
|
|
|
|
modifyServiceB: '',
|
|
|
|
|
modifyElectricityB: '',
|
|
|
|
|
modifyServiceC: '',
|
|
|
|
|
modifyElectricityC: '',
|
|
|
|
|
modifyServiceD: '',
|
|
|
|
|
modifyElectricityD: '',
|
|
|
|
|
},
|
|
|
|
|
// 校验
|
|
|
|
|
dialogRules: {
|
|
|
|
|
modifyServiceA: [
|
|
|
|
|
{ validator: validatePassA, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyElectricityA: [
|
|
|
|
|
{ validator: validatePassB, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyServiceB: [
|
|
|
|
|
{ validator: validatePassC, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyElectricityB: [
|
|
|
|
|
{ validator: validatePassD, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyServiceC: [
|
|
|
|
|
{ validator: validatePassE, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyElectricityC: [
|
|
|
|
|
{ validator: validatePassF, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyServiceD: [
|
|
|
|
|
{ validator: validatePassG, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
modifyElectricityD: [
|
|
|
|
|
{ validator: validatePassH, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
sitesList: [],//站点列表
|
2024-01-31 15:53:39 +08:00
|
|
|
stationId: '',//站点id
|
2024-02-19 16:27:50 +08:00
|
|
|
tagsTime: [],
|
|
|
|
|
queryStation: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
groupCode: this.$route.params.groupCode.split('&')[0],
|
|
|
|
|
},
|
|
|
|
|
stationTotal: 0
|
2024-01-15 09:28:57 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
mounted() {
|
2024-01-24 17:07:21 +08:00
|
|
|
console.log(this.$route.params.groupCode, this.$route.params.groupCode.split('&')[0], this.$route.params.groupCode.split('&')[1]);
|
2024-01-15 14:19:59 +08:00
|
|
|
this.getMemberList();
|
|
|
|
|
this.getOrderList();
|
2024-02-19 16:27:50 +08:00
|
|
|
this.getStationList()
|
2024-01-15 09:28:57 +08:00
|
|
|
},
|
2024-01-31 15:53:39 +08:00
|
|
|
computed: {
|
2024-01-15 09:28:57 +08:00
|
|
|
|
2024-01-31 15:53:39 +08:00
|
|
|
},
|
2024-01-15 09:28:57 +08:00
|
|
|
methods: {
|
2024-01-15 11:02:08 +08:00
|
|
|
handleAddMember() {
|
|
|
|
|
this.openAddMember = true
|
|
|
|
|
},
|
|
|
|
|
/** 添加会员按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
console.log(this.queryParams);
|
|
|
|
|
var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
|
|
|
if (!reg_tel.test(this.queryParams.phoneNumber)) {
|
|
|
|
|
this.$modal.msgError("请正确填写您的手机号码!");
|
|
|
|
|
this.queryParams.phoneNumber = ''
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2024-01-15 13:36:20 +08:00
|
|
|
addMember(this.queryParams).then(response => {
|
2024-01-15 11:02:08 +08:00
|
|
|
console.log(response);
|
|
|
|
|
this.$modal.msgSuccess("添加成功");
|
2024-01-15 13:36:20 +08:00
|
|
|
this.openAddMember = false;
|
2024-01-15 14:06:42 +08:00
|
|
|
this.queryParams.phoneNumber = '';
|
2024-01-15 14:19:59 +08:00
|
|
|
this.getMemberList();
|
2024-01-15 11:02:08 +08:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
cancel() {
|
|
|
|
|
this.openAddMember = false;
|
2024-01-15 13:36:20 +08:00
|
|
|
this.queryParams.phoneNumber = '';
|
|
|
|
|
},
|
2024-01-15 14:19:59 +08:00
|
|
|
getMemberList() {
|
|
|
|
|
this.loading = true;
|
2024-01-15 13:36:20 +08:00
|
|
|
console.log(this.queryParams);
|
|
|
|
|
queryMemberList(this.queryParams).then(response => {
|
|
|
|
|
console.log(response);
|
|
|
|
|
this.memberGroupList = response.rows;
|
|
|
|
|
this.total = response.total;
|
2024-01-15 14:19:59 +08:00
|
|
|
this.loading = false;
|
2024-01-15 13:36:20 +08:00
|
|
|
});
|
|
|
|
|
},
|
2024-01-15 14:19:59 +08:00
|
|
|
getOrderList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listOrder(this.from).then((response) => {
|
2024-01-15 13:36:20 +08:00
|
|
|
this.details = response.rows;
|
2024-01-15 14:19:59 +08:00
|
|
|
console.log("this.from", this.from);
|
|
|
|
|
console.log("response", response);
|
2024-01-15 13:36:20 +08:00
|
|
|
this.getTotal = response.total;
|
2024-01-15 14:19:59 +08:00
|
|
|
this.loading = false;
|
2024-01-15 13:36:20 +08:00
|
|
|
});
|
2024-01-24 17:07:21 +08:00
|
|
|
},
|
|
|
|
|
//添加站点
|
|
|
|
|
addasite() {
|
|
|
|
|
console.log(this.$route.params.groupCode.split('&')[1]);
|
|
|
|
|
let value = this.$route.params.groupCode.split('&')[1]
|
|
|
|
|
this.getSite = true
|
|
|
|
|
getStationListByMerchantId(value).then((response) => {
|
|
|
|
|
console.log('站点', response);
|
|
|
|
|
this.stationList = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-01-25 16:31:39 +08:00
|
|
|
// 站点弹框取消重置
|
2024-01-24 17:07:21 +08:00
|
|
|
getCancel() {
|
|
|
|
|
this.getSite = false;
|
|
|
|
|
this.selectSite = '';
|
2024-01-31 15:53:39 +08:00
|
|
|
this.tagsTime = [];
|
2024-01-25 15:53:21 +08:00
|
|
|
this.exchangeRate = {
|
|
|
|
|
electricityPriceA: "",
|
|
|
|
|
servicePriceA: "",
|
|
|
|
|
electricityPriceB: "",
|
|
|
|
|
servicePriceB: "",
|
|
|
|
|
electricityPriceC: "",
|
|
|
|
|
servicePriceC: "",
|
|
|
|
|
electricityPriceD: "",
|
|
|
|
|
servicePriceD: "",
|
|
|
|
|
modifyServiceA: "",
|
|
|
|
|
modifyElectricityA: "",
|
|
|
|
|
modifyServiceB: "",
|
|
|
|
|
modifyElectricityB: "",
|
|
|
|
|
modifyServiceC: "",
|
|
|
|
|
modifyElectricityC: "",
|
|
|
|
|
modifyServiceD: "",
|
|
|
|
|
modifyElectricityD: "",
|
2024-01-25 16:31:39 +08:00
|
|
|
};
|
|
|
|
|
this.$refs["exchangeRate"].resetFields();
|
2024-01-24 17:07:21 +08:00
|
|
|
},
|
|
|
|
|
// 站点弹框确认
|
2024-01-25 15:53:21 +08:00
|
|
|
siteConfirmation() {
|
|
|
|
|
this.$refs["exchangeRate"].validate(valid => {
|
|
|
|
|
if (valid) {
|
2024-01-31 15:53:39 +08:00
|
|
|
let newOffers = {
|
|
|
|
|
stationId: this.stationId,
|
|
|
|
|
electricityPriceA: this.exchangeRate.modifyServiceA,
|
|
|
|
|
servicePriceA: this.exchangeRate.modifyElectricityA,
|
|
|
|
|
electricityPriceB: this.exchangeRate.modifyServiceB,
|
|
|
|
|
servicePriceB: this.exchangeRate.modifyElectricityB,
|
|
|
|
|
electricityPriceC: this.exchangeRate.modifyServiceC,
|
|
|
|
|
servicePriceC: this.exchangeRate.modifyElectricityC,
|
|
|
|
|
electricityPriceD: this.exchangeRate.modifyServiceD,
|
|
|
|
|
servicePriceD: this.exchangeRate.modifyElectricityD,
|
|
|
|
|
timeArray: this.exchangeRate.timeArray
|
|
|
|
|
}
|
|
|
|
|
console.log('验证成功', newOffers);
|
|
|
|
|
preferentialTemplates(newOffers).then((response) => {
|
|
|
|
|
console.log("添加站点优惠模板", response);
|
|
|
|
|
this.$modal.msgSuccess("添加成功");
|
|
|
|
|
this.getCancel() //重置
|
|
|
|
|
});
|
2024-01-25 15:53:21 +08:00
|
|
|
} else {
|
|
|
|
|
console.log('验证失败');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 查计费模板详情
|
|
|
|
|
queryInfo(stationId) {
|
|
|
|
|
console.log(stationId);
|
2024-01-31 15:53:39 +08:00
|
|
|
this.stationId = stationId
|
2024-01-25 15:53:21 +08:00
|
|
|
queryStationBillingTemplateList(stationId).then((response) => {
|
|
|
|
|
console.log("通过站点id查询计费模板 result: ", response.rows, response.rows[0].templateId);
|
|
|
|
|
this.stationBillingTemplate = response.rows;
|
|
|
|
|
getTemplate(response.rows[0].templateId).then((response) => {
|
|
|
|
|
console.log("查询计费模板详情", response);
|
|
|
|
|
this.exchangeRate = response.data;
|
2024-01-31 15:53:39 +08:00
|
|
|
this.dynamicTags();
|
2024-01-25 15:53:21 +08:00
|
|
|
// 重置验证
|
|
|
|
|
this.$refs["exchangeRate"].resetFields();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-01-31 15:53:39 +08:00
|
|
|
dynamicTags() {
|
|
|
|
|
let tags = [];
|
|
|
|
|
this.exchangeRate.timeArray.map((x) => {
|
|
|
|
|
// console.log(x.type);
|
|
|
|
|
let type;
|
|
|
|
|
let desc;
|
|
|
|
|
if (x.type === "1") {
|
|
|
|
|
type = "danger";
|
|
|
|
|
desc = "尖";
|
|
|
|
|
} else if (x.type === "2") {
|
|
|
|
|
type = "warning";
|
|
|
|
|
desc = "峰";
|
|
|
|
|
} else if (x.type === "3") {
|
|
|
|
|
type = "success";
|
|
|
|
|
desc = "平";
|
|
|
|
|
} else {
|
|
|
|
|
type = "info";
|
|
|
|
|
desc = "谷";
|
|
|
|
|
}
|
|
|
|
|
let label = desc + " - " + x.startTime + " - " + x.endTime;
|
|
|
|
|
let tag = {
|
|
|
|
|
type: type,
|
|
|
|
|
label: label,
|
|
|
|
|
};
|
|
|
|
|
tags.push(tag);
|
|
|
|
|
});
|
|
|
|
|
this.tagsTime = tags
|
|
|
|
|
console.log(this.tagsTime);
|
|
|
|
|
},
|
2024-02-19 16:27:50 +08:00
|
|
|
// 站点列表
|
|
|
|
|
getStationList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
queryStationList(this.queryStation).then(response => {
|
|
|
|
|
console.log('站点列表', response);
|
|
|
|
|
this.sitesList = response.rows;
|
|
|
|
|
this.stationTotal = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-01-15 09:28:57 +08:00
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-01-15 11:10:42 +08:00
|
|
|
<style lang="scss" scoped></style>
|