|
|
@@ -34,104 +34,35 @@
|
|
|
ref="queryRef"
|
|
|
size="default" label-width="0px" class="mt5 mb5">
|
|
|
<el-input
|
|
|
- v-model="state.formQuery.avgConnectorElec"
|
|
|
- placeholder="单枪平均日充电量"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.avgOrderElec"
|
|
|
- placeholder="订单平均充电量"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.avgOrderMoney"
|
|
|
- placeholder="订单平均充电费用"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.chargeUsers"
|
|
|
- placeholder="充电人数"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.discountAmount"
|
|
|
- placeholder="总优惠金额"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.elecMoney"
|
|
|
- placeholder="总电费"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.serviceMoney"
|
|
|
- placeholder="总服务费"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.serviceMoneyDiscount"
|
|
|
- placeholder="服务费优惠金额"
|
|
|
+ v-model="state.formQuery.adminUserName"
|
|
|
+ placeholder="客户姓名"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
</el-input>
|
|
|
+
|
|
|
<el-input
|
|
|
v-model="state.formQuery.statMonth"
|
|
|
- placeholder="统计时间"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.stationId"
|
|
|
- placeholder="站点id"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.totalMoney"
|
|
|
- placeholder="总充电费用"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.totalPower"
|
|
|
- placeholder="总电量"
|
|
|
+ placeholder="统计时间(月)"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
</el-input>
|
|
|
<el-input
|
|
|
- v-model="state.formQuery.updateTime"
|
|
|
- placeholder=""
|
|
|
+ v-model="state.formQuery.stationName"
|
|
|
+ placeholder="站点名称"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
</el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.validOrders"
|
|
|
- placeholder="充电有效订单数"
|
|
|
+ <ext-d-select
|
|
|
+ type="Statement.status"
|
|
|
+ v-model="state.formQuery.status"
|
|
|
+ placeholder="状态"
|
|
|
clearable
|
|
|
@blur="loadData(true)"
|
|
|
class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
-
|
|
|
+ </ext-d-select>
|
|
|
|
|
|
<el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
|
|
|
<SvgIcon name="ele-Search"/>
|
|
|
@@ -153,7 +84,6 @@
|
|
|
<template #empty>
|
|
|
<el-empty></el-empty>
|
|
|
</template>
|
|
|
- <el-table-column type="selection" align="center" width="55" fixed="left"/>
|
|
|
<el-table-column
|
|
|
v-for="field in state.tableData.columns"
|
|
|
:key="field.prop"
|
|
|
@@ -166,8 +96,21 @@
|
|
|
:show-overflow-tooltip="!field.fixed&&field.width>150"
|
|
|
>
|
|
|
<template #default="{row}">
|
|
|
- <template v-if="field.prop==='expand'">
|
|
|
- <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
|
|
|
+ <template v-if="field.prop==='action'">
|
|
|
+ <el-button v-auth="'statement.list'" size="small" plain type="primary" @click="onRowClick('view',row)">查看</el-button>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='stationId'">
|
|
|
+ <div class="text-align-center">
|
|
|
+ {{ row.stationId }}
|
|
|
+ <hr>
|
|
|
+ {{ row.stationName }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='status'">
|
|
|
+ <ext-d-label type="Statement.status" v-model="row.status"/>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="['actualElecMoney','actualServiceMoney','actualSplittingAmount','discountAmount','elecLossMoney','elecMoney','serviceMoney','serviceMoneyDiscount','splittingAmount','totalMoney','vatAmount'].includes(field.prop)">
|
|
|
+ {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div>{{ row[field.prop] }}</div>
|
|
|
@@ -180,24 +123,27 @@
|
|
|
<ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
- <StationStatementsMonthDialog ref="stationStatementsMonthDialogRef" @refresh="loadData(true)"/>
|
|
|
+ <StatementsDialog ref="statementsDialogRef" @refresh="loadData(true)"/>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts" name="StationStatementsMonthList">
|
|
|
+<script setup lang="ts" name="StatementsList">
|
|
|
import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
|
|
|
import {$body, $get} from "/@/utils/request";
|
|
|
import {Msg} from "/@/utils/message";
|
|
|
+import u from "/@/utils/u";
|
|
|
|
|
|
|
|
|
import ExtPage from '/@/components/form/ExtPage.vue'
|
|
|
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
+import ExtDLabel from "/@/components/form/ExtDLabel.vue";
|
|
|
+import ExtDSelect from "/@/components/form/ExtDSelect.vue";
|
|
|
|
|
|
-const StationStatementsMonthDialog = defineAsyncComponent(() => import("/@/views/admin/station/statment/dialog.vue"));
|
|
|
+const StatementsDialog = defineAsyncComponent(() => import("/@/views/admin/station/statment/dialog.vue"));
|
|
|
|
|
|
//定义引用
|
|
|
const queryRef = ref();
|
|
|
-const stationStatementsMonthDialogRef = ref();
|
|
|
+const statementsDialogRef = ref();
|
|
|
|
|
|
//定义变量
|
|
|
const state = reactive({
|
|
|
@@ -212,21 +158,27 @@ const state = reactive({
|
|
|
data: [] as Array<any>,
|
|
|
loading: false,
|
|
|
columns: [
|
|
|
- {type: 'selection', width: 60, align: 'center', fixed: 'left'},
|
|
|
- {label: '订单平均充电费用', prop: 'avgOrderMoney', resizable: true, width: 130},
|
|
|
- {label: '充电人数', prop: 'chargeUsers', resizable: true, width: 130},
|
|
|
- {label: '', prop: 'createTime', sortable: 'custom', resizable: true, width: 150},
|
|
|
- {label: '总优惠金额', prop: 'discountAmount', resizable: true, width: 130},
|
|
|
- {label: '总电费', prop: 'elecMoney', resizable: true, width: 130},
|
|
|
- {label: '总服务费', prop: 'serviceMoney', resizable: true, width: 130},
|
|
|
- {label: '服务费优惠金额', prop: 'serviceMoneyDiscount', resizable: true, width: 130},
|
|
|
- {label: '统计时间', prop: 'statMonth', resizable: true},
|
|
|
- {label: '站点id', prop: 'stationId', resizable: true},
|
|
|
- {label: '总充电费用', prop: 'totalMoney', resizable: true, width: 130},
|
|
|
- {label: '', prop: 'updateTime', sortable: 'custom', resizable: true, width: 150},
|
|
|
- {label: '充电有效订单数', prop: 'validOrders', resizable: true, width: 130},
|
|
|
+ {label: '客户姓名', prop: 'adminUserName', resizable: true, fixed: 'left', width: 150},
|
|
|
+ {label: '站点', prop: 'stationId', resizable: true, width: 130},
|
|
|
+ {label: '统计时间(月)', prop: 'statMonth', resizable: true, width: 160},
|
|
|
+ {label: '状态', prop: 'status', sortable: 'custom', align: 'center', width: 130},
|
|
|
+ {label: '实际抄表电费金额', prop: 'actualElecMoney', resizable: true, width: 160},
|
|
|
+ {label: '实际参与分成的服务费', prop: 'actualServiceMoney', resizable: true, width: 180},
|
|
|
+ {label: '实际分成金额', prop: 'actualSplittingAmount', resizable: true, width: 160},
|
|
|
+
|
|
|
+ {label: '优惠金额', prop: 'discountAmount', resizable: true, width: 160},
|
|
|
+ {label: '电损电费金额', prop: 'elecLossMoney', resizable: true, width: 160},
|
|
|
+ {label: '订单电费金额', prop: 'elecMoney', resizable: true, width: 160},
|
|
|
+
|
|
|
+ {label: '服务费金额', prop: 'serviceMoney', resizable: true, width: 160},
|
|
|
+ {label: '服务费优惠金额', prop: 'serviceMoneyDiscount', resizable: true, width: 160},
|
|
|
+ {label: '分成金额', prop: 'splittingAmount', resizable: true, width: 160},
|
|
|
+
|
|
|
+ {label: '订单金额', prop: 'totalMoney', resizable: true, width: 160},
|
|
|
+ {label: '增值税额', prop: 'vatAmount', resizable: true, width: 160},
|
|
|
+ {label: '创建时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 200, fixed: 'right'},
|
|
|
{
|
|
|
- label: '操作', prop: 'action', width: 180, align: 'center', fixed: 'right',
|
|
|
+ label: '操作', prop: 'action', width: 100, align: 'center', fixed: 'right',
|
|
|
}
|
|
|
],
|
|
|
},
|
|
|
@@ -251,16 +203,16 @@ onMounted(() => {
|
|
|
nextTick(() => {
|
|
|
let bodyHeight = document.body.clientHeight;
|
|
|
let queryHeight = queryRef.value.$el.clientHeight;
|
|
|
- state.tableData.height = bodyHeight - queryHeight - 220
|
|
|
+ state.tableData.height = bodyHeight - queryHeight - 320
|
|
|
})
|
|
|
|
|
|
- mittBus.on("stationStatementsMonth.refresh", () => {
|
|
|
+ mittBus.on("statements.refresh", () => {
|
|
|
loadData();
|
|
|
})
|
|
|
});
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
- mittBus.off("stationStatementsMonth.refresh")
|
|
|
+ mittBus.off("statements.refresh")
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -271,7 +223,7 @@ const loadData = (refresh: boolean = false) => {
|
|
|
state.pageQuery.pageNum = 1;
|
|
|
}
|
|
|
state.tableData.loading = true;
|
|
|
- $body(`/stationStatementsMonth/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
+ $get(`/statements/listStatements`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
let {list, total} = res;
|
|
|
state.tableData.data = list;
|
|
|
state.pageQuery.total = total;
|
|
|
@@ -282,15 +234,15 @@ const loadData = (refresh: boolean = false) => {
|
|
|
})
|
|
|
};
|
|
|
|
|
|
-// 打开修改站点经营数据对账表-月弹窗
|
|
|
+// 打开修改客户对账单弹窗
|
|
|
const onRowClick = (type: string, row: any) => {
|
|
|
- stationStatementsMonthDialogRef.value.open(type, row);
|
|
|
+ statementsDialogRef.value.open(type, row);
|
|
|
};
|
|
|
|
|
|
-// 删除站点经营数据对账表-月
|
|
|
+// 删除客户对账单
|
|
|
const onRowDel = (row: any) => {
|
|
|
Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
|
|
|
- $get(`/stationStatementsMonth/delete/${row.id}`).then(() => {
|
|
|
+ $get(`/statements/delete/${row.id}`).then(() => {
|
|
|
Msg.message("删除成功", 'success')
|
|
|
}).catch(() => {
|
|
|
Msg.message("删除失败", 'error')
|