Commit b05c051d authored by rencs's avatar rencs

9.4 旅游/租车顶顶那

parent c022fa8e
...@@ -4,20 +4,17 @@ ...@@ -4,20 +4,17 @@
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属地区" prop="zoneId"> <el-form-item label="车牌号">
<el-select <el-input v-model="listQuery.plateNumber" placeholder="请输入车牌号"></el-input>
class="filter-item"
v-model="listQuery.zoneId"
placeholder="请选择"
@change="getProvinceRegions"
>
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属公司" prop="startCompanyId"> <el-form-item label="车辆编号">
<el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="所属门店" prop="startCompanyId">
<el-select <el-select
v-model="listQuery.startCompanyId" v-model="listQuery.startCompanyId"
filterable filterable
...@@ -35,21 +32,34 @@ ...@@ -35,21 +32,34 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="手机号或姓名"> <el-form-item label="所属公司" prop="startCompanyId">
<el-input v-model="listQuery.keywords" placeholder="请输入手机号或者姓名"></el-input> <el-select
class="filter-item"
v-model="listQuery.corporationId"
clearable
filterable
placeholder="请选择公司"
>
<el-option label="全部" :key="undefined" :value="undefined"></el-option>
<el-option
v-for="val in companys_list"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="车牌号"> <el-form-item label="订单号">
<el-input v-model="listQuery.plateNumber" placeholder="请输入车牌号"></el-input> <el-input v-model="listQuery.no" placeholder="请输入订单号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="订单号"> <el-form-item label="客户">
<el-input v-model="listQuery.no" placeholder="请输入订单号"></el-input> <el-input v-model="listQuery.keywords" placeholder="请输入手机号或者客户姓名"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
...@@ -60,52 +70,27 @@ ...@@ -60,52 +70,27 @@
placeholder="请选择" placeholder="请选择"
@change="getOrderStatus" @change="getOrderStatus"
> >
<el-option v-for="val in orderStatus" :key="val.id" :label="val.name" :value="val.id"></el-option> <el-option
v-for="val in orderStatus"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item class="orderstatus"> <el-form-item class="orderstatus">
<el-select <el-select class="filter-item" v-model="listQuery.status" placeholder="请选择">
class="filter-item" <el-option
v-model="listQuery.status" v-for="val in childrenStatus"
placeholder="请选择" :key="val.id"
> :label="val.name"
<el-option v-for="val in childrenStatus" :key="val.id" :label="val.name" :value="val.id"></el-option> :value="val.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="车辆编号">
<el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="开始时间" prop="bookStartDate4Query">
<el-date-picker
v-model="bookStartDate4Query"
type="date"
:editable="true"
format="yyyy-MM-dd"
placeholder="请选择订单开始时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="结束时间" prop="bookEndDate4Query">
<el-date-picker
v-model="bookEndDate4Query"
type="date"
:editable="true"
format="yyyy-MM-dd"
placeholder="请选择订单结束时间"
></el-date-picker>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
...@@ -125,11 +110,11 @@ ...@@ -125,11 +110,11 @@
<span>{{scope.row.orderId}}</span> <span>{{scope.row.orderId}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="订单号/下单时间"> <el-table-column width="200" align="center" label="订单号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.orderNo}}</span> <span>{{scope.row.orderNo}}</span>
<br /> <!-- <br />
<span>{{scope.row.crtTime}}</span> <span>{{scope.row.crtTime}}</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="订单状态" width="100" align="center"> <el-table-column prop="status" label="订单状态" width="100" align="center">
...@@ -137,7 +122,7 @@ ...@@ -137,7 +122,7 @@
<span>{{scope.row.ststusName}}</span> <span>{{scope.row.ststusName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="250" align="center" label="名称/车牌号"> <el-table-column min-width="250" align="center" label="车型/车牌号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.vehicleName}}</span> <span>{{scope.row.vehicleName}}</span>
<br /> <br />
...@@ -150,38 +135,50 @@ ...@@ -150,38 +135,50 @@
<span>{{scope.row.telephone}}</span> <span>{{scope.row.telephone}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="取车时间/还车时间"> <el-table-column width="200" align="center" label="取车时间">
<template slot-scope="scope"> <template slot-scope="scope">
取:
<span>{{dateFormat(scope.row.startTime)}}</span> <span>{{dateFormat(scope.row.startTime)}}</span>
<br />还: </template>
</el-table-column>
<el-table-column width="200" align="center" label="还车时间">
<template slot-scope="scope">
<span>{{dateFormat(scope.row.endTime)}}</span> <span>{{dateFormat(scope.row.endTime)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="交车公司"> <el-table-column width="200" align="center" label="出车门店">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.startCompanyName}}</span> <span>{{scope.row.startCompanyName}}</span>
<!-- <br /> <!-- <br />
<span>({{scope.row.orderRentVehicleDetail.startAddr}})</span>--> <span>({{scope.row.orderRentVehicleDetail.startAddr}})</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="收车公司"> <el-table-column width="200" align="center" label="收车门店">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.endCompanyName}}</span> <span>{{scope.row.endCompanyName}}</span>
<!-- <br /> <!-- <br />
<span>({{scope.row.orderRentVehicleDetail.endAddr}})</span>--> <span>({{scope.row.orderRentVehicleDetail.endAddr}})</span>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="车辆所属门店">
<template slot-scope="scope">
<span>{{scope.row.vehicleCompanyName}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="车辆所属公司">
<template slot-scope="scope">
<span>{{scope.row. vehicleBranchName}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单金额"> <el-table-column width="110" align="center" label="订单金额">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.realAmount}}</span> <span>{{scope.row.realAmount}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="支付方式"> <!-- <el-table-column width="110" align="center" label="支付方式">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.payWay == 1 ? '微信支付' : scope.row.payWay == 2 ? '支付宝支付' : scope.row.payWay == 3 ? '银联支付' : '微信支付'}}</span> <span>{{scope.row.payWay == 1 ? '微信支付' : scope.row.payWay == 2 ? '支付宝支付' : scope.row.payWay == 3 ? '银联支付' : '微信支付'}}</span>
</template> </template>
</el-table-column> </el-table-column>-->
<!-- <el-table-column align="center" label="订单状态">--> <!-- <el-table-column align="center" label="订单状态">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
...@@ -193,7 +190,7 @@ ...@@ -193,7 +190,7 @@
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column width="100" align="center" label="订单详情" fixed="right"> <el-table-column width="100" align="center" label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleOrderDetail(scope.row)">订单详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleOrderDetail(scope.row)">订单详情</span>
</template> </template>
...@@ -307,26 +304,15 @@ ...@@ -307,26 +304,15 @@
:key="index" :key="index"
>{{item.excessCost}}</span> >{{item.excessCost}}</span>
</el-form-item> </el-form-item>
<!-- <el-form-item label="违约赔款:">
<span <el-form-item
v-for="(item,index) in orderReturnVehicleCrosstown.violateDetailList" label="违约赔款.:"
:key="index"
>{{item.cost}}</span>
</el-form-item>
<el-form-item label="违约类型:">
<span
v-for="(item,index) in orderReturnVehicleCrosstown.violateDetailList"
:key="index"
>{{item.statusName}}</span>
</el-form-item>
<el-form-item label="赔款备注:">
<span
v-for="(item,index) in orderReturnVehicleCrosstown.violateDetailList" v-for="(item,index) in orderReturnVehicleCrosstown.violateDetailList"
:key="index" :key="index"
>{{item.deductions}}</span> >
</el-form-item> --> <span>{{item.statusName}}</span>
<el-form-item label="违约赔款.:" v-for="(item,index) in orderReturnVehicleCrosstown.violateDetailList" :key="index"> <span style="margin-left:10px">{{item.cost}}</span>
<span>{{item.statusName}}</span><span style="margin-left:10px">{{item.cost}}</span><br/> <br />
<span style="color:#999">{{item.deductions}}</span> <span style="color:#999">{{item.deductions}}</span>
</el-form-item> </el-form-item>
<el-form-item label="优惠券返还:"> <el-form-item label="优惠券返还:">
...@@ -364,7 +350,6 @@ ...@@ -364,7 +350,6 @@
class="label-text" class="label-text"
>{{checkUserInfo.length > 0 && checkUserInfo[0].username? checkUserInfo[0].username : ""}} {{checkUserInfo.length > 0 && checkUserInfo[0].telephone? checkUserInfo[0].telephone : ""}}</span> >{{checkUserInfo.length > 0 && checkUserInfo[0].username? checkUserInfo[0].username : ""}} {{checkUserInfo.length > 0 && checkUserInfo[0].telephone? checkUserInfo[0].telephone : ""}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="交车时间:"> <el-form-item label="交车时间:">
...@@ -378,14 +363,17 @@ ...@@ -378,14 +363,17 @@
<div v-show="modalTitle=='还车记录'"> <div v-show="modalTitle=='还车记录'">
<div v-show="orderReturnVehicleCrosstown.type == 3"> <div v-show="orderReturnVehicleCrosstown.type == 3">
<!-- <el-form-item label="定损类型:"> <!-- <el-form-item label="定损类型:">
<span></span> --> <span></span>-->
</el-form-item> <!-- </el-form-item> -->
<el-form-item label="定损总赔:"> <el-form-item label="定损总赔:">
<span>{{dedDetailDTOListAll}}</span> <span>{{dedDetailDTOListAll}}</span>
</el-form-item> </el-form-item>
<el-form-item label="赔偿事项:"> <el-form-item label="赔偿事项:">
<div v-if="orderReturnVehicleCrosstown.dedDetailDTOList != ''"> <div v-if="orderReturnVehicleCrosstown.dedDetailDTOList != ''">
<div v-for="(item,index) in orderReturnVehicleCrosstown.dedDetailDTOList" :key="index"> <div
v-for="(item,index) in orderReturnVehicleCrosstown.dedDetailDTOList"
:key="index"
>
<p <p
style="line-height: 1;position: relative;top: -3px;" style="line-height: 1;position: relative;top: -3px;"
>事项{{index+1}} {{item.deductions}} {{item.cost}}</p> >事项{{index+1}} {{item.deductions}} {{item.cost}}</p>
...@@ -467,7 +455,9 @@ ...@@ -467,7 +455,9 @@
</template> </template>
<template v-if="item.status==3"> <template v-if="item.status==3">
<div class="picBox"> <div class="picBox">
<div v-show="item.iscomplete">退还违章保证金{{activeRecord.refundOfRemainingDeposit}}元(扣除{{activeRecord.violationOfCharges}}元)</div> <div
v-show="item.iscomplete"
>退还违章保证金{{activeRecord.refundOfRemainingDeposit}}元(扣除{{activeRecord.violationOfCharges}}元)</div>
<div v-show="!item.iscomplete">退还押金{{item.restAmount}}</div> <div v-show="!item.iscomplete">退还押金{{item.restAmount}}</div>
<div style="color: #999" v-show="item.iscomplete"> <div style="color: #999" v-show="item.iscomplete">
{{item.updTimeStr}} {{item.updTimeStr}}
...@@ -581,10 +571,10 @@ ...@@ -581,10 +571,10 @@
<script> <script>
import Illegal from './illegalModal' //违章查询 import Illegal from "./illegalModal"; //违章查询
import Detail from './detail' //违章查询 import Detail from "./detail"; //违章查询
import rentOrderDetailModal from '../modal/rentOrderDetailModal' //租车订单详情 import rentOrderDetailModal from "../modal/rentOrderDetailModal"; //租车订单详情
import { formatDate } from '../../../utils/dateFormattor' import { formatDate } from "../../../utils/dateFormattor";
import { import {
page, page,
getAllBranchCompany, getAllBranchCompany,
...@@ -593,94 +583,96 @@ import { ...@@ -593,94 +583,96 @@ import {
getStep, getStep,
calculate, calculate,
getViolatePrice, getViolatePrice,
orderDetail orderDetail,
} from 'api/order/rentVehicle' } from "api/order/rentVehicle";
import { import {
toEast8Date, toEast8Date,
deepCopyDate, deepCopyDate,
newEast8Date, newEast8Date,
timestamp2Date timestamp2Date,
} from 'utils/dateUtils' } from "utils/dateUtils";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import rsCode from '../../../utils/rsCode' import rsCode from "../../../utils/rsCode";
import { getSysRegionByIds } from 'api/vehicle/vehicleInfo/' import { getSysRegionByIds } from "api/vehicle/vehicleInfo/";
import { getAllZone } from 'api/base_info/constant/' import { getAllZone } from "api/base_info/constant/";
import { getAll,getAllCompany } from 'api/base_info/branch_company' import { getAll, getAllCompany } from "api/base_info/branch_company";
import ElRow from 'element-ui/packages/row/src/row' import ElRow from "element-ui/packages/row/src/row";
import ElCol from 'element-ui/packages/col/src/col' import ElCol from "element-ui/packages/col/src/col";
import ElButton from '../../../../node_modules/element-ui/packages/button/src/button.vue' import ElButton from "../../../../node_modules/element-ui/packages/button/src/button.vue";
import { company_all_list, branchCompany_all_list } from "api/company.js";
export default { export default {
name: 'branchCompanyStock', name: "branchCompanyStock",
components: { components: {
ElButton, ElButton,
ElCol, ElCol,
ElRow, ElRow,
Illegal, Illegal,
Detail, Detail,
rentOrderDetailModal rentOrderDetailModal,
}, },
data() { data() {
return { return {
orderStatus: [{ companys_list: [], //公司列表
"id": 1, orderStatus: [
"name": "订单状态", {
"children": [ id: 1,
name: "订单状态",
children: [
{ {
"id": null, id: null,
"name": "全部订单" name: "全部订单",
}, },
{ {
"id": 3, id: 3,
"name": "待付款" name: "待付款",
}, },
{ {
"id": 4, id: 4,
"name": "待出行" name: "待出行",
}, },
{ {
"id": 5, id: 5,
"name": "出行中" name: "出行中",
}, },
{ {
"id": 6, id: 6,
"name": "已完成" name: "已完成",
}, },
{ {
"id": 2, id: 2,
"name": "已取消" name: "已取消",
}, },
{ {
"id": -1, id: -1,
"name": "定损中" name: "定损中",
}, },
] ],
}, },
{ {
"id": 2, id: 2,
"name": "押金状态", name: "押金状态",
"children": [ children: [
{ {
"id": 7, id: 7,
"name": "违章待退" name: "违章待退",
}, },
{ {
"id": 8, id: 8,
"name": "违章已退" name: "违章已退",
}, },
], ],
} },
], ],
childrenStatus: [], childrenStatus: [],
breakRecordData:{},//违约金记录数据 breakRecordData: {}, //违约金记录数据
breakRecordPop:false,//违约金记录弹窗 breakRecordPop: false, //违约金记录弹窗
activeRecord:null, activeRecord: null,
isInline: false, isInline: false,
pictureList: [], pictureList: [],
dedDetail: [], dedDetail: [],
depositRefundRecord: [], depositRefundRecord: [],
dedTotal: '', dedTotal: "",
Tel: '', Tel: "",
showDialog: false, showDialog: false,
changeViolateAmount: null, changeViolateAmount: null,
violateAmount: null, violateAmount: null,
...@@ -707,12 +699,12 @@ export default { ...@@ -707,12 +699,12 @@ export default {
endTime: undefined, endTime: undefined,
orderAmount: undefined, orderAmount: undefined,
orderOrigin: undefined, orderOrigin: undefined,
positionName:undefined, positionName: undefined,
orderVehicleCrosstownDto: { orderVehicleCrosstownDto: {
licenseIdCard: '', licenseIdCard: "",
licenseImg: '', licenseImg: "",
licenseName: '', licenseName: "",
licensePhone: '' licensePhone: "",
}, },
orderRentVehicleDetail: { orderRentVehicleDetail: {
bookRecordId: undefined, bookRecordId: undefined,
...@@ -741,7 +733,7 @@ export default { ...@@ -741,7 +733,7 @@ export default {
stime: undefined, stime: undefined,
suserid: undefined, suserid: undefined,
updTime: undefined, updTime: undefined,
vehicleId: undefined vehicleId: undefined,
}, },
payOrigin: undefined, payOrigin: undefined,
picture: undefined, picture: undefined,
...@@ -756,11 +748,11 @@ export default { ...@@ -756,11 +748,11 @@ export default {
userId: undefined, userId: undefined,
username: undefined, username: undefined,
vehicleNumberPlat: undefined, vehicleNumberPlat: undefined,
version: undefined version: undefined,
}, },
orderVehicleCrosstownVisible: false, orderVehicleCrosstownVisible: false,
rentDialogVisible: false, //租车详情弹框 rentDialogVisible: false, //租车详情弹框
modalTitle: '订单详情', modalTitle: "订单详情",
illegalVisible: false, //违章查询弹框 illegalVisible: false, //违章查询弹框
detailVisible: false, detailVisible: false,
rules: { rules: {
...@@ -784,6 +776,7 @@ export default { ...@@ -784,6 +776,7 @@ export default {
keywords: null, keywords: null,
orderStatus: 1, orderStatus: 1,
refundStatus: null, refundStatus: null,
corporationId: undefined,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
zoneId: undefined, zoneId: undefined,
...@@ -792,25 +785,25 @@ export default { ...@@ -792,25 +785,25 @@ export default {
realName: undefined, realName: undefined,
vehicleCode: undefined, vehicleCode: undefined,
orderStartTime: undefined, orderStartTime: undefined,
orderEndTime: undefined orderEndTime: undefined,
}, },
crtTimeIndex: null, crtTimeIndex: null,
baranchQuery: { baranchQuery: {
zoneId: null zoneId: null,
}, },
orderVehicleQuery: { orderVehicleQuery: {
orderId: null, orderId: null,
type: undefined type: undefined,
}, },
dialogFormVisible: false, dialogFormVisible: false,
dialogStatus: '', dialogStatus: "",
btn_del: true, btn_del: true,
btn_buy: true, btn_buy: true,
btn_cancel: true, btn_cancel: true,
allZoneArr: [], //全部片区 allZoneArr: [], //全部片区
allBranchCompany: [], allBranchCompany: [],
tourCostDetail: '', tourCostDetail: "",
damageSafe: '', damageSafe: "",
serviceCost: 0, serviceCost: 0,
orderReturnVehicleCrosstown: { orderReturnVehicleCrosstown: {
crtTime: undefined, crtTime: undefined,
...@@ -835,7 +828,7 @@ export default { ...@@ -835,7 +828,7 @@ export default {
licenseImg: undefined, licenseImg: undefined,
licenseName: undefined, licenseName: undefined,
licensePhone: undefined, licensePhone: undefined,
checkUserInfo: undefined checkUserInfo: undefined,
}, //还车记录 }, //还车记录
tableKey: 0, tableKey: 0,
dedDetailDTOListAll: undefined, dedDetailDTOListAll: undefined,
...@@ -872,7 +865,7 @@ export default { ...@@ -872,7 +865,7 @@ export default {
no: undefined, no: undefined,
orderAmount: undefined, orderAmount: undefined,
orderOrigin: undefined, orderOrigin: undefined,
positionName:undefined, positionName: undefined,
// useAmountList:undefined, // useAmountList:undefined,
orderRentVehicleDetail: { orderRentVehicleDetail: {
bookRecordId: undefined, bookRecordId: undefined,
...@@ -905,13 +898,13 @@ export default { ...@@ -905,13 +898,13 @@ export default {
updTime: undefined, updTime: undefined,
usedDay: undefined, usedDay: undefined,
vehicleId: undefined, vehicleId: undefined,
violateTrafficAmount: undefined violateTrafficAmount: undefined,
}, },
orderVehicleCrosstownDto: { orderVehicleCrosstownDto: {
licenseIdCard: '', licenseIdCard: "",
licenseImg: '', licenseImg: "",
licenseName: '', licenseName: "",
licensePhone: '' licensePhone: "",
}, },
outTradeNo: undefined, outTradeNo: undefined,
payOrigin: undefined, payOrigin: undefined,
...@@ -939,174 +932,181 @@ export default { ...@@ -939,174 +932,181 @@ export default {
{ {
key: undefined, key: undefined,
detail: undefined, detail: undefined,
val: undefined val: undefined,
}
]
}
}, },
],
} },
},
};
}, },
created() { created() {
let t = this let t = this;
t.childrenStatus = t.orderStatus[0].children t.childrenStatus = t.orderStatus[0].children;
let query = localStorage.getItem('rentVehicleInfo') let query = localStorage.getItem("rentVehicleInfo");
this.listQuery.no = this.$route.query.id || null this.listQuery.no = this.$route.query.id || null;
if (query != 'null' && query) { if (query != "null" && query) {
let queryJson = JSON.parse(query) let queryJson = JSON.parse(query);
if (queryJson.type) { if (queryJson.type) {
t.listQuery.type = queryJson.type t.listQuery.type = queryJson.type;
} }
if (queryJson.vehicleCode) { if (queryJson.vehicleCode) {
t.listQuery.vehicleCode = queryJson.vehicleCode t.listQuery.vehicleCode = queryJson.vehicleCode;
} }
if (queryJson.page) { if (queryJson.page) {
t.listQuery.page = queryJson.page t.listQuery.page = queryJson.page;
} }
if (queryJson.limit) { if (queryJson.limit) {
t.listQuery.limit = queryJson.limit t.listQuery.limit = queryJson.limit;
} }
if (queryJson.no) { if (queryJson.no) {
t.listQuery.no = queryJson.no t.listQuery.no = queryJson.no;
} }
if (queryJson.status) { if (queryJson.status) {
t.listQuery.status = queryJson.status t.listQuery.status = queryJson.status;
} }
if (queryJson.startTime) { if (queryJson.startTime) {
t.listQuery.startTime = queryJson.startTime t.listQuery.startTime = queryJson.startTime;
} }
if (queryJson.endTime) { if (queryJson.endTime) {
t.listQuery.endTime = queryJson.endTime t.listQuery.endTime = queryJson.endTime;
} }
if (queryJson.realName) { if (queryJson.realName) {
t.listQuery.realName = queryJson.realName t.listQuery.realName = queryJson.realName;
} }
if (queryJson.plateNumber) { if (queryJson.plateNumber) {
t.listQuery.plateNumber = queryJson.plateNumber t.listQuery.plateNumber = queryJson.plateNumber;
} }
} }
this.getList() this.getList();
this.get_all_companys(); //公司列表
// this.getAllFn() // this.getAllFn()
getAllCompany(codeAndBranchCompany => { getAllCompany((codeAndBranchCompany) => {
this.allBranchCompany = codeAndBranchCompany; this.allBranchCompany = codeAndBranchCompany;
}); });
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'] this.btn_del = this.elements["branchCompany/stockApply:btn_delete"];
this.order_btn_order_violcation_save = this.elements[ this.order_btn_order_violcation_save = this.elements[
'order:btn_order_violcation_save' "order:btn_order_violcation_save"
] ];
}, },
computed: { computed: {
...mapGetters(['elements']), ...mapGetters(["elements"]),
provinceRegions() { provinceRegions() {
return getSonRegionByCodes(1) return getSonRegionByCodes(1);
}, },
//获取大区列表 //获取大区列表
getAllZoneList() { getAllZoneList() {
return getAllZone() return getAllZone();
}, },
bookStartDate4Query: { bookStartDate4Query: {
get: function() { get: function () {
if ( if (
this.$utils.isString(this.listQuery.orderStartTime) && this.$utils.isString(this.listQuery.orderStartTime) &&
this.listQuery.orderStartTime !== '' this.listQuery.orderStartTime !== ""
) { ) {
return toEast8Date(this.listQuery.orderStartTime) return toEast8Date(this.listQuery.orderStartTime);
} }
return undefined return undefined;
}, },
set: function(date) { set: function (date) {
if (this.$utils.isDate(date)) { if (this.$utils.isDate(date)) {
this.listQuery.orderStartTime = formatDate( this.listQuery.orderStartTime = formatDate(date, "yyyy-MM-dd");
date,
'yyyy-MM-dd'
)
} else { } else {
this.listQuery.orderStartTime = undefined this.listQuery.orderStartTime = undefined;
}
} }
}, },
},
bookEndDate4Query: { bookEndDate4Query: {
get: function() { get: function () {
if ( if (
this.$utils.isString(this.listQuery.orderEndTime) && this.$utils.isString(this.listQuery.orderEndTime) &&
this.listQuery.orderEndTime !== '' this.listQuery.orderEndTime !== ""
) { ) {
return toEast8Date(this.listQuery.orderEndTime) return toEast8Date(this.listQuery.orderEndTime);
} }
return undefined return undefined;
}, },
set: function(date) { set: function (date) {
if (this.$utils.isDate(date)) { if (this.$utils.isDate(date)) {
this.listQuery.orderEndTime = formatDate(date, 'yyyy-MM-dd') this.listQuery.orderEndTime = formatDate(date, "yyyy-MM-dd");
} else { } else {
this.listQuery.orderEndTime = undefined this.listQuery.orderEndTime = undefined;
}
} }
}, },
},
cityRegions() { cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) { if (!this.$utils.isInteger(this.form.addrProvince)) {
return null return null;
}
return getSonRegionByCodes(this.form.addrProvince)
} }
return getSonRegionByCodes(this.form.addrProvince);
},
}, },
methods: { methods: {
//所有公司
get_all_companys() {
company_all_list().then((res) => {
if (res.status == 200) {
this.companys_list = res.data;
}
});
},
//违约金记录 //违约金记录
breakRecord(row){ breakRecord(row) {
let param = { let param = {
"orderNo":row.orderNo, orderNo: row.orderNo,
"flag" : true flag: true,
} };
orderDetail(param).then(data=>{ orderDetail(param).then((data) => {
if (data.status == 200) { if (data.status == 200) {
if (!!data.data.orderRentVehicleDetail.costDetailExtend) { if (!!data.data.orderRentVehicleDetail.costDetailExtend) {
let info = JSON.parse(data.data.orderRentVehicleDetail.costDetailExtend) let info = JSON.parse(
this.breakRecordData.time = data.data.updTime, data.data.orderRentVehicleDetail.costDetailExtend
this.breakRecordData.violateAmount = info.violateAmount+'元' );
this.breakRecordData.violateDesc = info.violateDesc (this.breakRecordData.time = data.data.updTime),
(this.breakRecordData.violateAmount = info.violateAmount + "元");
this.breakRecordData.violateDesc = info.violateDesc;
this.breakRecordPop = true; this.breakRecordPop = true;
}else{ } else {
this.breakRecordData.time = data.data.updTime, (this.breakRecordData.time = data.data.updTime),
this.breakRecordData.violateAmount ='0元' (this.breakRecordData.violateAmount = "0元");
this.breakRecordData.violateDesc ='无' this.breakRecordData.violateDesc = "无";
this.breakRecordPop = true; this.breakRecordPop = true;
} }
} }
}) });
}, },
//取消订单 //取消订单
cancel(row, changeViolateAmount) { cancel(row, changeViolateAmount) {
let that = this let that = this;
if (changeViolateAmount == null || changeViolateAmount == 0) { if (changeViolateAmount == null || changeViolateAmount == 0) {
this.$confirm('此操作将取消该订单, 是否继续?', '提示', { this.$confirm("此操作将取消该订单, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: row.userId, appUserId: row.userId,
changeViolateAmount: null changeViolateAmount: null,
} };
calculate(row.orderNo, params).then(data => { calculate(row.orderNo, params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '取消订单成功', message: "取消订单成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
this.getList() this.getList();
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '取消订单失败', message: "取消订单失败",
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}) });
}) });
} else { } else {
// this.$prompt('请输入违约金', '提示', { // this.$prompt('请输入违约金', '提示', {
// confirmButtonText: '确定', // confirmButtonText: '确定',
...@@ -1124,202 +1124,205 @@ export default { ...@@ -1124,202 +1124,205 @@ export default {
// message: '取消输入' // message: '取消输入'
// }); // });
// }); // });
that.showDialog = true that.showDialog = true;
that.changeViolateAmount = changeViolateAmount that.changeViolateAmount = changeViolateAmount;
that.violateAmount = changeViolateAmount that.violateAmount = changeViolateAmount;
that.row = row that.row = row;
} }
}, },
getOrderDetail() { getOrderDetail() {
if(this.form.orderNo) { if (this.form.orderNo) {
var param = { var param = {
"orderNo":this.form.orderNo, orderNo: this.form.orderNo,
"flag" : true flag: true,
};
orderDetail(param).then((response) => {
this.orderDetailInfo = response.data;
if (this.orderDetailInfo) {
if (this.orderDetailInfo.memberLevel == 1) {
this.orderDetailInfo.memberName = "普通会员";
} }
orderDetail(param).then(response => { if (this.orderDetailInfo.memberLevel == 2) {
this.orderDetailInfo = response.data this.orderDetailInfo.memberName = "黄金会员";
if(this.orderDetailInfo) {
if(this.orderDetailInfo.memberLevel == 1) {
this.orderDetailInfo.memberName = "普通会员"
} }
if(this.orderDetailInfo.memberLevel == 2) { if (this.orderDetailInfo.memberLevel == 3) {
this.orderDetailInfo.memberName = "黄金会员" this.orderDetailInfo.memberName = "钻石会员";
} }
if(this.orderDetailInfo.memberLevel == 3) { if (this.orderDetailInfo.orderRentVehicleDetail.costDetail) {
this.orderDetailInfo.memberName = "钻石会员" this.orderDetailInfo.costDetail = JSON.parse(
} this.orderDetailInfo.orderRentVehicleDetail.costDetail
if(this.orderDetailInfo.orderRentVehicleDetail.costDetail) { );
this.orderDetailInfo.costDetail = JSON.parse(this.orderDetailInfo.orderRentVehicleDetail.costDetail)
} }
if(this.orderDetailInfo.costDetail.paramJson) { if (this.orderDetailInfo.costDetail.paramJson) {
this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(this.orderDetailInfo.costDetail.paramJson) this.orderDetailInfo.rentVehiclePriceVO = JSON.parse(
this.orderDetailInfo.costDetail.paramJson
);
} }
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) {
this.orderDetailInfo.carArticlesJson = this.orderDetailInfo.items[i].detail this.orderDetailInfo.carArticlesJson = this.orderDetailInfo.items[
i
].detail;
} }
} }
} }
if (this.form.positionName) { if (this.form.positionName) {
this.orderDetailInfo.positionName = this.form.positionName this.orderDetailInfo.positionName = this.form.positionName;
} else { } else {
this.orderDetailInfo.positionName ='普通用户' this.orderDetailInfo.positionName = "普通用户";
} }
if (this.orderDetailInfo.status == 2) { if (this.orderDetailInfo.status == 2) {
this.orderDetailInfo.ststusName = '取消' this.orderDetailInfo.ststusName = "取消";
} }
if (this.orderDetailInfo.status == -1) { if (this.orderDetailInfo.status == -1) {
this.orderDetailInfo.ststusName = '定损中' this.orderDetailInfo.ststusName = "定损中";
} }
if (this.orderDetailInfo.status == 3) { if (this.orderDetailInfo.status == 3) {
this.orderDetailInfo.ststusName = '待付款' this.orderDetailInfo.ststusName = "待付款";
} }
if (this.orderDetailInfo.status == 4) { if (this.orderDetailInfo.status == 4) {
this.orderDetailInfo.ststusName = '待出行' this.orderDetailInfo.ststusName = "待出行";
} }
if (this.orderDetailInfo.status == 5) { if (this.orderDetailInfo.status == 5) {
this.orderDetailInfo.ststusName = '出行中' this.orderDetailInfo.ststusName = "出行中";
} }
if (this.orderDetailInfo.status == 6) { if (this.orderDetailInfo.status == 6) {
this.orderDetailInfo.ststusName = '已完成' this.orderDetailInfo.ststusName = "已完成";
} }
} }
this.rentDialogVisible = true this.rentDialogVisible = true;
});
})
} }
}, },
checkViolateAmount() { checkViolateAmount() {
if (this.topAmount < this.violateAmount) { if (this.topAmount < this.violateAmount) {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '违约金额不能大于最高限制金额' + this.topAmount, message: "违约金额不能大于最高限制金额" + this.topAmount,
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}, },
getOrderStatus(e) { getOrderStatus(e) {
if (e == 1) {//订单状态 if (e == 1) {
this.listQuery.status = null //订单状态
this.listQuery.status = null;
} else if (e == 2) { } else if (e == 2) {
this.listQuery.status = 7 this.listQuery.status = 7;
} }
this.childrenStatus = this.orderStatus[e-1].children this.childrenStatus = this.orderStatus[e - 1].children;
}, },
handleConfirm() { handleConfirm() {
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: this.row.userId, appUserId: this.row.userId,
changeViolateAmount: this.violateAmount changeViolateAmount: this.violateAmount,
} };
calculate(this.row.orderNo, params).then(data => { calculate(this.row.orderNo, params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '取消订单成功', message: "取消订单成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
this.showDialog = false this.showDialog = false;
this.getList() this.getList();
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '取消订单失败', message: "取消订单失败",
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}) });
}, },
handleCancelDialog() { handleCancelDialog() {
this.showDialog = false this.showDialog = false;
}, },
handleViolatePrice(row) { handleViolatePrice(row) {
let that = this let that = this;
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: row.userId appUserId: row.userId,
} };
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;
that.cancel(row, data.data.cutAmount) that.cancel(row, data.data.cutAmount);
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '获取违约金失败', message: "获取违约金失败",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
} }
}) });
}, },
handleOrderDetail(row) { handleOrderDetail(row) {
this.form = row this.form = row;
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消' this.form.ststusName = "取消";
} }
if (this.form.status == 3) { if (this.form.status == 3) {
this.form.ststusName = '待付款' this.form.ststusName = "待付款";
} }
if (this.form.status == 4) { if (this.form.status == 4) {
this.form.ststusName = '待出行' this.form.ststusName = "待出行";
} }
if (this.form.status == 5) { if (this.form.status == 5) {
this.form.ststusName = '出行中' this.form.ststusName = "出行中";
} }
if (this.form.status == 6) { if (this.form.status == 6) {
this.form.ststusName = '已完成' this.form.ststusName = "已完成";
} }
if (this.form.status == -1) { if (this.form.status == -1) {
this.form.ststusName = '定损中' this.form.ststusName = "定损中";
} }
this.form.startTime = this.form this.form.startTime = this.form.startTime
.startTime
? timestamp2Date(this.form.startTime) ? timestamp2Date(this.form.startTime)
: '' : "";
this.form.endTime = this.form this.form.endTime = this.form.endTime
.endTime
? timestamp2Date(this.form.endTime) ? timestamp2Date(this.form.endTime)
: '' : "";
this.getOrderDetail(); this.getOrderDetail();
}, },
/** /**
* 租车订单详情弹框关闭 * 租车订单详情弹框关闭
* */ * */
rentOrderDetailDialogEvent(e) { rentOrderDetailDialogEvent(e) {
this.rentDialogVisible = false this.rentDialogVisible = false;
if (e) { if (e) {
this.getList() this.getList();
} }
}, },
/** /**
* 操作-违章查询按钮,显示违章弹框 * 操作-违章查询按钮,显示违章弹框
*/ */
illegalInquiry(row) { illegalInquiry(row) {
this.activeInfo = row this.activeInfo = row;
this.currentRow = row this.currentRow = row;
this.illegalVisible = true this.illegalVisible = true;
}, },
/** /**
* 操作-查看详情按钮,显示详情弹框 * 操作-查看详情按钮,显示详情弹框
*/ */
detailInquiry(row) { detailInquiry(row) {
this.currentRow = row this.currentRow = row;
this.detailVisible = true this.detailVisible = true;
}, },
/** /**
* 关闭违章查询弹框 * 关闭违章查询弹框
* */ * */
illegalEvent(params) { illegalEvent(params) {
this.illegalVisible = false this.illegalVisible = false;
console.log(params) console.log(params);
if (params) { if (params) {
} }
}, },
...@@ -1327,198 +1330,186 @@ export default { ...@@ -1327,198 +1330,186 @@ export default {
* 关闭违章查询弹框 * 关闭违章查询弹框
* */ * */
detailEvent(params) { detailEvent(params) {
this.detailVisible = false this.detailVisible = false;
if (params) { if (params) {
} }
}, },
handleHandoverOrderVehicle(row) { handleHandoverOrderVehicle(row) {
this.modalTitle = "交车记录";
this.modalTitle = '交车记录' this.form = row;
this.form = row
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消' this.form.ststusName = "取消";
} }
if (this.form.status == 3) { if (this.form.status == 3) {
this.form.ststusName = '待付款' this.form.ststusName = "待付款";
} }
if (this.form.status == 4) { if (this.form.status == 4) {
this.form.ststusName = '待出行' this.form.ststusName = "待出行";
} }
if (this.form.status == 5) { if (this.form.status == 5) {
this.form.ststusName = '出行中' this.form.ststusName = "出行中";
} }
if (this.form.status == 6) { if (this.form.status == 6) {
this.form.ststusName = '已完成' this.form.ststusName = "已完成";
} }
if (this.form.status == -1) { if (this.form.status == -1) {
this.form.ststusName = '定损中' this.form.ststusName = "定损中";
} }
this.orderVehicleQuery.orderId = this.form.orderId this.orderVehicleQuery.orderId = this.form.orderId;
this.orderVehicleQuery.type = 1 this.orderVehicleQuery.type = 1;
this.orderVehicleQuery.types = null this.orderVehicleQuery.types = null;
this.getAllOrderVehicleCrosstown() this.getAllOrderVehicleCrosstown();
this.handover = true this.handover = true;
this.returnVehicle = false this.returnVehicle = false;
this.vehicleDetail = true this.vehicleDetail = true;
this.depositDetail = false this.depositDetail = false;
}, },
getAllOrderVehicleCrosstown() { getAllOrderVehicleCrosstown() {
getOrderVehicleCrosstown(this.orderVehicleQuery).then(response => { getOrderVehicleCrosstown(this.orderVehicleQuery).then((response) => {
if (response.data.length <= 0) { if (response.data.length <= 0) {
alert('交还车记录不存在') alert("交还车记录不存在");
} else { } else {
this.orderVehicleCrosstownVisible = true this.orderVehicleCrosstownVisible = true;
this.orderReturnVehicleCrosstown = response.data[0] this.orderReturnVehicleCrosstown = response.data[0];
var sum = 0 var sum = 0;
if (this.orderReturnVehicleCrosstown.dedDetailDTOList) { if (this.orderReturnVehicleCrosstown.dedDetailDTOList) {
this.orderReturnVehicleCrosstown.dedDetailDTOList.forEach( this.orderReturnVehicleCrosstown.dedDetailDTOList.forEach(
element => { (element) => {
sum += element.cost sum += element.cost;
} }
) );
this.dedDetailDTOListAll = sum this.dedDetailDTOListAll = sum;
} }
if(this.orderReturnVehicleCrosstown.checkUserInfo) { if (this.orderReturnVehicleCrosstown.checkUserInfo) {
this.checkUserInfo = JSON.parse(this.orderReturnVehicleCrosstown.checkUserInfo); this.checkUserInfo = JSON.parse(
this.orderReturnVehicleCrosstown.checkUserInfo
);
} else { } else {
this.checkUserInfo =[] this.checkUserInfo = [];
} }
if (response.data[0].imgs) { if (response.data[0].imgs) {
this.otherImg = response.data[0].imgs.split(',') this.otherImg = response.data[0].imgs.split(",");
} }
} }
}) });
}, },
handleReturnOrderVehicle(row) { handleReturnOrderVehicle(row) {
this.modalTitle = '还车记录' this.modalTitle = "还车记录";
this.form = row this.form = row;
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消' this.form.ststusName = "取消";
} }
if (this.form.status == 3) { if (this.form.status == 3) {
this.form.ststusName = '待付款' this.form.ststusName = "待付款";
} }
if (this.form.status == 4) { if (this.form.status == 4) {
this.form.ststusName = '待出行' this.form.ststusName = "待出行";
} }
if (this.form.status == 5) { if (this.form.status == 5) {
this.form.ststusName = '出行中' this.form.ststusName = "出行中";
} }
if (this.form.status == 6) { if (this.form.status == 6) {
this.form.ststusName = '已完成' this.form.ststusName = "已完成";
} }
if (this.form.status == -1) { if (this.form.status == -1) {
this.form.ststusName = '定损中' this.form.ststusName = "定损中";
} }
this.form.startTime = timestamp2Date( this.form.startTime = timestamp2Date(this.form.startTime);
this.form.startTime this.form.endTime = timestamp2Date(this.form.endTime);
)
this.form.endTime = timestamp2Date(
this.form.endTime
)
this.orderVehicleQuery.orderId = this.form.orderId this.orderVehicleQuery.orderId = this.form.orderId;
this.orderVehicleQuery.types = '2,3' this.orderVehicleQuery.types = "2,3";
this.orderVehicleQuery.type = null this.orderVehicleQuery.type = null;
this.getAllOrderVehicleCrosstown() this.getAllOrderVehicleCrosstown();
this.returnVehicle = true this.returnVehicle = true;
this.handover = false this.handover = false;
this.vehicleDetail = true this.vehicleDetail = true;
this.depositDetail = false this.depositDetail = false;
}, },
handleRefundVehicle(row) { handleRefundVehicle(row) {
this.activeInfo = row this.activeInfo = row;
var that = this var that = this;
that.pictureList = [] that.pictureList = [];
that.dedDetail = [] that.dedDetail = [];
that.depositRefundRecord = [] that.depositRefundRecord = [];
that.dedTotal = 0 that.dedTotal = 0;
that.Tel = '' that.Tel = "";
getStep(row.orderNo + '&address=1').then(response => { getStep(row.orderNo + "&address=1").then((response) => {
this.activeRecord = response.data[0] this.activeRecord = response.data[0];
response.data.forEach(function(item) { response.data.forEach(function (item) {
if (item.type != 1) { if (item.type != 1) {
that.Tel = item.customerPhone that.Tel = item.customerPhone;
that.type = item.type that.type = item.type;
that.crtTimeIndex = item.crtTime that.crtTimeIndex = item.crtTime;
if (item.dedDetail) { if (item.dedDetail) {
var dedTotal = 0 var dedTotal = 0;
var dedDetail = JSON.parse(item.dedDetail) var dedDetail = JSON.parse(item.dedDetail);
that.dedDetail = dedDetail that.dedDetail = dedDetail;
dedDetail.forEach(function(item) { dedDetail.forEach(function (item) {
dedTotal += Number(item.cost) dedTotal += Number(item.cost);
}) });
that.dedTotal = dedTotal.toFixed(2) that.dedTotal = dedTotal.toFixed(2);
} }
item.depositRefundRecord.forEach(function(itm) { item.depositRefundRecord.forEach(function (itm) {
itm.updTimeStr = timestamp2Date(itm.updTime) itm.updTimeStr = timestamp2Date(itm.updTime);
if (itm.status == 3) { if (itm.status == 3) {
itm.endTimeStr = timestamp2Date( itm.endTimeStr = timestamp2Date(
Number(itm.updTime) + 2592000000 Number(itm.updTime) + 2592000000
) );
if (itm.orderViolation) { if (itm.orderViolation) {
if (itm.orderViolation.picture) { if (itm.orderViolation.picture) {
var Arr = itm.orderViolation.picture.split( var Arr = itm.orderViolation.picture.split(",");
',' var arrivalPicList = [];
) Arr.map(function (it) {
var arrivalPicList = [] arrivalPicList.push(it);
Arr.map(function(it) { });
arrivalPicList.push(it) itm.pictureList = arrivalPicList;
})
itm.pictureList = arrivalPicList
} }
} }
} }
}) });
if (item.type == 3) { if (item.type == 3) {
var arr = item.depositRefundRecord var arr = item.depositRefundRecord;
var item = arr.shift() var item = arr.shift();
arr.push(item) arr.push(item);
} else { } else {
var arr = item.depositRefundRecord var arr = item.depositRefundRecord;
} }
that.depositRefundRecord = arr that.depositRefundRecord = arr;
} }
}) });
}) });
this.modalTitle = '押金记录' this.modalTitle = "押金记录";
this.form = row this.form = row;
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消' this.form.ststusName = "取消";
} }
if (this.form.status == 3) { if (this.form.status == 3) {
this.form.ststusName = '待付款' this.form.ststusName = "待付款";
} }
if (this.form.status == 4) { if (this.form.status == 4) {
this.form.ststusName = '待出行' this.form.ststusName = "待出行";
} }
if (this.form.status == 5) { if (this.form.status == 5) {
this.form.ststusName = '出行中' this.form.ststusName = "出行中";
} }
if (this.form.status == 6) { if (this.form.status == 6) {
this.form.ststusName = '已完成' this.form.ststusName = "已完成";
} }
if (this.form.status == -1) { if (this.form.status == -1) {
this.form.ststusName = '定损中' this.form.ststusName = "定损中";
} }
this.form.startTime = timestamp2Date( this.form.startTime = timestamp2Date(this.form.startTime);
this.form.startTime this.form.endTime = timestamp2Date(this.form.endTime);
) this.orderVehicleCrosstownVisible = true;
this.form.endTime = timestamp2Date( this.vehicleDetail = false;
this.form.endTime this.depositDetail = true;
)
this.orderVehicleCrosstownVisible = true
this.vehicleDetail = false
this.depositDetail = true
}, },
//监听change事件 //监听change事件
getProvinceRegions(item) { getProvinceRegions(item) {
this.listQuery.zoneId = item this.listQuery.zoneId = item;
this.baranchQuery.zoneId = item this.baranchQuery.zoneId = item;
// this.listQuery.startCompanyId = undefined // this.listQuery.startCompanyId = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => { // getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
...@@ -1526,53 +1517,53 @@ export default { ...@@ -1526,53 +1517,53 @@ export default {
// }) // })
}, },
getAllBranchCompanyChange(item) { getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item this.listQuery.startCompanyId = item;
}, },
handleCancel(row) { handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', { this.$confirm("此操作将放弃购买, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
cancelApply(row.id).then(() => { cancelApply(row.id).then(() => {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '操作成功', message: "操作成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
this.getList() this.getList();
}) });
}) });
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', { this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
delObj(row.id).then(() => { delObj(row.id).then(() => {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '删除成功', message: "删除成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
const index = this.list.indexOf(row) const index = this.list.indexOf(row);
this.list.splice(index, 1) this.list.splice(index, 1);
}) });
}) });
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1 this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate((valid) => {
if (valid) { if (valid) {
this.getList() this.getList();
} else { } else {
return false return false;
} }
}) });
}, },
clearSearch() { clearSearch() {
this.listQuery = { this.listQuery = {
...@@ -1582,6 +1573,7 @@ export default { ...@@ -1582,6 +1573,7 @@ export default {
no: null, no: null,
status: null, status: null,
keywords: null, keywords: null,
corporationId: undefined,
orderStatus: 1, orderStatus: 1,
refundStatus: null, refundStatus: null,
startTime: undefined, startTime: undefined,
...@@ -1589,84 +1581,75 @@ export default { ...@@ -1589,84 +1581,75 @@ export default {
zoneId: undefined, zoneId: undefined,
orderEndTime: undefined, orderEndTime: undefined,
orderStartTime: undefined, orderStartTime: undefined,
startCompanyId: undefined startCompanyId: undefined,
} };
this.getList() this.getList();
}, },
/** /**
* 获取订单列表 * 获取订单列表
*/ */
getList() { getList() {
this.listLoading = true this.listLoading = true;
if (this.listQuery.orderStartTime) { if (this.listQuery.orderStartTime) {
this.listQuery.startTime = toEast8Date( this.listQuery.startTime = toEast8Date(
this.listQuery.orderStartTime this.listQuery.orderStartTime
).getTime() ).getTime();
} }
if (this.listQuery.orderEndTime) { if (this.listQuery.orderEndTime) {
this.listQuery.endTime = this.listQuery.endTime =
toEast8Date(this.listQuery.orderEndTime).getTime() + toEast8Date(this.listQuery.orderEndTime).getTime() +
1000 * 3600 * 24 - 1000 * 3600 * 24 -
1 1;
} }
if (this.listQuery) { if (this.listQuery) {
localStorage.setItem( localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
} }
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) {
if (el.status == 2) { if (el.status == 2) {
el.ststusName = '取消' el.ststusName = "取消";
} }
if (el.status == 3) { if (el.status == 3) {
el.ststusName = '待付款' el.ststusName = "待付款";
} }
if (el.status == 4) { if (el.status == 4) {
el.ststusName = '待出行' el.ststusName = "待出行";
} }
if (el.status == 5) { if (el.status == 5) {
el.ststusName = '出行中' el.ststusName = "出行中";
} }
if (el.status == 6) { if (el.status == 6) {
el.ststusName = '已完成' el.ststusName = "已完成";
} }
if (el.status == -1) { if (el.status == -1) {
el.ststusName = '定损中' el.ststusName = "定损中";
} }
}) });
} }
this.list = response.data.data this.list = response.data.data;
this.total = response.data.totalCount this.total = response.data.totalCount;
this.listLoading = false this.listLoading = false;
}) });
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val this.listQuery.limit = val;
if (this.listQuery) { if (this.listQuery) {
localStorage.setItem( localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
} }
this.getList() this.getList();
}, },
dateFormat(timestamp) { dateFormat(timestamp) {
let date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000 let date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss') return formatDate(date, "yyyy-MM-dd hh:mm:ss");
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val this.listQuery.page = val;
if (this.listQuery) { if (this.listQuery) {
localStorage.setItem( localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
} }
this.getList() this.getList();
}, },
templateModel() { templateModel() {
this.costDetail = { this.costDetail = {
...@@ -1676,13 +1659,13 @@ export default { ...@@ -1676,13 +1659,13 @@ export default {
{ {
key: undefined, key: undefined,
detail: undefined, detail: undefined,
val: undefined val: undefined,
} },
] ],
} };
} },
} },
} };
</script> </script>
<style scpoed> <style scpoed>
...@@ -1763,7 +1746,7 @@ export default { ...@@ -1763,7 +1746,7 @@ export default {
position: relative; position: relative;
} }
.stepBox li .inline:nth-child(1)::before { .stepBox li .inline:nth-child(1)::before {
content: ''; content: "";
position: absolute; position: absolute;
left: -40px; left: -40px;
top: -51px; top: -51px;
......
...@@ -4,77 +4,99 @@ ...@@ -4,77 +4,99 @@
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属地区" prop="zoneId"> <el-form-item label="所属公司" prop="startCompanyId">
<el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions"> <el-select
<el-option :key="undefined" label="无" :value="undefined"></el-option> class="filter-item"
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option> v-model="listQuery.corporationId"
clearable
filterable
placeholder="请选择公司"
>
<el-option label="全部" :key="undefined" :value="undefined"></el-option>
<el-option
v-for="val in companys_list"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属公司" prop="startCompanyId"> <el-form-item label="出发门店" prop="startCompanyId">
<el-select class="filter-item" v-model="listQuery.startCompanyId" placeholder="请选择" <el-select
@change="getAllBranchCompanyChange"> class="filter-item"
v-model="listQuery.startCompanyId"
placeholder="请选择"
@change="getAllBranchCompanyChange"
>
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"></el-option> <el-option
v-for="val in allBranchCompany"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5">
<el-form-item label="手机号">
<el-input v-model="listQuery.phone" type="text" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="订单号"> <el-form-item label="订单号">
<el-input v-model="listQuery.no" type="text" placeholder="请输入订单号"></el-input> <el-input v-model="listQuery.no" type="text" placeholder="请输入订单号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="状态"> <el-form-item label="手机号">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态"> <el-input v-model="listQuery.phone" type="text" placeholder="请输入手机号"></el-input>
<el-option :key="null" label="无" :value="null"></el-option>
<el-option :key="2" label="取消" :value="2"></el-option>
<el-option :key="3" label="待付款" :value="3"></el-option>
<el-option :key="4" label="待出行" :value="4"></el-option>
<el-option :key="5" label="出行中" :value="5"></el-option>
<el-option :key="6" label="已完成" :value="6"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
</div> </div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" <el-table
border fit highlight-current-row :key="tableKey"
style="width: 100%"> :data="list"
v-loading.body="listLoading"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" label="ID" width="70"> <el-table-column align="center" label="ID" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.id}}</span> <span>{{scope.row.id}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="订单号/创建时间"> <el-table-column width="200" align="center" label="订单号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.no}}</span><br/> <span>{{scope.row.no}}</span>
<br />
<span>{{scope.row.crtTime}}</span> <span>{{scope.row.crtTime}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="名称"> <el-table-column width="110" align="center" label="状态">
<template slot-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" width="200" label="旅游路线名称">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span>{{scope.row.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="用户ID/用户名"> <el-table-column align="center" width="200" label="姓名/手机号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.username}}</span>/<span>{{scope.row.telephone}}</span> <span>{{scope.row.username}}</span>/
<span>{{scope.row.telephone}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="报名人数"> <el-table-column width="150" align="center" label="报名人数">
<template slot-scope="scope"> <template slot-scope="scope">
<span>成人{{scope.row.orderTourDetail.adultNum}} 儿童{{scope.row.orderTourDetail.childNum}}</span> <span>成人{{scope.row.orderTourDetail.adultNum}} 儿童{{scope.row.orderTourDetail.childNum}}</span>
...@@ -87,28 +109,29 @@ ...@@ -87,28 +109,29 @@
<span>{{dateFormat(scope.row.orderTourDetail.endTime)}}</span> <span>{{dateFormat(scope.row.orderTourDetail.endTime)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="出发公司"> <el-table-column width="150" align="center" label="出发门店">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.startCompanyName}}</span> <span>{{scope.row.startCompanyName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="所属公司">
<el-table-column width="110" align="center" label="订单价格">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.orderAmount}}</span> <span>{{scope.row.corporationName}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="所属门店">
<template slot-scope="scope">
<span>{{scope.row.companyName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="状态"> <el-table-column width="110" align="center" label="订单金额">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status == '2'">取消</span> <span>{{scope.row.orderAmount}}</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> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="订单详情" fixed="right">
<el-table-column width="200" align="center" label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleBuy(scope.row)">订单详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleBuy(scope.row)">订单详情</span>
<el-button <el-button
...@@ -122,71 +145,78 @@ ...@@ -122,71 +145,78 @@
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" @size-change="handleSizeChange"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> @current-change="handleCurrentChange"
:current-page.sync="listQuery.page"
:page-sizes="[10,20,30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div> </div>
<!--订单详情--> <!--订单详情-->
<tourOrderDetailModal :tourRow="tourRow" :insureDetail="insureDetail" v-if="tourDialogVisible" <tourOrderDetailModal
:tourRow="tourRow"
:insureDetail="insureDetail"
v-if="tourDialogVisible"
:tourCostDetail="tourCostDetail" :tourCostDetail="tourCostDetail"
v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal> v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"
></tourOrderDetailModal>
<el-dialog title="取消订单" :visible.sync="showDialog"> <el-dialog title="取消订单" :visible.sync="showDialog">
<el-form> <el-form>
<el-form-item label="违约金金额:" > <el-form-item label="违约金金额:">
<el-input v-model="violateAmount" type="number" @blur="checkViolateAmount()" auto-complete="off"></el-input> <el-input
v-model="violateAmount"
type="number"
@blur="checkViolateAmount()"
auto-complete="off"
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span class="label-text">实际违约金是{{changeViolateAmount}}元</span> <span class="label-text">实际违约金是{{changeViolateAmount}}元</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click = "handleCancelDialog()">取 消</el-button> <el-button @click="handleCancelDialog()">取 消</el-button>
<el-button type="primary" @click = "handleConfirm()">确 定</el-button> <el-button type="primary" @click="handleConfirm()">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import Detail from "./detail";//违章查询 import Detail from "./detail"; //违章查询
import tourOrderDetailModal from "../modal/tourOrderDetailModal";//租车订单详情 import tourOrderDetailModal from "../modal/tourOrderDetailModal"; //租车订单详情
import { import {
page, page,
getOrderList, getOrderList,
getAllBranchCompany, getAllBranchCompany,
getAllBranchCompanyByZoneId, getAllBranchCompanyByZoneId,
calculate, calculate,
getViolatePrice getViolatePrice,
} from 'api/order/rentVehicle'; } from "api/order/rentVehicle";
import {mapGetters} from 'vuex'; import { mapGetters } from "vuex";
import rsCode from '../../../utils/rsCode'; import rsCode from "../../../utils/rsCode";
import { import { timestamp2Date } from "utils/dateUtils";
timestamp2Date import { getAllZone } from "api/base_info/constant/";
} from 'utils/dateUtils'; import { formatDate } from "../../../utils/dateFormattor";
import { import { company_all_list, branchCompany_all_list } from "api/company.js";
getAllZone import { getAllCompany } from "api/base_info/branch_company";
} from 'api/base_info/constant/'; export default {
import { name: "branchCompanyStock",
formatDate
} from '../../../utils/dateFormattor';
import {getAllCompany } from 'api/base_info/branch_company'
export default {
name: 'branchCompanyStock',
components: { components: {
Detail, Detail,
tourOrderDetailModal tourOrderDetailModal,
}, },
data() { data() {
return { return {
showDialog:false, companys_list: [], //公司列表
changeViolateAmount:null, showDialog: false,
changeViolateAmount: null,
violateAmount: null, violateAmount: null,
row:null, row: null,
topAmount: null, topAmount: null,
form: { form: {
couponAmount: undefined, couponAmount: undefined,
...@@ -231,7 +261,7 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -231,7 +261,7 @@ import {getAllCompany } from 'api/base_info/branch_company'
totalNumber: undefined, totalNumber: undefined,
tourUserIds: undefined, tourUserIds: undefined,
updTime: undefined, updTime: undefined,
verificationId: undefined verificationId: undefined,
}, },
payOrigin: undefined, payOrigin: undefined,
picture: undefined, picture: undefined,
...@@ -249,8 +279,8 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -249,8 +279,8 @@ import {getAllCompany } from 'api/base_info/branch_company'
version: undefined, version: undefined,
}, },
detailVisible: false, detailVisible: false,
bannerDialogVisible: false,//添加、编辑弹框 bannerDialogVisible: false, //添加、编辑弹框
modalTitle: '订单详情', modalTitle: "订单详情",
rules: { rules: {
// companyName: [ // companyName: [
// { // {
...@@ -261,18 +291,18 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -261,18 +291,18 @@ import {getAllCompany } from 'api/base_info/branch_company'
// ], // ],
}, },
applyState: { applyState: {
'-1': { "-1": {
key: -1, key: -1,
label: '放弃购买' label: "放弃购买",
}, },
0: { 0: {
key: 0, key: 0,
label: '申请中' label: "申请中",
}, },
1: { 1: {
key: 1, key: 1,
label: '确认购买' label: "确认购买",
} },
}, },
list: null, list: null,
total: null, total: null,
...@@ -281,15 +311,15 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -281,15 +311,15 @@ import {getAllCompany } from 'api/base_info/branch_company'
page: 1, page: 1,
limit: 20, limit: 20,
type: 2, type: 2,
corporationId: undefined,
no: undefined, no: undefined,
phone: undefined,
status: null, status: null,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
zoneId: undefined, zoneId: undefined,
startCompanyId: undefined startCompanyId: undefined,
}, },
tourRow: {},//旅游订单详情-当前行 tourRow: {}, //旅游订单详情-当前行
//"{"key":"费用明细","val":"","children":[{"key":"成人价格","detail":"¥13800.00/人×1人","val":"¥13800.00"}]}" //"{"key":"费用明细","val":"","children":[{"key":"成人价格","detail":"¥13800.00/人×1人","val":"¥13800.00"}]}"
costDetail: { costDetail: {
key: undefined, key: undefined,
...@@ -298,67 +328,67 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -298,67 +328,67 @@ import {getAllCompany } from 'api/base_info/branch_company'
{ {
key: undefined, key: undefined,
detail: undefined, detail: undefined,
val: undefined val: undefined,
} },
] ],
}, },
baranchQuery: { baranchQuery: {
zoneId: null zoneId: null,
}, },
dialogFormVisible: false, dialogFormVisible: false,
dialogStatus: '', dialogStatus: "",
btn_del: true, btn_del: true,
btn_buy: true, btn_buy: true,
btn_cancel: true, btn_cancel: true,
allBranchCompany: [], allBranchCompany: [],
tourCostDetail: '', tourCostDetail: "",
insureDetail: '',//保险 insureDetail: "", //保险
tableKey: 0, tableKey: 0,
tourDialogVisible: false,//旅游详情 tourDialogVisible: false, //旅游详情
} };
}, },
created() { created() {
let t = this; let t = this;
let query = localStorage.getItem("tourOrderInfo"); let query = localStorage.getItem("tourOrderInfo");
this.listQuery.no = this.$route.query.id || null this.listQuery.no = this.$route.query.id || null;
if(query !="null" && query){ if (query != "null" && query) {
let queryJson = JSON.parse(query); let queryJson = JSON.parse(query);
if(queryJson.page){ if (queryJson.page) {
t.listQuery.page = queryJson.page; t.listQuery.page = queryJson.page;
} }
if(queryJson.limit){ if (queryJson.limit) {
t.listQuery.limit = queryJson.limit; t.listQuery.limit = queryJson.limit;
} }
if(queryJson.no){ if (queryJson.no) {
t.listQuery.no = queryJson.no; t.listQuery.no = queryJson.no;
} }
if(queryJson.type){ if (queryJson.type) {
t.listQuery.type = queryJson.type; t.listQuery.type = queryJson.type;
} }
if(queryJson.startTime){ if (queryJson.startTime) {
t.listQuery.startTime = queryJson.startTime; t.listQuery.startTime = queryJson.startTime;
} }
if(queryJson.endTime){ if (queryJson.endTime) {
t.listQuery.endTime = queryJson.endTime; t.listQuery.endTime = queryJson.endTime;
} }
if(queryJson.status){ if (queryJson.status) {
t.listQuery.status = queryJson.status; t.listQuery.status = queryJson.status;
} }
if(queryJson.phone){ if (queryJson.phone) {
t.listQuery.phone = queryJson.phone; t.listQuery.phone = queryJson.phone;
} }
} }
this.get_all_companys(); //公司列表
this.getList(); this.getList();
getAllCompany(codeAndBranchCompany => {
getAllCompany((codeAndBranchCompany) => {
this.allBranchCompany = codeAndBranchCompany; this.allBranchCompany = codeAndBranchCompany;
}); });
this.btn_del = this.elements['branchCompany/stockApply:btn_delete']; this.btn_del = this.elements["branchCompany/stockApply:btn_delete"];
}, },
computed: { computed: {
...mapGetters([ ...mapGetters(["elements"]),
'elements'
]),
provinceRegions() { provinceRegions() {
return getSonRegionByCodes(1); return getSonRegionByCodes(1);
}, },
...@@ -371,9 +401,17 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -371,9 +401,17 @@ import {getAllCompany } from 'api/base_info/branch_company'
return null; return null;
} }
return getSonRegionByCodes(this.form.addrProvince); return getSonRegionByCodes(this.form.addrProvince);
} },
}, },
methods: { methods: {
//所有公司
get_all_companys() {
company_all_list().then((res) => {
if (res.status == 200) {
this.companys_list = res.data;
}
});
},
/** /**
* 操作-查看详情按钮,显示详情弹框 * 操作-查看详情按钮,显示详情弹框
*/ */
...@@ -411,35 +449,35 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -411,35 +449,35 @@ import {getAllCompany } from 'api/base_info/branch_company'
cancel(row, changeViolateAmount) { cancel(row, changeViolateAmount) {
let that = this; let that = this;
if (changeViolateAmount == null || changeViolateAmount == 0) { if (changeViolateAmount == null || changeViolateAmount == 0) {
this.$confirm('此操作将取消该订单, 是否继续?', '提示', { this.$confirm("此操作将取消该订单, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}).then(() => { }).then(() => {
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: row.userId, appUserId: row.userId,
changeViolateAmount: null changeViolateAmount: null,
} };
calculate(row.no, params).then(data => { calculate(row.no, params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '取消订单成功', message: "取消订单成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
this.getList() this.getList();
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '取消订单失败', message: "取消订单失败",
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}) });
}) });
} else { } else {
// this.$prompt('请输入违约金', '提示', { // this.$prompt('请输入违约金', '提示', {
// confirmButtonText: '确定', // confirmButtonText: '确定',
...@@ -457,78 +495,77 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -457,78 +495,77 @@ import {getAllCompany } from 'api/base_info/branch_company'
// message: '取消输入' // message: '取消输入'
// }); // });
// }); // });
that.showDialog = true that.showDialog = true;
that.changeViolateAmount = changeViolateAmount that.changeViolateAmount = changeViolateAmount;
that.violateAmount = changeViolateAmount that.violateAmount = changeViolateAmount;
that.row = row that.row = row;
} }
}, },
checkViolateAmount() { checkViolateAmount() {
console.log(this.topAmount) console.log(this.topAmount);
console.log(this.violateAmount) console.log(this.violateAmount);
if(this.topAmount < this.violateAmount) { if (this.topAmount < this.violateAmount) {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '违约金额不能大于最高限制金额' + this.topAmount, message: "违约金额不能大于最高限制金额" + this.topAmount,
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}, },
handleConfirm() { handleConfirm() {
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: this.row.userId, appUserId: this.row.userId,
changeViolateAmount: this.violateAmount changeViolateAmount: this.violateAmount,
} };
calculate(this.row.no, params).then(data => { calculate(this.row.no, params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '取消订单成功', message: "取消订单成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
this.showDialog = false this.showDialog = false;
this.getList() this.getList();
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '取消订单失败', message: "取消订单失败",
type: 'fail', type: "fail",
duration: 2000 duration: 2000,
}) });
} }
}) });
}, },
handleCancelDialog() { handleCancelDialog() {
this.showDialog = false this.showDialog = false;
}, },
handleViolatePrice(row) { handleViolatePrice(row) {
let that = this; let that = this;
let params = { let params = {
cancelReason: '后台取消', cancelReason: "后台取消",
appUserId: row.userId appUserId: row.userId,
} };
getViolatePrice(row.no).then(data => { getViolatePrice(row.no).then((data) => {
if (data.status == 200) { if (data.status == 200) {
that.topAmount = data.data.topAmount; that.topAmount = data.data.topAmount;
that.cancel(row, data.data.cutAmount); that.cancel(row, data.data.cutAmount);
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: '获取违约金失败', message: "获取违约金失败",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}) });
} }
}) });
}, },
getProvinceRegions(item) { getProvinceRegions(item) {
this.listQuery.zoneId = item this.listQuery.zoneId = item;
this.baranchQuery.zoneId = item this.baranchQuery.zoneId = item;
// this.listQuery.startCompanyId = undefined; // this.listQuery.startCompanyId = undefined;
// getAllBranchCompanyByZoneId(this.baranchQuery) // getAllBranchCompanyByZoneId(this.baranchQuery)
// .then(response => { // .then(response => {
...@@ -536,41 +573,37 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -536,41 +573,37 @@ import {getAllCompany } from 'api/base_info/branch_company'
// }) // })
}, },
getAllBranchCompanyChange(item) { getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item this.listQuery.startCompanyId = item;
}, },
handleCancel(row) { handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', { this.$confirm("此操作将放弃购买, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}) }).then(() => {
.then(() => { cancelApply(row.id).then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '操作成功', message: "操作成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}); });
this.getList(); this.getList();
}); });
}); });
}, },
handleDelete(row) { handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', { this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning' type: "warning",
}) }).then(() => {
.then(() => { delObj(row.id).then(() => {
delObj(row.id)
.then(() => {
this.$notify({ this.$notify({
title: '成功', title: "成功",
message: '删除成功', message: "删除成功",
type: 'success', type: "success",
duration: 2000 duration: 2000,
}); });
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.list.splice(index, 1); this.list.splice(index, 1);
...@@ -579,7 +612,7 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -579,7 +612,7 @@ import {getAllCompany } from 'api/base_info/branch_company'
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate((valid) => {
if (valid) { if (valid) {
this.getList(); this.getList();
} else { } else {
...@@ -593,70 +626,68 @@ import {getAllCompany } from 'api/base_info/branch_company' ...@@ -593,70 +626,68 @@ import {getAllCompany } from 'api/base_info/branch_company'
limit: 20, limit: 20,
type: 2, type: 2,
no: null, no: null,
phone: null, corporationId: undefined,
status: null, status: null,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
zoneId: undefined, zoneId: undefined,
startCompanyId: undefined startCompanyId: undefined,
};
} this.getList();
this.getList()
}, },
getList() { getList() {
this.listLoading = true; this.listLoading = true;
console.log(this.listQuery) console.log(this.listQuery);
// if(this.listQuery.startTime){ // if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime(); // this.listQuery.startTime = this.listQuery.startTime.getTime();
// } // }
// if(this.listQuery.endTime){ // if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime(); // this.listQuery.endTime = this.listQuery.endTime.getTime();
// } // }
if(this.listQuery){ if (this.listQuery) {
localStorage.setItem("tourOrderInfo", JSON.stringify(this.listQuery)); localStorage.setItem("tourOrderInfo", JSON.stringify(this.listQuery));
} }
getOrderList(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;
this.listLoading = false; this.listLoading = false;
}) });
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
this.getList(); this.getList();
}, },
dateFormat(timestamp) { dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 let date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd'); return formatDate(date, "yyyy-MM-dd");
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
} },
} },
} };
</script> </script>
<style> <style>
.label-text { .label-text {
margin-left: 10px; margin-left: 10px;
margin-right: 20px; margin-right: 20px;
} }
.label-title { .label-title {
margin-top: 10px; margin-top: 10px;
} }
.orderDetail tr td { .orderDetail tr td {
width: 500px; width: 500px;
text-align: center; text-align: center;
border: 0.0625rem solid; border: 0.0625rem solid;
margin-left: 100px; margin-left: 100px;
margin-right: 100px; margin-right: 100px;
} }
.label-value { .label-value {
margin-left: 80px; margin-left: 80px;
margin-right: 100px; margin-right: 100px;
} }
</style> </style>
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