修改站点详情订单页面

This commit is contained in:
admin-lmm
2023-08-30 15:02:00 +08:00
parent 9ca633dcaf
commit ca21baa343

View File

@@ -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,30 +53,57 @@
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
v-loading="loading"
:data="orderList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <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"
@@ -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>
@@ -123,13 +183,33 @@
</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
@@ -154,12 +234,12 @@ export default {
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,9 +368,9 @@ 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;
}, },
/** 订单详情序号 */ /** 订单详情序号 */
@@ -297,22 +380,26 @@ export default {
/** 复选框选中数据 */ /** 复选框选中数据 */
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;
}); });
}, },
@@ -323,17 +410,17 @@ export default {
//字符串拼接,开始时间,结束时间 //字符串拼接,开始时间,结束时间
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>