手动结算订单支持自定义输入金额和充电度数

This commit is contained in:
2023-03-18 15:35:29 +08:00
parent 6b3f593f3f
commit c3232cd29a
4 changed files with 53 additions and 16 deletions

View File

@@ -13,7 +13,15 @@
>
<span>平台收到充电桩传来的最后一次实时监测数据<br/></span>
<span v-if="lastMonitorData != null">时间:{{lastMonitorData.dateTime}}, 消费金额:{{lastMonitorData.chargingAmount}}, 充电度数:{{lastMonitorData.chargingDegree}}</span>
<el-empty v-if="lastMonitorData == null" description="未查询到实时监测数据"/>
<el-empty v-if="lastMonitorData == null" :image-size="50" description="未查询到实时监测数据"/>
<el-form :model="manualSettlementParam">
<el-form-item label="消费金额" label-width="80px">
<el-input v-model="manualSettlementParam.chargingAmount" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="充电度数" label-width="80px">
<el-input v-model="manualSettlementParam.chargingDegree" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="confirmManualSettlement"> </el-button>
@@ -196,8 +204,12 @@ export default {
orderDetail:[],
pileIn: [],
orderRealTimeInfo: null,
// 手动结算对话框Visible
dialogVisible: false,
// 最后一次实时监测数据
lastMonitorData: {},
// 手动结算参数
manualSettlementParam: {},
};
},
created() {
@@ -208,11 +220,9 @@ export default {
this.dialogVisible = true;
},
confirmManualSettlement() {
var data = {
orderCode: this.orderInfo[0].orderCode
};
console.log("确认手动结算订单", data);
manualSettlementOrder(data).then(response => {
this.manualSettlementParam.orderCode = this.orderInfo[0].orderCode;
console.log("确认手动结算订单param:", this.manualSettlementParam);
manualSettlementOrder(this.manualSettlementParam).then(response => {
this.dialogVisible = false;
this.getOrderDetail();
})