Commit 0828e966 authored by hanfeng's avatar hanfeng

修改车辆订单

parent 03dbdfb2
......@@ -21,7 +21,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="姓名:">
<span>{{form.username}}</span>
<span>{{form.realName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......
......@@ -25,6 +25,11 @@
<el-input v-model="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="姓名">
<el-input v-model="listQuery.realName" placeholder="请输入客户姓名"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
......@@ -50,6 +55,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆编号">
<el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
......@@ -68,6 +78,13 @@
<span>{{scope.row.no}}</span><br><span>{{scope.row.crtTime}}</span>
</template>
</el-table-column>
<el-table-column
prop="status"
label="订单状态" width="100"align="center">
<template scope="scope">
<span>{{scope.row.ststusName}}</span>
</template>
</el-table-column>
<el-table-column min-width="250" align="center" label="名称/车牌号">
<template scope="scope">
<span>{{scope.row.name}}</span><br/><span>{{scope.row.vehicleNumberPlat}}</span>
......@@ -75,7 +92,7 @@
</el-table-column>
<el-table-column width="150" align="center" label="姓名/手机号">
<template scope="scope">
<span>{{scope.row.username}}</span>/<span>{{scope.row.telephone}}</span>
<span>{{scope.row.realName}}</span>/<span>{{scope.row.telephone}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="取车时间/还车时间">
......@@ -102,15 +119,15 @@
</template>
</el-table-column>
<el-table-column align="center" label="订单状态">
<template scope="scope">
<span v-if="scope.row.status == '2'">取消</span>
<span v-if="scope.row.status == '3'">待付款</span>
<span v-if="scope.row.status == '4'">待出行</span>
<span v-if="scope.row.status == '5'">出行中</span>
<span v-if="scope.row.status == '6'">已完成</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="订单状态">-->
<!-- <template scope="scope">-->
<!-- <span v-if="scope.row.status == '2'">取消</span>-->
<!-- <span v-if="scope.row.status == '3'">待付款</span>-->
<!-- <span v-if="scope.row.status == '4'">待出行</span>-->
<!-- <span v-if="scope.row.status == '5'">出行中</span>-->
<!-- <span v-if="scope.row.status == '6'">已完成</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column width="100" align="center" label="订单详情" fixed="right">
<template scope="scope">
......@@ -161,7 +178,7 @@
</div>
<div class="label-title">
<span>姓名/手机号:</span> <span
class="label-text"><span>{{form.username}}</span>/<span>{{form.telephone}}</span></span>
class="label-text"><span>{{form.realName}}</span>/<span>{{form.telephone}}</span></span>
</div>
<div class="label-title">
<span>取车:</span> <span class="label-text">{{form.orderRentVehicleDetail.startTime}}</span><span
......@@ -294,574 +311,598 @@
<script>
import Illegal from "./illegalModal";//违章查询
import Detail from "./detail";//违章查询
import rentOrderDetailModal from "../modal/rentOrderDetailModal";//租车订单详情
import {
formatDate
} from '../../../utils/dateFormattor';
import {
page,
getAllBranchCompany,
getAllBranchCompanyByZoneId,
getOrderVehicleCrosstown,
getStep
} from 'api/order/rentVehicle';
import {
timestamp2Date
} from 'utils/dateUtils';
import {mapGetters} from 'vuex';
import rsCode from '../../../utils/rsCode';
import {
getSysRegionByIds
} from 'api/vehicle/vehicleInfo/';
import {
getAllZone
} from 'api/base_info/constant/';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElButton from "../../../../node_modules/element-ui/packages/button/src/button.vue";
import Illegal from "./illegalModal";//违章查询
import Detail from "./detail";//违章查询
import rentOrderDetailModal from "../modal/rentOrderDetailModal";//租车订单详情
import {
formatDate
} from '../../../utils/dateFormattor';
import {
page,
getAllBranchCompany,
getAllBranchCompanyByZoneId,
getOrderVehicleCrosstown,
getStep
} from 'api/order/rentVehicle';
import {
timestamp2Date
} from 'utils/dateUtils';
import {mapGetters} from 'vuex';
import rsCode from '../../../utils/rsCode';
import {
getSysRegionByIds
} from 'api/vehicle/vehicleInfo/';
import {
getAllZone
} from 'api/base_info/constant/';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElButton from "../../../../node_modules/element-ui/packages/button/src/button.vue";
export default {
name: 'branchCompanyStock',
components: {
ElButton,
ElCol,
ElRow,
Illegal,
Detail,
rentOrderDetailModal
export default {
name: 'branchCompanyStock',
components: {
ElButton,
ElCol,
ElRow,
Illegal,
Detail,
rentOrderDetailModal
},
data() {
return {
pictureList: [],
dedDetail: [],
depositRefundRecord: [],
dedTotal: '',
Tel: '',
form: {
couponAmount: undefined,
crtHost: undefined,
crtName: undefined,
crtTime: undefined,
crtUser: undefined,
detailId: undefined,
endCompanyName: undefined,
goodsAmount: undefined,
hasDiscount: undefined,
hasMemberRight: undefined,
hasPay: undefined,
id: undefined,
name: undefined,
realName:undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
orderVehicleCrosstownDto: {
licenseIdCard: "",
licenseImg: "",
licenseName: "",
licensePhone: ""
},
orderRentVehicleDetail: {
bookRecordId: undefined,
costDetail: undefined,
crtTime: undefined,
dayNum: undefined,
deposit: undefined,
driverType: undefined,
endAddr: undefined,
endCity: undefined,
endCityName: undefined,
endCompanyId: undefined,
endTime: undefined,
freeDays: undefined,
handelViolation: undefined,
id: undefined,
modelId: undefined,
myDriverIds: undefined,
orderId: undefined,
score: undefined,
startAddr: undefined,
startCity: undefined,
startCityName: undefined,
startCompanyId: undefined,
startTime: undefined,
stime: undefined,
suserid: undefined,
updTime: undefined,
vehicleId: undefined,
},
payOrigin: undefined,
picture: undefined,
realAmount: undefined,
refundStatus: undefined,
startCompanyName: undefined,
status: undefined,
ststusName: undefined,
telephone: undefined,
type: undefined,
updTime: undefined,
userId: undefined,
username: undefined,
vehicleNumberPlat: undefined,
version: undefined
},
data() {
return {
pictureList: [],
dedDetail: [],
depositRefundRecord: [],
dedTotal: '',
Tel: '',
form: {
couponAmount: undefined,
crtHost: undefined,
crtName: undefined,
crtTime: undefined,
crtUser: undefined,
detailId: undefined,
endCompanyName: undefined,
goodsAmount: undefined,
hasDiscount: undefined,
hasMemberRight: undefined,
hasPay: undefined,
id: undefined,
name: undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
orderVehicleCrosstownDto: {
licenseIdCard: "",
licenseImg: "",
licenseName: "",
licensePhone: ""
},
orderRentVehicleDetail: {
bookRecordId: undefined,
costDetail: undefined,
crtTime: undefined,
dayNum: undefined,
deposit: undefined,
driverType: undefined,
endAddr: undefined,
endCity: undefined,
endCityName: undefined,
endCompanyId: undefined,
endTime: undefined,
freeDays: undefined,
handelViolation: undefined,
id: undefined,
modelId: undefined,
myDriverIds: undefined,
orderId: undefined,
score: undefined,
startAddr: undefined,
startCity: undefined,
startCityName: undefined,
startCompanyId: undefined,
startTime: undefined,
stime: undefined,
suserid: undefined,
updTime: undefined,
vehicleId: undefined,
},
payOrigin: undefined,
picture: undefined,
realAmount: undefined,
refundStatus: undefined,
startCompanyName: undefined,
status: undefined,
ststusName: undefined,
telephone: undefined,
type: undefined,
updTime: undefined,
userId: undefined,
username: undefined,
vehicleNumberPlat: undefined,
version: undefined
},
orderVehicleCrosstownVisible: false,
rentDialogVisible: false,//租车详情弹框
modalTitle: '订单详情',
illegalVisible: false,//违章查询弹框
detailVisible: false,
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
type: 1,
no: null,
status: null,
startTime: undefined,
endTime: undefined,
zoneId: undefined,
startCompanyId: undefined,
plateNumber: undefined
},
baranchQuery: {
zoneId: null
},
orderVehicleQuery: {
orderId: null,
type: undefined
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
allZoneArr: [],//全部片区
allBranchCompany: [],
tourCostDetail: '',
damageSafe: '',
serviceCost: 0,
orderReturnVehicleCrosstown: {
crtTime: undefined,
deduction: undefined,
id: undefined,
imgs: undefined,
isDel: undefined,
mileage: undefined,
mileageImg: undefined,
orderId: undefined,
orderNo: undefined,
orperaterId: undefined,
remak: undefined,
status: undefined,
statusId: undefined,
statusTime: undefined,
type: undefined,
updTime: undefined,
userLicenseId: undefined,
username: undefined,
licenseIdCard: undefined,
licenseImg: undefined,
licenseName: undefined,
licensePhone: undefined
},//还车记录
tableKey: 0,
otherImg: [],
handover: false,
returnVehicle: false,
refundshow: false,//退款信息
vehicleDetail: false, //交还车信息,默认全部显示
order_btn_order_violcation_save: false,
depositDetail: false,
}
orderVehicleCrosstownVisible: false,
rentDialogVisible: false,//租车详情弹框
modalTitle: '订单详情',
illegalVisible: false,//违章查询弹框
detailVisible: false,
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
this.order_btn_order_violcation_save = this.elements['order:btn_order_violcation_save'];
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
type: 1,
no: null,
status: null,
startTime: undefined,
endTime: undefined,
zoneId: undefined,
startCompanyId: undefined,
plateNumber: undefined,
realName: undefined,
vehicleCode: undefined
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
//获取大区列表
getAllZoneList() {
return getAllZone();
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
baranchQuery: {
zoneId: null
},
methods: {
handleOrderDetail(row) {
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
var detail = a.detail == undefined ? '' : a.detail
cost += a.key + ":" + detail + " "
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.rentDialogVisible = true;
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e) {
this.rentDialogVisible = false;
if (e) {
this.getList()
}
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row) {
this.currentRow = row;
this.illegalVisible = true;
},
/**
* 操作-查看详情按钮,显示详情弹框
*/
detailInquiry(row) {
this.currentRow = row;
this.detailVisible = true;
},
/**
* 关闭违章查询弹框
* */
illegalEvent(params) {
this.illegalVisible = false;
if (params) {
console.log(params);
}
},
/**
* 关闭违章查询弹框
* */
detailEvent(params) {
this.detailVisible = false;
if (params) {
console.log(params);
}
},
handleHandoverOrderVehicle(row) {
console.log(row)
this.modalTitle = "交车记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
cost += a.key + ":" + a.detail + " "
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 1
this.getAllOrderVehicleCrosstown();
this.handover = true
this.returnVehicle = false
this.vehicleDetail = true
this.depositDetail = false
orderVehicleQuery: {
orderId: null,
type: undefined
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
allZoneArr: [],//全部片区
allBranchCompany: [],
tourCostDetail: '',
damageSafe: '',
serviceCost: 0,
orderReturnVehicleCrosstown: {
crtTime: undefined,
deduction: undefined,
id: undefined,
imgs: undefined,
isDel: undefined,
mileage: undefined,
mileageImg: undefined,
orderId: undefined,
orderNo: undefined,
orperaterId: undefined,
remak: undefined,
status: undefined,
statusId: undefined,
statusTime: undefined,
type: undefined,
updTime: undefined,
userLicenseId: undefined,
username: undefined,
licenseIdCard: undefined,
licenseImg: undefined,
licenseName: undefined,
licensePhone: undefined
},//还车记录
tableKey: 0,
otherImg: [],
handover: false,
returnVehicle: false,
refundshow: false,//退款信息
vehicleDetail: false, //交还车信息,默认全部显示
order_btn_order_violcation_save: false,
depositDetail: false,
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
this.order_btn_order_violcation_save = this.elements['order:btn_order_violcation_save'];
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
//获取大区列表
getAllZoneList() {
return getAllZone();
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
},
methods: {
handleOrderDetail(row) {
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
var detail = a.detail == undefined ? '' : a.detail
cost += a.key + ":" + detail + " "
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.rentDialogVisible = true;
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e) {
this.rentDialogVisible = false;
if (e) {
this.getList()
}
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row) {
this.currentRow = row;
this.illegalVisible = true;
},
/**
* 操作-查看详情按钮,显示详情弹框
*/
detailInquiry(row) {
this.currentRow = row;
this.detailVisible = true;
},
/**
* 关闭违章查询弹框
* */
illegalEvent(params) {
this.illegalVisible = false;
if (params) {
console.log(params);
}
},
/**
* 关闭违章查询弹框
* */
detailEvent(params) {
this.detailVisible = false;
if (params) {
console.log(params);
}
},
handleHandoverOrderVehicle(row) {
console.log(row)
this.modalTitle = "交车记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
cost += a.key + ":" + a.detail + " "
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 1
this.getAllOrderVehicleCrosstown();
this.handover = true
this.returnVehicle = false
this.vehicleDetail = true
this.depositDetail = false
},
getAllOrderVehicleCrosstown() {
getOrderVehicleCrosstown(this.orderVehicleQuery)
.then(response => {
console.log(response)
if (response.data.length <= 0) {
alert("交还车记录不存在")
} else {
this.orderVehicleCrosstownVisible = true
this.orderReturnVehicleCrosstown = response.data[0];
if (response.data[0].imgs) {
this.otherImg = response.data[0].imgs.split(',')
}
}
})
},
getAllOrderVehicleCrosstown() {
getOrderVehicleCrosstown(this.orderVehicleQuery)
.then(response => {
console.log(response)
if (response.data.length <= 0) {
alert("交还车记录不存在")
} else {
this.orderVehicleCrosstownVisible = true
this.orderReturnVehicleCrosstown = response.data[0];
if (response.data[0].imgs) {
this.otherImg = response.data[0].imgs.split(',')
}
}
})
},
},
handleReturnOrderVehicle(row) {
console.log(row)
this.modalTitle = "还车记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
cost += a.key + ":" + a.detail + " "
handleReturnOrderVehicle(row) {
console.log(row)
this.modalTitle = "还车记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a) {
cost += a.key + ":" + a.detail + " "
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 2
this.getAllOrderVehicleCrosstown();
this.returnVehicle = true
this.handover = false
this.vehicleDetail = true
this.depositDetail = false
},
handleRefundVehicle(row) {
console.log(row)
var that = this;
that.pictureList = [];
that.dedDetail = [];
that.depositRefundRecord = [];
that.dedTotal = 0;
that.Tel = '';
getStep(row.no).then(response => {
response.data.forEach(function (item) {
if (item.type != 1) {
that.Tel = item.customerPhone
that.type = item.type
if (item.dedDetail) {
var dedTotal = 0
var dedDetail = JSON.parse(item.dedDetail);
that.dedDetail = dedDetail;
dedDetail.forEach(function (item) {
dedTotal += Number(item.cost)
})
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
that.dedTotal = dedTotal.toFixed(2);
}
item.depositRefundRecord.forEach(function (itm) {
itm.updTimeStr = timestamp2Date(itm.updTime);
if (itm.status == 3) {
itm.endTimeStr = timestamp2Date(Number(itm.updTime) + 2592000000)
if (itm.orderViolation) {
if (itm.orderViolation.picture) {
var Arr = itm.orderViolation.picture.split(",");
var arrivalPicList = [];
Arr.map(function (it) {
arrivalPicList.push(it);
});
itm.pictureList = arrivalPicList;
}
}
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 2
this.getAllOrderVehicleCrosstown();
this.returnVehicle = true
this.handover = false
this.vehicleDetail = true
this.depositDetail = false
},
handleRefundVehicle(row) {
console.log(row)
var that = this;
that.pictureList = [];
that.dedDetail = [];
that.depositRefundRecord = [];
that.dedTotal = 0;
that.Tel = '';
getStep(row.no).then(response => {
response.data.forEach(function (item) {
if (item.type != 1) {
that.Tel = item.customerPhone
that.type = item.type
if (item.dedDetail) {
var dedTotal = 0
var dedDetail = JSON.parse(item.dedDetail);
that.dedDetail = dedDetail;
dedDetail.forEach(function (item) {
dedTotal += Number(item.cost)
})
that.dedTotal = dedTotal.toFixed(2);
}
item.depositRefundRecord.forEach(function (itm) {
itm.updTimeStr = timestamp2Date(itm.updTime);
if (itm.status == 3) {
itm.endTimeStr = timestamp2Date(Number(itm.updTime) + 2592000000)
if (itm.orderViolation) {
if (itm.orderViolation.picture) {
var Arr = itm.orderViolation.picture.split(",");
var arrivalPicList = [];
Arr.map(function (it) {
arrivalPicList.push(it);
});
itm.pictureList = arrivalPicList;
}
}
}
})
if (item.type == 3) {
var arr = item.depositRefundRecord;
var item = arr.shift();
arr.push(item)
} else {
var arr = item.depositRefundRecord;
}
})
if (item.type == 3) {
var arr = item.depositRefundRecord;
var item = arr.shift();
arr.push(item)
} else {
var arr = item.depositRefundRecord;
}
that.depositRefundRecord = arr
console.log(that.depositRefundRecord)
}
});
})
this.modalTitle = "押金记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
that.depositRefundRecord = arr
console.log(that.depositRefundRecord)
}
});
})
this.modalTitle = "押金记录"
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = '取消';
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.orderVehicleCrosstownVisible = true
this.vehicleDetail = false
this.depositDetail = true
},
//监听change事件
getProvinceRegions(item) {
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
this.listQuery.startCompanyId = undefined;
getAllBranchCompanyByZoneId(this.baranchQuery)
.then(response => {
this.allBranchCompany = response.data;
})
},
getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clearSearch() {
this.listQuery = {
page: 1,
limit: 20,
type: 1,
no: null,
status: null,
startTime: undefined,
endTime: undefined,
zoneId: undefined,
startCompanyId: undefined
}
this.getList()
},
/**
* 获取订单列表
*/
getList() {
this.listLoading = true;
// if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime();
// }
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
page(this.listQuery)
.then(response => {
if (response.data.data){
response.data.data.map(function (el) {
console.log(el)
if (el.status == 2) {
el.ststusName = '取消';
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
if (el.status == 3) {
el.ststusName = '待付款';
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
if (el.status == 4) {
el.ststusName = '待出行';
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
if (el.status == 5) {
el.ststusName = '出行中';
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(this.form.orderRentVehicleDetail.startTime)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(this.form.orderRentVehicleDetail.endTime)
this.orderVehicleCrosstownVisible = true
this.vehicleDetail = false
this.depositDetail = true
},
//监听change事件
getProvinceRegions(item) {
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
this.listQuery.startCompanyId = undefined;
getAllBranchCompanyByZoneId(this.baranchQuery)
.then(response => {
this.allBranchCompany = response.data;
})
},
getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clearSearch() {
this.listQuery = {
page: 1,
limit: 20,
type: 1,
no: null,
status: null,
startTime: undefined,
endTime: undefined,
zoneId: undefined,
startCompanyId: undefined
if (el.status == 6) {
el.ststusName = '已完成';
}
this.getList()
},
/**
* 获取订单列表
*/
getList() {
this.listLoading = true;
console.log(this.listQuery)
// if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime();
// }
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
page(this.listQuery)
.then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
})
}
}
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
}
}
}
</script>
<style scpoed>
......
......@@ -21,7 +21,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="姓名:">
<span>{{form.username}}</span>
<span>{{form.realName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -95,6 +95,7 @@
hasPay: undefined,
id: undefined,
name: undefined,
realName: undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
......
......@@ -21,7 +21,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="姓名:">
<span>{{form.username}}</span>
<span>{{form.realName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......
......@@ -14,7 +14,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="订单状态:">
<span>{{form.ststusName}}</span>
<span>{{form.status}}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -40,40 +40,53 @@
</el-col>
</el-row>
<table class="orderDetail">
<tr><th>旅行</th><th>价格</th><th>人数</th><th>保险</th></tr>
<tr>
<th>旅行</th>
<th>价格</th>
<th>人数</th>
<th>保险</th>
</tr>
<tr>
<td>{{form.name}}</td>
<td>{{tourCostDetail}}</td>
<td>成人:{{form.orderTourDetail.adultNum}} 儿童:{{form.orderTourDetail.childNum}}</td>
<td>成人:{{form.orderTourDetail.adultNum}} 儿童:{{form.orderTourDetail.childNum}}</td>
<td>{{insureDetail}}</td>
</tr>
<tr>
<td ></td>
<td ></td>
<td ></td>
<td >订单金额:{{form.realAmount}}</td>
<td></td>
<td></td>
<td></td>
<td>订单金额:{{form.realAmount}}</td>
</tr>
</table>
<div>
<div style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">联系人信息</span></div>
<div>
<span style="font-weight: 700">联系人:</span><span class="label-text" >{{form.orderTourDetail.contactMan}}</span>
<span style="font-weight: 700">联系电话:</span><span class="label-text" >{{form.orderTourDetail.contactPhone}}</span>
<span style="font-weight: 700">Email:</span><span class="label-text">{{form.orderTourDetail.contactEmail}}</span>
<span style="font-weight: 700">联系人:</span><span class="label-text">{{form.orderTourDetail.contactMan}}</span>
<span style="font-weight: 700">联系电话:</span><span
class="label-text">{{form.orderTourDetail.contactPhone}}</span>
<span style="font-weight: 700">Email:</span><span
class="label-text">{{form.orderTourDetail.contactEmail}}</span>
</div>
</div>
<div>
<div style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">出游人信息 成人{{form.orderTourDetail.adultNum}}人 儿童{{form.orderTourDetail.childNum}}</span></div>
<div style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">出游人信息 成人{{form.orderTourDetail.adultNum}}人 儿童{{form.orderTourDetail.childNum}}</span>
</div>
<table class="orderDetail">
<tr><th>身份</th><th>姓名</th><th>电话</th><th>身份证号</th></tr>
<tr v-for="(item,index) in form.orderTourDetail.userVoList " :key="index">
<td v-if="item && item.isdel == 0 && item.isChild == 0">成人</td>
<td v-if="item && item.isdel == 0 && item.isChild == 1">儿童</td>
<td v-if="item && item.isdel == 0">{{item.name}}</td>
<td v-if="item && item.isdel == 0">{{item.phone}}</td>
<td v-if="item && item.isdel == 0">{{item.idCard}}</td>
</tr>
<tr>
<th>身份</th>
<th>姓名</th>
<th>电话</th>
<th>身份证号</th>
</tr>
<tr v-for="(item,index) in form.orderTourDetail.userVoList " :key="index">
<td v-if="item && item.isdel == 0 && item.isChild == 0">成人</td>
<td v-if="item && item.isdel == 0 && item.isChild == 1">儿童</td>
<td v-if="item && item.isdel == 0">{{item.name}}</td>
<td v-if="item && item.isdel == 0">{{item.phone}}</td>
<td v-if="item && item.isdel == 0">{{item.idCard}}</td>
</tr>
</table>
</div>
</el-form>
......@@ -92,6 +105,7 @@
import {
timestamp2Date
} from 'utils/dateUtils';
export default {
props: ["tourRow"],
name: 'tourOrderDetailModal',
......@@ -105,83 +119,84 @@
return {
dialogVisible: false,
form: {
couponAmount: undefined,
crtHost: undefined,
crtName: undefined,
crtTime: undefined,
crtUser: undefined,
detailId: undefined,
endCompanyName: undefined,
goodsAmount: undefined,
hasDiscount: undefined,
hasMemberRight: undefined,
hasPay: undefined,
id: undefined,
name: undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
orderTourDetail: {
adultNum: undefined,
childNum: undefined,
contactEmail: undefined,
contactMan: undefined,
contactPhone: undefined,
costDetail: undefined,
crtTime: undefined,
dayNum: undefined,
endAddr: undefined,
endTime: undefined,
goodId: undefined,
hasInsure: undefined,
id: undefined,
isOutside: undefined,
orderId: undefined,
siteId: undefined,
spePriceId: undefined,
startAddr: undefined,
startCity: undefined,
startCityName: undefined,
startCompanyId: undefined,
startTime: undefined,
totalNumber: undefined,
tourUserIds: undefined,
updTime: undefined,
verificationId: undefined
},
payOrigin: undefined,
picture: undefined,
realAmount: undefined,
refundStatus: undefined,
startCompanyName: undefined,
status: undefined,
ststusName:undefined,
telephone: undefined,
type: undefined,
updTime: undefined,
userId: undefined,
username: undefined,
vehicleNumberPlat: undefined,
version: undefined,
},
costDetail:{
key:undefined,
val:undefined,
children:[
couponAmount: undefined,
crtHost: undefined,
crtName: undefined,
crtTime: undefined,
crtUser: undefined,
detailId: undefined,
endCompanyName: undefined,
goodsAmount: undefined,
hasDiscount: undefined,
hasMemberRight: undefined,
hasPay: undefined,
id: undefined,
name: undefined,
realName: undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
orderTourDetail: {
adultNum: undefined,
childNum: undefined,
contactEmail: undefined,
contactMan: undefined,
contactPhone: undefined,
costDetail: undefined,
crtTime: undefined,
dayNum: undefined,
endAddr: undefined,
endTime: undefined,
goodId: undefined,
hasInsure: undefined,
id: undefined,
isOutside: undefined,
orderId: undefined,
siteId: undefined,
spePriceId: undefined,
startAddr: undefined,
startCity: undefined,
startCityName: undefined,
startCompanyId: undefined,
startTime: undefined,
totalNumber: undefined,
tourUserIds: undefined,
updTime: undefined,
verificationId: undefined
},
payOrigin: undefined,
picture: undefined,
realAmount: undefined,
refundStatus: undefined,
startCompanyName: undefined,
status: undefined,
ststusName: undefined,
telephone: undefined,
type: undefined,
updTime: undefined,
userId: undefined,
username: undefined,
vehicleNumberPlat: undefined,
version: undefined,
},
costDetail: {
key: undefined,
val: undefined,
children: [
{
key:undefined,
detail:undefined,
val:undefined
key: undefined,
detail: undefined,
val: undefined
}
]
},
insureDetail:'',//保险
tourCostDetail:''
insureDetail: '',//保险
tourCostDetail: ''
}
},
watch: {
dialogVisible(newValue, oldValue){
if(!newValue){
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit("tourOrderDetailDialogEvent", false);
}
},
......@@ -191,44 +206,44 @@
},
methods: {
//获取订单详情
getOrderInfo(){
getOrderInfo() {
// let params = {
// orderNo: this.tourRow.no
// };
this.form=this.tourRow
this.dialogVisible = true;
// this.form=this.tourRow
// this.dialogVisible = true;
// getVehicleOrderDetail(params).then(res => {
// if (res.status == 200) {
// let a = res.data;
// this.form = a;
// this.form.orderTourDetail.startTime = timestamp2Date(a.orderTourDetail.startTime)
// this.form.orderTourDetail.endTime = timestamp2Date(a.orderTourDetail.endTime)
// this.costDetail = JSON.parse(a.orderTourDetail.costDetail)
// var cost = '';
// this.costDetail.children.forEach(function(a1) {
// var detail = a1.detail==undefined?'':a1.detail
// cost += a1.key + ":" +detail+" "
// })
// if (this.form.status == 2) {
// this.form.ststusName = '取消';
// }
// if (this.form.status == 3) {
// this.form.ststusName = '待付款';
// }
// if (this.form.status == 4) {
// this.form.ststusName = '待出行';
// }
// if (this.form.status == 5) {
// this.form.ststusName = '出行中';
// }
// if (this.form.status == 6) {
// this.form.ststusName = '已完成';
// }
// if(a.orderTourDetail.hasInsure == 0) {
// this.insureDetail = "不需要保险"
// }
// this.tourCostDetail = cost;
// this.dialogVisible = true;
let a = this.tourRow;
this.form = a;
this.form.orderTourDetail.startTime = timestamp2Date(a.orderTourDetail.startTime)
this.form.orderTourDetail.endTime = timestamp2Date(a.orderTourDetail.endTime)
this.costDetail = JSON.parse(a.orderTourDetail.costDetail)
var cost = '';
this.costDetail.children.forEach(function (a1) {
var detail = a1.detail == undefined ? '' : a1.detail
cost += a1.key + ":" + detail + " "
})
// if (this.form.status == 2) {
// this.form.ststusName = '取消';
// }
// if (this.form.status == 3) {
// this.form.ststusName = '待付款';
// }
// if (this.form.status == 4) {
// this.form.ststusName = '待出行';
// }
// if (this.form.status == 5) {
// this.form.ststusName = '出行中';
// }
// if (this.form.status == 6) {
// this.form.ststusName = '已完成';
// }
if (a.orderTourDetail.hasInsure == 0) {
this.insureDetail = "不需要保险"
}
this.tourCostDetail = cost;
this.dialogVisible = true;
// } else {
// this.$notify({
// title: '失败',
......@@ -244,17 +259,20 @@
}
</script>
<style>
.label-text{
.label-text {
margin-left: 10px;
margin-right: 20px;
}
.label-title{
.label-title {
margin-top: 10px;
}
.orderDetail tr th{
.orderDetail tr th {
background: #eef1f6;
}
.orderDetail tr td, .orderDetail tr th{
.orderDetail tr td, .orderDetail tr th {
width: 500px;
text-align: center;
border: 1px solid #dfe6ec;
......@@ -262,15 +280,18 @@
margin-right: 100px;
padding: 10px;
}
.label-value{
.label-value {
margin-left: 80px;
margin-right: 100px;
}
#license-img{
#license-img {
width: 50px;
height: 50px;
}
.order-details .el-form-item{
.order-details .el-form-item {
margin-bottom: 10px !important;
}
</style>
......@@ -507,7 +507,7 @@
<memberOrderDetailModal :memberRow="memberRow" :memberCostDetail="memberCostDetail" v-if="memberDialogVisible"
v-on:memberOrderDetailDialogEvent="memberOrderDetailDialogEvent"></memberOrderDetailModal>
v-on:memberOrderDetailDialogEvent="memberOrderDetailDialogEvent"></memberOrderDetailModal>
</div>
</template>
......@@ -548,8 +548,8 @@
data() {
return {
tourCostDetail: '',
memberCostDetail:'',
rentCostDetail:'',
memberCostDetail: '',
rentCostDetail: '',
serviceCost: 0,
inline: true,
peopleSettingModal: false,
......@@ -606,9 +606,9 @@
file: ''
},
rentDialogVisible: false,
tourDialogVisible:false,
memberDialogVisible:false,
insureDetail:'',
tourDialogVisible: false,
memberDialogVisible: false,
insureDetail: '',
fileList: [],
errorHandler: true,
list: null,
......@@ -643,6 +643,7 @@
hasPay: undefined,
id: undefined,
name: undefined,
realName: undefined,
no: undefined,
orderAmount: undefined,
orderOrigin: undefined,
......@@ -697,7 +698,7 @@
version: undefined
},
tourRow: {},
memberRow:{},
memberRow: {},
rules: {
totalNumber: [this.integerValidator()],
rentFreeDays: [this.integerValidator()]
......@@ -839,16 +840,15 @@
this.rentDialogVisible = true;
}
if (row.type == "旅游") {
this.tourRow=row
this.tourRow = row
this.tourDialogVisible = true;
}
if (row.type == "会员") {
this.memberRow=row;
this.memberDialogVisible=true;
this.memberRow = row;
this.memberDialogVisible = true;
}
},
/**
* 租车订单详情弹框关闭
......@@ -865,7 +865,7 @@
/**
* 旅游订单详情弹框关闭
* */
tourOrderDetailDialogEvent(e){
tourOrderDetailDialogEvent(e) {
this.tourDialogVisible = false;
},
......
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