Commit 6b228177 authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

# Conflicts:
#	src/router/index.js
#	src/views/admin/user/index.vue
parents 2cae7524 876f3491
module.exports = {
NODE_ENV: '"production"',
// BASE_API: '"http://113.105.137.152:9800"',
BASE_API: '"https://xxfcmgmt.upyuns.com"',
BASE_API: '"https://mgmt.dfangche.com"',
APP_ORIGIN: '"https://wallstreetcn.com"'
};
......@@ -53,3 +53,30 @@ export function ret(data) {
data: data
});
}
/**
* 根据id获取一条违章查询记录
* @param query
*/
export function getOneIllegalRow(id) {
return fetch({
url: '/api/order/orderViolation/getOne/' + id,
method: 'get'
});
}
/**
* 保存违章记录
* @param query
* {price:图片地址(多个逗号分割)
price:退款总金额
detailId:租车订单id
}
*/
export function saveOrderViolation(params) {
return fetch({
url: '/vehicle/departure/app/save',
method: 'post',
data: params
});
}
\ No newline at end of file
......@@ -77,7 +77,7 @@ export const constantRouterMap = [{
component: _import('error/401'),
hidden: true
},
{
{
path: '/',
component: Layout,
redirect: '/dashboard',
......@@ -87,7 +87,19 @@ export const constantRouterMap = [{
path: 'dashboard',
component: _import('dashboard/index')
}]
},
},
// {
// path: '/',
// component: Layout,
// redirect: '/baseManager/userManager',
// name: '首页',
// hidden: true,
// children: [{
// path: 'userManager',
// component: _import('admin/user/index')
// }]
// },
{
path: '/introduction',
component: Layout,
......
<template>
<div class="app-container calendar-list-container">
<div class="app-container calendar-list-container">
<div class="filter-container">
<el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="姓名或账户"
v-model="listQuery.name"></el-input>
<el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="姓名或账户" v-model="listQuery.name"> </el-input>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" v-if="userManager_btn_add" style="margin-left: 10px;" @click="handleCreate"
type="primary" icon="edit">添加
</el-button>
<el-button class="filter-item" v-if="userManager_btn_add" style="margin-left: 10px;" @click="handleCreate" type="primary" icon="edit">添加</el-button>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%">
<el-table-column align="center" label="序号" width="65">
<template scope="scope">
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row style="width: 100%">
<el-table-column align="center" label="序号" width="65"> <template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="姓名">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="200" align="center" label="姓名"> <template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="账户">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="110" align="center" label="账户"> <template scope="scope">
<span>{{scope.row.username}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="性别">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="110" align="center" label="性别"> <template scope="scope">
<span>{{scope.row.sex}}</span>
</template>
</el-table-column>
<el-table-column width="300" align="center" label="备注">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="300" align="center" label="备注"> <template scope="scope">
<span>{{scope.row.description}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="最后时间">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="180" align="center" label="最后时间"> <template scope="scope">
<span>{{scope.row.updTime}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="最后更新人">
<template scope="scope">
</template> </el-table-column>
<el-table-column width="200" align="center" label="最后更新人"> <template scope="scope">
<span>{{scope.row.updName}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="150">
<template scope="scope">
</template> </el-table-column>
<el-table-column align="center" label="操作" width="150"> <template scope="scope">
<el-button v-if="userManager_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button>
<el-button v-if="userManager_btn_del" size="small" type="danger" @click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>
</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>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
......@@ -77,17 +55,17 @@
</el-form-item>
<el-form-item label="性别">
<el-select class="filter-item" v-model="form.sex" placeholder="请选择">
<el-option v-for="item in sexOptions" :key="item" :label="item" :value="item"></el-option>
<el-option v-for="item in sexOptions" :key="item" :label="item" :value="item"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="是否开启" prop="status">
<el-radio-group class="filter-item" v-model.number="form.status">
<el-radio-group class="filter-item" v-model.number="form.status" >
<el-radio v-for="item in statusOptions" :key="item.val" :label="item.id">{{item.val}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="所属片区" prop="zoneId">
<el-select class="filter-item" v-model="form.zoneId" clearable placeholder="请选择" @change="getProvinceRegions">
<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-form-item label="所属分公司" prop="companyId">
......@@ -99,7 +77,7 @@
<!--@select="handleSelectSubordinate"-->
<!--&gt;</el-autocomplete>-->
<el-select class="filter-item" v-model="form.companyId" clearable filterable placeholder="请选择分公司">
<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-form-item label="所属角色" prop="members">
......@@ -434,6 +412,7 @@
for (let i = 0; i < result.data.length; i++) {
mems.push(result.data[i].id);
}
this.membersName = result.data[0].name
this.$set(this.form, "members", mems)
}
});
......
......@@ -357,7 +357,7 @@
res.data.list.forEach(function (item) {
item.price = item.price / 1000 + ",000";
item.width = (item.total - item.balance) / item.total * 100 + "px";
item.companyPic = "https://xxfcmgmt.upyuns.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
item.companyPic = "https://mgmt.dfangche.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
allList.push(item);
});
this.lastPage = res.data.lastPage;
......@@ -394,7 +394,7 @@
res.data.list.forEach(function (item) {
item.price = item.price / 1000 + ",000";
item.width = (item.total - item.balance) / item.total * 100 + "px";
item.companyPic = "https://xxfcmgmt.upyuns.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
item.companyPic = "https://mgmt.dfangche.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
allList.push(item);
});
this.list = allList;
......
......@@ -231,7 +231,7 @@
res.data.list.forEach(function (item) {
item.price = item.price / 10000;
item.width = (item.total - item.balance) / item.total * 100 + "px";
item.companyPic = "https://xxfcmgmt.upyuns.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
item.companyPic = "https://mgmt.dfangche.com/vehicle/branchCompany/stock/download/companyPic?realFileRelPath=" + item.companyPic;
allList.push(item);
});
if(res.data.list.length< this.listQuery.limit && allList.length>0){
......
......@@ -5,7 +5,7 @@
<el-form-item label="申请状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择申请状态">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in getAllBookRecordStatus() " :key="val.code" :label="val.val"
<el-option v-for="(val, key, index) in statusList " :key="val.code" :label="val.val"
:value="val.code"></el-option>
</el-select>
</el-form-item>
......@@ -20,7 +20,7 @@
</el-select>
</el-form-item>
<el-form-item label="所属公司">
<el-form-item label="停靠公司">
<el-select class="filter-item" v-model="listQuery.liftCompany" placeholder="请选择" @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>
......@@ -50,7 +50,7 @@
<el-table-column align="center" label="停靠公司" width="120">
<template scope="scope">
<span>{{scope.row.parkCompanyName}}</span>
<span>{{scope.row.liftCompanyName}}</span>
</template>
</el-table-column>
......@@ -189,18 +189,18 @@
</el-table-column>
<el-table-column align="center" label="操作" width="250">
<template scope="scope">
<el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button>
<el-button v-if="scope.row.haveViolation" size="small" type="success" @click="weizhang(scope.row)">违章记录</el-button>
<!-- <el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button> -->
<el-button size="small" type="success" v-if="scope.row.status==3" @click="illegalInquiry(scope.row)">违章记录</el-button>
<el-button v-if="bookRecord_btn_prove&&scope.row.status==1" size="small" type="success" @click="handleProve(scope.row)">通过
</el-button>
<el-button v-if="bookRecord_btn_reject&&scope.row.status==1" size="small" type="danger" @click="handleReject(scope.row)">驳回
</el-button>
<el-button v-if="bookRecord_btn_lift && checkIfProved(scope.row.status)" size="small" type="success"
<!-- <el-button v-if="bookRecord_btn_lift && checkIfProved(scope.row.status)" size="small" type="success"
@click="handleLift(scope.row)">提车
</el-button>
<el-button v-if="bookRecord_btn_ret && checkIfLift(scope.row.status)" size="small" type="success"
@click="handleRet(scope.row)">还车
</el-button>
</el-button> -->
<el-button v-if="bookRecord_btn_unbook && checkIfProved(scope.row.status)" size="small" type="danger"
@click="handleUnbook(scope.row)">取消预定
</el-button>
......@@ -242,19 +242,19 @@
</el-col>
<el-col :span="12">
<el-form-item label="车辆编号">
<span v-if="detailItem.vehicleDepartureLogVo">{{detailItem.vehicleDepartureLogVo.vehicleId}}</span>
<span>{{detailItem.vehicleId}}</span>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="当前停靠公司">
<span>{{detailItem.parkCompanyName}}</span>
<span>{{detailItem.liftCompanyName}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="申请账号">
<span></span>
<span>{{detailItem.bookUserName}}</span>
<span style="margin-left:10px"></span>
</el-form-item>
</el-col>
......@@ -294,7 +294,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="备注">
<span></span>
<span>{{detailItem.remark}}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -358,7 +358,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="审核人操作">
<span></span>
<span>{{detailItem.reviewerNameApply}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -439,6 +439,38 @@
</div>
</el-dialog>
<el-dialog title="违章查询" :visible.sync="illegalVisible">
<el-form>
<el-row>
<el-col>
<el-form-item label="违章截图" :style="{display:'block'}">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
action="https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload"
:on-remove="handleRemove"
:file-list="fileList2"
:on-success="handleSuccess"
list-type="picture-card">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="违章罚款">
<el-input v-model="price" type="number" placeholder="请输入违章罚款金额" style="width: 50%;margin-right:10px"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="okHandler('form')">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -450,7 +482,9 @@
getObj,
lift,
ret,
unbook
unbook,
getOneIllegalRow,
saveOrderViolation
} from 'api/vehicle/bookRecord';
......@@ -477,7 +511,9 @@
deepCopyDate,
newEast8Date
} from 'utils/dateUtils';
import {
getToken
} from '../../../utils/auth';
import {
BOOK_RECORD_STATUS_APPLY,
BOOK_RECORD_STATUS_PROVED,
......@@ -495,6 +531,40 @@
},
data() {
return {
statusList:[
{
code:'1',
val:'申请中'
},
{
code:'2',
val:'已通过'
},
{
code:'3',
val:'已归还'
},
{
code:'4',
val:'拒绝'
},
{
code:'5',
val:'逾期归还'
},
{
code:'6',
val:'取消预订'
},
{
code:'7',
val:'已提车'
},
],
detailId:'',
illegalVisible:false,
price: undefined,//违章罚款金额
fileList2:[],//违章截图
detailItem:{},
dialogDetailVisible:false,
baranchQuery: {
......@@ -504,17 +574,7 @@
allBranchCompany:[],
state2: '',//搜索-分公司名称
rules4Query: {
selectedMonth4Query: [
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(this.selectedMonth4Query) || !this.$utils.isDate(this.selectedMonth4Query)) {
return callback(new Error('请选择月份'));
}
callback();
},
trigger: 'blur'
}
]
},
list: null,
total: null,
......@@ -525,7 +585,7 @@
zoneId:undefined,
liftCompany: undefined,
numberPlate: undefined,
selectedMonth: formatDate(newEast8Date(), 'yyyy-MM'),
selectedMonth: undefined,
status: undefined
},
inline: true,
......@@ -660,6 +720,9 @@
'elements',
'bookRecordStatus'
]),
getHeaderWithToken() {
return {Authorization: getToken()};
},
//获取大区列表
getAllZoneList(){
return getAllZone();
......@@ -681,6 +744,84 @@
}
},
methods: {
/**
* 确定
* */
okHandler() {
let arr = [];
this.fileList2.map(function(item){
arr.push(item.url);
});
let params = {
illegalPic:arr.join(","),
illegalAmount:this.price,
id: this.detailId,
};
saveOrderViolation(params).then(response => {
if (response.status === 200) {
this.$notify({
title: '成功',
message: '创建成功',
type: 'success',
duration: 2000
});
this.illegalVisible = false;
this.getList();
} else {
this.$notify({
title: '创建失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
}
});
},
/**
* 上传成功
* */
handleSuccess(res, file) {
let c = {url: res.data};
this.fileList2.push(c);
this.showLoadingBody = false;
},
/**
* 删除违章图片
* */
handleRemove(file, fileList){
this.fileList2 = fileList;
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row){
var t = this;
this.fileList2 = [];
this.price = '';
if(row.vehicleDepartureLogVo.illegalPic){
let arr = row.vehicleDepartureLogVo.illegalPic.split(",");
let fileList2 = [];
let p = {};
arr.map(function(item){
p = {
url: item
};
fileList2.push(p);
});
t.fileList2 = fileList2;
}
if(row.vehicleDepartureLogVo.illegalAmount){
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount);
}
this.detailId = row.vehicleDepartureLogVo.id;
this.illegalVisible = true;
},
/**
* 弹框-取消
* */
cancel() {
this.illegalVisible = false;
},
handleDetail(row){
this.detailItem = row;
this.dialogDetailVisible = true;
......@@ -1020,7 +1161,14 @@
}).then(() => {
unbook(row.id)
.then(response => {
if (response.code === rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED) {
if(response.status==500){
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}else if (response.code === rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED) {
this.$notify({
title: '失败',
message: rsCode.msg[rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED],
......@@ -1043,7 +1191,11 @@
});
}
this.getList();
});
}).catch(response=>{
console.log(response)
}
);
});
},
resetTemp4Lift() {
......
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