Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system-vue
This commit is contained in:
commit
095a1d913a
@ -41,7 +41,7 @@
|
||||
"url": "https://github.com/YunaiV/ruoyi-vue-pro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.18.4",
|
||||
"@babel/parser": "^7.18.4",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.27.2",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
|
10
src/api/Map/map.js
Normal file
10
src/api/Map/map.js
Normal file
@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询救援信息列表
|
||||
export function getmap(id) {
|
||||
return request({
|
||||
url: '/rescue/rescue_driver_position/listByInfoId?rescueInfoId='+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
29
src/api/rescue/driver.js
Normal file
29
src/api/rescue/driver.js
Normal file
@ -0,0 +1,29 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function driverList(query) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/driverList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function addDriver(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/addDriver',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateDriver(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/updateDriver',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function delDriver(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/delDriver?ids='+data,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
93
src/api/rescue/info.js
Normal file
93
src/api/rescue/info.js
Normal file
@ -0,0 +1,93 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询【请填写功能名称】列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/list2',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function moneyManagement(query) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/moneyManagement',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function moneyManagementData(query) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/moneyManagementData',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function routeInfo(id) {
|
||||
return request({
|
||||
url: '/rescue/rescue_driver_position/routeInfo?rescueInfoId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询【请填写功能名称】详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/system/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function watchImg(id) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/watchImg?rescueId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增【请填写功能名称】
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
url: '/system/info',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改【请填写功能名称】
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除【请填写功能名称】
|
||||
export function delInfo(id) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function getDriver() {
|
||||
return request({
|
||||
url: '/app/rescueInfo/driverList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function designateDriver(rescueId,driverId) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/designateDriver?rescueId='+rescueId+'&driverId='+driverId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
export function returnOrder(data) {
|
||||
return request({
|
||||
url: '/system/rescueOrderReturn',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
86
src/components/Map/index.vue
Normal file
86
src/components/Map/index.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="container" style="width:100%;height:50vh" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data () {
|
||||
return {
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(this.getPosition);
|
||||
} else {
|
||||
console.log('浏览器不支持Geolocation API');
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getPosition(position) {
|
||||
this.latitude = position.coords.latitude;
|
||||
this.longitude = position.coords.longitude;
|
||||
console.log(`当前位置的经度为:${this.longitude},纬度为:${this.latitude}`);
|
||||
},
|
||||
// 初始化地图
|
||||
initMap (datas) {
|
||||
var that = this
|
||||
this.map = new AMap.Map('container', {
|
||||
resizeEnable: true, // 窗口大小调整
|
||||
center: datas[1], // 中心
|
||||
zoom: 5
|
||||
})
|
||||
// 添加maker
|
||||
this.marker = new AMap.Marker({
|
||||
map: this.map,
|
||||
position: datas[1],
|
||||
icon: 'https://webapi.amap.com/images/car.png',
|
||||
offset: new AMap.Pixel(-26, -13), // 调整图片偏移
|
||||
autoRotation: true, // 自动旋转
|
||||
angle: -90 // 图片旋转角度
|
||||
})
|
||||
that.initroad(datas)
|
||||
},
|
||||
// 初始化轨迹
|
||||
initroad (datas) {
|
||||
// 绘制还未经过的路线
|
||||
this.polyline = new AMap.Polyline({
|
||||
map: this.map,
|
||||
path: datas,
|
||||
showDir: true,
|
||||
strokeColor: '#77DDFF', // 线颜色--浅蓝色
|
||||
// strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 6, // 线宽
|
||||
// strokeStyle: "solid" //线样式
|
||||
lineJoin: 'round' // 折线拐点的绘制样式
|
||||
})
|
||||
// 绘制路过了的轨迹
|
||||
var passedPolyline = new AMap.Polyline({
|
||||
map: this.map,
|
||||
strokeColor: '#00BBFF', // 线颜色-深蓝色
|
||||
path: datas
|
||||
,
|
||||
// strokeOpacity: 1, //线透明度
|
||||
strokeWeight: 6 // 线宽
|
||||
// strokeStyle: "solid" //线样式
|
||||
})
|
||||
this.map.setFitView() // 合适的视口
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -145,7 +145,6 @@
|
||||
<ImageUpload v-model="formData.carLicenseImg"/>
|
||||
</el-form-item>
|
||||
</el-collapse-item>
|
||||
|
||||
</el-collapse>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
250
src/views/rescue/Locations.vue
Normal file
250
src/views/rescue/Locations.vue
Normal file
@ -0,0 +1,250 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="地点" prop="dictLabel">
|
||||
<el-input
|
||||
v-model="queryParams.searchValue"
|
||||
placeholder="请输入账号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="排序" align="center" prop="dictSort" />
|
||||
|
||||
<el-table-column label="扣车地址" align="center" prop="dictLabel">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
|
||||
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.dictLabel}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="显示排序" prop="dictSort">
|
||||
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="扣车地址" prop="dictLabel">
|
||||
<el-input v-model="form.dictLabel" placeholder="请输入账号" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getKcPosition,addKcPosition,delKcPosition} from "./api/Locations";
|
||||
|
||||
export default {
|
||||
name: "Data",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 字典表格数据
|
||||
dataList: [],
|
||||
// 默认字典类型
|
||||
defaultDictType: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 数据标签回显样式
|
||||
listClassOptions: [
|
||||
{
|
||||
value: "default",
|
||||
label: "默认"
|
||||
},
|
||||
{
|
||||
value: "primary",
|
||||
label: "主要"
|
||||
},
|
||||
{
|
||||
value: "success",
|
||||
label: "成功"
|
||||
},
|
||||
{
|
||||
value: "info",
|
||||
label: "信息"
|
||||
},
|
||||
{
|
||||
value: "warning",
|
||||
label: "警告"
|
||||
},
|
||||
{
|
||||
value: "danger",
|
||||
label: "危险"
|
||||
}
|
||||
],
|
||||
// 类型数据字典
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
dictLabel: [
|
||||
{ required: true, message: "数据标签不能为空", trigger: "blur" }
|
||||
],
|
||||
dictValue: [
|
||||
{ required: true, message: "数据键值不能为空", trigger: "blur" }
|
||||
],
|
||||
dictSort: [
|
||||
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getKcPosition(this.queryParams).then(response => {
|
||||
console.log(response)
|
||||
this.dataList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
dictCode: undefined,
|
||||
dictLabel: undefined,
|
||||
dictValue: undefined,
|
||||
cssClass: undefined,
|
||||
listClass: 'default',
|
||||
dictSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 返回按钮操作 */
|
||||
handleClose() {
|
||||
const obj = { path: "/system/dict" };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {}
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加扣车地址";
|
||||
this.form.dictType = this.queryParams.dictType;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictCode)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const dictCode = row.dictCode || this.ids
|
||||
addKcPosition(dictCode).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改字典数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
addKcPosition(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictCodes = row.dictCode || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
|
||||
return delKcPosition(dictCodes);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/data/export', {
|
||||
...this.queryParams
|
||||
}, `data_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
31
src/views/rescue/api/Locations.js
Normal file
31
src/views/rescue/api/Locations.js
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
import request from '@/utils/request'
|
||||
// pid
|
||||
|
||||
|
||||
export function getKcPosition() {
|
||||
return request({
|
||||
url: '/system/rescueInfo/getKcPosition',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
export function addKcPosition(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/addKcPosition',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function delKcPosition(id) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/delKcPosition?dictId=' + id,
|
||||
method: 'post',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
44
src/views/rescue/api/applet.js
Normal file
44
src/views/rescue/api/applet.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询救援信息列表
|
||||
export function listRescue(query) {
|
||||
return request({
|
||||
url: '/rescue/wxRescue/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询救援信息详细
|
||||
export function getRescue(id) {
|
||||
return request({
|
||||
url: '/rescue/rescue/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增救援信息
|
||||
export function addRescue(data) {
|
||||
return request({
|
||||
url: '/rescue/rescue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改救援信息
|
||||
export function updateRescue(data) {
|
||||
return request({
|
||||
url: '/rescue/rescue',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除救援信息
|
||||
export function delRescue(id) {
|
||||
return request({
|
||||
url: '/rescue/wxRescue/del?ids='+id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
44
src/views/rescue/api/carInfo.js
Normal file
44
src/views/rescue/api/carInfo.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询救援车辆信息列表
|
||||
export function listRescueCar(query) {
|
||||
return request({
|
||||
url: '/system/rescueCar/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询救援车辆信息详细
|
||||
export function getRescueCar(id) {
|
||||
return request({
|
||||
url: '/system/rescueCar/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增救援车辆信息
|
||||
export function addRescueCar(data) {
|
||||
return request({
|
||||
url: '/system/rescueCar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改救援车辆信息
|
||||
export function updateRescueCar(data) {
|
||||
return request({
|
||||
url: '/system/rescueCar',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除救援车辆信息
|
||||
export function delRescueCar(id) {
|
||||
return request({
|
||||
url: '/system/rescueCar/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/views/rescue/api/refuelRecord.js
Normal file
44
src/views/rescue/api/refuelRecord.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询加油记录列表
|
||||
export function listRefuelRecord(query) {
|
||||
return request({
|
||||
url: '/rescue/refuelRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询加油记录详细
|
||||
export function getRefuelRecord(id) {
|
||||
return request({
|
||||
url: '/rescue/refuelRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增加油记录
|
||||
export function addRefuelRecord(data) {
|
||||
return request({
|
||||
url: '/rescue/refuelRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改加油记录
|
||||
export function updateRefuelRecord(data) {
|
||||
return request({
|
||||
url: '/rescue/refuelRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除加油记录
|
||||
export function delRefuelRecord(id) {
|
||||
return request({
|
||||
url: '/rescue/refuelRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
55
src/views/rescue/api/rescueCarSpend.js
Normal file
55
src/views/rescue/api/rescueCarSpend.js
Normal file
@ -0,0 +1,55 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询车辆消费管理列表
|
||||
export function listRescueCarSpend(query) {
|
||||
return request({
|
||||
url: '/rescue/rescueCarSpend/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询车辆消费管理详细
|
||||
export function getRescueCarSpend(id) {
|
||||
return request({
|
||||
url: '/rescue/rescueCarSpend/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增车辆消费管理
|
||||
export function addRescueCarSpend(data) {
|
||||
return request({
|
||||
url: '/rescue/rescueCarSpend',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改车辆消费管理
|
||||
export function updateRescueCarSpend(data) {
|
||||
return request({
|
||||
url: '/rescue/rescueCarSpend',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除车辆消费管理
|
||||
export function delRescueCarSpend(id) {
|
||||
return request({
|
||||
url: '/rescue/rescueCarSpend/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function listCar() {
|
||||
return request({
|
||||
url: '/system/rescueCar/list',
|
||||
method: 'get',
|
||||
params: {
|
||||
pageNo:1,
|
||||
pageSize:100
|
||||
}
|
||||
})
|
||||
}
|
28
src/views/rescue/api/rescueConfig.js
Normal file
28
src/views/rescue/api/rescueConfig.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 查询救援司机提成配置详细
|
||||
export function getRescueConfig() {
|
||||
return request({
|
||||
url: '/rescue/rescueConfig/getInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增救援司机提成配置
|
||||
export function addRescueConfig(data) {
|
||||
return request({
|
||||
url: '/rescue/rescueConfig',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改救援司机提成配置
|
||||
export function updateRescueConfig(data) {
|
||||
return request({
|
||||
url: '/rescue/rescueConfig',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
81
src/views/rescue/api/rescueCustomer.js
Normal file
81
src/views/rescue/api/rescueCustomer.js
Normal file
@ -0,0 +1,81 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询救援的客户信息列表
|
||||
export function listRescueCustomer(query) {
|
||||
return request({
|
||||
url: '/rescueCustomer/rescueCustomer/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询救援的客户信息列表
|
||||
export function driverlist(query) {
|
||||
return request({
|
||||
url: '/dept_driver/dept_driver/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询救援的客户信息详细
|
||||
export function getRescueCustomer(id) {
|
||||
return request({
|
||||
url: '/rescueCustomer/rescueCustomer/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增救援的客户信息
|
||||
export function addRescueCustomer(data) {
|
||||
return request({
|
||||
url: '/rescueCustomer/rescueCustomer',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改救援的客户信息
|
||||
export function updateRescueCustomer(data) {
|
||||
return request({
|
||||
url: '/rescueCustomer/rescueCustomer',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除救援的客户信息
|
||||
export function delRescueCustomer(id) {
|
||||
return request({
|
||||
url: '/rescueCustomer/rescueCustomer/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//ai
|
||||
export function getdeptTree() {
|
||||
return request({
|
||||
url: '/system/user/deptTree' ,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function driverList(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/driverList' ,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// /dept_driver/dept_driver
|
||||
export function dept_driver(data) {
|
||||
return request({
|
||||
url: '/dept_driver/dept_driver' ,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function edept_driver(data) {
|
||||
return request({
|
||||
url: '/dept_driver/dept_driver' ,
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
31
src/views/rescue/api/rescueRoad.js
Normal file
31
src/views/rescue/api/rescueRoad.js
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
import request from '@/utils/request'
|
||||
// pid
|
||||
|
||||
|
||||
export function getRescueRoad() {
|
||||
return request({
|
||||
url: '/system/rescueInfo/getRescueRoad',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
export function addRescueRoad(data) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/addRescueRoad',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function delRescueRoad(id) {
|
||||
return request({
|
||||
url: '/system/rescueInfo/delRescueRoad?dictId=' + id,
|
||||
method: 'post',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
295
src/views/rescue/applet.vue
Normal file
295
src/views/rescue/applet.vue
Normal file
@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="顾客名称" prop="customerName">
|
||||
<el-input
|
||||
v-model="queryParams.customerName"
|
||||
placeholder="请输入顾客名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="顾客电话" prop="customerPhone">
|
||||
<el-input
|
||||
v-model="queryParams.customerPhone"
|
||||
placeholder="请输入顾客电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="carNum">
|
||||
<el-input
|
||||
v-model="queryParams.carNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-row :gutter="10" class="mb8">-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['rescue:rescue:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['rescue:rescue:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['rescue:rescue:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['rescue:rescue:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="rescueList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="id" />
|
||||
<el-table-column label="顾客名称" align="center" prop="customerName" />
|
||||
<el-table-column label="顾客电话" align="center" prop="customerPhone" />
|
||||
<el-table-column label="车牌号" align="center" prop="carNum" />
|
||||
<el-table-column label="金额" align="center" prop="amount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.amount/100}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="1微信支付2到店支付" align="center" prop="payType" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType=='1'">微信支付</span>
|
||||
<span v-else>到店支付</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改救援信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="顾客名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" placeholder="请输入顾客名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="顾客电话" prop="customerPhone">
|
||||
<el-input v-model="form.customerPhone" placeholder="请输入顾客电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="carNum">
|
||||
<el-input v-model="form.carNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额单位分" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入金额单位分" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRescue, getRescue, delRescue, addRescue, updateRescue } from "./api/applet";
|
||||
|
||||
export default {
|
||||
name: "Rescue",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 救援信息表格数据
|
||||
rescueList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
customerName: null,
|
||||
customerPhone: null,
|
||||
carNum: null,
|
||||
amount: null,
|
||||
payType: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询救援信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRescue(this.queryParams).then(response => {
|
||||
this.rescueList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
customerName: null,
|
||||
customerPhone: null,
|
||||
carNum: null,
|
||||
amount: null,
|
||||
payType: null,
|
||||
remark: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加救援信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRescue(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改救援信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRescue(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRescue(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id ;
|
||||
this.$modal.confirm('是否确认删除救援信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescue(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescue/rescue/export', {
|
||||
...this.queryParams
|
||||
}, `rescue_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
400
src/views/rescue/carInfo.vue
Normal file
400
src/views/rescue/carInfo.vue
Normal file
@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="车辆类型" prop="rescueCarType">
|
||||
<el-select v-model="queryParams.rescueCarType" placeholder="请选择车辆类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.jyc_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="rescueCarNum">
|
||||
<el-input
|
||||
v-model="queryParams.rescueCarNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="车辆所属" prop="carOwn">-->
|
||||
<!-- <el-select v-model="queryParams.carOwn" placeholder="请选择车辆所属" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.car_own"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="车牌颜色" prop="carLicenseColor">
|
||||
<el-select v-model="queryParams.carLicenseColor" placeholder="请选择车牌颜色" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.car_license_color"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carUseNature">
|
||||
<el-select v-model="queryParams.carUseNature" placeholder="请选择车辆性质" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.car_use_nature"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rescueCarList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="车辆类型" align="center" prop="rescueCarType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.jyc_type" :value="scope.row.rescueCarType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车牌号" align="center" prop="rescueCarNum" />
|
||||
<el-table-column label="品牌型号" align="center" prop="rescueCarBrand" />
|
||||
<el-table-column label="图片" align="center" prop="carImage" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.carImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买时间" align="center" prop="carBuyTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.carBuyTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="保养到期时间" align="center" prop="carKeepTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.carKeepTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="保险到期时间" align="center" prop="carInsuranceTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.carInsuranceTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年检到期时间" align="center" prop="carCheckTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.carCheckTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车牌颜色" align="center" prop="carLicenseColor">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.car_license_color" :value="scope.row.carLicenseColor"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="车辆所属" align="center" prop="carLicenseColor">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.car_own" :value="scope.row.carOwn"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="车辆性质" align="center" prop="carUseNature">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.car_use_nature" :value="scope.row.carUseNature"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改救援车辆信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
|
||||
|
||||
<el-form-item label="车辆类型" prop="rescueCarType">
|
||||
<el-select v-model="form.rescueCarType" placeholder="请选择车辆类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.jyc_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="rescueCarNum">
|
||||
<el-input v-model="form.rescueCarNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌型号" prop="rescueCarBrand">
|
||||
<el-input v-model="form.rescueCarBrand" placeholder="请输入品牌型号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="carImage">
|
||||
<image-upload v-model="form.carImage"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="行驶证" prop="driveLicenseImage">
|
||||
<image-upload v-model="form.driveLicenseImage"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买时间" prop="carBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.carBuyTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择购买时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保养到期时间" prop="carBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.carKeepTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择到期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险到期时间" prop="carBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.carInsuranceTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择到期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="年检到期时间" prop="carBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.carCheckTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择到期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌颜色" prop="carLicenseColor">
|
||||
<el-radio-group v-model="form.carLicenseColor">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.car_license_color"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carUseNature">
|
||||
<el-radio-group v-model="form.carUseNature">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.car_use_nature"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号" prop="frameNumber">
|
||||
<el-input v-model="form.frameNumber" placeholder="请输入车架号" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRescueCar, getRescueCar, delRescueCar, addRescueCar, updateRescueCar } from "./api/carInfo";
|
||||
|
||||
export default {
|
||||
name: "RescueCar",
|
||||
dicts: ['car_own', 'car_use_nature', 'jyc_type', 'car_license_color'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 救援车辆信息表格数据
|
||||
rescueCarList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
rescueCarType: null,
|
||||
rescueCarNum: null,
|
||||
rescueCarBrand: null,
|
||||
carOwn: null,
|
||||
carImage: null,
|
||||
driveLicenseImage: null,
|
||||
carBuyTime: null,
|
||||
carLicenseColor: null,
|
||||
carUseNature: null,
|
||||
frameNumber: null,
|
||||
possessorId: null,
|
||||
deptId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询救援车辆信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRescueCar(this.queryParams).then(response => {
|
||||
this.rescueCarList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
rescueCarType: null,
|
||||
rescueCarNum: null,
|
||||
rescueCarBrand: null,
|
||||
carOwn: null,
|
||||
carImage: null,
|
||||
driveLicenseImage: null,
|
||||
carBuyTime: null,
|
||||
carLicenseColor: null,
|
||||
carUseNature: null,
|
||||
frameNumber: null,
|
||||
possessorId: null,
|
||||
deptId: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加救援车辆信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRescueCar(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改救援车辆信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.carOwn = "0"
|
||||
if (this.form.id != null) {
|
||||
updateRescueCar(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRescueCar(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除救援车辆信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescueCar(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/rescueCar/export', {
|
||||
...this.queryParams
|
||||
}, `rescueCar_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
393
src/views/rescue/customerDriverIndex.vue
Normal file
393
src/views/rescue/customerDriverIndex.vue
Normal file
@ -0,0 +1,393 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<div class="left-box">
|
||||
<div class="title-h">公司机构</div>
|
||||
<div class="xzbox">
|
||||
<span>当前选择:{{xtitle}}</span>
|
||||
</div>
|
||||
<el-input
|
||||
placeholder="请输入机构名称查询"
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
|
||||
<el-tree :data="Thetree"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
:default-expanded-keys="[200, 201]"
|
||||
:default-checked-keys="[206]"
|
||||
@node-click="handleNodeClick"></el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<!-- <el-form-item label="区域名称" prop="customerName">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.customerName"-->
|
||||
<!-- placeholder="请输入客户名称"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rescueCustomerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="机构" align="center" prop="deptName" />
|
||||
<el-table-column label="第一梯队" align="center" prop="firstDriverName" />
|
||||
<el-table-column label="第二梯队" align="center" prop="secondDriverName" />
|
||||
<el-table-column label="第三梯队" align="center" prop="thirdDriverName" />
|
||||
<!-- <el-table-column label="签约开始日期" align="center" prop="signStartDate" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.signStartDate, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改救援的客户信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="司机公司" prop="deptName">
|
||||
|
||||
<span style="font-weight: bold; font-size: 16px">{{ form.deptName ||xtitle}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="第一梯队" prop="firstDriverIds">
|
||||
<el-select v-model="form.firstDriverIds" filterable multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id.toString()"
|
||||
:label="item.realName"
|
||||
:value="item.id.toString()">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="第二梯队" prop="secondDriverIds">
|
||||
<el-select v-model="form.secondDriverIds" filterable multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id.toString()"
|
||||
:label="item.realName"
|
||||
:value="item.id.toString()">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="第三梯队" prop="thirdDriverIds">
|
||||
<el-select v-model="form.thirdDriverIds" filterable multiple placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id.toString()"
|
||||
:label="item.realName"
|
||||
:value="item.id.toString()">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { driverlist, edept_driver, dept_driver, listRescueCustomer, getRescueCustomer, delRescueCustomer, addRescueCustomer, updateRescueCustomer,getdeptTree,driverList } from "./api/rescueCustomer";
|
||||
|
||||
export default {
|
||||
name: "RescueCustomer",
|
||||
dicts: ['dljy_type'],
|
||||
data() {
|
||||
return {
|
||||
filterText:'',
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
value1:[],
|
||||
value2:[],
|
||||
value3:[],
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '黄金糕'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '双皮奶'
|
||||
}, {
|
||||
value: '选项3',
|
||||
label: '蚵仔煎'
|
||||
}, {
|
||||
value: '选项4',
|
||||
label: '龙须面'
|
||||
}, {
|
||||
value: '选项5',
|
||||
label: '北京烤鸭'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 救援的客户信息表格数据
|
||||
rescueCustomerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
xtitle:'',
|
||||
xid:'',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
pageNo: 1,//第几页
|
||||
pageSize: 999,//一页多少张
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
firstDriverIds:[],
|
||||
secondDriverIds:[],
|
||||
thirdDriverIds:[],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
customerName: null,
|
||||
customerPhone: null,
|
||||
customerDeptId: null,
|
||||
signStartDate: null,
|
||||
signEndDate: null,
|
||||
defaultRescueType: null,
|
||||
},
|
||||
Thetree:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
customerName: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
customerPhone: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
orderPrefix: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleCheckChange(data, checked, indeterminate) {
|
||||
console.log(data, checked, indeterminate);
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
this.xid = data.id
|
||||
// this.form.customerDeptId
|
||||
this.xtitle = data.label
|
||||
console.log('x',data);
|
||||
console.log(this.form.customerDeptId)
|
||||
},
|
||||
/** 查询救援的客户信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
driverlist(this.queryParams).then(response => {
|
||||
this.rescueCustomerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
getdeptTree().then(res=>{
|
||||
console.log(res)
|
||||
this.Thetree = res.data
|
||||
})
|
||||
let data = {
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
}
|
||||
driverList(data).then(res=>{
|
||||
console.log(res)
|
||||
this.options = res.rows
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
firstDriverIds:null,
|
||||
secondDriverIds:null,
|
||||
thirdDriverIds:null,
|
||||
deptId: null,
|
||||
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
if(this.xtitle == ''){
|
||||
this.$modal.msgSuccess("请先选择部门");
|
||||
return
|
||||
}
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加司机信息";
|
||||
this.form.deptId = this.xid
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
row.firstDriverIds = row.firstDriverIds.split(",");
|
||||
row.secondDriverIds = row.secondDriverIds.split(",");
|
||||
row.thirdDriverIds = row.thirdDriverIds.split(",");
|
||||
this.form = row
|
||||
console.log(this.form)
|
||||
this.open = true;
|
||||
this.title = "修改救援的客户信息";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
this.form.firstDriverIds = this.form.firstDriverIds.join(",")
|
||||
this.form.secondDriverIds = this.form.secondDriverIds.join(",")
|
||||
this.form.thirdDriverIds = this.form.thirdDriverIds.join(",")
|
||||
edept_driver(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.form.firstDriverIds = this.form.firstDriverIds.join(",")
|
||||
this.form.secondDriverIds = this.form.secondDriverIds.join(",")
|
||||
this.form.thirdDriverIds = this.form.thirdDriverIds.join(",")
|
||||
dept_driver(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除救援的客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescueCustomer(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescueCustomer/rescueCustomer/export', {
|
||||
...this.queryParams
|
||||
}, `rescueCustomer_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.left-box{
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.title-h{
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.xzbox{
|
||||
width: 100%;
|
||||
margin: 5px auto;
|
||||
border-radius: 8px;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
padding: 0px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #409EFF;
|
||||
|
||||
/*background: #99a9bf;*/
|
||||
}
|
||||
</style>
|
398
src/views/rescue/customerIndex.vue
Normal file
398
src/views/rescue/customerIndex.vue
Normal file
@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<div class="left-box">
|
||||
<div class="title-h">公司机构</div>
|
||||
<div class="xzbox">
|
||||
<span>当前选择:{{xtitle}}</span>
|
||||
</div>
|
||||
<el-input
|
||||
placeholder="请输入机构名称查询"
|
||||
v-model="filterText">
|
||||
</el-input>
|
||||
|
||||
<el-tree :data="Thetree"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
:default-expanded-keys="[200, 201]"
|
||||
:default-checked-keys="[206]"
|
||||
@node-click="handleNodeClick"></el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input
|
||||
v-model="queryParams.customerName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="customerPhone">
|
||||
<el-input
|
||||
v-model="queryParams.customerPhone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="开始日期" prop="signStartDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.signStartDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择签约开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束日期" prop="signEndDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.signEndDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择签约结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rescueCustomerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="客户名称" align="center" prop="customerName" />
|
||||
<el-table-column label="客户手机号" align="center" prop="customerPhone" />
|
||||
<el-table-column label="客户公司" align="center" prop="deptName" />
|
||||
<el-table-column label="签约开始日期" align="center" prop="signStartDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.signStartDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签约结束日期" align="center" prop="signEndDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.signEndDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="默认救援类型" align="center" prop="defaultRescueType">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.dljy_type" :value="scope.row.defaultRescueType"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改救援的客户信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="客户公司" prop="customerDeptId">
|
||||
|
||||
<span style="font-weight: bold; font-size: 16px">{{ deptName ||xtitle}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户手机号" prop="customerPhone">
|
||||
<el-input v-model="form.customerPhone" placeholder="请输入客户手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单号前缀" prop="orderPrefix">
|
||||
<el-input v-model="form.orderPrefix" placeholder="请输入单号前缀" />
|
||||
</el-form-item>
|
||||
<el-form-item label="签约开始日期" prop="signStartDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.signStartDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择签约开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="签约结束日期" prop="signEndDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.signEndDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择签约结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="默认救援类型" prop="defaultRescueType">-->
|
||||
<!-- <el-select v-model="form.defaultRescueType" placeholder="请选择默认救援类型">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.dljy_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRescueCustomer, getRescueCustomer, delRescueCustomer, addRescueCustomer, updateRescueCustomer,getdeptTree } from "./api/rescueCustomer";
|
||||
|
||||
export default {
|
||||
name: "RescueCustomer",
|
||||
dicts: ['dljy_type'],
|
||||
data() {
|
||||
return {
|
||||
filterText:'',
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 救援的客户信息表格数据
|
||||
rescueCustomerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
xtitle:'',
|
||||
xid:'',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
customerName: null,
|
||||
customerPhone: null,
|
||||
customerDeptId: null,
|
||||
signStartDate: null,
|
||||
signEndDate: null,
|
||||
defaultRescueType: null,
|
||||
},
|
||||
Thetree:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
customerName: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
customerPhone: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
orderPrefix: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleCheckChange(data, checked, indeterminate) {
|
||||
console.log(data, checked, indeterminate);
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
this.xid = data.id
|
||||
// this.form.customerDeptId
|
||||
this.xtitle = data.label
|
||||
console.log('x',data);
|
||||
console.log(this.form.customerDeptId)
|
||||
},
|
||||
/** 查询救援的客户信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRescueCustomer(this.queryParams).then(response => {
|
||||
this.rescueCustomerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
getdeptTree().then(res=>{
|
||||
console.log(res)
|
||||
this.Thetree = res.data
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
customerName: null,
|
||||
customerPhone: null,
|
||||
customerDeptId: null,
|
||||
signStartDate: null,
|
||||
signEndDate: null,
|
||||
orderPrefix: null,
|
||||
defaultRescueType: null,
|
||||
deptId: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
if(this.xtitle == ''){
|
||||
this.$modal.msgSuccess("请先选择部门");
|
||||
return
|
||||
}
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加客户信息";
|
||||
this.form.customerDeptId = this.xid
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRescueCustomer(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改救援的客户信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRescueCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRescueCustomer(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除救援的客户信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescueCustomer(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescueCustomer/rescueCustomer/export', {
|
||||
...this.queryParams
|
||||
}, `rescueCustomer_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.left-box{
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.title-h{
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.xzbox{
|
||||
width: 100%;
|
||||
margin: 5px auto;
|
||||
border-radius: 8px;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
padding: 0px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #409EFF;
|
||||
|
||||
/*background: #99a9bf;*/
|
||||
}
|
||||
</style>
|
736
src/views/rescue/driverIndex.vue
Normal file
736
src/views/rescue/driverIndex.vue
Normal file
@ -0,0 +1,736 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="司机" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入司机名称"
|
||||
style="width: 140px"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phonenumber">
|
||||
<el-input
|
||||
v-model="queryParams.phonenumber"
|
||||
style="width: 140px"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作状态" prop="carLicenseNum">
|
||||
<el-select
|
||||
v-model="queryParams.driveStatus"
|
||||
placeholder="工作状态"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in workDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证状态" prop="authStatus">
|
||||
<el-select
|
||||
v-model="queryParams.authStatus"
|
||||
placeholder="认证状态"
|
||||
clearable
|
||||
style="width: 140px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in authDicts"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="realName" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center" prop="sex" width="100"/>
|
||||
<el-table-column label="手机号" align="center" prop="phonenumber" width="130"/>
|
||||
<el-table-column label="年龄" align="center" prop="userAge" width="100"/>
|
||||
<el-table-column label="图片" align="center" prop="avatar" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.avatar" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="认证状态" align="center" prop="authStatus" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.authStatus =='0'" style="color: #1c84c6">待认证</span>
|
||||
<span v-if="scope.row.authStatus =='1'" style="color: #1c84c6">待审核</span>
|
||||
<span v-if="scope.row.authStatus =='2'" style="color: green">认证成功</span>
|
||||
<span v-if="scope.row.authStatus =='3'" style="color: red">驳回</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接单状态" align="center" prop="driverStatus" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.driverStatus =='1'">空闲</span>
|
||||
<span v-if="scope.row.driverStatus =='2'">暂停</span>
|
||||
<span v-if="scope.row.driverStatus =='3'">忙碌</span>
|
||||
<span v-if="scope.row.driverStatus =='4'">离线</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前所在位置" align="center" prop="driverPositionInfo" />
|
||||
<el-table-column label="司机离线时间" align="center" prop="driverOfflineTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.driverOfflineTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.authStatus =='1'"
|
||||
icon="el-icon-s-check"
|
||||
@click="handleAuth(scope.row)"
|
||||
>审核</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-dialog title="认证审核" :visible.sync="authFlag" width="400px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="审核结果" prop="authStatus">
|
||||
<el-radio-group v-model="form.authStatus">
|
||||
<el-radio label="2">通过</el-radio>
|
||||
<el-radio label="3">拒绝</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拒绝原因" prop="rejectInfo">
|
||||
<el-input type="textarea" v-model="form.rejectInfo" placeholder="请输入拒绝原因"> </el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="authSubmit">确 定</el-button>
|
||||
<el-button @click="authCancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改【请填写功能名称】对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
|
||||
<el-tabs :value="'first'" @tab-click="handleClick">
|
||||
<el-tab-pane label="司机信息" name="first">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px" >
|
||||
<el-form-item v-show="false" label="用户主键" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户主键" />
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="真实姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="真实姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="手机号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="司机性别">
|
||||
<el-select v-model="form.sex" placeholder="请选择性别">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="年龄" prop="userAge">
|
||||
<el-input-number v-model="form.userAge" placeholder="年龄" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证正面" prop="idCardRight">
|
||||
<image-upload :limit="1" v-model="form.idCardRight"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证反面" prop="idCardBack">
|
||||
<image-upload :limit="1" v-model="form.idCardBack"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="驾驶证照片" prop="licenseImage">
|
||||
<image-upload :limit="1" v-model="form.licenseImage"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="司机照片" prop="avatar">
|
||||
<image-upload :limit="1" v-model="form.avatar"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="车辆信息" name="second">
|
||||
<el-form ref="carfrom" :model="carfrom" :rules="carRules" label-width="120px" >
|
||||
<div v-for="(item,index) in carfrom.carInfoList" :key="index" style="width: 100%; ">
|
||||
<el-collapse v-model="activeNames" accordion>
|
||||
<el-collapse-item :title=" '车辆'+ (index+1)" :name="index" accordion>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label=" 车辆类型" prop="rescueCarType">
|
||||
<el-select v-model="item.rescueCarType" placeholder="请选择车辆类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.jyc_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<!-- <div style="position: absolute; left: 35px;top: 10px; color: red">*</div>-->
|
||||
<el-form-item label=" 车牌号" :prop="'rescueCarNum'+index" >
|
||||
<el-input v-model="item.rescueCarNum" @input="valid(item.rescueCarNum,index,'rescueCarNum')" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label=" 品牌型号" prop="rescueCarBrand">
|
||||
<el-input v-model="item.rescueCarBrand" placeholder="请输入品牌型号" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label=" 购买时间" prop="carBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="item.carBuyTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择购买时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label=" 车架号" prop="frameNumber">
|
||||
<el-input v-model="item.frameNumber" placeholder="请输入车架号" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label="车辆性质" prop="carUseNature">
|
||||
<el-radio-group v-model="item.carUseNature">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.car_use_nature"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label=" 车牌颜色" prop="carLicenseColor">
|
||||
<el-radio-group v-model="item.carLicenseColor">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.car_license_color"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label="行驶证" prop="driveLicenseImage">
|
||||
<image-upload v-model="item.driveLicenseImage"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div style="position: relative">
|
||||
<div style="position: absolute; left: 35px;top: 10px; color: red">*</div>
|
||||
<el-form-item label="图片" prop="carImage">
|
||||
<image-upload v-model="item.carImage"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="width: 100%; display: flex; align-items: center;justify-content: flex-end ">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="deletecomm(index)"
|
||||
>删除</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
<div style="width: 100%; margin: 20px auto; display: flex;align-items: center; justify-content: flex-end ">
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="addCommodity()" >新增车辆信息</el-button>-->
|
||||
</div>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="authCancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { driverList, delDriver, addDriver, updateDriver } from "@/api/rescue/driver";
|
||||
|
||||
export default {
|
||||
name: "Info",
|
||||
dicts: ['jyc_type','sys_user_sex','car_license_color','car_own', 'car_use_nature'],
|
||||
data() {
|
||||
var verify = (rule, value, callback) => {
|
||||
if (value == '') {
|
||||
callback(new Error('不能为空'));
|
||||
this.pd = false
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
return {
|
||||
pd:true,
|
||||
switchover:0,
|
||||
activeNames:0,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 【请填写功能名称】表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
workDicts:[
|
||||
{
|
||||
label:"空闲",
|
||||
value:"1"
|
||||
},
|
||||
{
|
||||
label:"暂停",
|
||||
value:"2"
|
||||
},
|
||||
{
|
||||
label:"忙碌",
|
||||
value:"3"
|
||||
},
|
||||
{
|
||||
label:"离线",
|
||||
value:"4"
|
||||
}
|
||||
],
|
||||
authDicts:[
|
||||
{
|
||||
label:"待认证",
|
||||
value:"0"
|
||||
},
|
||||
{
|
||||
label:"待审核",
|
||||
value:"1"
|
||||
},
|
||||
{
|
||||
label:"认证成功",
|
||||
value:"2"
|
||||
},
|
||||
{
|
||||
label:"认证失败",
|
||||
value:"3"
|
||||
}
|
||||
],
|
||||
authFlag:false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
licenseImage: null,
|
||||
idCardRight: null,
|
||||
idCardBack: null,
|
||||
driveLicenseImage: null,
|
||||
carBrand: null,
|
||||
carLicenseNum: null,
|
||||
carType: null,
|
||||
carNum: null,
|
||||
carBuyTime: null,
|
||||
carLicenseColor: null,
|
||||
authStatus: null,
|
||||
rejectInfo: null,
|
||||
driverStatus: null,
|
||||
driverLongitude: null,
|
||||
driverLatitude: null,
|
||||
driverPositionInfo: null,
|
||||
driverOfflineTime: null,
|
||||
},
|
||||
carfrom:{
|
||||
carInfoList:[
|
||||
{
|
||||
rescueCarType: '1',
|
||||
rescueCarNum: '',
|
||||
rescueCarBrand: '',
|
||||
carOwn: '',
|
||||
carImage: '',
|
||||
driveLicenseImage: '',
|
||||
carBuyTime: '',
|
||||
carLicenseColor: '',
|
||||
carUseNature: '',
|
||||
frameNumber: '',
|
||||
possessorId: '',
|
||||
deptId: '',
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
carRules:{
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' }
|
||||
],
|
||||
phonenumber:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 11, message: '长度在 1 到 11 个字符', trigger: 'blur' }
|
||||
],
|
||||
rescueCarType:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
rescueCarNum:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
carOwn:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
carImage:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
driveLicenseImage:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
carLicenseColor:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
carUseNature:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
frameNumber:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
possessorId:[
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
valid(value,idx,str){
|
||||
this.$set(this.carfrom, str+idx, value)
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
driverList(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
addCommodity(){
|
||||
let data = {
|
||||
rescueCarType: null,
|
||||
rescueCarNum: null,
|
||||
rescueCarBrand: null,
|
||||
carOwn: null,
|
||||
carImage: null,
|
||||
driveLicenseImage: null,
|
||||
carBuyTime: null,
|
||||
carLicenseColor: null,
|
||||
carUseNature: null,
|
||||
frameNumber: null,
|
||||
possessorId: null,
|
||||
deptId: null,
|
||||
}
|
||||
|
||||
this.carfrom.carInfoList.push(data)
|
||||
let idx = this.carfrom.carInfoList.length-1
|
||||
let key = 'rescueCarNum'+idx;
|
||||
this.$set(this.carRules, key, [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
])
|
||||
console.log(this.carRules)
|
||||
},
|
||||
deletecomm(index){
|
||||
this.carfrom.carInfoList.splice(index, 1);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
authCancel() {
|
||||
this.authFlag = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.resetForm("form");
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
licenseImage: null,
|
||||
idCardRight: null,
|
||||
idCardBack: null,
|
||||
driveLicenseImage: null,
|
||||
carBrand: null,
|
||||
carLicenseNum: null,
|
||||
carType: null,
|
||||
carNum: null,
|
||||
carBuyTime: null,
|
||||
carLicenseColor: null,
|
||||
authStatus: null,
|
||||
rejectInfo: null,
|
||||
driverStatus: null,
|
||||
driverLongitude: null,
|
||||
driverLatitude: null,
|
||||
driverPositionInfo: null,
|
||||
driverOfflineTime: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null,
|
||||
};
|
||||
this.carfrom.carInfoList=[
|
||||
{
|
||||
rescueCarType: '',
|
||||
rescueCarNum: '',
|
||||
rescueCarBrand: '',
|
||||
carOwn: '',
|
||||
carImage: '',
|
||||
driveLicenseImage: '',
|
||||
carBuyTime: '',
|
||||
carLicenseColor: '',
|
||||
carUseNature: '',
|
||||
frameNumber: '',
|
||||
possessorId: '',
|
||||
deptId: '',
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加司机";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
||||
this.reset();
|
||||
console.log(row)
|
||||
this.form = row;
|
||||
this.carfrom.carInfoList = row.carInfoList
|
||||
this.open = true;
|
||||
this.title = "修改司机信息";
|
||||
|
||||
},
|
||||
handleAuth(row){
|
||||
this.reset();
|
||||
this.form = row;
|
||||
this.authFlag = true;
|
||||
},
|
||||
//提交前的处理
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.$refs["carfrom"].validate(carValid => {
|
||||
if (carValid) {
|
||||
if (this.form.id != null) {
|
||||
this.form.carInfoList = this.carfrom.carInfoList
|
||||
updateDriver(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.form.carInfoList = this.carfrom.carInfoList
|
||||
addDriver(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
authSubmit(){
|
||||
updateDriver(this.form).then(response => {
|
||||
this.$modal.msgSuccess("审核成功");
|
||||
this.authFlag = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delDriver(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/info/export', {
|
||||
...this.queryParams
|
||||
}, `info_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
690
src/views/rescue/index.vue
Normal file
690
src/views/rescue/index.vue
Normal file
@ -0,0 +1,690 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="connectionName">
|
||||
<el-input
|
||||
v-model="queryParams.connectionName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户车牌号" prop="licenseNum">
|
||||
<el-input
|
||||
v-model="queryParams.licenseNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机名称" prop="driverName">
|
||||
<el-input
|
||||
v-model="queryParams.driverName"
|
||||
placeholder="请输入司机名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机车牌号" prop="driverCarNum">
|
||||
<el-input
|
||||
v-model="queryParams.driverCarNum"
|
||||
placeholder="请输入救援车辆车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援时间" prop="maintenanceTime" >
|
||||
<el-date-picker
|
||||
v-model="time1"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援类型" prop="rescueType">
|
||||
<el-select v-model="queryParams.rescueType" placeholder="请选择救援类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.dljy_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收费类型" prop="feeType">
|
||||
<el-select v-model="queryParams.feeType" placeholder="请选择收费类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.fee_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援状态" prop="rescueStatus">
|
||||
<el-select v-model="queryParams.rescueStatus" placeholder="请选择救援状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.jy_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.jy_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
|
||||
<el-table-column label="客户信息" align="center">
|
||||
<el-table-column label="姓名" align="center" prop="connectionName" />
|
||||
<el-table-column label="手机号" width="130" align="center" prop="connectionPhone" />
|
||||
<el-table-column label="车牌号" width="150" align="center" prop="licenseNum" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span v-if="editType==0 && scope.$index == editIdx"><el-input v-model="scope.row.licenseNum "></el-input><i @click="editInfo(scope.row)" class="el-icon-check"></i></span>
|
||||
<span v-else>{{ scope.row.licenseNum }}<i @click="editInfoFront(0,scope.$index)" class="el-icon-edit"></i></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援司机" align="center">
|
||||
<el-table-column label="姓名" align="center" prop="driverName" />
|
||||
<el-table-column label="手机号" width="130" align="center" prop="driverPhoneNum" />
|
||||
<el-table-column label="车牌号" width="120" align="center" prop="driverCarNum" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span v-if="editType==1 && scope.$index == editIdx"><el-input v-model="scope.row.driverCarNum "></el-input><i @click="editInfo(scope.row)" class="el-icon-check"></i></span>
|
||||
<span v-else>{{ scope.row.driverCarNum }}<i @click="editInfoFront(1,scope.$index)" class="el-icon-edit"></i></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援时间" width="100" align="center" prop="rescueTime" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.rescueTime, '{y}-{m}-{d} {h}:{m}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援类型" align="center" prop="rescueType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.dljy_type" :value="scope.row.rescueType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="路段" align="center" prop="sectionRoad"/>
|
||||
|
||||
<el-table-column label="车辆类型" align="center" prop="carType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.rescue_car_type" :value="scope.row.carType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130" label="救援地点" align="center" prop="rescuePosition" />
|
||||
<el-table-column label="收费类型" align="center" prop="feeType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.fee_type" :value="scope.row.feeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援状态" align="center" prop="rescueStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.jy_status" :value="scope.row.rescueStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态·" align="center" prop="orderStatus" >
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.orderStatus">
|
||||
<dict-tag :options="dict.type.jy_order_status" :value="scope.row.orderStatus"/>
|
||||
</span>
|
||||
<span v-else>
|
||||
未成单
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="应收金额(元)" width="150" align="center" prop="setMoney" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
<span v-if="editType==2 && scope.$index == editIdx"><el-input oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.setMoney2 "></el-input><i @click="editInfo(scope.row,2)" class="el-icon-check"></i></span>
|
||||
<span v-else>{{ scope.row.setMoney/100 }}<i @click="editInfoFront(2,scope.$index)" class="el-icon-edit"></i></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实收金额(元)" align="center" prop="setMoney" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.payMoney/100 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款时间" align="center" width="100" prop="setMoney" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.payTime}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:info:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.rescueStatus==1||scope.row.rescueStatus==2"
|
||||
@click="designateDriver(scope.row)"
|
||||
|
||||
>指派司机</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleMap(scope.row)"
|
||||
|
||||
>路线</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
||||
@click="repayment(scope.row)"
|
||||
>收款</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-picture-outline"
|
||||
|
||||
@click="watchImg(scope.row)"
|
||||
>救援图片</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改道路救援模块对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="opens" width="600px" append-to-body>
|
||||
|
||||
<Map ref="mapComponent" ></Map>
|
||||
<div class="lang-for" v-for="(item,index) in ztlist" :key="index">
|
||||
<span style="margin-right: 10px;">{{item.title}}</span>
|
||||
<span>{{item.distanceMeter/1000}} KM</span>
|
||||
</div>
|
||||
<div> 总里程: {{zong/1000}} KM</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="指派司机" :visible.sync="designateFlag" width="600px" append-to-body>
|
||||
<el-form>
|
||||
<el-form-item label="选择司机" prop="carType">
|
||||
<el-select v-model="chooseDriverId" placeholder="请选择司机">
|
||||
<el-option
|
||||
v-for="item in driverList"
|
||||
:key="item.id"
|
||||
:label="item.realName"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="driverOk">确 定</el-button>
|
||||
<el-button @click="designateFlag = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="联系人名称" prop="connectionName">
|
||||
<el-input v-model="form.connectionName" placeholder="请输入联系人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人手机号" prop="connectionPhone">
|
||||
<el-input v-model="form.connectionPhone" placeholder="请输入联系人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNum">
|
||||
<el-input v-model="form.licenseNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为预约单" prop="isAppointment">
|
||||
<el-radio-group v-model="form.isAppointment">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援时间" prop="rescueTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.rescueTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择救援时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援类型 1拖车2送油3搭电4换台5扣车" prop="rescueType">
|
||||
<el-select v-model="form.rescueType" placeholder="请选择救援类型 1拖车2送油3搭电4换台5扣车">
|
||||
<el-option
|
||||
v-for="dict in dict.type.dljy_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆类型 大中小" prop="carType">
|
||||
<el-select v-model="form.carType" placeholder="请选择车辆类型 大中小">
|
||||
<el-option
|
||||
v-for="dict in dict.type.rescue_car_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援地点 详细描述" prop="rescuePosition">
|
||||
<el-input v-model="form.rescuePosition" placeholder="请输入救援地点 详细描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援经度" prop="rescueLongitude">
|
||||
<el-input v-model="form.rescueLongitude" placeholder="请输入救援经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援纬度" prop="rescueLatitude">
|
||||
<el-input v-model="form.rescueLatitude" placeholder="请输入救援纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收费类型" prop="feeType">
|
||||
<el-radio-group v-model="form.feeType">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.fee_type"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<el-input v-model="form.carBrand" placeholder="请输入车辆品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地详细描述" prop="destinationInfo">
|
||||
<el-input v-model="form.destinationInfo" placeholder="请输入目的地详细描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地经度" prop="destinationLongitude">
|
||||
<el-input v-model="form.destinationLongitude" placeholder="请输入目的地经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地纬度" prop="destinationLatitude">
|
||||
<el-input v-model="form.destinationLatitude" placeholder="请输入目的地纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援司机主键" prop="driverId">
|
||||
<el-input v-model="form.driverId" placeholder="请输入救援司机主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="应收金额" prop="rescueAmount">
|
||||
<el-input v-model="form.rescueAmount" placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="订单收款" :visible.sync="repaymentOpen" width="600px" append-to-body>
|
||||
<el-form ref="repaymentForm" :model="repaymentForm" :rules="rules" label-width="120px">
|
||||
<el-form-item label="收款金额" prop="returnMoney">
|
||||
<el-input-number v-model="repaymentForm.returnMoney" placeholder="请输入收款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="returnMoney">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
placeholder="请输入备注"
|
||||
v-model="repaymentForm.remark">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="repaymentSubmit">确 定</el-button>
|
||||
<el-button @click="cancelRepayment">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="救援图片" :visible.sync="imgFlag" width="500px" append-to-body>
|
||||
|
||||
<image-preview v-for="item in watchImgList" :src="item" :width="200" :height="200"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { routeInfo, listInfo, getInfo, delInfo, addInfo, updateInfo,getDriver,designateDriver,returnOrder,watchImg } from "@/api/rescue/info";
|
||||
import { getmap } from "@/api/Map/map";
|
||||
import Map from "../../components/Map/index"
|
||||
export default {
|
||||
name: "Info",
|
||||
dicts: ['dljy_type', 'fee_type', 'rescue_car_type', 'yes_no','jy_status','jy_order_status'],
|
||||
data() {
|
||||
return {
|
||||
chooseDriverId:'',
|
||||
rescueInfoId:'',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
ztlist:[],
|
||||
time1:[],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 道路救援模块表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
opens:false,
|
||||
designateFlag:false,
|
||||
zong:'',
|
||||
repaymentForm:{},
|
||||
repaymentOpen:false,
|
||||
editType:0,
|
||||
editIdx:-1,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
connectionName: null,
|
||||
isAppointment: null,
|
||||
rescueType: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
rescueStatus: null,
|
||||
rescueAmount: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
driverList:[],
|
||||
imgFlag:0,
|
||||
watchImgList:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
connectionName: [
|
||||
{ required: true, message: "联系人名称不能为空", trigger: "blur" }
|
||||
],
|
||||
connectionPhone: [
|
||||
{ required: true, message: "联系人手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
licenseNum: [
|
||||
{ required: true, message: "车牌号不能为空", trigger: "blur" }
|
||||
],
|
||||
isAppointment: [
|
||||
{ required: true, message: "是否为预约单不能为空", trigger: "change" }
|
||||
],
|
||||
rescueType: [
|
||||
{ required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change" }
|
||||
],
|
||||
carType: [
|
||||
{ required: true, message: "车辆类型 大中小不能为空", trigger: "change" }
|
||||
],
|
||||
rescuePosition: [
|
||||
{ required: true, message: "救援地点 详细描述不能为空", trigger: "blur" }
|
||||
],
|
||||
feeType: [
|
||||
{ required: true, message: "收费类型不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
components:{
|
||||
Map
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
watchImg(data){
|
||||
|
||||
watchImg(data.id).then(response =>{
|
||||
this.imgFlag = 1
|
||||
this.watchImgList = response.data
|
||||
})
|
||||
},
|
||||
editInfo(data,type){
|
||||
if (type==2){
|
||||
data.setMoney= data.setMoney2*100
|
||||
}
|
||||
updateInfo(data).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.editType = 0;
|
||||
this.editIdx=-1
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
editInfoFront(type,index){
|
||||
this.editType =type
|
||||
this.editIdx =index
|
||||
|
||||
},
|
||||
cancelRepayment(){
|
||||
this.repaymentForm = {}
|
||||
this.repaymentOpen = false
|
||||
},
|
||||
repaymentSubmit(){
|
||||
|
||||
this.$refs["repaymentForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.repaymentForm.returnMoney = this.repaymentForm.returnMoney*100
|
||||
returnOrder(this.repaymentForm).then(res=>{
|
||||
this.$modal.msgSuccess("收款成功");
|
||||
this.repaymentOpen = false;
|
||||
this.repaymentForm = {}
|
||||
this.getList();
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
repayment(data){
|
||||
this.repaymentOpen = true
|
||||
this.repaymentForm.rescueOrderId = data.rescueOrderId
|
||||
},
|
||||
driverOk(){
|
||||
this.designateFlag = false
|
||||
designateDriver(this.rescueInfoId,this.chooseDriverId).then(res=>{
|
||||
this.$message.success("指派成功")
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/** 查询道路救援模块列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getDriverList() {
|
||||
getDriver().then(response => {
|
||||
this.driverList = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
connectionName: null,
|
||||
connectionPhone: null,
|
||||
licenseNum: null,
|
||||
isAppointment: null,
|
||||
rescueTime: null,
|
||||
rescueType: null,
|
||||
carType: null,
|
||||
rescuePosition: null,
|
||||
rescueLongitude: null,
|
||||
rescueLatitude: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
destinationLongitude: null,
|
||||
destinationLatitude: null,
|
||||
rescueStatus: null,
|
||||
driverId: null,
|
||||
rescueAmount: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
if (this.time1&&this.time1.length>0){
|
||||
this.queryParams.rescueStart = this.time1[0];
|
||||
this.queryParams.rescueEnd = this.time1[1];
|
||||
}
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.time1 =[]
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加道路救援模块";
|
||||
},
|
||||
pickDriver(row){
|
||||
|
||||
},
|
||||
designateDriver(row){
|
||||
this.designateFlag = true
|
||||
this.rescueInfoId = row.id
|
||||
this.getDriverList();
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改道路救援模块";
|
||||
});
|
||||
},
|
||||
handleMap(row){
|
||||
this.rescueInfoId = row.id
|
||||
routeInfo(row.id).then(res=>{
|
||||
this.ztlist = res.data
|
||||
this.none(res.data)
|
||||
})
|
||||
getmap(row.id).then(res=>{
|
||||
let datas =[]
|
||||
res.data.forEach(it=>{
|
||||
let temp =[it.longitude,it.latitude]
|
||||
datas.push(temp)
|
||||
})
|
||||
this.$refs.mapComponent.initMap(datas)
|
||||
})
|
||||
this.opens = true;
|
||||
},
|
||||
none(arr){
|
||||
let sum = 0;
|
||||
for(var i = 0;i<arr.length;i++){
|
||||
sum += arr[i].distanceMeter;
|
||||
}
|
||||
|
||||
this.zong = sum
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/rescueInfo/export', {
|
||||
...this.queryParams
|
||||
}, `救援订单_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.lang-for{
|
||||
width: 100%;
|
||||
margin: 10px auto;
|
||||
}
|
||||
</style>
|
263
src/views/rescue/refuelRecord.vue
Normal file
263
src/views/rescue/refuelRecord.vue
Normal file
@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="司机名称" prop="driverId">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入司机名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="carId">
|
||||
<el-input
|
||||
v-model="queryParams.rescueCarNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="refuelRecordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="司机" align="center" prop="realName" />
|
||||
<el-table-column label="车牌号" align="center" prop="rescueCarNum" />
|
||||
<el-table-column label="加油数量(L)" align="center" prop="refuelNum" />
|
||||
<el-table-column label="花费(元)" align="center" prop="refuelMoney" />
|
||||
<el-table-column label="当前公里数(km)" align="center" prop="refuelDistance" />
|
||||
<el-table-column label="拍照" align="center" prop="showImage" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.showImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="记录时间" align="center" prop="recordTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['rescue:refuelRecord:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['rescue:refuelRecord:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改加油记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="加油数量(L)" prop="refuelNum">
|
||||
<el-input v-model="form.refuelNum" placeholder="请输入加油数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="花费(元)" prop="refuelMoney">
|
||||
<el-input v-model="form.refuelMoney" placeholder="请输入花费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前公里数(km)" prop="refuelDistance">
|
||||
<el-input-number v-model="form.refuelDistance" placeholder="请输入当前加油公里数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="拍照" prop="showImage">
|
||||
<image-upload :limit="1" v-model="form.showImage"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="记录时间" prop="recordTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.recordTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择时间的记录">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRefuelRecord, getRefuelRecord, delRefuelRecord, addRefuelRecord, updateRefuelRecord } from "./api/refuelRecord";
|
||||
|
||||
export default {
|
||||
name: "RefuelRecord",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 加油记录表格数据
|
||||
refuelRecordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
driverId: null,
|
||||
carId: null,
|
||||
refuelNum: null,
|
||||
refuelMoney: null,
|
||||
recordTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询加油记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRefuelRecord(this.queryParams).then(response => {
|
||||
this.refuelRecordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
driverId: null,
|
||||
carId: null,
|
||||
refuelNum: null,
|
||||
refuelMoney: null,
|
||||
recordTime: null,
|
||||
deptId: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
driverId: null,
|
||||
carId: null,
|
||||
rescueCarNum: null,
|
||||
realName: null,
|
||||
recordTime: null,
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加加油记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRefuelRecord(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改加油记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRefuelRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRefuelRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除加油记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRefuelRecord(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescue/refuelRecord/export', {
|
||||
...this.queryParams
|
||||
}, `refuelRecord_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
425
src/views/rescue/rescueCarSpend.vue
Normal file
425
src/views/rescue/rescueCarSpend.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="车牌号" prop="carNum">
|
||||
<el-input
|
||||
v-model="queryParams.carNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修保养时间" prop="maintenanceTime" >
|
||||
<el-date-picker
|
||||
v-model="time1"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险购买时间" prop="insuranceBuyTime">
|
||||
<el-date-picker
|
||||
v-model="time2"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="年审时间" prop="annualAuditTime">
|
||||
<el-date-picker
|
||||
v-model="time3"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rescueCarSpendList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="id" />
|
||||
<el-table-column label="车牌号" align="center" prop="carNum" />
|
||||
<el-table-column label="维修保养时间" align="center" prop="maintenanceTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.maintenanceTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" prop="maintenanceContent" />
|
||||
<el-table-column label="金额" align="center" prop="maintenanceMoney" />
|
||||
<el-table-column label="保险" align="center" prop="insuranceContent" />
|
||||
<el-table-column label="保险购买时间" align="center" prop="insuranceBuyTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.insuranceBuyTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="保险金额" align="center" prop="insuranceMoney" />
|
||||
<el-table-column label="年审时间" align="center" prop="annualAuditTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.annualAuditTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="年审金额" align="center" prop="annualAuditMoney" />
|
||||
<el-table-column label="其他" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改车辆消费管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="车辆" prop="rescueCarNum">
|
||||
<el-select v-model="form.rescueCarId" placeholder="请选择车辆">
|
||||
<el-option
|
||||
v-for="item in carList"
|
||||
:key="item.id"
|
||||
:label="item.rescueCarNum"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修保养时间" prop="maintenanceTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.maintenanceTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择维修保养时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input type="textarea" v-model="form.maintenanceContent" placeholder="请输入维修保养项目"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="maintenanceMoney">
|
||||
<el-input-number v-model="form.maintenanceMoney" :precision="2" :step="0.01" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险">
|
||||
<el-input type="textarea" v-model="form.insuranceContent" placeholder="请输入保险相关"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险购买时间" prop="insuranceBuyTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.insuranceBuyTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择保险购买时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="保险金额" prop="insuranceMoney">
|
||||
<el-input-number v-model="form.insuranceMoney" :precision="2" :step="0.01" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="年审时间" prop="annualAuditTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.annualAuditTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择年审时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="年审金额" prop="annualAuditMoney">
|
||||
<el-input-number v-model="form.annualAuditMoney" :precision="2" :step="0.01" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他" prop="remark">
|
||||
<el-input type="textarea" v-model="form.remark" placeholder="请输入其他" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRescueCarSpend, getRescueCarSpend, delRescueCarSpend, addRescueCarSpend, updateRescueCarSpend,listCar } from "./api/rescueCarSpend";
|
||||
|
||||
export default {
|
||||
name: "RescueCarSpend",
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}, {
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
time1:[],
|
||||
time2:[],
|
||||
time3:[],
|
||||
// 车辆消费管理表格数据
|
||||
rescueCarSpendList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
rescueCarId: null,
|
||||
carNum: null,
|
||||
maintenanceTime: null,
|
||||
maintenanceContent: null,
|
||||
maintenanceMoney: null,
|
||||
insuranceContent: null,
|
||||
insuranceBuyTime: null,
|
||||
insuranceMoney: null,
|
||||
annualAuditTime: null,
|
||||
annualAuditMoney: null,
|
||||
deptId: null,
|
||||
},
|
||||
carList:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCarList();
|
||||
},
|
||||
methods: {
|
||||
getCarList(){
|
||||
listCar().then(res=>{
|
||||
this.carList = res.rows
|
||||
})
|
||||
},
|
||||
/** 查询车辆消费管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRescueCarSpend(this.queryParams).then(response => {
|
||||
this.rescueCarSpendList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
rescueCarId: null,
|
||||
carNum: null,
|
||||
maintenanceTime: null,
|
||||
maintenanceContent: null,
|
||||
maintenanceMoney: null,
|
||||
insuranceContent: null,
|
||||
insuranceBuyTime: null,
|
||||
insuranceMoney: null,
|
||||
annualAuditTime: null,
|
||||
annualAuditMoney: null,
|
||||
remark: null,
|
||||
deptId: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
if (this.time1&&this.time1.length>0){
|
||||
this.queryParams.maintenanceStart = this.time1[0];
|
||||
this.queryParams.maintenanceEnd = this.time1[1];
|
||||
}
|
||||
if (this.time2&&this.time2.length>0){
|
||||
this.queryParams.maintenanceStart = this.time2[0];
|
||||
this.queryParams.maintenanceEnd = this.time2[1];
|
||||
}
|
||||
if (this.time3&&this.time3.length>0){
|
||||
this.queryParams.maintenanceStart = this.time3[0];
|
||||
this.queryParams.maintenanceEnd = this.time3[1];
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.time1=[]
|
||||
this.time2=[]
|
||||
this.time3=[]
|
||||
this.queryParams={}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加车辆消费管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRescueCarSpend(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改车辆消费管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRescueCarSpend(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRescueCarSpend(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除车辆消费管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescueCarSpend(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescue/rescueCarSpend/export', {
|
||||
...this.queryParams
|
||||
}, `rescueCarSpend_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
161
src/views/rescue/rescueConfig.vue
Normal file
161
src/views/rescue/rescueConfig.vue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="大型车提成比例" prop="rescueTcBig">
|
||||
<el-input v-model="form.rescueTcBig" placeholder="请输入救援大拖车提成比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="中型车提成比例" prop="rescueTcMid">
|
||||
<el-input v-model="form.rescueTcMid" placeholder="请输入救援中型车提成比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小型车提成比例" prop="rescueTcSmall">
|
||||
<el-input v-model="form.rescueTcSmall" placeholder="请输入救援小拖车提成比例" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRescueConfig, addRescueConfig, updateRescueConfig } from "./api/rescueConfig";
|
||||
|
||||
export default {
|
||||
name: "RescueConfig",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 救援司机提成配置表格数据
|
||||
rescueConfigList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
topDeptId: null,
|
||||
rescueTcBig: null,
|
||||
rescueTcMid: null,
|
||||
rescueTcSmall: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
/** 查询救援司机提成配置列表 */
|
||||
getInfo() {
|
||||
this.loading = true;
|
||||
getRescueConfig().then(response => {
|
||||
this.form = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
topDeptId: null,
|
||||
rescueTcBig: null,
|
||||
rescueTcMid: null,
|
||||
rescueTcSmall: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加救援司机提成配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRescueConfig(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改救援司机提成配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRescueConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRescueConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除救援司机提成配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRescueConfig(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescue/rescueConfig/export', {
|
||||
...this.queryParams
|
||||
}, `rescueConfig_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
428
src/views/rescue/rescueCw.vue
Normal file
428
src/views/rescue/rescueCw.vue
Normal file
@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户车牌号" prop="licenseNum">
|
||||
<el-input
|
||||
v-model="queryParams.licenseNum"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="司机名称" prop="driverName">
|
||||
<el-input
|
||||
v-model="queryParams.driverName"
|
||||
placeholder="请输入司机名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援车辆" prop="driverCarNum">
|
||||
<el-input
|
||||
v-model="queryParams.driverCarNum"
|
||||
placeholder="请输入救援车辆车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="rescueStartMonth" >
|
||||
<el-date-picker
|
||||
v-model="queryParams.rescueStartMonth"
|
||||
value-format="yyyy-MM"
|
||||
type="month"
|
||||
placeholder="选择月份">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="收费类型" prop="feeType">
|
||||
<el-select v-model="queryParams.feeType" placeholder="请选择收费类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.fee_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援时间" prop="maintenanceTime" >
|
||||
<el-date-picker
|
||||
v-model="time1"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
>导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="margin-left: 52%;font-weight: bold">
|
||||
<span>
|
||||
施救总金额:{{moneyManagementData.allMoney}} 元
|
||||
</span>
|
||||
<span style="margin-left: 3%">
|
||||
出车次数:{{moneyManagementData.allNum}} 次
|
||||
</span>
|
||||
<span style="margin-left: 3%">
|
||||
提成总金额:{{moneyManagementData.tcAll}} 元
|
||||
</span>
|
||||
<span style="margin-left: 3%">
|
||||
燃油费小计:{{moneyManagementData.refuelMoney}} 元
|
||||
</span>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column :span-method="objectSpanMethod" type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户车牌号" align="center" prop="licenseNum" />
|
||||
<el-table-column label="司机" align="center" prop="driverName" />
|
||||
<el-table-column label="车牌号" align="center" prop="diverCarNum" />
|
||||
<el-table-column label="救援时间" align="center" prop="rescueTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.rescueTime, '{y}-{m}-{d} {h}:{m}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收费类型" align="center" prop="feeType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.fee_type" :value="scope.row.feeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施救金额(元)" align="center" prop="setMoney" />
|
||||
<el-table-column label="过关费(元)" align="center" prop="checkpointMoney" />
|
||||
<el-table-column label="应计提产值(元)" align="center" prop="upMoney" />
|
||||
<el-table-column label="提成比例" align="center" prop="royaltyRatio" />
|
||||
<el-table-column label="提成金额(元)" align="center" prop="royaltyMoney" />
|
||||
<el-table-column label="放空公里数" align="center" prop="emptyingDistance" />
|
||||
<el-table-column label="油补(元)" align="center" prop="oilSubsidy" />
|
||||
|
||||
<el-table-column label="燃油费(元)" align="center" prop="fuelCost" />
|
||||
<el-table-column label="每公里油耗(L)" align="center" prop="oilConsumption" />
|
||||
<el-table-column label="工资(元)" align="center" prop="grossWages" />
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {moneyManagement,moneyManagementData} from "@/api/rescue/info";
|
||||
import { getmap } from "@/api/Map/map";
|
||||
import Map from "../../components/Map/index"
|
||||
export default {
|
||||
name: "Info",
|
||||
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no','jy_status','jy_order_status'],
|
||||
data() {
|
||||
return {
|
||||
chooseDriverId:'',
|
||||
rescueInfoId:'',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
ztlist:[],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
time1:[],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 道路救援模块表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
opens:false,
|
||||
designateFlag:false,
|
||||
zong:'',
|
||||
repaymentForm:{},
|
||||
repaymentOpen:false,
|
||||
moneyManagementData:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
connectionName: null,
|
||||
isAppointment: null,
|
||||
rescueType: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
rescueStatus: null,
|
||||
rescueAmount: null,
|
||||
rescueStart:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
driverList:[],
|
||||
// 表单校验
|
||||
rules: {
|
||||
connectionName: [
|
||||
{ required: true, message: "联系人名称不能为空", trigger: "blur" }
|
||||
],
|
||||
connectionPhone: [
|
||||
{ required: true, message: "联系人手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
licenseNum: [
|
||||
{ required: true, message: "车牌号不能为空", trigger: "blur" }
|
||||
],
|
||||
isAppointment: [
|
||||
{ required: true, message: "是否为预约单不能为空", trigger: "change" }
|
||||
],
|
||||
rescueType: [
|
||||
{ required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change" }
|
||||
],
|
||||
carType: [
|
||||
{ required: true, message: "车辆类型 大中小不能为空", trigger: "change" }
|
||||
],
|
||||
rescuePosition: [
|
||||
{ required: true, message: "救援地点 详细描述不能为空", trigger: "blur" }
|
||||
],
|
||||
feeType: [
|
||||
{ required: true, message: "收费类型不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
components:{
|
||||
Map
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
cancelRepayment(){
|
||||
this.repaymentForm = {}
|
||||
this.repaymentOpen = false
|
||||
},
|
||||
repaymentSubmit(){
|
||||
this.$refs["repaymentForm"].validate(valid => {
|
||||
if (valid) {
|
||||
returnOrder(this.repaymentForm).then(res=>{
|
||||
this.$modal.msgSuccess("还款成功");
|
||||
this.repaymentOpen = false;
|
||||
this.repaymentForm = {}
|
||||
this.getList();
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
repayment(data){
|
||||
this.repaymentOpen = true
|
||||
this.repaymentForm.rescueOrderId = data.rescueOrderId
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
driverOk(){
|
||||
this.designateFlag = false
|
||||
designateDriver(this.rescueInfoId,this.chooseDriverId).then(res=>{
|
||||
this.$message.success("指派成功")
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
/** 查询道路救援模块列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
moneyManagement(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
moneyManagementData(this.queryParams).then(response => {
|
||||
this.moneyManagementData = response.data;
|
||||
});
|
||||
},
|
||||
getDriverList() {
|
||||
getDriver().then(response => {
|
||||
this.driverList = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
connectionName: null,
|
||||
connectionPhone: null,
|
||||
licenseNum: null,
|
||||
isAppointment: null,
|
||||
rescueTime: null,
|
||||
rescueType: null,
|
||||
carType: null,
|
||||
rescuePosition: null,
|
||||
rescueLongitude: null,
|
||||
rescueLatitude: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
destinationLongitude: null,
|
||||
destinationLatitude: null,
|
||||
rescueStatus: null,
|
||||
driverId: null,
|
||||
rescueAmount: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
if (this.time1&&this.time1.length>0){
|
||||
this.queryParams.rescueStart = this.time1[0];
|
||||
this.queryParams.rescueEnd = this.time1[1];
|
||||
}
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.time1 =[]
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams={}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加道路救援模块";
|
||||
},
|
||||
pickDriver(row){
|
||||
|
||||
},
|
||||
designateDriver(row){
|
||||
this.designateFlag = true
|
||||
this.rescueInfoId = row.id
|
||||
this.getDriverList();
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改道路救援模块";
|
||||
});
|
||||
},
|
||||
handleMap(row){
|
||||
this.rescueInfoId = row.id
|
||||
routeInfo(row.id).then(res=>{
|
||||
this.ztlist = res.data
|
||||
this.none(res.data)
|
||||
})
|
||||
getmap(row.id).then(res=>{
|
||||
let datas =[]
|
||||
res.data.forEach(it=>{
|
||||
let temp =[it.longitude,it.latitude]
|
||||
datas.push(temp)
|
||||
})
|
||||
this.$refs.mapComponent.initMap(datas)
|
||||
})
|
||||
this.opens = true;
|
||||
},
|
||||
none(arr){
|
||||
let sum = 0;
|
||||
for(var i = 0;i<arr.length;i++){
|
||||
sum += arr[i].distanceMeter;
|
||||
}
|
||||
|
||||
this.zong = sum
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('/system/rescueInfo/exportManagement', {
|
||||
...this.queryParams
|
||||
}, `救援财务报表_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.lang-for{
|
||||
width: 100%;
|
||||
margin: 10px auto;
|
||||
}
|
||||
</style>
|
250
src/views/rescue/rescueRoad.vue
Normal file
250
src/views/rescue/rescueRoad.vue
Normal file
@ -0,0 +1,250 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="路段" prop="dictLabel">
|
||||
<el-input
|
||||
v-model="queryParams.searchValue"
|
||||
placeholder="请输入路段名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="排序" align="center" prop="dictSort" />
|
||||
|
||||
<el-table-column label="路段" align="center" prop="dictLabel">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
|
||||
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.dictLabel}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="显示排序" prop="dictSort">
|
||||
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="路段" prop="dictLabel">
|
||||
<el-input v-model="form.dictLabel" placeholder="请输入账号" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getRescueRoad,addRescueRoad,delRescueRoad} from "./api/rescueRoad";
|
||||
|
||||
export default {
|
||||
name: "Data",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 字典表格数据
|
||||
dataList: [],
|
||||
// 默认字典类型
|
||||
defaultDictType: "",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 数据标签回显样式
|
||||
listClassOptions: [
|
||||
{
|
||||
value: "default",
|
||||
label: "默认"
|
||||
},
|
||||
{
|
||||
value: "primary",
|
||||
label: "主要"
|
||||
},
|
||||
{
|
||||
value: "success",
|
||||
label: "成功"
|
||||
},
|
||||
{
|
||||
value: "info",
|
||||
label: "信息"
|
||||
},
|
||||
{
|
||||
value: "warning",
|
||||
label: "警告"
|
||||
},
|
||||
{
|
||||
value: "danger",
|
||||
label: "危险"
|
||||
}
|
||||
],
|
||||
// 类型数据字典
|
||||
typeOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
dictLabel: [
|
||||
{ required: true, message: "数据标签不能为空", trigger: "blur" }
|
||||
],
|
||||
dictValue: [
|
||||
{ required: true, message: "数据键值不能为空", trigger: "blur" }
|
||||
],
|
||||
dictSort: [
|
||||
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getRescueRoad(this.queryParams).then(response => {
|
||||
console.log(response)
|
||||
this.dataList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
dictCode: undefined,
|
||||
dictLabel: undefined,
|
||||
dictValue: undefined,
|
||||
cssClass: undefined,
|
||||
listClass: 'default',
|
||||
dictSort: 0,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 返回按钮操作 */
|
||||
handleClose() {
|
||||
const obj = { path: "/system/dict" };
|
||||
this.$tab.closeOpenPage(obj);
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {}
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加扣车地址";
|
||||
this.form.dictType = this.queryParams.dictType;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictCode)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const dictCode = row.dictCode || this.ids
|
||||
addRescueRoad(dictCode).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改字典数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
addRescueRoad(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictCodes = row.dictCode || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
|
||||
return delRescueRoad(dictCodes);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/data/export', {
|
||||
...this.queryParams
|
||||
}, `data_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
419
src/views/rescue/systemRescueInfo.vue
Normal file
419
src/views/rescue/systemRescueInfo.vue
Normal file
@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="connectionName">
|
||||
<el-input
|
||||
v-model="queryParams.connectionName"
|
||||
placeholder="请输入联系人名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约单" prop="isAppointment">
|
||||
<el-select v-model="queryParams.isAppointment" placeholder="请选择是否为预约单" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援类型" prop="rescueType">
|
||||
<el-select v-model="queryParams.rescueType" placeholder="请选择救援类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.dljy_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:info:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['system:info:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="名称" align="center" prop="connectionName" />
|
||||
<el-table-column label="手机号" align="center" prop="connectionPhone" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNum" />
|
||||
<el-table-column label="是否为预约单" align="center" prop="isAppointment">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.yes_no" :value="scope.row.isAppointment"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援时间" align="center" prop="rescueTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.rescueTime, '{y}-{m}-{d} {h}:{m}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援类型" align="center" prop="rescueType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.dljy_type" :value="scope.row.rescueType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车辆类型" align="center" prop="carType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.car_type" :value="scope.row.carType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="救援地点" align="center" prop="rescuePosition" />
|
||||
<el-table-column label="收费类型" align="center" prop="feeType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.fee_type" :value="scope.row.feeType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="救援状态" align="center" prop="rescueStatus" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.jy_order_status" :value="scope.row.rescueStatus"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="金额" align="center" prop="rescueAmount" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:info:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.rescueStatus==1||scope.row.rescueStatus==2"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:info:edit']"
|
||||
>指派司机</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:info:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改道路救援模块对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="联系人名称" prop="connectionName">
|
||||
<el-input v-model="form.connectionName" placeholder="请输入联系人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人手机号" prop="connectionPhone">
|
||||
<el-input v-model="form.connectionPhone" placeholder="请输入联系人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNum">
|
||||
<el-input v-model="form.licenseNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为预约单" prop="isAppointment">
|
||||
<el-radio-group v-model="form.isAppointment">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援时间" prop="rescueTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.rescueTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择救援时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援类型 1拖车2送油3搭电4换台5扣车" prop="rescueType">
|
||||
<el-select v-model="form.rescueType" placeholder="请选择救援类型 1拖车2送油3搭电4换台5扣车">
|
||||
<el-option
|
||||
v-for="dict in dict.type.dljy_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆类型 大中小" prop="carType">
|
||||
<el-select v-model="form.carType" placeholder="请选择车辆类型 大中小">
|
||||
<el-option
|
||||
v-for="dict in dict.type.car_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="救援地点 详细描述" prop="rescuePosition">
|
||||
<el-input v-model="form.rescuePosition" placeholder="请输入救援地点 详细描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援经度" prop="rescueLongitude">
|
||||
<el-input v-model="form.rescueLongitude" placeholder="请输入救援经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援纬度" prop="rescueLatitude">
|
||||
<el-input v-model="form.rescueLatitude" placeholder="请输入救援纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收费类型" prop="feeType">
|
||||
<el-radio-group v-model="form.feeType">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.fee_type"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<el-input v-model="form.carBrand" placeholder="请输入车辆品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地详细描述" prop="destinationInfo">
|
||||
<el-input v-model="form.destinationInfo" placeholder="请输入目的地详细描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地经度" prop="destinationLongitude">
|
||||
<el-input v-model="form.destinationLongitude" placeholder="请输入目的地经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目的地纬度" prop="destinationLatitude">
|
||||
<el-input v-model="form.destinationLatitude" placeholder="请输入目的地纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="救援司机主键" prop="driverId">
|
||||
<el-input v-model="form.driverId" placeholder="请输入救援司机主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="rescueAmount">
|
||||
<el-input v-model="form.rescueAmount" placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/rescue/info";
|
||||
|
||||
export default {
|
||||
name: "Info",
|
||||
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no','jy_order_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 道路救援模块表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
connectionName: null,
|
||||
isAppointment: null,
|
||||
rescueType: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
rescueStatus: null,
|
||||
rescueAmount: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
connectionName: [
|
||||
{ required: true, message: "联系人名称不能为空", trigger: "blur" }
|
||||
],
|
||||
connectionPhone: [
|
||||
{ required: true, message: "联系人手机号不能为空", trigger: "blur" }
|
||||
],
|
||||
licenseNum: [
|
||||
{ required: true, message: "车牌号不能为空", trigger: "blur" }
|
||||
],
|
||||
isAppointment: [
|
||||
{ required: true, message: "是否为预约单不能为空", trigger: "change" }
|
||||
],
|
||||
rescueType: [
|
||||
{ required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change" }
|
||||
],
|
||||
carType: [
|
||||
{ required: true, message: "车辆类型 大中小不能为空", trigger: "change" }
|
||||
],
|
||||
rescuePosition: [
|
||||
{ required: true, message: "救援地点 详细描述不能为空", trigger: "blur" }
|
||||
],
|
||||
feeType: [
|
||||
{ required: true, message: "收费类型不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询道路救援模块列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.rescueStatus
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
connectionName: null,
|
||||
connectionPhone: null,
|
||||
licenseNum: null,
|
||||
isAppointment: null,
|
||||
rescueTime: null,
|
||||
rescueType: null,
|
||||
carType: null,
|
||||
rescuePosition: null,
|
||||
rescueLongitude: null,
|
||||
rescueLatitude: null,
|
||||
feeType: null,
|
||||
carBrand: null,
|
||||
destinationInfo: null,
|
||||
destinationLongitude: null,
|
||||
destinationLatitude: null,
|
||||
rescueStatus: null,
|
||||
driverId: null,
|
||||
rescueAmount: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加道路救援模块";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改道路救援模块";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/info/export', {
|
||||
...this.queryParams
|
||||
}, `info_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user