Commit d9528a91 authored by guoyou's avatar guoyou

后台优化

parent 7b612e12
This diff is collapsed.
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="用户ID/实名"> <el-form-item label="用户ID/实名">
<span>{{row.userId}}</span>/<span>{{row.username}}</span> <span>{{row.userId}}</span>/
<span>{{row.username}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -88,27 +89,18 @@ ...@@ -88,27 +89,18 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { import { page, saveOrderViolation } from 'api/order/rentVehicle'
page, import { mapGetters } from 'vuex'
saveOrderViolation import { formatDate } from '../../../utils/dateFormattor'
} from 'api/order/rentVehicle'; import { getToken } from '../../../utils/auth'
import {mapGetters} from 'vuex'; import { getOneIllegalRow } from 'api/order/rentVehicle'
import { import ElRow from 'element-ui/packages/row/src/row'
formatDate import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
} from '../../../utils/dateFormattor'; import ElCol from 'element-ui/packages/col/src/col'
import { import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
getToken import ElForm from '../../../../node_modules/element-ui/packages/form/src/form.vue'
} from '../../../utils/auth'; export default {
import { props: ['row'],
getOneIllegalRow
} from 'api/order/rentVehicle';
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
export default {
props: ["row"],
name: 'illegalDialog', name: 'illegalDialog',
components: { components: {
ElForm, ElForm,
...@@ -120,30 +112,27 @@ ...@@ -120,30 +112,27 @@
data() { data() {
return { return {
isVisible: false, isVisible: false,
tableData:[], tableData: []
} }
}, },
created() { created() {
console.log(JSON.stringify(this.row)) console.log(JSON.stringify(this.row))
}, },
watch: { watch: {
isVisible(newValue, oldValue){ isVisible(newValue, oldValue) {
if(!newValue){ if (!newValue) {
this.$emit('detailEvent', false); this.$emit('detailEvent', false)
}
} }
},
}, },
mounted() { mounted() {
let that = this; let that = this
this.isVisible = true; this.isVisible = true
}, },
computed: { computed: {
...mapGetters([ ...mapGetters(['elements']),
'elements',
]),
getHeaderWithToken() { getHeaderWithToken() {
return {Authorization: getToken()}; return { Authorization: getToken() }
} }
}, },
methods: { methods: {
...@@ -151,10 +140,10 @@ ...@@ -151,10 +140,10 @@
* 弹框-取消 * 弹框-取消
* */ * */
cancel() { cancel() {
this.$emit('detailEvent', false); this.$emit('detailEvent', false)
}, },
sure:function(){ sure: function() {
this.$emit('detailEvent', false); this.$emit('detailEvent', false)
}, },
/** /**
* 格式化时间 * 格式化时间
...@@ -162,14 +151,14 @@ ...@@ -162,14 +151,14 @@
* @returns {*} * @returns {*}
*/ */
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'); return formatDate(date, 'yyyy-MM-dd hh:mm')
},
} }
} }
}
</script> </script>
<style> <style>
.el-form-item__content{ .el-form-item__content {
display: inline-block; display: inline-block;
} }
</style> </style>
This diff is collapsed.
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-option :key="undefined" label="全部" :value="undefined"></el-option> <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-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>-->
<el-form-item label="提车公司" prop="subordinateBranch"> <el-form-item label="提车公司" prop="subordinateBranch">
<el-autocomplete <el-autocomplete
class="inline-input" class="inline-input"
...@@ -115,12 +115,16 @@ ...@@ -115,12 +115,16 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="预定取/还时间" width="200"> <el-table-column align="center" label="预定取/还时间" width="200">
<template scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="实际取/还时间" width="200"> <el-table-column align="center" label="实际取/还时间" width="200">
<template scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" label="预定时间" width="220"> <!-- <el-table-column align="center" label="预定时间" width="220">
...@@ -411,7 +415,7 @@ ...@@ -411,7 +415,7 @@
style="margin-bottom:10px" style="margin-bottom:10px"
> >
<el-card> <el-card>
<img :src="item" class="image" /> <img :src="item" class="image" @click="lookPic(item)" />
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -425,7 +429,14 @@ ...@@ -425,7 +429,14 @@
type="primary" type="primary"
style="padding: 7px 9px;" style="padding: 7px 9px;"
@click="resetReturn = true" @click="resetReturn = true"
v-show="detailItem.status == 2 || detailItem.status == 5" 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"
>更换</el-button> >更换</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -460,7 +471,7 @@ ...@@ -460,7 +471,7 @@
style="margin-bottom:10px" style="margin-bottom:10px"
> >
<el-card> <el-card>
<img :src="item" class="image" /> <img :src="item" class="image" @click="lookPic(item)" />
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -484,6 +495,10 @@ ...@@ -484,6 +495,10 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="bigPicTitle" :visible.sync="bigPicPop" :append-to-body="true" :modal="false" top='0'>
<img :src="priceUrl" alt style='width:100%'/>
</el-dialog>
<!-- 更改还车地点 --> <!-- 更改还车地点 -->
<div class="modal_modal" v-show="resetReturn"></div> <div class="modal_modal" v-show="resetReturn"></div>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false"> <el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
...@@ -738,6 +753,9 @@ export default { ...@@ -738,6 +753,9 @@ export default {
}, },
data() { data() {
return { return {
priceUrl: '',
bigPicPop: false,
bigPicTitle: '',
returnForm: { returnForm: {
retCompany: '' retCompany: ''
}, },
...@@ -929,7 +947,7 @@ export default { ...@@ -929,7 +947,7 @@ export default {
flag: false, flag: false,
zoneId: undefined, zoneId: undefined,
liftCompany: undefined, liftCompany: undefined,
liftCompanyName: "", liftCompanyName: '',
numberPlate: undefined, numberPlate: undefined,
selectedMonth: undefined, selectedMonth: undefined,
status: undefined, status: undefined,
...@@ -1061,56 +1079,56 @@ export default { ...@@ -1061,56 +1079,56 @@ export default {
} }
}, },
created() { created() {
let t = this; let t = this
getAll().then(response => { getAll().then(response => {
this.allCompaniesArr = response.data; this.allCompaniesArr = response.data
let query = localStorage.getItem("bookRecord"); let query = localStorage.getItem('bookRecord')
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.flag){ if (queryJson.flag) {
t.listQuery.flag = queryJson.flag; t.listQuery.flag = queryJson.flag
} }
if(queryJson.zoneId){ if (queryJson.zoneId) {
t.listQuery.zoneId = queryJson.zoneId; t.listQuery.zoneId = queryJson.zoneId
} }
if(queryJson.liftCompany){ if (queryJson.liftCompany) {
t.listQuery.liftCompany = queryJson.liftCompany; t.listQuery.liftCompany = queryJson.liftCompany
} }
if(queryJson.liftCompanyName){ if (queryJson.liftCompanyName) {
t.listQuery.liftCompanyName = queryJson.liftCompanyName; t.listQuery.liftCompanyName = queryJson.liftCompanyName
} }
if(queryJson.numberPlate){ if (queryJson.numberPlate) {
t.listQuery.numberPlate = queryJson.numberPlate; t.listQuery.numberPlate = queryJson.numberPlate
} }
if(queryJson.selectedMonth){ if (queryJson.selectedMonth) {
t.listQuery.selectedMonth = queryJson.selectedMonth; t.listQuery.selectedMonth = queryJson.selectedMonth
} }
if(queryJson.status){ if (queryJson.status) {
t.listQuery.status = queryJson.status; t.listQuery.status = queryJson.status
} }
if(queryJson.bookType){ if (queryJson.bookType) {
t.listQuery.bookType = queryJson.bookType; t.listQuery.bookType = queryJson.bookType
} }
// if(queryJson.liftCompany){ // if(queryJson.liftCompany){
// t.allCompaniesArr.map(function (item) { // t.allCompaniesArr.map(function (item) {
// if(item.id == queryJson.liftCompany){ // if(item.id == queryJson.liftCompany){
// t.listQuery.liftCompanyName = item.name; // t.listQuery.liftCompanyName = item.name;
// } // }
// }); // });
// } // }
} }
this.getList() this.getList()
}); })
getAllCompany(codeAndBranchCompany => { getAllCompany(codeAndBranchCompany => {
//初始化公司列表 //初始化公司列表
this.allCompanies = codeAndBranchCompany this.allCompanies = codeAndBranchCompany
}); })
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove'] this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject'] this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook'] this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
...@@ -1146,6 +1164,12 @@ export default { ...@@ -1146,6 +1164,12 @@ export default {
} }
}, },
methods: { methods: {
//查看大图
lookPic(val) {
this.priceUrl = val;
this.bigPicPop = true;
this.bigPicTitle = '图片放大'
},
/** /**
* 重置 * 重置
* */ * */
...@@ -1156,16 +1180,19 @@ export default { ...@@ -1156,16 +1180,19 @@ export default {
flag: false, flag: false,
zoneId: undefined, zoneId: undefined,
liftCompany: undefined, liftCompany: undefined,
liftCompanyName: "", liftCompanyName: '',
numberPlate: undefined, numberPlate: undefined,
selectedMonth: undefined, selectedMonth: undefined,
status: undefined, status: undefined,
bookType: undefined bookType: undefined
};
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
} }
this.getList(); if (this.listQuery) {
localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
}
this.getList()
}, },
confirm() { confirm() {
if (this.returnForm.retCompany == '') { if (this.returnForm.retCompany == '') {
...@@ -1185,9 +1212,9 @@ export default { ...@@ -1185,9 +1212,9 @@ export default {
type: 'success', type: 'success',
duration: 2000 duration: 2000
}) })
this.resetReturn = false; this.resetReturn = false
this.dialogDetailVisible = false; this.dialogDetailVisible = false
this.getList(); this.getList()
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: '失败',
...@@ -1348,10 +1375,10 @@ export default { ...@@ -1348,10 +1375,10 @@ export default {
getProvinceRegions(item) { getProvinceRegions(item) {
this.listQuery.zoneId = item this.listQuery.zoneId = item
this.baranchQuery.zoneId = item this.baranchQuery.zoneId = item
// this.listQuery.liftCompany = undefined // this.listQuery.liftCompany = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => { // getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
// this.allBranchCompany = response.data // this.allBranchCompany = response.data
// }) // })
}, },
getAllBranchCompanyChange(item) { getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item this.listQuery.liftCompany = item
...@@ -1383,12 +1410,12 @@ export default { ...@@ -1383,12 +1410,12 @@ export default {
* 提车分公司 * 提车分公司
* */ * */
handleSelect(item) { handleSelect(item) {
if (item.value == "全部") { if (item.value == '全部') {
this.listQuery.liftCompany = undefined; this.listQuery.liftCompany = undefined
} else { } else {
this.listQuery.liftCompany = item.id; this.listQuery.liftCompany = item.id
} }
console.log(item); console.log(item)
}, },
cancelDialog4Lift(formName) { cancelDialog4Lift(formName) {
this.dialogForm4LiftVisible = false this.dialogForm4LiftVisible = false
...@@ -1597,8 +1624,11 @@ export default { ...@@ -1597,8 +1624,11 @@ export default {
this.listQuery.page = 1 this.listQuery.page = 1
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate(valid => {
if (valid) { if (valid) {
if(this.listQuery){ if (this.listQuery) {
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery)); localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
} }
this.getList() this.getList()
} else { } else {
......
This diff is collapsed.
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<div style="color: #bfcbd9;font-size: 14px;"> <div style="color: #bfcbd9;font-size: 14px;">
现在位置:{{scope.row.parkCompanyName}} 现在位置:{{scope.row.parkCompanyName}}
</div> </div>
<div>{{scope.row.numberPlate}}<img src="../../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div> <div>{{scope.row.numberPlate}}<span style='color:red'>({{scope.row.code}})</span><img src="../../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div>
<div style="color: #bfcbd9;font-size: 14px;">{{scope.row.vehicleModel?scope.row.vehicleModel.name:''}}</div> <div style="color: #bfcbd9;font-size: 14px;">{{scope.row.vehicleModel?scope.row.vehicleModel.name:''}}</div>
</div> </div>
</template> </template>
......
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