救援集成进度3/5

This commit is contained in:
xiao-fajia 2024-08-22 21:18:33 +08:00
parent 69c9a06975
commit 05be79b026
7 changed files with 110 additions and 70 deletions

View File

@ -91,3 +91,12 @@ export function returnOrder(data) {
data:data
})
}
export function downloadOrder(params) {
return request({
url: '/system/rescueInfo/export',
method: 'get',
params,
responseType: 'blob'
})
}

View File

@ -149,6 +149,16 @@ export const DICT_TYPE = {
CAR_LICENSE_COLOR: 'car_license_color',
// 车辆使用性质
CAR_USE_NATURE : 'car_use_nature',
// 救援类型
DLJY_TYPE: 'dljy_type',
// 收费类型
FEE_TYPE: 'fee_type',
// 救援状态
JY_STATUS: 'jy_status',
// 救援订单状态
JY_ORDER_STATUS: 'jy_order_status',
// 车辆类型
RESCUE_CAR_TYPE: 'rescue_car_type',
}
/**

View File

@ -29,7 +29,11 @@
</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">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="扣车地址" align="center" prop="dictLabel">

View File

@ -84,7 +84,11 @@
</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">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="主键" align="center" prop="id" />-->
<el-table-column label="客户名称" align="center" prop="customerName"/>
<el-table-column label="客户手机号" align="center" prop="customerPhone"/>

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="名称" prop="connectionName">
<el-input
v-model="queryParams.connectionName"
@ -33,6 +33,46 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="救援类型" prop="rescueType">
<el-select v-model="queryParams.rescueType" placeholder="请选择救援类型" clearable>
<el-option
v-for="dict in this.getDictDatas(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 this.getDictDatas(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 this.getDictDatas(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 this.getDictDatas(DICT_TYPE.JY_ORDER_STATUS)"
: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"
@ -46,53 +86,18 @@
: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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" 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="infoList" @selection-change="handleSelectionChange">
@ -101,8 +106,7 @@
<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-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>
@ -113,7 +117,7 @@
<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-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>
@ -125,31 +129,30 @@
</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"/>
<dict-tag :type="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"/>
<dict-tag :type="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 width="130" label="救援地点" :show-overflow-tooltip="true" 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"/>
<dict-tag :type="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"/>
<dict-tag :type="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"/>
<dict-tag :type="DICT_TYPE.JY_ORDER_STATUS" :value="scope.row.orderStatus"/>
</span>
<span v-else>
未成单
@ -160,7 +163,7 @@
<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-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>
@ -272,11 +275,11 @@
</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-->
<!-- 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">
@ -289,22 +292,22 @@
</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-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-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">
@ -318,11 +321,11 @@
</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-->
<!-- 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">
@ -377,7 +380,7 @@
</template>
<script>
import { routeInfo, listInfo, getInfo, delInfo, addInfo, updateInfo,getDriver,designateDriver,returnOrder,watchImg } from "@/api/rescue/info";
import { routeInfo, listInfo, getInfo, delInfo, addInfo, updateInfo,getDriver,designateDriver,returnOrder,watchImg, downloadOrder} from "@/api/rescue/info";
import { getmap } from "@/api/Map/map";
import Map from "../../components/Map/index"
export default {
@ -426,12 +429,18 @@ export default {
destinationInfo: null,
rescueStatus: null,
rescueAmount: null,
driverName: null,
driverCarNum: null,
orderStatus: null,
rescueEnd: null,
rescueStart: null
},
//
form: {},
driverList:[],
imgFlag:0,
imgFlag:false,
watchImgList:[],
pickerOptions: null,
//
rules: {
connectionName: [
@ -472,7 +481,7 @@ export default {
watchImg(data){
watchImg(data.id).then(response =>{
this.imgFlag = 1
this.imgFlag = true
this.watchImgList = response.data
})
},
@ -563,10 +572,6 @@ export default {
rescueStatus: null,
driverId: null,
rescueAmount: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null
};
this.resetForm("form");
},
@ -583,7 +588,9 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.time1 =[]
this.time1 = null
this.queryParams.rescueStart = null
this.queryParams.rescueEnd = null
this.resetForm("queryForm");
this.handleQuery();
},
@ -674,10 +681,12 @@ export default {
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/rescueInfo/export', {
...this.queryParams
}, `救援订单_${new Date().getTime()}.xlsx`)
async handleExport() {
try {
const data = await downloadOrder(this.queryParams)
this.$download.excel(data, `救援订单_${new Date().getTime()}.xls`)
}catch {}
finally {}
}
}
};

View File

@ -296,15 +296,15 @@ export default {
methods: {
getCarList(){
listCar().then(res=>{
this.carList = res.rows
this.carList = res.data.records
})
},
/** 查询车辆消费管理列表 */
getList() {
this.loading = true;
listRescueCarSpend(this.queryParams).then(response => {
this.rescueCarSpendList = response.rows;
this.total = response.total;
this.rescueCarSpendList = response.data.records;
this.total = response.data.total;
this.loading = false;
});
},

View File

@ -29,7 +29,11 @@
</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">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="路段" align="center" prop="dictLabel">