Commit c8eb2c6a authored by jiaorz's avatar jiaorz

后台订单详情修改

parent 0dd9baa9
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
<vehiclePlanModal v-if="anpai" :currentItem="currentItem" v-on:anpaiDialogEvent = "anpaiDialogEvent"></vehiclePlanModal> <vehiclePlanModal v-if="anpai" :currentItem="currentItem" v-on:anpaiDialogEvent = "anpaiDialogEvent"></vehiclePlanModal>
<!--租车详情弹框--> <!--租车详情弹框-->
<!--rentOrder--> <!--rentOrder-->
<rentOrderDetailModal :form="rentOrderInfo" :rentCostDetail="rentCostDetail" v-if="rentOrder" v-on:rentOrderDetailDialogEvent="rentOrderDetailDialogEvent"></rentOrderDetailModal> <rentOrderDetailModal :orderDetailInfo="orderDetailInfo" v-if="rentOrder" v-on:rentOrderDetailDialogEvent="rentOrderDetailDialogEvent"></rentOrderDetailModal>
<!--旅游订单详情--> <!--旅游订单详情-->
<tourOrderDetailModal :tourRow="tourRow" v-if="tourDialogVisible" v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal> <tourOrderDetailModal :tourRow="tourRow" v-if="tourDialogVisible" v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal>
<!--禁用弹框--> <!--禁用弹框-->
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
} from 'api/base_info/branch_company/'; } from 'api/base_info/branch_company/';
import { import {
getAllBranchCompanyByZoneId, getAllBranchCompanyByZoneId,
page orderDetail
} from 'api/order/rentVehicle'; } from 'api/order/rentVehicle';
import { import {
formatDate formatDate
...@@ -461,7 +461,7 @@ ...@@ -461,7 +461,7 @@
anpai: false,//安排用车弹框 anpai: false,//安排用车弹框
jinyong: false,//禁用弹框 jinyong: false,//禁用弹框
currentItem: {},//待操作数据 currentItem: {},//待操作数据
rentOrderInfo: {},//租车订单详情 orderDetailInfo: {},//租车订单详情
rentCostDetail: {},//租车订单费用明细 rentCostDetail: {},//租车订单费用明细
tourDialogVisible: false,//旅游订单弹框 tourDialogVisible: false,//旅游订单弹框
tourRow: {},//旅游订单详情-当前行 tourRow: {},//旅游订单详情-当前行
...@@ -686,50 +686,60 @@ ...@@ -686,50 +686,60 @@
* 根据订单号获取订单详情 * 根据订单号获取订单详情
* */ * */
getOneVechi: function(orderNo) { getOneVechi: function(orderNo) {
let params = { var param = {
oneNo: orderNo "orderNo":orderNo,
}; "flag" : true
page(params).then(res => { }
if (res.status == 200) { orderDetail(param).then(response => {
let a = res.data.data[0]; console.log(response)
let vehicleUserLicenses = {}; this.orderDetailInfo = response.data
// if (a.status == 5) { if(this.orderDetailInfo && this.orderDetailInfo.memberLevel) {
// vehicleUserLicenses = { if(this.orderDetailInfo.memberLevel == 1) {
// name: a.orderVehicleCrosstownDto.licenseName, this.orderDetailInfo.memberName = "普通会员"
// phone: a.orderVehicleCrosstownDto.licensePhone, }
// idCard: a.orderVehicleCrosstownDto.licenseIdCard if(this.orderDetailInfo.memberLevel == 2) {
// }; this.orderDetailInfo.memberName = "黄金会员"
// } else { }
// if (a.vehicleUserLicenses.length > 0) { if(this.orderDetailInfo.memberLevel == 3) {
// vehicleUserLicenses = a.vehicleUserLicenses[0]; this.orderDetailInfo.memberName = "钻石会员"
// } }
// } if(this.orderDetailInfo.orderRentVehicleDetail.costDetail) {
a.orderRentVehicleDetail.startTime = timestamp2Date(a.orderRentVehicleDetail.startTime); this.orderDetailInfo.costDetail = JSON.parse(this.orderDetailInfo.orderRentVehicleDetail.costDetail)
a.orderRentVehicleDetail.endTime = timestamp2Date(a.orderRentVehicleDetail.endTime);
let arr = a.picture ? a.picture.split(",") : []; }
a.picture = arr.length > 0 ? arr[0] : ""; if(this.orderDetailInfo.costDetail.paramJson) {
a.payTime = timestamp2Date(a.payTime); this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(this.orderDetailInfo.costDetail.paramJson)
this.rentOrderInfo = a;
}
this.costDetail = JSON.parse(this.rentOrderInfo.orderRentVehicleDetail.costDetail); console.log(this.orderDetailInfo.items)
var cost = ''; if(this.orderDetailInfo.items) {
this.costDetail.children.map(function(a) { for (var i = 0;i< this.orderDetailInfo.items.length;i++) {
cost += a.key + ":" +a.detail+" "; if(this.orderDetailInfo.items[i].type == 104) {
}); this.orderDetailInfo.carArticlesJson = this.orderDetailInfo.items[i].detail
this.rentCostDetail = cost; }
if(this.rentOrderInfo.orderRentVehicleDetail.driverType==1) { }
this.serviceCost = this.rentOrderInfo.orderRentVehicleDetail.dayNum * 600 }
} if (this.orderDetailInfo.status == 2) {
this.rentOrder = true; this.orderDetailInfo.ststusName = '取消'
} else { }
this.$notify({ if (this.orderDetailInfo.status == -1) {
title: '失败', this.orderDetailInfo.ststusName = '定损中'
message: '操作失败!', }
type: 'error', if (this.orderDetailInfo.status == 3) {
duration: 2000 this.orderDetailInfo.ststusName = '待付款'
}); }
} if (this.orderDetailInfo.status == 4) {
}); this.orderDetailInfo.ststusName = '待出行'
}
if (this.orderDetailInfo.status == 5) {
this.orderDetailInfo.ststusName = '出行中'
}
if (this.orderDetailInfo.status == 6) {
this.orderDetailInfo.ststusName = '已完成'
}
}
this.rentOrder = true
})
}, },
/** /**
* 关闭保养弹框后逻辑处理 * 关闭保养弹框后逻辑处理
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment