mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 18:10:10 +08:00
修改站点详情订单页面
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="168px" @submit.native.prevent>
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="168px"
|
||||||
|
@submit.native.prevent
|
||||||
|
>
|
||||||
<el-form-item label="订单编号" prop="orderCode">
|
<el-form-item label="订单编号" prop="orderCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.orderCode"
|
v-model="queryParams.orderCode"
|
||||||
@@ -46,33 +53,60 @@
|
|||||||
range-separator="-"
|
range-separator="-"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
:clearable=false
|
:clearable="false"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['order:order:export']">导出</el-button>
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['order:order:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<div>
|
<div>
|
||||||
{{dateDescription}}期间,总用电量{{sumUsedElectricity}}度,总消费金额{{sumOrderAmount}}元
|
{{ dateDescription }}期间,总用电量{{
|
||||||
|
sumUsedElectricity
|
||||||
|
}}度,总消费金额{{ sumOrderAmount }}元
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
<el-table-column type="selection" width="55" align="center"/>
|
v-loading="loading"
|
||||||
|
:data="orderList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!--<el-table-column label="主键" align="center" prop="id"/>-->
|
<!--<el-table-column label="主键" align="center" prop="id"/>-->
|
||||||
<el-table-column label="订单编号" align="center" prop="orderCode" width="180px">
|
<el-table-column
|
||||||
|
label="订单编号"
|
||||||
|
align="center"
|
||||||
|
prop="orderCode"
|
||||||
|
width="180px"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link
|
<router-link
|
||||||
:to="'/order/index/orderDetail/'+scope.row.orderCode"
|
:to="'/order/index/orderDetail/' + scope.row.orderCode"
|
||||||
class="link-type"
|
class="link-type"
|
||||||
>
|
>
|
||||||
<span>{{ scope.row.orderCode }}</span>
|
<span>{{ scope.row.orderCode }}</span>
|
||||||
@@ -87,15 +121,44 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>-->
|
</el-table-column>-->
|
||||||
<el-table-column label="订单状态描述" align="center" prop="orderStatusDescribe"/>
|
<el-table-column
|
||||||
<el-table-column label="会员昵称" align="center" prop="nickName" width="120px"/>
|
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="mobileNumber"
|
||||||
|
width="120px"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column label="站点" align="center" prop="stationName"/>
|
<el-table-column label="站点" align="center" prop="stationName" />
|
||||||
<el-table-column label="充电桩枪口号" align="center" prop="pileConnectorCode" width="200px"/>
|
<el-table-column
|
||||||
<el-table-column label="微信商户订单号" align="center" prop="outTradeNo" width="165px"/>
|
label="充电桩枪口号"
|
||||||
<el-table-column label="启动方式" align="center" prop="startMode" width="100px">
|
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">
|
<template slot-scope="scope">
|
||||||
<dict-tag
|
<dict-tag
|
||||||
:options="dict.type.start_mode"
|
:options="dict.type.start_mode"
|
||||||
@@ -106,10 +169,7 @@
|
|||||||
|
|
||||||
<el-table-column label="支付方式" align="center" prop="payMode">
|
<el-table-column label="支付方式" align="center" prop="payMode">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag
|
<dict-tag :options="dict.type.pay_mode" :value="scope.row.payMode" />
|
||||||
:options="dict.type.pay_mode"
|
|
||||||
:value="scope.row.payMode"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -122,18 +182,38 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="支付金额" align="center" prop="payAmount"/>
|
<el-table-column label="支付金额" align="center" prop="payAmount" />
|
||||||
<el-table-column label="充电度数" align="center" prop="chargingDegree" width="100px"/>
|
<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="startSoc" />
|
||||||
<el-table-column label="终止soc" align="center" prop="endSoc" />
|
<el-table-column label="终止soc" align="center" prop="endSoc" />
|
||||||
<!--<el-table-column label="订单生成日期" align="center" prop="createTime" width="180"/>-->
|
<!--<el-table-column label="订单生成日期" align="center" prop="createTime" width="180"/>-->
|
||||||
<el-table-column label="开始充电时间" align="center" prop="chargeStartTime" width="180"/>
|
<el-table-column
|
||||||
<el-table-column label="结束充电时间" align="center" prop="chargeEndTime" width="180"/>
|
label="开始充电时间"
|
||||||
<el-table-column label="订单总金额" align="center" prop="orderAmount" width="100px"/>
|
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>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@@ -143,23 +223,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listOrder, totalData} from "@/api/order/order";
|
import { listOrder, totalData } from "@/api/order/order";
|
||||||
import Template from "@/views/billing/template";
|
import Template from "@/views/billing/template";
|
||||||
import {listStation} from "@/api/pile/station";
|
import { listStation } from "@/api/pile/station";
|
||||||
import {getDay} from "@/utils/common";
|
import { getDay } from "@/utils/common";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "stationOrderList",
|
name: "stationOrderList",
|
||||||
components: {Template},
|
components: { Template },
|
||||||
props: {
|
props: {
|
||||||
stationId: "",
|
stationId: "",
|
||||||
},
|
},
|
||||||
dicts: ['order_status', 'start_mode', 'pay_mode', 'pay_status'],
|
dicts: ["order_status", "start_mode", "pay_mode", "pay_status"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateDescription: "",
|
dateDescription: "",
|
||||||
sumOrderAmount:'',
|
sumOrderAmount: "",
|
||||||
sumUsedElectricity:'',
|
sumUsedElectricity: "",
|
||||||
// 遮罩
|
// 遮罩
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -184,6 +264,8 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
startTime: null,
|
||||||
|
endTime: null,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderCode: null,
|
orderCode: null,
|
||||||
@@ -209,7 +291,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async dataLoading() {
|
async dataLoading() {
|
||||||
console.log("加载站点订单数据...")
|
console.log("加载站点订单数据...");
|
||||||
// 设置默认日期
|
// 设置默认日期
|
||||||
await this.defaultDate();
|
await this.defaultDate();
|
||||||
// 查询订单列表
|
// 查询订单列表
|
||||||
@@ -220,18 +302,19 @@ export default {
|
|||||||
/** 查询订单列表 */
|
/** 查询订单列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listOrder(this.queryParams).then(response => {
|
console.log("查询订单列表 this.queryParams", this.queryParams);
|
||||||
|
listOrder(this.queryParams).then((response) => {
|
||||||
this.orderList = response.rows;
|
this.orderList = response.rows;
|
||||||
console.log('this.queryParams', this.queryParams)
|
console.log("this.queryParams", this.queryParams);
|
||||||
console.log('response', response)
|
console.log("response", response);
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取订单总金额数据
|
// 获取订单总金额数据
|
||||||
getOrderTotalData() {
|
getOrderTotalData() {
|
||||||
totalData(this.queryParams).then(response => {
|
totalData(this.queryParams).then((response) => {
|
||||||
console.log('getOrderTotalData', response);
|
console.log("getOrderTotalData", response);
|
||||||
this.dateDescription = response.data.dateDescription;
|
this.dateDescription = response.data.dateDescription;
|
||||||
this.sumOrderAmount = response.data.sumOrderAmount;
|
this.sumOrderAmount = response.data.sumOrderAmount;
|
||||||
this.sumUsedElectricity = response.data.sumUsedElectricity;
|
this.sumUsedElectricity = response.data.sumUsedElectricity;
|
||||||
@@ -265,7 +348,7 @@ export default {
|
|||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
delFlag: null
|
delFlag: null,
|
||||||
};
|
};
|
||||||
this.orderDetailList = [];
|
this.orderDetailList = [];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
@@ -285,55 +368,59 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 订单详情序号 */
|
/** 订单详情序号 */
|
||||||
rowOrderDetailIndex({row, rowIndex}) {
|
rowOrderDetailIndex({ row, rowIndex }) {
|
||||||
row.index = rowIndex + 1;
|
row.index = rowIndex + 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 复选框选中数据 */
|
/** 复选框选中数据 */
|
||||||
handleOrderDetailSelectionChange(selection) {
|
handleOrderDetailSelectionChange(selection) {
|
||||||
this.checkedOrderDetail = selection.map(item => item.index)
|
this.checkedOrderDetail = selection.map((item) => item.index);
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('order/order/export', {
|
this.download(
|
||||||
...this.queryParams
|
"order/order/export",
|
||||||
}, `order_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`order_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
},
|
},
|
||||||
/** 查询充电站信息列表 */
|
/** 查询充电站信息列表 */
|
||||||
getStationList() {
|
getStationList() {
|
||||||
const queryStationParams = {
|
const queryStationParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 999
|
pageSize: 999,
|
||||||
};
|
};
|
||||||
listStation(queryStationParams).then((response) => {
|
listStation(queryStationParams).then((response) => {
|
||||||
console.log("订单列表页-查询站点列表", response)
|
console.log("订单列表页-查询站点列表", response);
|
||||||
this.stationList = response.rows;
|
this.stationList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//设置默认日期
|
//设置默认日期
|
||||||
defaultDate () {
|
defaultDate() {
|
||||||
console.log(getDay(-7));
|
console.log(getDay(-7));
|
||||||
//字符串拼接,开始时间,结束时间
|
//字符串拼接,开始时间,结束时间
|
||||||
let beg = getDay(-7) + " 00:00:00"; //当月第一天
|
let beg = getDay(-7) + " 00:00:00"; //当月第一天
|
||||||
let end = getDay(0) + " 23:59:59"; //当天
|
let end = getDay(0) + " 23:59:59"; //当天
|
||||||
this.settleTimeRange = [beg, end] //将值设置给插件绑定的数据
|
this.settleTimeRange = [beg, end]; //将值设置给插件绑定的数据
|
||||||
// console.log("defaultDate", this.settleTimeRange);
|
// console.log("defaultDate", this.settleTimeRange);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
settleTimeRange(newValue, oldValue) {
|
settleTimeRange(newValue, oldValue) {
|
||||||
if (newValue != null && newValue.length > 0) {
|
if (newValue != null && newValue.length > 0) {
|
||||||
this.queryParams.startSettleTime = newValue[0];
|
this.queryParams.startTime = newValue[0];
|
||||||
this.queryParams.endSettleTime = newValue[1];
|
this.queryParams.endTime = newValue[1];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user