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
});
}
/*
* 新建一条车型数据
* */
......
......@@ -70,6 +70,30 @@
<el-input v-model="listQuery.vehicleCode" placeholder="请输入车辆编号"></el-input>
</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>
......@@ -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',
......
This diff is collapsed.
......@@ -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