Commit a6eed53e authored by hezhen's avatar hezhen

修改回去

parent 4b637358
......@@ -132,17 +132,6 @@ export function updateVehicleModel(params) {
});
}
/**
* App是否展示
* @param {Object} params
*/
export function updateAppShow(params) {
return fetch({
url: '/vehicle/vehicleModel/bg/updateAppShow',
method: 'post',
data: params
});
}
/*
* 新建一条车型数据
* */
......
......@@ -71,6 +71,30 @@
</el-form-item>
</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-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="delete" @click="clearSearch">清除搜索</el-button>
......@@ -478,7 +502,7 @@ import {
calculate,
getViolatePrice
} from 'api/order/rentVehicle'
import { timestamp2Date } from 'utils/dateUtils'
import { toEast8Date, deepCopyDate, newEast8Date,timestamp2Date } from 'utils/dateUtils'
import { mapGetters } from 'vuex'
import rsCode from '../../../utils/rsCode'
import { getSysRegionByIds } from 'api/vehicle/vehicleInfo/'
......@@ -606,7 +630,9 @@ export default {
startCompanyId: undefined,
plateNumber: undefined,
realName: undefined,
vehicleCode: undefined
vehicleCode: undefined,
orderStartTime: undefined,
orderEndTime: undefined
},
baranchQuery: {
zoneId: null
......@@ -722,6 +748,42 @@ export default {
getAllZoneList() {
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() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null
......@@ -1206,6 +1268,8 @@ export default {
startTime: undefined,
endTime: undefined,
zoneId: undefined,
orderEndTime: undefined,
orderStartTime:undefined,
startCompanyId: undefined
}
this.getList()
......@@ -1215,13 +1279,12 @@ export default {
*/
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();
// }
if (this.listQuery.orderStartTime) {
this.listQuery.startTime = toEast8Date(this.listQuery.orderStartTime).getTime()
}
if(this.listQuery.orderEndTime){
this.listQuery.endTime = toEast8Date(this.listQuery.orderEndTime).getTime() + 1000*3600*24 - 1;
}
if (this.listQuery) {
localStorage.setItem(
'rentVehicleInfo',
......
......@@ -2,6 +2,26 @@
<div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container">
<el-form :rules="rules4Query" ref="queryForm" :inline="inline" :model="listQuery">
<el-row>
<el-col :span="5">
<el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.bookType" placeholder="请选择">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="val in bookTypeList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆编码">
<el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车牌号">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="申请状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择申请状态">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
......@@ -15,20 +35,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="车辆编码">
<el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item>
<el-form-item label="车牌号">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌号"></el-input>
</el-form-item>
<el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.bookType" placeholder="请选择">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="val in bookTypeList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="所属大区">
</el-col>
</el-row>
<el-row>
</el-col>
<el-col :span="5">
<el-form-item label="所属大区">
<el-select
class="filter-item"
v-model="listQuery.zoneId"
......@@ -38,7 +50,9 @@
<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 :span="5">
<el-form-item label="提车公司" prop="subordinateBranch">
<el-autocomplete
class="inline-input"
......@@ -48,26 +62,30 @@
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<!--<el-form-item label="提车公司">-->
<!--<el-select-->
<!--class="filter-item"-->
<!--v-model="listQuery.liftCompany"-->
<!--placeholder="请选择"-->
<!--@change="getAllBranchCompanyChange"-->
<!--&gt;-->
<!--<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-select>-->
<!--</el-form-item>-->
<el-form-item label="预订月份" prop="selectedMonth4Query">
</el-col>
<el-col :span="5">
<el-form-item label="提车时间" prop="bookStartDate4Query">
<el-date-picker
v-model="selectedMonth4Query"
v-model="bookStartDate4Query"
type="month"
:editable="true"
format="yyyy-MM"
placeholder="请选择预订月份"
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="month"
:editable="true"
format="yyyy-MM"
placeholder="请选择预约还车时间"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form>
......@@ -115,16 +133,12 @@
</el-table-column>
<el-table-column align="center" label="预定取/还时间" width="200">
<template scope="scope">
<span>{{scope.row.bookStartDate}}</span>
<br />
<span>{{scope.row.bookEndDate}}</span>
<span>{{scope.row.bookStartDate}}</span> <br/><span>{{scope.row.bookEndDate}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="实际取/还时间" width="200">
<template scope="scope">
<span>{{scope.row.actualStartDate}}</span>
<br />
<span>{{scope.row.actualEndDate}}</span>
<span>{{scope.row.actualStartDate}}</span> <br/><span>{{scope.row.actualEndDate}}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="预定时间" width="220">
......@@ -407,7 +421,7 @@
</el-col>
</el-row>
<el-row style="margin-left: 20px;" v-if="departurePicList.length>0">
<!-- <el-col
<el-col
:span="3"
v-for="(item, index) in departurePicList"
:key="index"
......@@ -415,13 +429,9 @@
style="margin-bottom:10px"
>
<el-card>
<img :src="item" class="image" @click="lookPic(item)" />
<img :src="item" class="image" />
</el-card>
</el-col> -->
<viewer :images="departurePicList">
<img v-for="src in departurePicList" :src="src" :key="src" style="width: 100px; height: 100px;margin-right:30px;">
</viewer>
</el-col>
</el-row>
<hr />
<el-row>
......@@ -433,14 +443,7 @@
type="primary"
style="padding: 7px 9px;"
@click="resetReturn = true"
v-if="detailItem.status == 2 && !detailItem.vehicleDepartureLogVo"
>更换</el-button>
<el-button
size="mini"
type="primary"
style="padding: 7px 9px;"
@click="resetReturn = true"
v-if="detailItem.status == 2 && !!detailItem.vehicleDepartureLogVo && detailItem.vehicleDepartureLogVo.state == 0"
v-show="detailItem.status == 2 || detailItem.status == 5"
>更换</el-button>
</el-form-item>
</el-col>
......@@ -467,7 +470,7 @@
</el-col>
</el-row>
<el-row style="margin-left: 20px;" v-if="arrivalPicList.length>0">
<!-- <el-col
<el-col
:span="3"
v-for="(item, index) in arrivalPicList"
:key="index"
......@@ -475,12 +478,9 @@
style="margin-bottom:10px"
>
<el-card>
<img :src="item" class="image" @click="lookPic(item)" />
<img :src="item" class="image" />
</el-card>
</el-col> -->
<viewer :images="arrivalPicList">
<img v-for="src in arrivalPicList" :src="src" :key="src" style="width: 100px; height: 100px;margin-right:30px;">
</viewer>
</el-col>
</el-row>
<hr />
<el-row>
......@@ -947,11 +947,13 @@ export default {
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: '',
liftCompanyName: "",
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
bookType: undefined
bookType: undefined,
bookStartDate: undefined,
bookEndDate: undefined
},
inline: true,
dialogFormVisible: false,
......@@ -1079,56 +1081,56 @@ export default {
}
},
created() {
let t = this
let t = this;
getAll().then(response => {
this.allCompaniesArr = response.data
let query = localStorage.getItem('bookRecord')
if (query != 'null' && query) {
let queryJson = JSON.parse(query)
if (queryJson.page) {
t.listQuery.page = queryJson.page
this.allCompaniesArr = response.data;
let query = localStorage.getItem("bookRecord");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.page){
t.listQuery.page = queryJson.page;
}
if (queryJson.limit) {
t.listQuery.limit = queryJson.limit
if(queryJson.limit){
t.listQuery.limit = queryJson.limit;
}
if (queryJson.flag) {
t.listQuery.flag = queryJson.flag
if(queryJson.flag){
t.listQuery.flag = queryJson.flag;
}
if (queryJson.zoneId) {
t.listQuery.zoneId = queryJson.zoneId
if(queryJson.zoneId){
t.listQuery.zoneId = queryJson.zoneId;
}
if (queryJson.liftCompany) {
t.listQuery.liftCompany = queryJson.liftCompany
if(queryJson.liftCompany){
t.listQuery.liftCompany = queryJson.liftCompany;
}
if (queryJson.liftCompanyName) {
t.listQuery.liftCompanyName = queryJson.liftCompanyName
if(queryJson.liftCompanyName){
t.listQuery.liftCompanyName = queryJson.liftCompanyName;
}
if (queryJson.numberPlate) {
t.listQuery.numberPlate = queryJson.numberPlate
if(queryJson.numberPlate){
t.listQuery.numberPlate = queryJson.numberPlate;
}
if (queryJson.selectedMonth) {
t.listQuery.selectedMonth = queryJson.selectedMonth
if(queryJson.selectedMonth){
t.listQuery.selectedMonth = queryJson.selectedMonth;
}
if (queryJson.status) {
t.listQuery.status = queryJson.status
if(queryJson.status){
t.listQuery.status = queryJson.status;
}
if (queryJson.bookType) {
t.listQuery.bookType = queryJson.bookType
if(queryJson.bookType){
t.listQuery.bookType = queryJson.bookType;
}
// if(queryJson.liftCompany){
// t.allCompaniesArr.map(function (item) {
// if(item.id == queryJson.liftCompany){
// t.listQuery.liftCompanyName = item.name;
// }
// });
// }
// if(queryJson.liftCompany){
// t.allCompaniesArr.map(function (item) {
// if(item.id == queryJson.liftCompany){
// t.listQuery.liftCompanyName = item.name;
// }
// });
// }
}
this.getList()
})
});
getAllCompany(codeAndBranchCompany => {
//初始化公司列表
this.allCompanies = codeAndBranchCompany
})
});
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
......@@ -1161,6 +1163,42 @@ export default {
this.listQuery.selectedMonth = undefined
}
}
},
bookStartDate4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.bookStartDate) &&
this.listQuery.bookStartDate !== ''
) {
return toEast8Date(this.listQuery.bookStartDate)
}
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.bookStartDate = formatDate(date, 'yyyy-MM')
} else {
this.listQuery.bookStartDate = undefined
}
}
},
bookEndDate4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.bookEndDate) &&
this.listQuery.bookEndDate !== ''
) {
return toEast8Date(this.listQuery.bookEndDate)
}
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.bookEndDate = formatDate(date, 'yyyy-MM')
} else {
this.listQuery.bookEndDate = undefined
}
}
}
},
methods: {
......@@ -1174,19 +1212,18 @@ export default {
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: '',
liftCompanyName: "",
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
bookType: undefined
bookType: undefined,
bookStartDate: undefined,
bookEndDate: undefined
};
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
if (this.listQuery) {
localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
}
this.getList()
this.getList();
},
confirm() {
if (this.returnForm.retCompany == '') {
......@@ -1206,9 +1243,9 @@ export default {
type: 'success',
duration: 2000
})
this.resetReturn = false
this.dialogDetailVisible = false
this.getList()
this.resetReturn = false;
this.dialogDetailVisible = false;
this.getList();
} else {
this.$notify({
title: '失败',
......@@ -1369,10 +1406,10 @@ export default {
getProvinceRegions(item) {
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
// this.listQuery.liftCompany = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
// this.allBranchCompany = response.data
// })
// this.listQuery.liftCompany = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
// this.allBranchCompany = response.data
// })
},
getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item
......@@ -1404,12 +1441,11 @@ export default {
* 提车分公司
* */
handleSelect(item) {
if (item.value == '全部') {
this.listQuery.liftCompany = undefined
if (item.value == "全部") {
this.listQuery.liftCompany = undefined;
} else {
this.listQuery.liftCompany = item.id
this.listQuery.liftCompany = item.id;
}
console.log(item)
},
cancelDialog4Lift(formName) {
this.dialogForm4LiftVisible = false
......@@ -1618,11 +1654,8 @@ export default {
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
if (this.listQuery) {
localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList()
} else {
......
......@@ -84,10 +84,12 @@
<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>
<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 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 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>
</template>
</el-table-column>
......@@ -150,7 +152,8 @@
getLabelList,
getLabelByParentId,
upStatusChange,
updateVehicleModel
updateVehicleModel,
updateAppShow
} from 'api/vehicleType';
import Element1 from "../admin/menu/components/element";
......@@ -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