Commit 8233429e authored by guoyou's avatar guoyou

租车订单管理

parent 4b637358
...@@ -70,6 +70,30 @@ ...@@ -70,6 +70,30 @@
<el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input> <el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<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>
...@@ -478,7 +502,7 @@ import { ...@@ -478,7 +502,7 @@ import {
calculate, calculate,
getViolatePrice getViolatePrice
} from 'api/order/rentVehicle' } from 'api/order/rentVehicle'
import { timestamp2Date } from 'utils/dateUtils' import { toEast8Date, deepCopyDate, newEast8Date,timestamp2Date } 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/'
...@@ -606,7 +630,9 @@ export default { ...@@ -606,7 +630,9 @@ export default {
startCompanyId: undefined, startCompanyId: undefined,
plateNumber: undefined, plateNumber: undefined,
realName: undefined, realName: undefined,
vehicleCode: undefined vehicleCode: undefined,
orderStartTime: undefined,
orderEndTime: undefined
}, },
baranchQuery: { baranchQuery: {
zoneId: null zoneId: null
...@@ -722,6 +748,42 @@ export default { ...@@ -722,6 +748,42 @@ export default {
getAllZoneList() { getAllZoneList() {
return getAllZone() return getAllZone()
}, },
bookStartDate4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.orderStartTime) &&
this.listQuery.orderStartTime !== ''
) {
return toEast8Date(this.listQuery.orderStartTime)
}
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.orderStartTime = formatDate(date, 'yyyy-MM-dd')
} else {
this.listQuery.orderStartTime = undefined
}
}
},
bookEndDate4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.orderEndTime) &&
this.listQuery.orderEndTime !== ''
) {
return toEast8Date(this.listQuery.orderEndTime)
}
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.orderEndTime = formatDate(date, 'yyyy-MM-dd')
} else {
this.listQuery.orderEndTime = undefined
}
}
},
cityRegions() { cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) { if (!this.$utils.isInteger(this.form.addrProvince)) {
return null return null
...@@ -1206,6 +1268,8 @@ export default { ...@@ -1206,6 +1268,8 @@ export default {
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
zoneId: undefined, zoneId: undefined,
orderEndTime: undefined,
orderStartTime:undefined,
startCompanyId: undefined startCompanyId: undefined
} }
this.getList() this.getList()
...@@ -1215,13 +1279,12 @@ export default { ...@@ -1215,13 +1279,12 @@ export default {
*/ */
getList() { getList() {
this.listLoading = true this.listLoading = true
if (this.listQuery.orderStartTime) {
// if(this.listQuery.startTime){ this.listQuery.startTime = toEast8Date(this.listQuery.orderStartTime).getTime()
// this.listQuery.startTime = this.listQuery.startTime.getTime(); }
// } if(this.listQuery.orderEndTime){
// if(this.listQuery.endTime){ this.listQuery.endTime = toEast8Date(this.listQuery.orderEndTime).getTime() + 1000*3600*24 - 1;
// this.listQuery.endTime = this.listQuery.endTime.getTime(); }
// }
if (this.listQuery) { if (this.listQuery) {
localStorage.setItem( localStorage.setItem(
'rentVehicleInfo', 'rentVehicleInfo',
......
This diff is collapsed.
...@@ -84,10 +84,12 @@ ...@@ -84,10 +84,12 @@
<template scope="scope"> <template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleUpdate(scope.row)">{{vehicleTypeList_btn_edit?'编辑':'查看'}} <el-button size="small" class="el-button el-button--text el-button--small" @click="handleUpdate(scope.row)">{{vehicleTypeList_btn_edit?'编辑':'查看'}}
</el-button> </el-button>
<el-button size="small"class="el-button el-button--text el-button--small" style="color: #6ce26c;" v-if="scope.row.status==2|| scope.row.status==0" @click="upStatus(scope.row)">上架 <el-button size="small" class="el-button el-button--text el-button--small" style="color: #6ce26c;" v-if="scope.row.status==2|| scope.row.status==0" @click="upStatus(scope.row)">上架
</el-button> </el-button>
<el-button size="small" class="el-button el-button--text el-button--small" style="color: #1d90e6" v-if="scope.row.status==1" @click="upStatus(scope.row)">下架 <el-button size="small" class="el-button el-button--text el-button--small" style="color: #1d90e6" v-if="scope.row.status==1" @click="upStatus(scope.row)">下架
</el-button> </el-button>
<el-button class="el-button el-button--text el-button--small" style="color:#1d90e6;" size="small" @click="handlerAppShow(scope.row)" v-if="scope.row.appShow==1">APP展示</el-button>
<el-button class="el-button el-button--text el-button--small" style="color:#1d90e6;" size="small" @click="handlerAppShow(scope.row)" v-if="scope.row.appShow==0">APP不展示</el-button>
<el-button class="el-button el-button--text el-button--small" style="color:red;" size="small" @click="deleteHandler(scope.row)" v-if="vehicleTypeList_btn_del">删除</el-button> <el-button class="el-button el-button--text el-button--small" style="color:red;" size="small" @click="deleteHandler(scope.row)" v-if="vehicleTypeList_btn_del">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -150,7 +152,8 @@ ...@@ -150,7 +152,8 @@
getLabelList, getLabelList,
getLabelByParentId, getLabelByParentId,
upStatusChange, upStatusChange,
updateVehicleModel updateVehicleModel,
updateAppShow
} from 'api/vehicleType'; } from 'api/vehicleType';
import Element1 from "../admin/menu/components/element"; import Element1 from "../admin/menu/components/element";
...@@ -257,6 +260,48 @@ ...@@ -257,6 +260,48 @@
}); });
} }
}); });
},
/**
* 是否在App展示
* @param {Object} row
*/
handlerAppShow(row) {
var text = "";
if (row.appShow == 0) {
text = "确定设置为在App展示吗?";
} else {
text = "确定设置为不在App展示吗?";
}
var status = row.appShow == 0 ? 1 : 0;
var param = {
"id" : row.id,
"appShow" : status
}
this.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateAppShow(param).then(response => {
if (response.status === 200) {
this.$notify({
title: '成功',
message: '设置成功',
type: 'success',
duration: 2000
});
this.bannerDialogVisible = false;
this.getList();
} else {
this.$notify({
title: '设置失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
})
}, },
/** /**
* 删除 * 删除
......
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