Commit d9528a91 authored by guoyou's avatar guoyou

后台优化

parent 7b612e12
<template>
<div class="app-container calendar-list-container" v-loading.body="showLoadingBody">
<div class="filter-container" ref="filter-container">
<el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate"
type="primary" icon="edit">添加
</el-button>
<el-button
class="filter-item"
style="margin-left: 10px;"
@click="handleCreate"
type="primary"
icon="edit"
>添加</el-button>
</div>
<el-table :key='tableKey' :data="list" border fit highlight-current-row
style="width: 600px">
<el-table-column
type="index"
align="center" label="序号" width="98">
</el-table-column>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 600px">
<el-table-column type="index" align="center" label="序号" width="98"></el-table-column>
<el-table-column width="250" align="center" label="标题">
<template scope="scope">
<span>{{scope.row.title}}</span>
......@@ -23,18 +23,33 @@
</el-table-column>
<el-table-column align="center" width="150" label="操作">
<template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleUpdate(scope.row)">编辑
</el-button>
<el-button class="el-button el-button--text el-button--small" style="color: red;" v-if="scope.row.type!=88" size="small" @click="deleteHandler(scope.row)">删除</el-button>
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="handleUpdate(scope.row)"
>编辑</el-button>
<el-button
class="el-button el-button--text el-button--small"
style="color: red;"
v-if="scope.row.type!=88"
size="small"
@click="deleteHandler(scope.row)"
>删除</el-button>
<!--<el-button size="small" type="danger" @click="deleteHandler(scope.row)">删除-->
<!--</el-button>-->
</template>
</el-table-column>
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @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>
<el-pagination
@size-change="handleSizeChange"
@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>
<!-- banner modal弹窗 -->
<el-dialog :title="modalTitle" :visible.sync="dialogVisible" :before-close="handleDialogClose">
......@@ -45,51 +60,54 @@
<el-form-item label="标识" prop="type">
<el-input type="number" v-model.number="dialogFrom.type" placeholder="1,2,3……"></el-input>
</el-form-item>
<el-form-item label="参数" prop="params" v-show="dialogFrom.type != '88'">
<el-input v-model="dialogFrom.params" placeholder="请输入标题"></el-input>
</el-form-item>
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="最低提现金额" prop="minAmount">
<el-input v-model="dialogFrom.minAmount" placeholder="请输入最低提现金额" ></el-input>
<el-input v-model="dialogFrom.minAmount" placeholder="请输入最低提现金额"></el-input>
<span style="color:#bfcbd9;">钱包余额,最低提现额度,达到此金额后才能提现</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="提现手续费" prop="proceduReates">
<el-input v-model="dialogFrom.proceduReates" placeholder="请输入提现手续费" ></el-input>
<el-input v-model="dialogFrom.proceduReates" placeholder="请输入提现手续费"></el-input>
<span style="color:#bfcbd9;">提现收取的手续费</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="月额度" prop="amountOfMonth">
<el-input v-model="dialogFrom.amountOfMonth" placeholder="请输入月额度" ></el-input>
<el-input v-model="dialogFrom.amountOfMonth" placeholder="请输入月额度"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="日额度" prop="amountOfDay">
<el-input v-model="dialogFrom.amountOfDay" placeholder="请输入日额度" ></el-input>
<el-input v-model="dialogFrom.amountOfDay" placeholder="请输入日额度"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="最多提现次数(月)" prop="maxNumberOfMonth">
<el-input v-model="dialogFrom.maxNumberOfMonth" placeholder="请输入最多提现次数(月)" ></el-input>
<el-input v-model="dialogFrom.maxNumberOfMonth" placeholder="请输入最多提现次数(月)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="最多提现次数(日)" prop="maxNumberOfDay">
<el-input v-model="dialogFrom.maxNumberOfDay" placeholder="请输入最多提现次数(日)" ></el-input>
<el-input v-model="dialogFrom.maxNumberOfDay" placeholder="请输入最多提现次数(日)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="dialogFrom.type==88" >
<el-row v-if="dialogFrom.type==88">
<el-col :span="12">
<el-form-item label="提现方式" prop="withdrawWay">
<el-radio v-model="dialogFrom.withdrawWay" label="1">线上</el-radio>
......@@ -102,7 +120,13 @@
<el-tab-pane label="详情" name="first">
<!--<Editor v-if="activeName2=='first'" @input="handelContentIncrease" :value="form.content" :myQuillEditor="'myQuillEditorContent'" :activeName2="activeName2"></Editor>-->
<div class="editor-container" v-if="activeName2=='first'">
<UE :editorId="activeName2" :defaultMsg="dialogFrom.value" :config=config ref="ue" @ready="editorReadyEvent"></UE>
<UE
:editorId="activeName2"
:defaultMsg="dialogFrom.value"
:config="config"
ref="ue"
@ready="editorReadyEvent"
></UE>
</div>
</el-tab-pane>
</el-tabs>
......@@ -117,8 +141,7 @@
</div>
</el-dialog>
<!--多图上传-->
<!--多图上传-->
<!--<el-upload-->
<!--:multiple="multiple"-->
<!--action="${pageContext.request.contextPath}/lookup/editEvidence/123"-->
......@@ -133,57 +156,53 @@
</div>
</template>
<style>
.el-table__header{
.el-table__header {
width: 100% !important;
}
}
</style>
<script>
import 'static/css/uploadImg.css';// 引入图片上传组件对话框
import 'static/css/uploadImg.css' // 引入图片上传组件对话框
// import Editor from "../modal/editorTool";//富文本
import UE from '../modal/Ueditor';//百度ue富文本
import {
formatDate
} from 'utils/dateFormattor';
import UE from '../modal/Ueditor' //百度ue富文本
import { formatDate } from 'utils/dateFormattor'
import {
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str
} from 'utils/dateUtils';
} from 'utils/dateUtils'
import {
import {
page,
addGeneral,
editGeneral,
delGeneral,
uploadFiles
} from 'api/base_info/general';
} from 'api/base_info/general'
import rsCode from '../../utils/rsCode';
import rsCode from '../../utils/rsCode'
import {mapGetters} from 'vuex';
import {
getToken
} from '../../utils/auth';
import { mapGetters } from 'vuex'
import { getToken } from '../../utils/auth'
import Element1 from "../admin/menu/components/element";
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import Element1 from '../admin/menu/components/element'
import ElRow from 'element-ui/packages/row/src/row'
import ElCol from 'element-ui/packages/col/src/col'
export default {
export default {
name: 'tourManage',
components: {
ElCol,
ElRow,
Element1,
UE
// Editor
// Editor
},
data() {
return {
multiple:true,
formDate:"",
multiple: true,
formDate: '',
listQuery: {
page: 1,
limit: 20
......@@ -192,23 +211,24 @@
initialFrameWidth: null,
initialFrameHeight: 350
},
tableKey:0,
activeName2: "",
modalTitle: "创建",
tableKey: 0,
activeName2: '',
modalTitle: '创建',
BASE_API: process.env.BASE_API,
dialogVisible: false,//添加、编辑弹框
dialogVisible: false, //添加、编辑弹框
showLoadingBody: false,
dialogFrom:{
title: "",
dialogFrom: {
title: '',
type: undefined,
value:"",
value: '',
minAmount: 100,
proceduReates:0.001,
amountOfMonth:'',
amountOfDay:'',
maxNumberOfMonth:'',
maxNumberOfDay:'',
withdrawWay:1
proceduReates: 0.001,
amountOfMonth: '',
amountOfDay: '',
maxNumberOfMonth: '',
maxNumberOfDay: '',
withdrawWay: 1,
params: ''
},
rules: {
title: {
......@@ -219,61 +239,58 @@
},
type: {
required: true,
message: '请输入数字标识',
message: '请输入数字标识'
},
proceduReates: {
required: true,
message: '请输入提现手续费',
message: '请输入提现手续费'
},
minAmount: {
required: true,
message: '请输入最低提现金额',
message: '请输入最低提现金额'
},
amountOfMonth: {
required: true,
message: '请输入月额度',
message: '请输入月额度'
},
amountOfDay: {
required: true,
message: '请输入日额度',
message: '请输入日额度'
},
maxNumberOfMonth: {
required: true,
message: '请输入最多提现次数(月)',
message: '请输入最多提现次数(月)'
},
maxNumberOfDay: {
required: true,
message: '请输入最多提现次数(日)',
message: '请输入最多提现次数(日)'
},
withdrawWay: {
required: true,
message: '请选择提现方式',
message: '请选择提现方式'
}
},
list: null,
total: null,
listLoading: true,
inline: true,
inline: true
}
},
created() {
this.getList();
this.getList()
},
computed: {
...mapGetters([
'elements',
'belong2Type'
])
...mapGetters(['elements', 'belong2Type'])
},
methods: {
/**
* 添加
* */
handleCreate() {
this.cleanDialogFrom();
this.modalTitle = '创建';
this.activeName2 = "first";
this.dialogVisible = true;
this.cleanDialogFrom()
this.modalTitle = '创建'
this.activeName2 = 'first'
this.dialogVisible = true
},
/**
* 操作-删除
......@@ -291,102 +308,108 @@
message: '删除成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: '删除失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
message: rsCode.msg[response.code]
? rsCode.msg[response.code]
: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
})
},
/**
* 点击 X 关闭对话框的回调
**/
handleDialogClose() {
this.activeName2 = "";
this.dialogVisible = false;
this.activeName2 = ''
this.dialogVisible = false
},
/**
* 操作-编辑
* */
handleUpdate(row) {
this.modalTitle = '编辑';
this.dialogVisible = true;
this.cleanDialogFrom();
this.dialogFrom = row;
this.activeName2 = "first";
this.modalTitle = '编辑'
this.dialogVisible = true
this.cleanDialogFrom()
typeof row.params == 'object' ? delete row.params : row
this.dialogFrom = row
this.activeName2 = 'first'
},
/**
* 弹框-取消
* */
cancelHandel(){
this.cleanDialogFrom();
this.dialogVisible = false;
this.activeName2 = "";
cancelHandel() {
this.cleanDialogFrom()
this.dialogVisible = false
this.activeName2 = ''
},
/**
* 新建、编辑清空表单
* */
cleanDialogFrom(){
cleanDialogFrom() {
this.dialogFrom = {
title: "",
title: '',
type: undefined,
value:"",
value: '',
minAmount: 100,
proceduReates:0.001,
amountOfMonth:'',
amountOfDay:'',
maxNumberOfMonth:'',
maxNumberOfDay:'',
withdrawWay:1
};
this.activeName2 = "";
proceduReates: 0.001,
amountOfMonth: '',
amountOfDay: '',
maxNumberOfMonth: '',
maxNumberOfDay: '',
withdrawWay: 1,
params: ''
}
this.activeName2 = ''
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
this.listQuery.limit = val
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
this.listQuery.page = val
this.getList()
},
/**
* 获取通用设置列表数据
* */
getList() {
this.listLoading = true;
this.listLoading = true
page(this.listQuery).then(response => {
let totalCountRs = undefined;
let listRs = undefined;
if (!this.$utils.isEmpty(response.data.rows) && this.$utils.isInteger(response.data.total)) {
response.data.rows.map(function(item){
item.visible2 = false;
if(item.type == 88){
let totalCountRs = undefined
let listRs = undefined
if (
!this.$utils.isEmpty(response.data.rows) &&
this.$utils.isInteger(response.data.total)
) {
response.data.rows.map(function(item) {
item.visible2 = false
if (item.type == 88) {
//提现规则
item.params = JSON.parse(item.params);
item.minAmount = item.params.minAmount;
item.proceduReates = item.params.proceduReates;
item.amountOfMonth = item.params.amountOfMonth;
item.amountOfDay = item.params.amountOfDay;
item.maxNumberOfMonth = item.params.maxNumberOfMonth;
item.maxNumberOfDay = item.params.maxNumberOfDay;
item.withdrawWay = item.params.withdrawWay;
item.params = JSON.parse(item.params)
item.minAmount = item.params.minAmount
item.proceduReates = item.params.proceduReates
item.amountOfMonth = item.params.amountOfMonth
item.amountOfDay = item.params.amountOfDay
item.maxNumberOfMonth = item.params.maxNumberOfMonth
item.maxNumberOfDay = item.params.maxNumberOfDay
item.withdrawWay = item.params.withdrawWay
}
});
listRs = response.data.rows;
totalCountRs = response.data.total;
})
listRs = response.data.rows
totalCountRs = response.data.total
}
// "{"minAmount":"11","proceduReates":"0.02"}"
this.listLoading = false;
this.list = listRs;
this.total = totalCountRs;
});
// "{"minAmount":"11","proceduReates":"0.02"}"
this.listLoading = false
this.list = listRs
this.total = totalCountRs
})
},
/**
* 创建
......@@ -398,45 +421,49 @@
title: this.dialogFrom.title,
type: this.dialogFrom.type,
value: this.dialogFrom.value,
};
if(this.dialogFrom.type == 88){
params: this.dialogFrom.params
}
if (this.dialogFrom.type == 88) {
//提现规则
let p = {
minAmount: this.dialogFrom.minAmount,
proceduReates:this.dialogFrom.proceduReates,
amountOfMonth:this.dialogFrom.amountOfMonth,
amountOfDay:this.dialogFrom.amountOfDay,
maxNumberOfMonth:this.dialogFrom.maxNumberOfMonth,
maxNumberOfDay:this.dialogFrom.maxNumberOfDay,
withdrawWay:this.dialogFrom.withdrawWay
};
params.params = JSON.stringify(p);
proceduReates: this.dialogFrom.proceduReates,
amountOfMonth: this.dialogFrom.amountOfMonth,
amountOfDay: this.dialogFrom.amountOfDay,
maxNumberOfMonth: this.dialogFrom.maxNumberOfMonth,
maxNumberOfDay: this.dialogFrom.maxNumberOfDay,
withdrawWay: this.dialogFrom.withdrawWay
}
params.params = JSON.stringify(p)
} else {
params.params = this.dialogFrom.params
}
addGeneral(params).then(response => {
if (response.status === 200) {
this.cleanDialogFrom();
this.dialogVisible = false;
this.cleanDialogFrom()
this.dialogVisible = false
this.$notify({
title: '成功',
message: '添加成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: '添加失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
message: rsCode.msg[response.code]
? rsCode.msg[response.code]
: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
/**
* 编辑-更新
......@@ -444,88 +471,95 @@
update(formName) {
this.$refs.dialogFrom.validate(valid => {
if (valid) {
let params = {
id: this.dialogFrom.id,
title: this.dialogFrom.title,
type: this.dialogFrom.type,
value: this.dialogFrom.value
};
if(this.dialogFrom.type == 88){
value: this.dialogFrom.value,
params: this.dialogVisible.params
}
if (this.dialogFrom.type == 88) {
//提现规则
let p = {
minAmount: this.dialogFrom.minAmount,
proceduReates:this.dialogFrom.proceduReates,
amountOfMonth:this.dialogFrom.amountOfMonth,
amountOfDay:this.dialogFrom.amountOfDay,
maxNumberOfMonth:this.dialogFrom.maxNumberOfMonth,
maxNumberOfDay:this.dialogFrom.maxNumberOfDay,
withdrawWay:this.dialogFrom.withdrawWay
};
params.params = JSON.stringify(p);
proceduReates: this.dialogFrom.proceduReates,
amountOfMonth: this.dialogFrom.amountOfMonth,
amountOfDay: this.dialogFrom.amountOfDay,
maxNumberOfMonth: this.dialogFrom.maxNumberOfMonth,
maxNumberOfDay: this.dialogFrom.maxNumberOfDay,
withdrawWay: this.dialogFrom.withdrawWay
}
params.params = JSON.stringify(p)
} else {
params.params = this.dialogFrom.params
}
editGeneral(params).then(response => {
if (response.status === 200) {
this.cleanDialogFrom();
this.dialogVisible = false;
this.cleanDialogFrom()
this.dialogVisible = false
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
message: rsCode.msg[response.code]
? rsCode.msg[response.code]
: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
/**
* 富文本 营地详情
* */
editorReadyEvent(instance){
let t = this;
editorReadyEvent(instance) {
let t = this
instance.addListener('contentChange', () => {
if(t.activeName2 == "first"){
t.dialogFrom.value = instance.getContent();
if (t.activeName2 == 'first') {
t.dialogFrom.value = instance.getContent()
}
});
})
},
uploadFile(file){
this.formDate.append('files', file.file);
uploadFile(file) {
this.formDate.append('files', file.file)
},
subPicForm(){
subPicForm() {
this.formDate = new FormData()
this.$refs.upload.submit();
this.formDate.append('WS_CODE', "12133");
this.$refs.upload.submit()
this.formDate.append('WS_CODE', '12133')
let config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
uploadFiles(this.formDate).then( res => {
console.log(res)
}).catch( res => {
console.log(res)
uploadFiles(this.formDate)
.then(res => {
})
.catch(res => {
})
}
}
}
}
</script>
<style>
.v-modal{
.v-modal {
z-index: 1000 !important;
}
.el-dialog__wrapper{
}
.el-dialog__wrapper {
z-index: 1008 !important;
}
}
</style>
......@@ -28,7 +28,8 @@
<el-row>
<el-col :span="24">
<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-col>
</el-row>
......@@ -88,27 +89,18 @@
</el-dialog>
</template>
<script>
import {
page,
saveOrderViolation
} from 'api/order/rentVehicle';
import {mapGetters} from 'vuex';
import {
formatDate
} from '../../../utils/dateFormattor';
import {
getToken
} from '../../../utils/auth';
import {
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"],
import { page, saveOrderViolation } from 'api/order/rentVehicle'
import { mapGetters } from 'vuex'
import { formatDate } from '../../../utils/dateFormattor'
import { getToken } from '../../../utils/auth'
import { 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',
components: {
ElForm,
......@@ -120,30 +112,27 @@
data() {
return {
isVisible: false,
tableData:[],
tableData: []
}
},
created() {
console.log(JSON.stringify(this.row))
},
watch: {
isVisible(newValue, oldValue){
if(!newValue){
this.$emit('detailEvent', false);
isVisible(newValue, oldValue) {
if (!newValue) {
this.$emit('detailEvent', false)
}
}
},
},
mounted() {
let that = this;
this.isVisible = true;
let that = this
this.isVisible = true
},
computed: {
...mapGetters([
'elements',
]),
...mapGetters(['elements']),
getHeaderWithToken() {
return {Authorization: getToken()};
return { Authorization: getToken() }
}
},
methods: {
......@@ -151,10 +140,10 @@
* 弹框-取消
* */
cancel() {
this.$emit('detailEvent', false);
this.$emit('detailEvent', false)
},
sure:function(){
this.$emit('detailEvent', false);
sure: function() {
this.$emit('detailEvent', false)
},
/**
* 格式化时间
......@@ -162,14 +151,14 @@
* @returns {*}
*/
dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm');
},
let date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm')
}
}
}
</script>
<style>
.el-form-item__content{
.el-form-item__content {
display: inline-block;
}
}
</style>
......@@ -12,12 +12,7 @@
@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-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -30,12 +25,7 @@
@change="getAllBranchCompanyChange"
>
<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-form-item>
</el-col>
......@@ -269,18 +259,8 @@
:class="{'active':item.iscomplete}"
:key="index"
>
<img
class="activeImg"
v-if="item.iscomplete"
src="../../../assets/images/active.png"
alt
/>
<img
class="activeImg"
v-if="!item.iscomplete"
src="../../../assets/images/doing.png"
alt
/>
<img class="activeImg" v-if="item.iscomplete" src="../../../assets/images/active.png" alt />
<img class="activeImg" v-if="!item.iscomplete" src="../../../assets/images/doing.png" alt />
<p class="stepTitle">
<template v-if="item.status==1">
<div class="picBox">
......@@ -340,13 +320,7 @@
>违章罚款</p>
<p class="detailTitle" v-if="item.orderViolation && item.status==3">违章截图:</p>
<div class="picBox" v-if="dedDetail.length>0">
<img
class="picItem"
:src="itm"
alt
v-for="(itm,idx) in item.pictureList"
:key="idx"
/>
<img class="picItem" :src="itm" alt v-for="(itm,idx) in item.pictureList" :key="idx" />
</div>
<p
class="detailTitle"
......@@ -362,11 +336,7 @@
style="margin-top: 15px"
>定损总罚款{{dedTotal}}元</p>
<p class="detailTitle" v-if="dedDetail.length>0 && item.status==5">明细</p>
<div
v-if="dedDetail.length>0 && item.status==5"
v-for="(itm,idx) in dedDetail"
:key="idx"
>
<div v-if="dedDetail.length>0 && item.status==5" v-for="(itm,idx) in dedDetail" :key="idx">
<p class="detailTitle">{{itm.id}}、{{itm.statusName}}扣{{itm.cost}}元</p>
<div class="picBox">
<img class="picItem" :src="it" alt v-for="(it,ix) in itm.picList" :key="ix" />
......@@ -391,6 +361,7 @@
<img
:src="orderReturnVehicleCrosstown.licenseImg"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.licenseImg)"
/>
</div>
......@@ -402,6 +373,7 @@
:src="item"
:key="index"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(item)"
/>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
<img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
......@@ -415,6 +387,7 @@
<img
:src="orderReturnVehicleCrosstown.mileageImg"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.mileageImg)"
/>
</div>
<div v-if="returnVehicle">
......@@ -423,6 +396,7 @@
<img
:src="orderReturnVehicleCrosstown.vehicleKey"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.vehicleKey)"
/>
</div>
<div v-if="returnVehicle">
......@@ -438,15 +412,25 @@
</div>
</el-form>
</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>
</template>
<script>
import Illegal from "./illegalModal"; //违章查询
import Detail from "./detail"; //违章查询
import rentOrderDetailModal from "../modal/rentOrderDetailModal"; //租车订单详情
import { formatDate } from "../../../utils/dateFormattor";
import Illegal from './illegalModal' //违章查询
import Detail from './detail' //违章查询
import rentOrderDetailModal from '../modal/rentOrderDetailModal' //租车订单详情
import { formatDate } from '../../../utils/dateFormattor'
import {
page,
getAllBranchCompany,
......@@ -454,18 +438,18 @@ import {
getOrderVehicleCrosstown,
getStep,
calculate
} from "api/order/rentVehicle";
import { timestamp2Date } from "utils/dateUtils";
import { mapGetters } from "vuex";
import rsCode from "../../../utils/rsCode";
import { getSysRegionByIds } from "api/vehicle/vehicleInfo/";
import { getAllZone } from "api/base_info/constant/";
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElButton from "../../../../node_modules/element-ui/packages/button/src/button.vue";
} from 'api/order/rentVehicle'
import { timestamp2Date } from 'utils/dateUtils'
import { mapGetters } from 'vuex'
import rsCode from '../../../utils/rsCode'
import { getSysRegionByIds } from 'api/vehicle/vehicleInfo/'
import { getAllZone } from 'api/base_info/constant/'
import ElRow from 'element-ui/packages/row/src/row'
import ElCol from 'element-ui/packages/col/src/col'
import ElButton from '../../../../node_modules/element-ui/packages/button/src/button.vue'
export default {
name: "branchCompanyStock",
name: 'branchCompanyStock',
components: {
ElButton,
ElCol,
......@@ -476,11 +460,14 @@ export default {
},
data() {
return {
bigPicTitle: '查看',
bigPicPop: false,
priceUrl: '',
pictureList: [],
dedDetail: [],
depositRefundRecord: [],
dedTotal: "",
Tel: "",
dedTotal: '',
Tel: '',
form: {
couponAmount: undefined,
crtHost: undefined,
......@@ -500,10 +487,10 @@ export default {
orderAmount: undefined,
orderOrigin: undefined,
orderVehicleCrosstownDto: {
licenseIdCard: "",
licenseImg: "",
licenseName: "",
licensePhone: ""
licenseIdCard: '',
licenseImg: '',
licenseName: '',
licensePhone: ''
},
orderRentVehicleDetail: {
bookRecordId: undefined,
......@@ -551,7 +538,7 @@ export default {
},
orderVehicleCrosstownVisible: false,
rentDialogVisible: false, //租车详情弹框
modalTitle: "订单详情",
modalTitle: '订单详情',
illegalVisible: false, //违章查询弹框
detailVisible: false,
rules: {
......@@ -588,14 +575,14 @@ export default {
type: undefined
},
dialogFormVisible: false,
dialogStatus: "",
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
allZoneArr: [], //全部片区
allBranchCompany: [],
tourCostDetail: "",
damageSafe: "",
tourCostDetail: '',
damageSafe: '',
serviceCost: 0,
orderReturnVehicleCrosstown: {
crtTime: undefined,
......@@ -640,177 +627,177 @@ export default {
}
]
}
};
}
},
created() {
let t = this;
let query = localStorage.getItem("rentVehicleInfo");
let t = this
let query = localStorage.getItem('rentVehicleInfo')
this.listQuery.no = this.$route.query.id || null
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.type){
t.listQuery.type = queryJson.type;
if (query != 'null' && query) {
let queryJson = JSON.parse(query)
if (queryJson.type) {
t.listQuery.type = queryJson.type
}
if(queryJson.vehicleCode){
t.listQuery.vehicleCode = queryJson.vehicleCode;
if (queryJson.vehicleCode) {
t.listQuery.vehicleCode = queryJson.vehicleCode
}
if(queryJson.page){
t.listQuery.page = queryJson.page;
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.no){
t.listQuery.no = queryJson.no;
if (queryJson.no) {
t.listQuery.no = queryJson.no
}
if(queryJson.status){
t.listQuery.status = queryJson.status;
if (queryJson.status) {
t.listQuery.status = queryJson.status
}
if(queryJson.startTime){
t.listQuery.startTime = queryJson.startTime;
if (queryJson.startTime) {
t.listQuery.startTime = queryJson.startTime
}
if(queryJson.endTime){
t.listQuery.endTime = queryJson.endTime;
if (queryJson.endTime) {
t.listQuery.endTime = queryJson.endTime
}
if(queryJson.realName){
t.listQuery.realName = queryJson.realName;
if (queryJson.realName) {
t.listQuery.realName = queryJson.realName
}
if(queryJson.plateNumber){
t.listQuery.plateNumber = queryJson.plateNumber;
if (queryJson.plateNumber) {
t.listQuery.plateNumber = queryJson.plateNumber
}
}
this.getList();
this.btn_del = this.elements["branchCompany/stockApply:btn_delete"];
this.getList()
this.btn_del = this.elements['branchCompany/stockApply:btn_delete']
this.order_btn_order_violcation_save = this.elements[
"order:btn_order_violcation_save"
];
'order:btn_order_violcation_save'
]
},
computed: {
...mapGetters(["elements"]),
...mapGetters(['elements']),
provinceRegions() {
return getSonRegionByCodes(1);
return getSonRegionByCodes(1)
},
//获取大区列表
getAllZoneList() {
return getAllZone();
return getAllZone()
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
return null
}
return getSonRegionByCodes(this.form.addrProvince);
return getSonRegionByCodes(this.form.addrProvince)
}
},
methods: {
//取消订单
cancel(row) {
this.$confirm("此操作将取消该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('此操作将取消该订单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
cancelReason: "后台取消",
cancelReason: '后台取消',
appUserId: row.userId
};
}
calculate(row.no, params).then(data => {
if (data.status == 200) {
this.$notify({
title: "成功",
title: '成功',
message: '取消订单成功',
type: "success",
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: '取消订单失败',
type: "success",
type: 'success',
duration: 2000
});
})
}
});
});
})
})
},
handleOrderDetail(row) {
this.form = row;
this.form = row
if (this.form.status == 2) {
this.form.ststusName = "取消";
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = "待付款";
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = "待出行";
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = "出行中";
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = "已完成";
this.form.ststusName = '已完成'
}
if (this.form.status == -1) {
this.form.ststusName = "定损中";
this.form.ststusName = '定损中'
}
this.form.orderRentVehicleDetail.startTime = this.form
.orderRentVehicleDetail.startTime
? timestamp2Date(this.form.orderRentVehicleDetail.startTime)
: "";
: ''
this.form.orderRentVehicleDetail.endTime = this.form
.orderRentVehicleDetail.endTime
? timestamp2Date(this.form.orderRentVehicleDetail.endTime)
: "";
: ''
if (this.form.orderRentVehicleDetail.costDetail) {
try {
this.costDetail = JSON.parse(
this.form.orderRentVehicleDetail.costDetail
);
var cost = "";
)
var cost = ''
if (this.costDetail.children) {
this.costDetail.children.forEach(function(a) {
var detail = a.detail == undefined ? "" : a.detail;
cost += a.key + ":" + detail + " ";
});
var detail = a.detail == undefined ? '' : a.detail
cost += a.key + ':' + detail + ' '
})
}
} catch (e) {
this.templateModel();
this.templateModel()
}
}
this.tourCostDetail = cost;
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600;
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.rentDialogVisible = true;
this.rentDialogVisible = true
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e) {
this.rentDialogVisible = false;
this.rentDialogVisible = false
if (e) {
this.getList();
this.getList()
}
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row) {
this.currentRow = row;
this.illegalVisible = true;
this.currentRow = row
this.illegalVisible = true
},
/**
* 操作-查看详情按钮,显示详情弹框
*/
detailInquiry(row) {
this.currentRow = row;
this.detailVisible = true;
this.currentRow = row
this.detailVisible = true
},
/**
* 关闭违章查询弹框
* */
illegalEvent(params) {
this.illegalVisible = false;
this.illegalVisible = false
if (params) {
// console.log(params);
}
......@@ -819,262 +806,275 @@ export default {
* 关闭违章查询弹框
* */
detailEvent(params) {
this.detailVisible = false;
this.detailVisible = false
if (params) {
// console.log(params);
}
},
handleHandoverOrderVehicle(row) {
// console.log(row);
this.modalTitle = "交车记录";
this.form = row;
this.modalTitle = '交车记录'
this.form = row
if (this.form.status == 2) {
this.form.ststusName = "取消";
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = "待付款";
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = "待出行";
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = "出行中";
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = "已完成";
this.form.ststusName = '已完成'
}
if (this.form.status == -1) {
this.form.ststusName = "定损中";
this.form.ststusName = '定损中'
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(
this.form.orderRentVehicleDetail.startTime
);
)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(
this.form.orderRentVehicleDetail.endTime
);
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail);
var cost = "";
)
this.costDetail = JSON.parse(
this.form.orderRentVehicleDetail.costDetail
)
var cost = ''
if (this.costDetail.children) {
this.costDetail.children.forEach(function(a) {
var detail = a.detail == undefined ? "" : a.detail;
cost += a.key + ":" + detail + " ";
});
var detail = a.detail == undefined ? '' : a.detail
cost += a.key + ':' + detail + ' '
})
}
this.tourCostDetail = cost;
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600;
}
this.orderVehicleQuery.orderId = this.form.id;
this.orderVehicleQuery.type = 1;
this.getAllOrderVehicleCrosstown();
this.handover = true;
this.returnVehicle = false;
this.vehicleDetail = true;
this.depositDetail = false;
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 1
this.getAllOrderVehicleCrosstown()
this.handover = true
this.returnVehicle = false
this.vehicleDetail = true
this.depositDetail = false
},
//查看大图
lookPic(val) {
if (!!val) {
this.priceUrl = val
this.bigPicPop = true
}
},
getAllOrderVehicleCrosstown() {
getOrderVehicleCrosstown(this.orderVehicleQuery).then(response => {
// console.log(response);
if (response.data.length <= 0) {
alert("交还车记录不存在");
alert('交还车记录不存在')
} else {
this.orderVehicleCrosstownVisible = true;
this.orderReturnVehicleCrosstown = response.data[0];
this.orderVehicleCrosstownVisible = true
this.orderReturnVehicleCrosstown = response.data[0]
if (response.data[0].imgs) {
this.otherImg = response.data[0].imgs.split(",");
this.otherImg = response.data[0].imgs.split(',')
}
}
});
})
},
handleReturnOrderVehicle(row) {
// console.log(row);
this.modalTitle = "还车记录";
this.form = row;
this.modalTitle = '还车记录'
this.form = row
if (this.form.status == 2) {
this.form.ststusName = "取消";
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = "待付款";
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = "待出行";
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = "出行中";
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = "已完成";
this.form.ststusName = '已完成'
}
if (this.form.status == -1) {
this.form.ststusName = "定损中";
this.form.ststusName = '定损中'
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(
this.form.orderRentVehicleDetail.startTime
);
)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(
this.form.orderRentVehicleDetail.endTime
);
this.costDetail = JSON.parse(this.form.orderRentVehicleDetail.costDetail);
var cost = "";
)
this.costDetail = JSON.parse(
this.form.orderRentVehicleDetail.costDetail
)
var cost = ''
if (this.costDetail.children) {
this.costDetail.children.forEach(function(a) {
var detail = a.detail == undefined ? "" : a.detail;
cost += a.key + ":" + detail + " ";
});
var detail = a.detail == undefined ? '' : a.detail
cost += a.key + ':' + detail + ' '
})
}
this.tourCostDetail = cost;
this.tourCostDetail = cost
if (this.form.orderRentVehicleDetail.driverType == 1) {
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600;
}
this.orderVehicleQuery.orderId = this.form.id;
this.orderVehicleQuery.type = 2;
this.getAllOrderVehicleCrosstown();
this.returnVehicle = true;
this.handover = false;
this.vehicleDetail = true;
this.depositDetail = false;
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.orderVehicleQuery.orderId = this.form.id
this.orderVehicleQuery.type = 2
this.getAllOrderVehicleCrosstown()
this.returnVehicle = true
this.handover = false
this.vehicleDetail = true
this.depositDetail = false
},
handleRefundVehicle(row) {
// console.log(row);
var that = this;
that.pictureList = [];
that.dedDetail = [];
that.depositRefundRecord = [];
that.dedTotal = 0;
that.Tel = "";
var that = this
that.pictureList = []
that.dedDetail = []
that.depositRefundRecord = []
that.dedTotal = 0
that.Tel = ''
getStep(row.no).then(response => {
response.data.forEach(function(item) {
if (item.type != 1) {
that.Tel = item.customerPhone;
that.type = item.type;
that.Tel = item.customerPhone
that.type = item.type
if (item.dedDetail) {
var dedTotal = 0;
var dedDetail = JSON.parse(item.dedDetail);
that.dedDetail = dedDetail;
var dedTotal = 0
var dedDetail = JSON.parse(item.dedDetail)
that.dedDetail = dedDetail
dedDetail.forEach(function(item) {
dedTotal += Number(item.cost);
});
that.dedTotal = dedTotal.toFixed(2);
dedTotal += Number(item.cost)
})
that.dedTotal = dedTotal.toFixed(2)
}
item.depositRefundRecord.forEach(function(itm) {
itm.updTimeStr = timestamp2Date(itm.updTime);
itm.updTimeStr = timestamp2Date(itm.updTime)
if (itm.status == 3) {
itm.endTimeStr = timestamp2Date(
Number(itm.updTime) + 2592000000
);
)
if (itm.orderViolation) {
if (itm.orderViolation.picture) {
var Arr = itm.orderViolation.picture.split(",");
var arrivalPicList = [];
var Arr = itm.orderViolation.picture.split(
','
)
var arrivalPicList = []
Arr.map(function(it) {
arrivalPicList.push(it);
});
itm.pictureList = arrivalPicList;
arrivalPicList.push(it)
})
itm.pictureList = arrivalPicList
}
}
}
});
})
if (item.type == 3) {
var arr = item.depositRefundRecord;
var item = arr.shift();
arr.push(item);
var arr = item.depositRefundRecord
var item = arr.shift()
arr.push(item)
} else {
var arr = item.depositRefundRecord;
var arr = item.depositRefundRecord
}
that.depositRefundRecord = arr;
that.depositRefundRecord = arr
// console.log(that.depositRefundRecord);
}
});
});
this.modalTitle = "押金记录";
this.form = row;
})
})
this.modalTitle = '押金记录'
this.form = row
if (this.form.status == 2) {
this.form.ststusName = "取消";
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = "待付款";
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = "待出行";
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = "出行中";
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = "已完成";
this.form.ststusName = '已完成'
}
if (this.form.status == -1) {
this.form.ststusName = "定损中";
this.form.ststusName = '定损中'
}
this.form.orderRentVehicleDetail.startTime = timestamp2Date(
this.form.orderRentVehicleDetail.startTime
);
)
this.form.orderRentVehicleDetail.endTime = timestamp2Date(
this.form.orderRentVehicleDetail.endTime
);
this.orderVehicleCrosstownVisible = true;
this.vehicleDetail = false;
this.depositDetail = true;
)
this.orderVehicleCrosstownVisible = true
this.vehicleDetail = false
this.depositDetail = true
},
//监听change事件
getProvinceRegions(item) {
this.listQuery.zoneId = item;
this.baranchQuery.zoneId = item;
this.listQuery.startCompanyId = undefined;
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
this.listQuery.startCompanyId = undefined
getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
this.allBranchCompany = response.data;
});
this.allBranchCompany = response.data
})
},
getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item;
this.listQuery.startCompanyId = item
},
handleCancel(row) {
this.$confirm("此操作将放弃购买, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelApply(row.id).then(() => {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
})
this.getList()
})
})
},
handleDelete(row) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delObj(row.id).then(() => {
this.$notify({
title: "成功",
message: "删除成功",
type: "success",
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
})
const index = this.list.indexOf(row)
this.list.splice(index, 1)
})
})
},
handleFilter() {
this.listQuery.page = 1;
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
this.getList()
} else {
return false;
return false
}
});
})
},
clearSearch() {
this.listQuery = {
......@@ -1087,14 +1087,14 @@ export default {
endTime: undefined,
zoneId: undefined,
startCompanyId: undefined
};
this.getList();
}
this.getList()
},
/**
* 获取订单列表
*/
getList() {
this.listLoading = true;
this.listLoading = true
// if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime();
......@@ -1102,57 +1102,65 @@ export default {
// if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime();
// }
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
if (this.listQuery) {
localStorage.setItem(
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
}
page(this.listQuery).then(response => {
if (response.data.data) {
response.data.data.map(function(el) {
// console.log(el);
if (el.status == 2) {
el.ststusName = "取消";
el.ststusName = '取消'
}
if (el.status == 3) {
el.ststusName = "待付款";
el.ststusName = '待付款'
}
if (el.status == 4) {
el.ststusName = "待出行";
el.ststusName = '待出行'
}
if (el.status == 5) {
el.ststusName = "出行中";
el.ststusName = '出行中'
}
if (el.status == 6) {
el.ststusName = "已完成";
el.ststusName = '已完成'
}
if (el.status == -1) {
el.ststusName = "定损中";
el.ststusName = '定损中'
}
});
})
}
this.list = response.data.data;
this.list = response.data.data
this.total = response.data.totalCount;
this.listLoading = false;
});
this.total = response.data.totalCount
this.listLoading = false
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
this.listQuery.limit = val
if (this.listQuery) {
localStorage.setItem(
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
}
this.getList()
},
dateFormat(timestamp) {
let date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, "yyyy-MM-dd hh:mm:ss");
let date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
},
handleCurrentChange(val) {
this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("rentVehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
this.listQuery.page = val
if (this.listQuery) {
localStorage.setItem(
'rentVehicleInfo',
JSON.stringify(this.listQuery)
)
}
this.getList()
},
templateModel() {
this.costDetail = {
......@@ -1165,10 +1173,10 @@ export default {
val: undefined
}
]
};
}
}
};
}
}
</script>
<style scpoed>
......
......@@ -38,7 +38,7 @@
<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-form-item label="提车公司" prop="subordinateBranch">
<el-autocomplete
class="inline-input"
......@@ -115,12 +115,16 @@
</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">
......@@ -411,7 +415,7 @@
style="margin-bottom:10px"
>
<el-card>
<img :src="item" class="image" />
<img :src="item" class="image" @click="lookPic(item)" />
</el-card>
</el-col>
</el-row>
......@@ -425,7 +429,14 @@
type="primary"
style="padding: 7px 9px;"
@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-form-item>
</el-col>
......@@ -460,7 +471,7 @@
style="margin-bottom:10px"
>
<el-card>
<img :src="item" class="image" />
<img :src="item" class="image" @click="lookPic(item)" />
</el-card>
</el-col>
</el-row>
......@@ -484,6 +495,10 @@
</div>
</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>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
......@@ -738,6 +753,9 @@ export default {
},
data() {
return {
priceUrl: '',
bigPicPop: false,
bigPicTitle: '',
returnForm: {
retCompany: ''
},
......@@ -929,7 +947,7 @@ export default {
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: "",
liftCompanyName: '',
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
......@@ -1061,56 +1079,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']
......@@ -1146,6 +1164,12 @@ export default {
}
},
methods: {
//查看大图
lookPic(val) {
this.priceUrl = val;
this.bigPicPop = true;
this.bigPicTitle = '图片放大'
},
/**
* 重置
* */
......@@ -1156,16 +1180,19 @@ export default {
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: "",
liftCompanyName: '',
numberPlate: undefined,
selectedMonth: undefined,
status: 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() {
if (this.returnForm.retCompany == '') {
......@@ -1185,9 +1212,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: '失败',
......@@ -1348,10 +1375,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
......@@ -1383,12 +1410,12 @@ 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);
console.log(item)
},
cancelDialog4Lift(formName) {
this.dialogForm4LiftVisible = false
......@@ -1597,8 +1624,11 @@ 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 {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -130,7 +130,7 @@
<div style="color: #bfcbd9;font-size: 14px;">
现在位置:{{scope.row.parkCompanyName}}
</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>
</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