修改充电订单页面

This commit is contained in:
admin-lmm
2023-08-23 16:33:28 +08:00
parent dfd867e2af
commit 3b159f9011

View File

@@ -69,20 +69,20 @@
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="创建时间">--> <el-form-item label="创建时间">
<!-- <el-date-picker--> <el-date-picker
<!-- v-model="createTimeRange"--> v-model="createTimeRange"
<!-- style="width: 240px"--> style="width: 240px"
<!-- value-format="yyyy-MM-dd HH:mm:ss"--> value-format="yyyy-MM-dd HH:mm:ss"
<!-- :default-time="['00:00:00', '23:59:59']"--> :default-time="['00:00:00', '23:59:59']"
<!-- type="daterange"--> type="daterange"
<!-- range-separator="-"--> range-separator="-"
<!-- start-placeholder="开始日期"--> start-placeholder="开始日期"
<!-- end-placeholder="结束日期"--> end-placeholder="结束日期"
<!-- :clearable="true"--> :clearable="true"
<!-- ></el-date-picker>--> ></el-date-picker>
<!-- </el-form-item>--> </el-form-item>
<el-form-item label="结算时间"> <!-- <el-form-item label="结算时间">
<el-date-picker <el-date-picker
v-model="settleTimeRange" v-model="settleTimeRange"
style="width: 240px" style="width: 240px"
@@ -94,7 +94,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
:clearable="true" :clearable="true"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item> -->
</div> </div>
<el-button <el-button
@click="showOrHide()" @click="showOrHide()"
@@ -124,10 +124,7 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置 >重置
</el-button> </el-button>
</el-col> </el-col>
@@ -141,7 +138,11 @@
>导出 >导出
</el-button> </el-button>
<div> <div>
{{ dateDescription }}期间总用电量{{ sumUsedElectricity }}总消费金额{{ sumOrderAmount }}总结算金额{{ sumSettleAmount }} {{ dateDescription }}期间总用电量{{
sumUsedElectricity
}}总消费金额{{ sumOrderAmount }}总结算金额{{
sumSettleAmount
}}
</div> </div>
<el-popover placement="top-start" width="400" trigger="click"> <el-popover placement="top-start" width="400" trigger="click">
<el-checkbox <el-checkbox
@@ -156,10 +157,7 @@
v-model="checkedCities" v-model="checkedCities"
@change="handleCheckedCitiesChange" @change="handleCheckedCitiesChange"
> >
<el-checkbox <el-checkbox v-for="city in cities" :label="city" :key="city.id"
v-for="city in cities"
:label="city"
:key="city.id"
>{{ city }} >{{ city }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@@ -167,12 +165,9 @@
</el-row> </el-row>
<el-skeleton style="width: 100%" :loading="loading" animated :count="3"> <el-skeleton style="width: 100%" :loading="loading" animated :count="3">
<template slot="template"> <template slot="template">
<el-skeleton-item <el-skeleton-item variant="text" style="width: 100%; height: 100%" />
variant="text"
style="width: 100%; height: 100%"
/>
<div style="padding: 14px"> <div style="padding: 14px">
<el-skeleton-item variant="h3" style="width: 50%"/> <el-skeleton-item variant="h3" style="width: 50%" />
<div <div
style=" style="
display: flex; display: flex;
@@ -182,11 +177,8 @@
height: 16px; height: 16px;
" "
> >
<el-skeleton-item <el-skeleton-item variant="text" style="margin-right: 16px" />
variant="text" <el-skeleton-item variant="text" style="width: 30%" />
style="margin-right: 16px"
/>
<el-skeleton-item variant="text" style="width: 30%"/>
</div> </div>
</div> </div>
</template> </template>
@@ -201,10 +193,7 @@
<div class="cardview-static"> <div class="cardview-static">
<div> <div>
<router-link <router-link
:to=" :to="'/order/index/orderDetail/' + item.orderCode"
'/order/index/orderDetail/' +
item.orderCode
"
class="link-type" class="link-type"
>订单编号{{ item.orderCode }} >订单编号{{ item.orderCode }}
</router-link> </router-link>
@@ -215,9 +204,7 @@
>{{ item.orderStatusDescribe }} >{{ item.orderStatusDescribe }}
</el-tag> </el-tag>
</div> </div>
<div> <div>开始时间{{ item.chargeStartTime || "一" }}</div>
开始时间{{ item.chargeStartTime || "一" }}
</div>
</div> </div>
<div style="padding: 10px"> <div style="padding: 10px">
<el-descriptions <el-descriptions
@@ -229,10 +216,7 @@
> >
<!-- @click.native="goMemberDetail(item)" --> <!-- @click.native="goMemberDetail(item)" -->
<el-descriptions-item label="站点名称"> <el-descriptions-item label="站点名称">
<div <div style="color: #337ab7" @click="goStationDetail(item)">
style="color: #337ab7"
@click="goStationDetail(item)"
>
{{ item.stationName || "" }} {{ item.stationName || "" }}
</div> </div>
</el-descriptions-item> </el-descriptions-item>
@@ -255,13 +239,7 @@
>{{ startMode(item.startMode) }} >{{ startMode(item.startMode) }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<div <div style="flex: 1; text-align: center; margin: auto"></div>
style="
flex: 1;
text-align: center;
margin: auto;
"
></div>
</div> </div>
</div> </div>
@@ -289,12 +267,12 @@ import {
totalData, totalData,
} from "@/api/order/order"; } 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: "Order", name: "Order",
components: {Template}, components: { Template },
dicts: ["order_status", "start_mode", "pay_mode", "pay_status"], dicts: ["order_status", "start_mode", "pay_mode", "pay_status"],
data() { data() {
@@ -416,9 +394,7 @@ export default {
} }
}, },
startMode(mode) { startMode(mode) {
let arr = this.dict.type.start_mode.find( let arr = this.dict.type.start_mode.find((item) => item.value == mode);
(item) => item.value == mode
);
if (arr == null) { if (arr == null) {
return "一"; return "一";
} else { } else {
@@ -426,9 +402,7 @@ export default {
} }
}, },
payMode(mode) { payMode(mode) {
let arr = this.dict.type.pay_mode.find( let arr = this.dict.type.pay_mode.find((item) => item.value == mode);
(item) => item.value == mode
);
if (arr == null) { if (arr == null) {
return "一"; return "一";
} else { } else {
@@ -436,9 +410,7 @@ export default {
} }
}, },
payStatus(status) { payStatus(status) {
let arr = this.dict.type.pay_status.find( let arr = this.dict.type.pay_status.find((item) => item.value == status);
(item) => item.value == status
);
if (arr == null) { if (arr == null) {
return "一"; return "一";
} else { } else {
@@ -474,6 +446,7 @@ export default {
/** 查询订单列表 */ /** 查询订单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
console.log("查询订单列表需要的参数", this.queryParams);
listOrder(this.queryParams).then((response) => { listOrder(this.queryParams).then((response) => {
this.orderList = response.rows; this.orderList = response.rows;
console.log("order里面的参数", this.orderList); console.log("order里面的参数", this.orderList);
@@ -593,11 +566,10 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => { .catch(() => {});
});
}, },
/** 订单详情序号 */ /** 订单详情序号 */
rowOrderDetailIndex({row, rowIndex}) { rowOrderDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1; row.index = rowIndex + 1;
}, },
/** 订单详情添加按钮操作 */ /** 订单详情添加按钮操作 */
@@ -665,6 +637,8 @@ 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]; //将值设置给插件绑定的数据
this.createTimeRange = [beg, end];
// console.log("一进入页面显示的时间段", this.createTimeRange);
// return this.createTimeRange; // return this.createTimeRange;
}, },
}, },
@@ -682,14 +656,14 @@ export default {
settleTimeRange(newValue, oldValue) { settleTimeRange(newValue, oldValue) {
console.log("settleTimeRange", newValue, oldValue); console.log("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];
} else { } else {
this.queryParams.startSettleTime = null; this.queryParams.startTime = null;
this.queryParams.endSettleTime = null; this.queryParams.endTime = null;
}
} }
}, },
},
computed: { computed: {
tagType(row) { tagType(row) {
console.log("tagType row", row); console.log("tagType row", row);
@@ -699,7 +673,9 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell { ::v-deep
.el-descriptions--medium:not(.is-bordered)
.el-descriptions-item__cell {
padding-bottom: 4px; padding-bottom: 4px;
} }