Commit d9528a91 authored by guoyou's avatar guoyou

后台优化

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