Commit d6f68dc0 authored by guoyou's avatar guoyou

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents c7d8bacc 04c354ef
import fetch from 'utils/fetch'; import fetch from 'utils/fetch';
//获取租车订单
export function page(query) { export function page(query) {
return fetch({ return fetch({
url: '/api/order/baseOrder/getAll', url: '/api/order/baseOrder/getAll',
...@@ -8,6 +8,14 @@ export function page(query) { ...@@ -8,6 +8,14 @@ export function page(query) {
}); });
} }
//获取旅游订单
export function getOrderList(query) {
return fetch({
url: '/api/order/baseOrder/getOrderList',
method: 'get',
params: query
});
}
/** /**
* 获取所有分公司 * 获取所有分公司
*/ */
......
...@@ -254,7 +254,6 @@ export default { ...@@ -254,7 +254,6 @@ export default {
mounted() { mounted() {
this.dialogVisible = true this.dialogVisible = true
this.getAllFn() this.getAllFn()
console.log(this.orderDetailInfo)
}, },
methods: { methods: {
orderInfo(val) { orderInfo(val) {
...@@ -310,7 +309,7 @@ export default { ...@@ -310,7 +309,7 @@ export default {
duration: 2000 duration: 2000
}) })
} else { } else {
this.returnForm.id = this.form.detailId this.returnForm.id = this.orderDetailInfo.orderRentVehicleDetail.id
updateEndCompany(this.returnForm).then(data => { updateEndCompany(this.returnForm).then(data => {
if (data.status == 200) { if (data.status == 200) {
this.$notify({ this.$notify({
...@@ -336,7 +335,7 @@ export default { ...@@ -336,7 +335,7 @@ export default {
resetCar() { resetCar() {
this.clearFrom() this.clearFrom()
this.resetCarVisible = true this.resetCarVisible = true
this.resetCarForm.no = this.form.no this.resetCarForm.no = this.orderDetailInfo.no
}, },
cancelResetCar() { cancelResetCar() {
this.resetCarVisible = false this.resetCarVisible = false
...@@ -364,7 +363,7 @@ export default { ...@@ -364,7 +363,7 @@ export default {
duration: 2000 duration: 2000
}) })
this.resetCarVisible = false this.resetCarVisible = false
this.form.vehicleNumberPlat = this.resetCarForm.numberPlate this.orderDetailInfo.vehicleNumberPlat = this.resetCarForm.numberPlate
this.updateNumberPlat = true this.updateNumberPlat = true
} else { } else {
this.$notify({ this.$notify({
......
...@@ -1035,7 +1035,6 @@ export default { ...@@ -1035,7 +1035,6 @@ export default {
"flag" : true "flag" : true
} }
orderDetail(param).then(response => { orderDetail(param).then(response => {
console.log(response)
this.orderDetailInfo = response.data this.orderDetailInfo = response.data
if(this.orderDetailInfo && this.orderDetailInfo.memberLevel) { if(this.orderDetailInfo && this.orderDetailInfo.memberLevel) {
if(this.orderDetailInfo.memberLevel == 1) { if(this.orderDetailInfo.memberLevel == 1) {
...@@ -1055,7 +1054,6 @@ export default { ...@@ -1055,7 +1054,6 @@ export default {
this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(this.orderDetailInfo.costDetail.paramJson) this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(this.orderDetailInfo.costDetail.paramJson)
} }
console.log(this.orderDetailInfo.items)
if(this.orderDetailInfo.items) { if(this.orderDetailInfo.items) {
for (var i = 0;i< this.orderDetailInfo.items.length;i++) { for (var i = 0;i< this.orderDetailInfo.items.length;i++) {
if(this.orderDetailInfo.items[i].type == 104) { if(this.orderDetailInfo.items[i].type == 104) {
...@@ -1082,14 +1080,11 @@ export default { ...@@ -1082,14 +1080,11 @@ export default {
this.orderDetailInfo.ststusName = '已完成' this.orderDetailInfo.ststusName = '已完成'
} }
} }
console.log(this.orderDetailInfo)
this.rentDialogVisible = true this.rentDialogVisible = true
}) })
} }
}, },
checkViolateAmount() { checkViolateAmount() {
console.log(this.topAmount)
console.log(this.violateAmount)
if (this.topAmount < this.violateAmount) { if (this.topAmount < this.violateAmount) {
this.$notify({ this.$notify({
title: '失败', title: '失败',
...@@ -1134,7 +1129,6 @@ export default { ...@@ -1134,7 +1129,6 @@ export default {
cancelReason: '后台取消', cancelReason: '后台取消',
appUserId: row.userId appUserId: row.userId
} }
console.log(row)
getViolatePrice(row.orderNo).then(data => { getViolatePrice(row.orderNo).then(data => {
if (data.status == 200) { if (data.status == 200) {
that.topAmount = data.data.topAmount that.topAmount = data.data.topAmount
...@@ -1209,7 +1203,6 @@ export default { ...@@ -1209,7 +1203,6 @@ export default {
illegalEvent(params) { illegalEvent(params) {
this.illegalVisible = false this.illegalVisible = false
if (params) { if (params) {
// console.log(params);
} }
}, },
/** /**
...@@ -1218,11 +1211,10 @@ export default { ...@@ -1218,11 +1211,10 @@ export default {
detailEvent(params) { detailEvent(params) {
this.detailVisible = false this.detailVisible = false
if (params) { if (params) {
// console.log(params);
} }
}, },
handleHandoverOrderVehicle(row) { handleHandoverOrderVehicle(row) {
// console.log(row);
this.modalTitle = '交车记录' this.modalTitle = '交车记录'
this.form = row this.form = row
if (this.form.status == 2) { if (this.form.status == 2) {
...@@ -1281,7 +1273,6 @@ export default { ...@@ -1281,7 +1273,6 @@ export default {
}, },
handleReturnOrderVehicle(row) { handleReturnOrderVehicle(row) {
// console.log(row);
this.modalTitle = '还车记录' this.modalTitle = '还车记录'
this.form = row this.form = row
if (this.form.status == 2) { if (this.form.status == 2) {
...@@ -1319,7 +1310,6 @@ export default { ...@@ -1319,7 +1310,6 @@ export default {
this.depositDetail = false this.depositDetail = false
}, },
handleRefundVehicle(row) { handleRefundVehicle(row) {
// console.log(row);
this.activeInfo = row this.activeInfo = row
var that = this var that = this
that.pictureList = [] that.pictureList = []
...@@ -1372,7 +1362,7 @@ export default { ...@@ -1372,7 +1362,7 @@ export default {
var arr = item.depositRefundRecord var arr = item.depositRefundRecord
} }
that.depositRefundRecord = arr that.depositRefundRecord = arr
// console.log(that.depositRefundRecord);
} }
}) })
}) })
...@@ -1507,7 +1497,6 @@ export default { ...@@ -1507,7 +1497,6 @@ export default {
page(this.listQuery).then(response => { page(this.listQuery).then(response => {
if (response.data.data) { if (response.data.data) {
response.data.data.map(function(el) { response.data.data.map(function(el) {
// console.log(el);
if (el.status == 2) { if (el.status == 2) {
el.ststusName = '取消' el.ststusName = '取消'
} }
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
import tourOrderDetailModal from "../modal/tourOrderDetailModal";//租车订单详情 import tourOrderDetailModal from "../modal/tourOrderDetailModal";//租车订单详情
import { import {
page, page,
getOrderList,
getAllBranchCompany, getAllBranchCompany,
getAllBranchCompanyByZoneId, getAllBranchCompanyByZoneId,
calculate, calculate,
...@@ -614,7 +615,7 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -614,7 +615,7 @@ import {getAllCompany } from 'api/base_info/branch_company'
if(this.listQuery){ if(this.listQuery){
localStorage.setItem("tourOrderInfo", JSON.stringify(this.listQuery)); localStorage.setItem("tourOrderInfo", JSON.stringify(this.listQuery));
} }
page(this.listQuery) getOrderList(this.listQuery)
.then(response => { .then(response => {
this.list = response.data.data; this.list = response.data.data;
this.total = response.data.totalCount; this.total = response.data.totalCount;
......
...@@ -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,58 @@ ...@@ -686,50 +686,58 @@
* 根据订单号获取订单详情 * 根据订单号获取订单详情
* */ * */
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]; this.orderDetailInfo = response.data
let vehicleUserLicenses = {}; if(this.orderDetailInfo && this.orderDetailInfo.memberLevel) {
// if (a.status == 5) { if(this.orderDetailInfo.memberLevel == 1) {
// vehicleUserLicenses = { this.orderDetailInfo.memberName = "普通会员"
// name: a.orderVehicleCrosstownDto.licenseName, }
// phone: a.orderVehicleCrosstownDto.licensePhone, if(this.orderDetailInfo.memberLevel == 2) {
// idCard: a.orderVehicleCrosstownDto.licenseIdCard this.orderDetailInfo.memberName = "黄金会员"
// }; }
// } else { if(this.orderDetailInfo.memberLevel == 3) {
// if (a.vehicleUserLicenses.length > 0) { this.orderDetailInfo.memberName = "钻石会员"
// vehicleUserLicenses = a.vehicleUserLicenses[0]; }
// } if(this.orderDetailInfo.orderRentVehicleDetail.costDetail) {
// } this.orderDetailInfo.costDetail = JSON.parse(this.orderDetailInfo.orderRentVehicleDetail.costDetail)
a.orderRentVehicleDetail.startTime = timestamp2Date(a.orderRentVehicleDetail.startTime);
a.orderRentVehicleDetail.endTime = timestamp2Date(a.orderRentVehicleDetail.endTime); }
let arr = a.picture ? a.picture.split(",") : []; if(this.orderDetailInfo.costDetail.paramJson) {
a.picture = arr.length > 0 ? arr[0] : ""; this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(this.orderDetailInfo.costDetail.paramJson)
a.payTime = timestamp2Date(a.payTime);
this.rentOrderInfo = a; }
if(this.orderDetailInfo.items) {
this.costDetail = JSON.parse(this.rentOrderInfo.orderRentVehicleDetail.costDetail); for (var i = 0;i< this.orderDetailInfo.items.length;i++) {
var cost = ''; if(this.orderDetailInfo.items[i].type == 104) {
this.costDetail.children.map(function(a) { this.orderDetailInfo.carArticlesJson = this.orderDetailInfo.items[i].detail
cost += a.key + ":" +a.detail+" "; }
}); }
this.rentCostDetail = cost; }
if(this.rentOrderInfo.orderRentVehicleDetail.driverType==1) { if (this.orderDetailInfo.status == 2) {
this.serviceCost = this.rentOrderInfo.orderRentVehicleDetail.dayNum * 600 this.orderDetailInfo.ststusName = '取消'
} }
this.rentOrder = true; if (this.orderDetailInfo.status == -1) {
} else { this.orderDetailInfo.ststusName = '定损中'
this.$notify({ }
title: '失败', if (this.orderDetailInfo.status == 3) {
message: '操作失败!', this.orderDetailInfo.ststusName = '待付款'
type: 'error', }
duration: 2000 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