mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 20:10:16 +08:00
删除集团会员
This commit is contained in:
@@ -79,11 +79,20 @@ export function queryStationList(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员组中的站点列表
|
||||
//删除会员组中的站点列表
|
||||
export function removeStationFromMemberGroup(data) {
|
||||
return request({
|
||||
url: '/member/memberGroup/removeStationFromMemberGroup',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除会员组中的会员
|
||||
export function removeMemberFromMemberGroup(data) {
|
||||
return request({
|
||||
url: '/member/memberGroup/removeMemberFromMemberGroup',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -26,6 +26,13 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" align="center" prop="mobileNumber" />
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click="deleteMember(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
@@ -35,35 +42,34 @@
|
||||
<!-- 交易明细 -->
|
||||
<el-tab-pane label="交易明细">
|
||||
<!--搜索条件-->
|
||||
<el-form :model="queryOrderParams" ref="queryForm" size="small" :inline="true" v-show=true
|
||||
label-width="168px" @submit.native.prevent>
|
||||
<el-form-item label="订单编号" prop="orderCode">
|
||||
<el-input v-model="queryOrderParams.orderCode" placeholder="请输入订单编号" clearable
|
||||
<el-form :model="from" ref="queryForm" size="small" :inline="true" v-show=true
|
||||
@submit.native.prevent>
|
||||
<el-form-item label="订单编号" prop="orderCode" style="width: 300px">
|
||||
<el-input v-model="from.orderCode" placeholder="请输入订单编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryOrderParams.orderStatus" placeholder="请选择订单状态" clearable
|
||||
style="width: 140px">
|
||||
<el-form-item label="订单状态" prop="orderStatus" style="width: 230px">
|
||||
<el-select v-model="from.orderStatus" placeholder="请选择订单状态" clearable style="width: 140px">
|
||||
<el-option v-for="dict in dict.type.order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号码" prop="mobileNumber">
|
||||
<el-input v-model="queryOrderParams.mobileNumber" placeholder="请输入手机号码" clearable
|
||||
<el-form-item label="手机号码" prop="mobileNumber" style="width: 300px">
|
||||
<el-input v-model="from.mobileNumber" placeholder="请输入手机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker v-model="queryOrderParams.createTimeRange" style="width: 240px"
|
||||
<el-form-item label="创建时间" style="width: 330px">
|
||||
<el-date-picker v-model="createTimeRange" style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:clearable="true" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="结算时间">
|
||||
<el-date-picker v-model="queryOrderParams.settleTimeRange" style="width: 240px"
|
||||
<el-form-item label="结算时间" style="width: 330px">
|
||||
<el-date-picker v-model="settleTimeRange" style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:clearable="true"></el-date-picker>
|
||||
@@ -84,18 +90,14 @@
|
||||
v-hasPermi="['order:order:export']">导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<div>
|
||||
<ul>
|
||||
<li v-for="totalDate in totalDateList">
|
||||
{{
|
||||
totalDate.dateDescription
|
||||
}}期间,总用电量{{ totalDate.sumUsedElectricity }}度,总消费金额{{
|
||||
totalDate.sumOrderAmount
|
||||
}}元,总结算金额{{ totalDate.sumSettleAmount }}元
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-row>
|
||||
<ul class="uls">
|
||||
<li v-for="totalDate in totalDateList">
|
||||
{{ totalDate.dateDescription }}期间,总用电量{{ totalDate.sumUsedElectricity }}度,总消费金额{{
|
||||
totalDate.sumOrderAmount
|
||||
}}元,总结算金额{{ totalDate.sumSettleAmount }}元
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!--结果展示-->
|
||||
<el-table :data="orderListResult" stripe style="width: 100%" v-loading="loading">
|
||||
@@ -140,6 +142,7 @@
|
||||
:limit.sync="from.pageSize" @pagination="getOrderList" style="margin-bottom: 20px" />
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- 站点 -->
|
||||
<el-tab-pane label="站点">
|
||||
<el-col>
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addasite">添加站点
|
||||
@@ -163,6 +166,25 @@
|
||||
<pagination v-show="stationTotal > 0" :total="stationTotal" :page.sync="queryStation.pageNum"
|
||||
:limit.sync="queryStation.pageSize" @pagination="getStationList" style="margin-bottom: 20px" />
|
||||
</el-tab-pane>
|
||||
|
||||
<!-- 车辆列表 -->
|
||||
<el-tab-pane label="车辆列表">
|
||||
<el-table :data="carList" stripe style="width: 100%" v-loading="loading">
|
||||
<el-table-column label="车牌号" align="center" prop="" width="300" />
|
||||
<el-table-column label="VIN码" align="center" prop="" />
|
||||
<el-table-column label="总消费金额" align="center" prop="" />
|
||||
<el-table-column label="更新时间" align="center" prop="" />
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text">明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<pagination v-show="stationTotal > 0" :total="stationTotal" :page.sync="queryStation.pageNum"
|
||||
:limit.sync="queryStation.pageSize" @pagination="getStationList" style="margin-bottom: 20px" />
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -338,14 +360,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addMember, queryMemberList, preferentialTemplates, queryStationList, removeStationFromMemberGroup } from "@/api/member/memberGroup";
|
||||
import { listOrder } from "@/api/order/order";
|
||||
import { addMember, queryMemberList, preferentialTemplates, queryStationList, removeStationFromMemberGroup, removeMemberFromMemberGroup } from "@/api/member/memberGroup";
|
||||
import { listOrder, totalData } from "@/api/order/order";
|
||||
import { getStationListByMerchantId } from "@/api/pile/station";
|
||||
import { queryStationBillingTemplateList, getTemplate, queryStationPreferentialBillingTemplateList, updateBillingTemplate } from "@/api/billing/template.js";
|
||||
import { getDay } from "@/utils/common";
|
||||
|
||||
export default {
|
||||
name: 'JsowellUiDetail',
|
||||
dicts: ['member_status', 'start_mode', 'pay_mode', 'pay_status'],
|
||||
dicts: ['member_status', 'start_mode', 'pay_mode', 'pay_status', "order_status"],
|
||||
data() {
|
||||
// 自定义校验
|
||||
var validatePassA = (rule, value, callback) => {
|
||||
@@ -412,12 +435,17 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
groupCode: this.$route.params.groupCode.split('&')[0],
|
||||
merchantId: null,
|
||||
orderCode: null,
|
||||
pileSn: null,
|
||||
transactionCode: null,
|
||||
mobileNumber: null,
|
||||
orderStatus: null,
|
||||
stationId: null,
|
||||
groupLevel: null,
|
||||
groupType: null,
|
||||
discount: null,
|
||||
phoneNumber: null
|
||||
merchantId: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
startSettleTime: null,
|
||||
endSettleTime: null,
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -430,8 +458,6 @@ export default {
|
||||
discount: null,
|
||||
phoneNumber: null
|
||||
},
|
||||
// 查询订单搜索条件
|
||||
queryOrderParams: {},
|
||||
// 订单结果集
|
||||
orderListResult: [],
|
||||
total: 0,
|
||||
@@ -500,16 +526,45 @@ export default {
|
||||
stationTotal: 0,
|
||||
getDisabled: false,
|
||||
getTitle: '',
|
||||
stationBillingTemplate: null
|
||||
stationBillingTemplate: null,
|
||||
carList: [], //车辆列表
|
||||
// 订单创建时间范围
|
||||
createTimeRange: [],
|
||||
// 订单创建结束范围
|
||||
settleTimeRange: [],
|
||||
totalDateList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
console.log(this.$route.params.groupCode, this.$route.params.groupCode.split('&')[0], this.$route.params.groupCode.split('&')[1]);
|
||||
this.getMemberList();
|
||||
this.getOrderList();
|
||||
this.getStationList()
|
||||
this.getStationList();
|
||||
await this.defaultDate();
|
||||
this.handleQuery();
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
createTimeRange(newValue, oldValue) {
|
||||
console.log("createTimeRange发生变化", newValue, oldValue);
|
||||
if (newValue != null && newValue.length > 0) {
|
||||
this.from.startTime = newValue[0];
|
||||
this.from.endTime = newValue[1];
|
||||
} else {
|
||||
this.from.startTime = null;
|
||||
this.from.endTime = null;
|
||||
}
|
||||
},
|
||||
settleTimeRange(newValue, oldValue) {
|
||||
console.log("settleTimeRange发生变化", newValue, oldValue);
|
||||
if (newValue != null && newValue.length > 0) {
|
||||
this.from.startSettleTime = newValue[0];
|
||||
this.from.endSettleTime = newValue[1];
|
||||
} else {
|
||||
this.from.startSettleTime = null;
|
||||
this.from.endSettleTime = null;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleAddMember() {
|
||||
this.openAddMember = true
|
||||
@@ -547,9 +602,9 @@ export default {
|
||||
},
|
||||
getOrderList() {
|
||||
this.loading = true;
|
||||
console.log("this.from", this.from);
|
||||
listOrder(this.from).then((response) => {
|
||||
this.orderListResult = response.rows;
|
||||
console.log("this.from", this.from);
|
||||
console.log("response", response);
|
||||
this.getTotal = response.total;
|
||||
this.loading = false;
|
||||
@@ -677,7 +732,6 @@ export default {
|
||||
dynamicTags() {
|
||||
let tags = [];
|
||||
this.exchangeRate.timeArray.map((x) => {
|
||||
// console.log(x.type);
|
||||
let type;
|
||||
let desc;
|
||||
if (x.type === "1") {
|
||||
@@ -717,7 +771,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
this.$modal.confirm('是否确认删除"' + row.stationName + '"').then(function () {
|
||||
|
||||
|
||||
}).then(() => {
|
||||
let remove = {
|
||||
groupCode: this.$route.params.groupCode.split('&')[0],
|
||||
@@ -729,9 +783,68 @@ export default {
|
||||
this.getStationList();
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.from.pageNum = 1;
|
||||
// 获取订单列表
|
||||
this.getOrderList();
|
||||
// 获取订单总金额
|
||||
this.getOrderTotalData();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
//设置默认日期
|
||||
defaultDate() {
|
||||
//字符串拼接,开始时间,结束时间
|
||||
let beg = getDay(-7) + " 00:00:00"; //当月第一天
|
||||
let end = getDay(0) + " 23:59:59"; //当天
|
||||
this.createTimeRange = [beg, end];
|
||||
},
|
||||
// 删除会员
|
||||
deleteMember(row) {
|
||||
console.log(row);
|
||||
this.$modal.confirm('是否确认删除昵称为"' + row.nickName + '"会员').then(function () {
|
||||
|
||||
}).then(() => {
|
||||
let remove = {
|
||||
groupCode: this.$route.params.groupCode.split('&')[0],
|
||||
memberId: row.memberId
|
||||
}
|
||||
removeMemberFromMemberGroup(remove).then(response => {
|
||||
console.log('删除站点', response);
|
||||
this.$message.success("删除成功");
|
||||
this.getMemberList();
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 获取订单总金额数据
|
||||
getOrderTotalData() {
|
||||
totalData(this.from).then((response) => {
|
||||
console.log("getOrderTotalData", response);
|
||||
this.totalDateList = response.data;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"order/order/export",
|
||||
{
|
||||
...this.from,
|
||||
},
|
||||
`order_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.uls {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user