|
|
@@ -27,298 +27,142 @@
|
|
|
<template>
|
|
|
<div class="system-container layout-padding">
|
|
|
<el-card shadow="hover" class="layout-padding-auto">
|
|
|
-
|
|
|
-
|
|
|
- <el-form
|
|
|
- :model="state.formQuery"
|
|
|
+ <ext-query-form
|
|
|
+ class="page-search"
|
|
|
ref="queryRef"
|
|
|
- size="default" label-width="0px" class="mt5 mb5">
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.mobilePhone"
|
|
|
- placeholder="用户手机号"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <ext-select
|
|
|
- v-model="state.formQuery.stationId"
|
|
|
- placeholder="站点"
|
|
|
- clearable
|
|
|
- url="station/listStation"
|
|
|
- urlMethod="get"
|
|
|
- data-key=""
|
|
|
- label-key="stationName"
|
|
|
- value-key="stationId"
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </ext-select>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.startChargeSeq"
|
|
|
- placeholder="充电订单号"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-input
|
|
|
- v-model="state.formQuery.connectorId"
|
|
|
- placeholder="充电设备接口编码"
|
|
|
- clearable
|
|
|
- @blur="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-input>
|
|
|
- <el-date-picker
|
|
|
- v-model="state.formQuery.startDate"
|
|
|
- placeholder="开始时间"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-date-picker>
|
|
|
- <el-date-picker
|
|
|
- v-model="state.formQuery.endDate"
|
|
|
- placeholder="结束时间"
|
|
|
- type="date"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </el-date-picker>
|
|
|
- <ext-d-select
|
|
|
- v-model="state.formQuery.orderStatus"
|
|
|
- type="ChargeOrder.orderStatus"
|
|
|
- placeholder="订单状态"
|
|
|
- clearable
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </ext-d-select>
|
|
|
- <ext-d-select
|
|
|
- v-model="state.formQuery.chargeStatus"
|
|
|
- placeholder="充电状态"
|
|
|
- clearable
|
|
|
- type="ChargeOrder.chargeStatus"
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </ext-d-select>
|
|
|
- <!-- <ext-d-select-->
|
|
|
- <!-- v-model="state.formQuery.stopReason"-->
|
|
|
- <!-- placeholder="充电停止原因"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- type="ChargeOrder.stopReason"-->
|
|
|
- <!-- @blur="loadData(true)"-->
|
|
|
- <!-- class="wd150 mr10">-->
|
|
|
- <!-- </ext-d-select>-->
|
|
|
- <ext-d-select
|
|
|
- v-model="state.formQuery.invoiceStatus"
|
|
|
- placeholder="发票状态"
|
|
|
- clearable
|
|
|
- type="ChargeOrder.invoiceStatus"
|
|
|
- @on-change="loadData(true)"
|
|
|
- class="wd150 mr10">
|
|
|
- </ext-d-select>
|
|
|
-
|
|
|
-
|
|
|
- <el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
|
|
|
- <SvgIcon name="ele-Search"/>
|
|
|
- 查询
|
|
|
- </el-button>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <el-card class="w100">
|
|
|
- <div class="order-summary">
|
|
|
- <span>订单笔数:</span>
|
|
|
- <el-tag type="success">{{ state.extraData.totalOrders }} 笔</el-tag>
|
|
|
- <span class="ml5">电量:</span>
|
|
|
- <el-tag type="success">{{ state.extraData.totalPower }} 度</el-tag>
|
|
|
- <span class="ml5">订单金额:</span>
|
|
|
- <el-tag type="success">{{ u.fmt.fmtMoney(state.extraData.totalMoney) }} 元</el-tag>
|
|
|
- <span class="ml5"> 电费:</span>
|
|
|
- <el-tag type="success">{{ u.fmt.fmtMoney(state.extraData.elecMoney) }} 元</el-tag>
|
|
|
- <span class="ml5">服务费:</span>
|
|
|
- <el-tag type="success">{{ u.fmt.fmtMoney(state.extraData.serviceMoney) }} 元</el-tag>
|
|
|
- <span class="ml5">服务费优惠:</span>
|
|
|
- <el-tag type="success">{{ u.fmt.fmtMoney(state.extraData.serviceMoneyDiscount) }} 元</el-tag>
|
|
|
- <span class="ml5">实付服务费:</span>
|
|
|
- <el-tag type="success">{{ u.fmt.fmtMoney(state.extraData.payServiceAmount) }} 元</el-tag>
|
|
|
- </div>
|
|
|
-
|
|
|
- </el-card>
|
|
|
-
|
|
|
- <el-table
|
|
|
- border
|
|
|
- stripe="stripe"
|
|
|
+ v-model="state.formQuery"
|
|
|
+ :columns="state.columns"
|
|
|
+ :import-config="state.importConfig"
|
|
|
+ :export-config="state.exportConfig"
|
|
|
+ @on-change="loadData(true)"
|
|
|
+ @imported="loadData(true)">
|
|
|
+ <!-- <template #extraQuery></template>
|
|
|
+ <template #extraLeft></template>
|
|
|
+ <template #extraRight></template>-->
|
|
|
+ </ext-query-form>
|
|
|
+
|
|
|
+ <ext-table
|
|
|
+ class="page-content"
|
|
|
:height="state.tableData.height"
|
|
|
- highlight-current-row
|
|
|
- current-row-key="id"
|
|
|
- row-key="id"
|
|
|
- :data="state.tableData.data"
|
|
|
- v-loading="state.tableData.loading"
|
|
|
- @selection-change="handleTableSelectionChange"
|
|
|
- @sort-change="handleTableSortChange">
|
|
|
- <template #empty>
|
|
|
- <el-empty></el-empty>
|
|
|
- </template>
|
|
|
- <el-table-column
|
|
|
- v-for="field in state.tableData.columns"
|
|
|
- :key="field.prop"
|
|
|
- :label="field.label"
|
|
|
- :align="field.align||'left'"
|
|
|
- :column-key="field.prop"
|
|
|
- :width="field.width"
|
|
|
- :min-width="field.minWidth"
|
|
|
- :fixed="field.fixed"
|
|
|
- :sortable="field.sortable"
|
|
|
- :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>
|
|
|
- <template v-else-if="'totalMoney'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'elecMoney'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'serviceMoney'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'payAmount'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'discountAmount'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'serviceMoneyDiscount'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'payServiceAmount'===field.prop">
|
|
|
- {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
- </template>
|
|
|
- <template v-else-if="'orderStatus'===field.prop">
|
|
|
- <ext-d-label type="ChargeOrder.orderStatus" v-model="row[field.prop]"/>
|
|
|
- </template>
|
|
|
- <template v-else-if="'chargeStatus'===field.prop">
|
|
|
- <ext-d-label type="ChargeOrder.chargeStatus" v-model="row[field.prop]"/>
|
|
|
- </template>
|
|
|
- <template v-else-if="'stopReason'===field.prop">
|
|
|
- <ext-d-label type="ChargeOrder.stopReason" v-model="row[field.prop]"/>
|
|
|
- </template>
|
|
|
- <template v-else-if="'invoiceStatus'===field.prop">
|
|
|
- <ext-d-label type="ChargeOrder.invoiceStatus" v-model="row[field.prop]"/>
|
|
|
- </template>
|
|
|
- <template v-else-if="'startTime'===field.prop">
|
|
|
- <div title="充电开始时间">
|
|
|
- {{ (row.startTime) }}
|
|
|
- </div>
|
|
|
- <hr>
|
|
|
- <div title="充电结束时间">
|
|
|
- {{ (row.endTime) }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else-if="'stationId'===field.prop">
|
|
|
- <div >
|
|
|
- {{ (row.stationId) }}
|
|
|
- </div>
|
|
|
- <hr v-if="row.stationName">
|
|
|
- <div >
|
|
|
- {{ (row.stationName) }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-else>
|
|
|
- <div>{{ row[field.prop] }}</div>
|
|
|
- </template>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ :data-list="state.tableData.data"
|
|
|
+ :columns="state.columns"
|
|
|
+ :border="true"
|
|
|
+ :loading="state.tableData.loading">
|
|
|
+ </ext-table>
|
|
|
|
|
|
<ext-page class="page-pager" v-model:value="state.pageQuery" @change="loadData(false)"/>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
- <!-- <ChargeOrderDialog ref="chargeOrderDialogRef" @refresh="loadData(true)"/>-->
|
|
|
+ <WashOrderDialog ref="washOrderDialogRef" @refresh="loadData(true)"/>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts" name="ChargeOrderList">
|
|
|
-import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
|
|
|
-import {$body, $get} from "/@/utils/request";
|
|
|
+<script setup lang="ts" name="WashOrderList">
|
|
|
+import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance,nextTick,onBeforeUnmount} from 'vue';
|
|
|
+import {$body,$get} from "/@/utils/request";
|
|
|
+import u from '/@/utils/u'
|
|
|
import {Msg} from "/@/utils/message";
|
|
|
-import u from "/@/utils/u"
|
|
|
+import {Session} from "/@/utils/storage";
|
|
|
|
|
|
-import {useRoute} from "vue-router";
|
|
|
-
|
|
|
-const route = useRoute();
|
|
|
+const {proxy}: any = getCurrentInstance();
|
|
|
|
|
|
import ExtPage from '/@/components/form/ExtPage.vue'
|
|
|
+import ExtQueryForm from "/@/components/form/ExtQueryForm.vue";
|
|
|
+import ExtTable from "/@/components/form/ExtTable.vue";
|
|
|
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
-import ExtDatePicker from "/@/components/form/ExtDatePicker.vue";
|
|
|
-import ExtDSelect from "/@/components/form/ExtDSelect.vue";
|
|
|
-import ExtDLabel from "/@/components/form/ExtDLabel.vue";
|
|
|
-import ExtSelect from "/@/components/form/ExtSelect.vue";
|
|
|
|
|
|
-// const ChargeOrderDialog = defineAsyncComponent(() => import("/@/views/page/ChargeOrderDialog.vue"));
|
|
|
+import {ElButton} from 'element-plus'
|
|
|
+
|
|
|
+
|
|
|
+const WashOrderDialog = defineAsyncComponent(() => import("/@/views/page/WashOrderDialog.vue"));
|
|
|
|
|
|
//定义引用
|
|
|
const queryRef = ref();
|
|
|
-const chargeOrderDialogRef = ref();
|
|
|
+const washOrderDialogRef = ref();
|
|
|
|
|
|
//定义变量
|
|
|
const state = reactive({
|
|
|
formQuery: {},
|
|
|
pageQuery: {
|
|
|
- pageNum: 1,
|
|
|
+ pageIndex: 1,
|
|
|
pageSize: 10,
|
|
|
total: 0
|
|
|
},
|
|
|
tableData: {
|
|
|
- height: 500,
|
|
|
- data: [] as Array<any>,
|
|
|
- loading: false,
|
|
|
- columns: [
|
|
|
- {label: '站点ID/名称', prop: 'stationId', width: 130,align:'center', resizable: true, fixed: 'left'},
|
|
|
- {label: '用户手机号', prop: 'mobilePhone', width: 120, resizable: true, fixed: 'left'},
|
|
|
- // {label: '站点ID', prop: 'stationId',width:100, resizable: true, fixed: 'left'},
|
|
|
- // {label: '站点', prop: 'stationName', width: 150, resizable: true, fixed: 'left'},
|
|
|
- {label: '充电订单号', prop: 'startChargeSeq', width: 170, resizable: true, fixed: 'left'},
|
|
|
- {label: '设备编号', prop: 'shortId', width: 90, resizable: true},
|
|
|
- {label: '充电设备接口编码', prop: 'connectorId', width: 160, resizable: true},
|
|
|
- {label: '充电开始/结束时间', prop: 'startTime', sortable: 'custom', width: 175, resizable: true},
|
|
|
- // {label: '充电结束时间', prop: 'endTime', sortable: 'custom', width: 160, resizable: true},
|
|
|
- {label: '充电量/度', prop: 'totalPower', width: 95, resizable: true},
|
|
|
- {label: '订单总金额', prop: 'totalMoney', width: 105, resizable: true},
|
|
|
- {label: '服务费优惠', prop: 'serviceMoneyDiscount', width: 105, resizable: true},
|
|
|
- {label: '实付金额', prop: 'payAmount', width: 90, resizable: true},
|
|
|
- {label: '总电费', prop: 'elecMoney', width: 80, resizable: true},
|
|
|
- {label: '总服务费', prop: 'serviceMoney', width: 90, resizable: true},
|
|
|
- {label: '实付服务费', prop: 'payServiceAmount', width: 105, resizable: true},
|
|
|
- // {label: '时段数:0~32', prop: 'sumPeriod', width:150, resizable: true},
|
|
|
- // {label: '充电明细信息', prop: 'chargeDetail', width:150, resizable: true},
|
|
|
- {label: '订单状态', prop: 'orderStatus', width: 90, resizable: true},
|
|
|
- {label: '充电状态', prop: 'chargeStatus', width: 90, resizable: true},
|
|
|
- {label: '充电停止原因', prop: 'stopReason', width: 120, resizable: true},
|
|
|
- {label: '发票状态', prop: 'invoiceStatus', width: 90, resizable: true},
|
|
|
- // {label: '创建时间', prop: 'createTime', sortable: 'custom', width:150, resizable: true},
|
|
|
- // {label: '更新时间', prop: 'updateTime', sortable: 'custom',width:150, resizable: true},
|
|
|
- // {
|
|
|
- // label: '操作', prop: 'action', width: 180, align: 'center', fixed: 'right',
|
|
|
- // }
|
|
|
- ],
|
|
|
-
|
|
|
+ height:500,
|
|
|
+ data: [] as Array < any >,
|
|
|
+ loading: false
|
|
|
},
|
|
|
- extraData: {
|
|
|
- totalOrders: 0,
|
|
|
- totalPower: 0,
|
|
|
- elecMoney: 0,
|
|
|
- serviceMoney: 0,
|
|
|
- totalMoney: 0,
|
|
|
- }
|
|
|
+ importConfig: {},
|
|
|
+ exportConfig: {},
|
|
|
+ columns: [
|
|
|
+ {type: 'selection', width: 60, align: 'center', fixed: 'left'},
|
|
|
+ {label: '消费总额,等于各单项费用之和(单位分)', prop: 'amount', query: true, type: '', resizable: true},
|
|
|
+ {label: '应收金额,如果大于预付金额,则限制为预付金额并关机,否则等于消费总金额(单位分)', prop: 'amountReceivable', query: true, type: '', resizable: true},
|
|
|
+ {label: '实收金额等于应收金额乘会员折扣(单位分)', prop: 'amountReceived', query: true, type: '', resizable: true},
|
|
|
+ {label: '卡内余额(仅限刷储值卡的订单有效,普通卡为总是为0)', prop: 'cardBalance', query: true, type: '', resizable: true},
|
|
|
+ {label: '卡过期时间,从1970年开始的时间戳(仅限刷储值卡的订单有效,普通卡为总是为0)', prop: 'cardExpired', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
|
|
|
+ {label: '卡内码,卡出厂的时候厂家写入的ID(仅限刷卡订单)', prop: 'cardId', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '卡串号,印刷在卡的表面,通过电脑上的卡管理工具写入卡内。(仅限刷卡订单)', prop: 'cardSn', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '卡类型(仅限刷卡订单,1表示普通卡,2表示储值卡)', prop: 'cardType', query: true, type: '', resizable: true},
|
|
|
+ {label: '关机方式:button维护按钮,network网络命令,no_balance超过预设金额,idle_timeout设备空闲超时,operation_timeout操作超时,card刷卡。注意:为空表示还没有关机,正在使用', prop: 'closeType', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '投币的累计金额(仅限刷卡订单,单位分)', prop: 'coinMoney', query: true, type: '', resizable: true},
|
|
|
+ {label: '投币的次数仅限刷卡订单', prop: 'coinNum', query: true, type: '', resizable: true},
|
|
|
+ {label: '', prop: 'createTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
|
|
|
+ {label: '费用明细:name 名称 price 单价(单位分) seconds 时长(单位秒) amount 费用(单位分) space⻋位或场地,water清水,foam泡沫,cleaner吸尘,tap水龙头,user_ext用户扩展,消毒或吹干等功能,coat镀膜,blow吹气', prop: 'detail', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '设备名称', prop: 'deviceName', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '优惠金额(分)', prop: 'discountAmount', query: true, type: '', resizable: true},
|
|
|
+ {label: '优惠金额等于消费总额减去实收金额(单位分)', prop: 'discountMoney', query: true, type: '', resizable: true},
|
|
|
+ {label: '优惠方式:RechargeRights-充值权益 Coupon-优惠券', prop: 'discountType', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '结束时间', prop: 'endTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
|
|
|
+ {label: '设备空闲关机倒计时剩余时间(单位秒),开机后从idle_timeout开始每秒减1,见到0关机,关机原因close_type=idle_time(递减过程中按任意功能键,重新开始从idle_timeout递减)', prop: 'idleRemainTime', query: true, type: '', resizable: true},
|
|
|
+ {label: '发票状态:0-待开票 1-已开票 2-已作废(用不上) 3-开票中', prop: 'invoiceStatus', query: true, type: '', resizable: true},
|
|
|
+ {label: '会员折扣比例(0-100,100表示不享受折扣,95表示9.5折优惠)', prop: 'memberDiscount', query: true, type: '', resizable: true},
|
|
|
+ {label: '开机方式:button维护按钮,network网络命令,coin投币,card刷卡', prop: 'openType', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '订单操作剩余操作时间(单位秒),开机后从operation_timeout开始每秒减1,减到0关机,关机原因close_type=operation_timeout', prop: 'operationRemainTime', query: true, type: '', resizable: true},
|
|
|
+ {label: '订单号,和开机命令的order_id相同,如果使用按钮快速开机,order_id是空字符串', prop: 'orderId', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '本机订单号', prop: 'orderIdLocal', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '订单状态:-1:未知,0-开机,1:成功,2:失败,3:取消', prop: 'orderStatus', query: true, type: '', resizable: true},
|
|
|
+ {label: '支付状态:0:未支付,1:已支付', prop: 'payStatus', query: true, type: '', resizable: true},
|
|
|
+ {label: '本次开机的预付金额(单位分,本次开机最大消费金额限制)', prop: 'prepayMoney', query: true, type: '', resizable: true},
|
|
|
+ {label: '产品key', prop: 'productKey', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '开始时间', prop: 'startTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
|
|
|
+ {label: '', prop: 'stationId', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '', prop: 'stopReason', query: true, type: 'text', resizable: true},
|
|
|
+ {label: '', prop: 'updateTime', query: true, sortable: 'custom', type: 'datetime', resizable: true, conf: {format: (val: any) => u.fmt.fmtDate(val)}},
|
|
|
+ { label: '操作', prop: 'action', type: 'render', width: 180, align: 'center', fixed: 'right',
|
|
|
+ render: (h: any, row: any) => {
|
|
|
+ return (
|
|
|
+ h('div', null, [
|
|
|
+ proxy.$auth('washOrder.modify') ?
|
|
|
+ h(ElButton, {
|
|
|
+ type: 'warning',
|
|
|
+ text: true,
|
|
|
+ size: 'small',
|
|
|
+ onClick: () => {
|
|
|
+ handleRowClick('edit', row)
|
|
|
+ }
|
|
|
+ }, () => '编辑') : '',
|
|
|
+ proxy.$auth('washOrder.remove') ?
|
|
|
+ h(ElButton, {
|
|
|
+ type: 'danger',
|
|
|
+ text: true,
|
|
|
+ size: 'small',
|
|
|
+ onClick: () => {
|
|
|
+ handleRowDelete(row)
|
|
|
+ }
|
|
|
+ }, () => '删除') : '',
|
|
|
+ ])
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
})
|
|
|
|
|
|
|
|
|
// 监听双向绑定 modelValue 的变化
|
|
|
// watch(
|
|
|
-// () => state.pageNum,
|
|
|
+// () => state.pageIndex,
|
|
|
// () => {
|
|
|
//
|
|
|
// }
|
|
|
@@ -326,35 +170,36 @@ const state = reactive({
|
|
|
|
|
|
//生命周期钩子
|
|
|
onBeforeMount(() => {
|
|
|
-})
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- var query = route.query;
|
|
|
- console.log(route.params, route.query)
|
|
|
- if (query.connectorId) {
|
|
|
- state.formQuery.connectorId = query.connectorId;
|
|
|
+ let token = Session.get("token")
|
|
|
+ let encodeToken = encodeURIComponent(token)
|
|
|
+ let exportUrl = `poi/export?type=washOrder&X-Token=${encodeToken}`
|
|
|
+ //导入导出参数配置
|
|
|
+ state.importConfig = {
|
|
|
+ auths: ['washOrder.add'],
|
|
|
+ url: `poi/import?type=washOrder&X-Token=${encodeToken}`,
|
|
|
+ template: `${exportUrl}&isTemplate=true`
|
|
|
}
|
|
|
|
|
|
- if (query.mobilePhone) {
|
|
|
- state.formQuery.mobilePhone = query.mobilePhone;
|
|
|
- }
|
|
|
+ state.exportConfig = {url: exportUrl,}
|
|
|
+
|
|
|
+})
|
|
|
|
|
|
+onMounted(() => {
|
|
|
loadData();
|
|
|
|
|
|
- nextTick(() => {
|
|
|
+ nextTick(()=>{
|
|
|
let bodyHeight = document.body.clientHeight;
|
|
|
let queryHeight = queryRef.value.$el.clientHeight;
|
|
|
- state.tableData.height = bodyHeight - queryHeight - 320
|
|
|
- // state.tableData.height =300
|
|
|
+ state.tableData.height = bodyHeight - queryHeight - 220
|
|
|
})
|
|
|
|
|
|
- mittBus.on("chargeOrder.refresh", () => {
|
|
|
+ mittBus.on("washOrder.refresh",()=>{
|
|
|
loadData();
|
|
|
})
|
|
|
});
|
|
|
|
|
|
-onBeforeUnmount(() => {
|
|
|
- mittBus.off("chargeOrder.refresh")
|
|
|
+onBeforeUnmount(()=>{
|
|
|
+ mittBus.off("washOrder.refresh")
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -362,14 +207,13 @@ onBeforeUnmount(() => {
|
|
|
// 初始化表格数据
|
|
|
const loadData = (refresh: boolean = false) => {
|
|
|
if (refresh) {
|
|
|
- state.pageQuery.pageNum = 1;
|
|
|
+ state.pageQuery.pageIndex = 1;
|
|
|
}
|
|
|
state.tableData.loading = true;
|
|
|
- $get(`/custom/listChargeOrders`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
- let {list, total, extraData} = res;
|
|
|
- state.extraData = extraData;
|
|
|
+ $body(`/washOrder/list`, {...state.formQuery, ...state.pageQuery}).then((res: any) => {
|
|
|
+ let {list, count} = res;
|
|
|
state.tableData.data = list;
|
|
|
- state.pageQuery.total = total;
|
|
|
+ state.pageQuery.total = count;
|
|
|
state.tableData.loading = false;
|
|
|
}).catch(e => {
|
|
|
console.error(e)
|
|
|
@@ -377,15 +221,14 @@ const loadData = (refresh: boolean = false) => {
|
|
|
})
|
|
|
};
|
|
|
|
|
|
-// 打开修改用户弹窗
|
|
|
-const onRowClick = (type: string, row: any) => {
|
|
|
- chargeOrderDialogRef.value.open(type, row);
|
|
|
+// 打开详情页弹窗
|
|
|
+const handleRowClick = (type: string, row: any) => {
|
|
|
+ washOrderDialogRef.value.open(type, row);
|
|
|
};
|
|
|
-
|
|
|
-// 删除用户
|
|
|
-const onRowDel = (row: any) => {
|
|
|
+// 删除点击
|
|
|
+const handleRowDelete = (row: any) => {
|
|
|
Msg.confirm(`此操作将永久删除:『${row.name}』,是否继续?`).then(() => {
|
|
|
- $get(`/chargeOrder/delete/${row.id}`).then(() => {
|
|
|
+ $get(`/washOrder/delete/${row.id}`).then(() => {
|
|
|
Msg.message("删除成功", 'success')
|
|
|
}).catch(() => {
|
|
|
Msg.message("删除失败", 'error')
|
|
|
@@ -393,17 +236,6 @@ const onRowDel = (row: any) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-const handleTableSelectionChange = (selection: any) => {
|
|
|
- console.log("handleTableSelectionChange>>", selection)
|
|
|
- // emit("on-check-change", selection)
|
|
|
-}
|
|
|
-
|
|
|
-const handleTableSortChange = (column, prop, order) => {
|
|
|
- console.log("handleTableSortChange>>", column, prop, order)
|
|
|
- // emit("on-sort-change", column)
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
//endregion
|
|
|
|
|
|
|
|
|
@@ -411,4 +243,4 @@ const handleTableSortChange = (column, prop, order) => {
|
|
|
// defineExpose({
|
|
|
// loadData,
|
|
|
// });
|
|
|
-</script>
|
|
|
+</script>
|