This commit is contained in:
邱贞招 2024-06-20 15:09:30 +08:00
parent 6519e48ed1
commit 6f83e8078c
7 changed files with 249 additions and 85 deletions

View File

@ -54,7 +54,7 @@ export function allDevice() {
// 开锁
export function handleUnlocking(data){
return request({
url: '/appVerify/admin/unlocking?sn='+data.sn,
url: '/system/device/admin/unlockingByMac?mac='+data.mac,
method: 'post'
})
}
@ -62,7 +62,7 @@ export function handleUnlocking(data){
// 关锁
export function handleLock(data){
return request({
url: '/appVerify/admin/lock?sn='+data.sn,
url: '/system/device/admin/lockByMac?mac='+data.mac,
method: 'post'
})
}
@ -70,7 +70,7 @@ export function handleLock(data){
// 响铃寻车
export function ring(data){
return request({
url: '/app/device/ring?sn='+data.sn,
url: '/app/device/ringByMac?mac='+data.mac,
method: 'post'
})
}

View File

@ -40,11 +40,19 @@ export default {
},
initLng: {
type: String,
default: 120.250452
default: '120.250452'
},
initLat: {
type: String,
default: 27.101745
default: '27.101745'
},
status: {
type: String,
default: '0'
},
onlineStatus: {
type: String,
default: '0'
},
},
data() {
@ -115,7 +123,8 @@ export default {
this.getGeoAddress(this.initLng, this.initLat).then(res => {
//
this.removeAllMarker();
this.addMarker(this.initLng, this.initLat, res.regeocode.formattedAddress);
console.log("添加标记点")
this.addMarker(this.initLng, this.initLat, res.regeocode.formattedAddress, this.status, this.onlineStatus);
this.$emit('map-geo', res, this.initLng, this.initLat);
//
@ -129,16 +138,38 @@ export default {
})
}
},
addMarker(lng, lat, title) {
addMarker(lng, lat, title,status,onlineStatus) {
// Marker
let marker = new AMap.Marker({
position: new AMap.LngLat(lng, lat), //
icon: this.formarStatus(status,onlineStatus),
title: title,
});
//
this.map.add(marker);
this.markers.push(marker);
},
formarStatus(status,onlineStatus){
if(onlineStatus == "0"){
return globalConfig.icon.red;
}else{
if(status == "0"){
return globalConfig.icon.gray;
}else if(status == "1"){
return globalConfig.icon.blue;
}else if(status == "2"){
return globalConfig.icon.yellow;
}else if(status == "3"){
return globalConfig.icon.yellow;
}else if(status == "4"){
return globalConfig.icon.light_blue;
}else if(status == "8"){
return globalConfig.icon.gray;
}else if(status == "9"){
return globalConfig.icon.gray;
}
}
},
//
removeAllMarker() {
this.map.remove(this.markers);

View File

@ -302,7 +302,15 @@
<el-col :span="8">
<el-form-item label="二维码:">
<template>
<image-preview style="margin-top: -30px" :src="form.qrcode" :width="50" :height="50"/>
<el-popover
placement="top"
width="180"
trigger="hover">
<div class="qr-code-box">
<qr-code :text="form.qrText" :width="150" :height="150" />
</div>
<el-button slot="reference" type="text" icon="el-icon-picture">查看</el-button>
</el-popover>
</template>
</el-form-item>
<el-form-item label="车辆上下线:" style="color: #ffcc00;font-weight: 700">{{ form.onlineStatus == 1 ? '在线' : '离线' }}</el-form-item>
@ -328,6 +336,8 @@
@map-geo="onMapGeo"
:init-lat="form.latitude"
:init-lng="form.longitude"
:status="form.status"
:online-status="form.onlineStatus"
/>
</el-col>
</el-row>

View File

@ -2,6 +2,16 @@
<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="deptId" v-if="userName == 'admin'">
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
<el-option
v-for="item in deptOptions"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="套餐名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入套餐名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
@ -41,7 +51,7 @@
<el-table v-loading="loading" :data="feeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="ruleId" />
<el-table-column label="运营区" align="center" prop="area" v-if="userName == 'admin'"/>
<el-table-column label="运营商" align="center" prop="deptName" v-if="userName == 'admin'"/>
<el-table-column label="套餐名称" align="center" prop="name" />
<el-table-column label="说明" :show-overflow-tooltip="true" align="center" prop="instructions" />
<!-- <el-table-column label="时间(小时)" align="center" prop="time" />
@ -77,16 +87,16 @@
<el-form-item label="套餐名称" prop="name">
<el-input v-model="form.name" placeholder="请输入套餐名称" />
</el-form-item>
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="form.areaId" placeholder="请选择运营区">
<el-option
v-for="item in areaOptions"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">-->
<!-- <el-select v-model="form.areaId" placeholder="请选择运营区">-->
<!-- <el-option-->
<!-- v-for="item in areaOptions"-->
<!-- :key="item.areaId"-->
<!-- :label="item.areaName"-->
<!-- :value="item.areaId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="说明" prop="instructions" :show-overflow-tooltip="true">
<editor v-model="form.instructions" :min-height="192"/>
<!-- <el-input v-model="form.explain" type="textarea" placeholder="请输入内容" /> -->
@ -312,6 +322,7 @@
<script>
import { listFee, getFee, delFee, addFee, updateFee } from "@/api/system/fee";
import { listArea } from '@/api/system/area'
import { listDept, listDeptExcludeChild } from '@/api/system/dept'
export default {
name: "Fee",
@ -324,6 +335,7 @@ export default {
single: true,
//
areaOptions: [],
deptOptions: [],
multiple: true,
showSearch: true,
total: 0,
@ -414,6 +426,11 @@ export default {
console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name;
this.getList();
if(this.userName === 'admin'){
listDept({status: '0' }).then(response => {
this.deptOptions = response.data;
});
}
},
methods: {
handleUnitChange() {

View File

@ -121,8 +121,91 @@
/>
<!-- 添加或修改订单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" label-width="110px">
<el-row>
<el-col :span="12">
<el-form-item label="支付订单编号:">{{ form.orderNo }}</el-form-item>
<el-form-item label="租赁时长:">{{ formatDuration(form) }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="租赁用户:" >{{ form.phonenumber }}</el-form-item>
<el-form-item label="行驶距离:" >{{ form.distance }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="订单状态:">{{ formatStatus(form.status) }}</el-form-item>
</el-col>
</el-row>
<h2 style="font-weight: bold;font-size: 18px">设备信息</h2>
<el-row>
<el-col :span="12">
<el-form-item label="车牌号:">{{ form.device.vehicleNum }}</el-form-item>
<el-form-item label="SN">{{ form.sn }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="MAC">{{ form.device.mac }}</el-form-item>
<el-form-item label="运营区域:" >{{ form.area }}</el-form-item>
</el-col>
</el-row>
<h2 style="font-weight: bold;font-size: 18px">行程记录</h2>
<!-- 显示路径 -->
<el-row>
<el-col :span="24">
<location-map
v-if="showPlaceSearchMap"
ref="map"
height="400px"
/>
</el-col>
</el-row>
<h2 style="font-weight: bold;font-size: 18px;padding-top: 10px">费用明细</h2>
<el-row>
<el-col :span="12">
<el-form-item label="预约费用:">{{ formatFee(form.appointmentFee) }}</el-form-item>
<el-form-item label="调度费:">{{ formatFee(form.dispatchFee) }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="骑行费用:" >{{ formatFee(form.ridingFee) }}</el-form-item>
<el-form-item label="管理费:" >{{ formatFee(form.manageFee) }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="实收:">{{ formatFee(form.payFee) }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="支付方式:">{{ formatType(form.wx) }}</el-form-item>
<el-form-item label="支付时间:">{{ form.payTime }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="收费方式:" >{{ form.areaName }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="预约费退款:">{{ formatFee(form.payFee) }}</el-form-item>
<el-form-item label="调度费退款:">{{ formatFee(form.payFee) }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="骑行费用退款:" >{{ formatFee(form.areaName) }}</el-form-item>
<el-form-item label="管理费退款:" >{{ formatFee(form.remainingPower) }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="退款原因:">{{ form.mac }}</el-form-item>
<el-form-item label="退款时间:">{{ form.sn }}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="结算总费用:">{{ formatFee(form.mac) }}</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -134,10 +217,12 @@
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/system/order";
import LocationMap from '@/components/Map/location/LocationMap'
export default {
name: "Order",
dicts: ['et_order_type', 'et_pay_type', 'et_order_status'],
components: {LocationMap },
data() {
return {
//
@ -156,6 +241,7 @@ export default {
orderList: [],
//
title: "",
showPlaceSearchMap: false,
//
open: false,
//
@ -171,7 +257,16 @@ export default {
deviceMac: null,
},
//
form: {},
form: {
device: {
vehicleNum: null,
mac: null
},
status: null,
payType: null,
payFee: null,
appointmentFee: null,
},
//
rules: {
orderNo: [
@ -190,6 +285,38 @@ export default {
this.getList();
},
methods: {
formatFee(fee){
if (!fee) return '0.00';
return parseFloat(this.form.appointmentFee).toFixed(2);
},
formatStatus(status) {
//0-1-2-3-4-
if (!status) return '未知';
switch (status) {
case '0':
return '预约中';
case '1':
return '取消预约';
case '2':
return '开始骑行';
case '3':
return '骑行结束';
case '4':
return '订单结束';
default:
return '未知';
}
},
formatType(payType) {
switch (payType) {
case 'ali':
return '支付宝';
case 'wx':
return '微信';
default:
return '未知';
}
},
formatDuration(row) {
const createTime = new Date(row.createTime);
const endTime = new Date(row.returnTime);
@ -267,8 +394,10 @@ export default {
const orderId = row.orderId || this.ids
getOrder(orderId).then(response => {
this.form = response.data;
console.log("111111111111111111111111---------------"+JSON.stringify(response.data))
this.showPlaceSearchMap = true;
this.open = true;
this.title = "修改订单";
this.title = "订单详情";
});
},
/** 提交按钮 */
@ -310,3 +439,11 @@ export default {
}
};
</script>
<style>
.el-dialog__body{
padding: 0px 20px !important;
}
.el-form-item--mini.el-form-item {
margin-bottom: 10px !important;
}
</style>

View File

@ -17,10 +17,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户ID" prop="userId">
<el-form-item label="用户" prop="userName">
<el-input
v-model="queryParams.userId"
placeholder="请输入用户ID"
v-model="queryParams.userName"
placeholder="请输入用户"
clearable
@keyup.enter.native="handleQuery"
/>
@ -33,7 +33,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="退款项目说明" prop="itemDesc">
<el-form-item label="退款说明" prop="itemDesc">
<el-input
v-model="queryParams.itemDesc"
placeholder="请输入退款项目说明"
@ -48,38 +48,6 @@
</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:refund: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="['system:refund: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="['system:refund:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@ -95,10 +63,9 @@
<el-table v-loading="loading" :data="refundList" @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="refundNo" />
<el-table-column label="关联订单" align="center" prop="orderNo" />
<el-table-column label="用户ID" align="center" prop="userId" />
<el-table-column label="用户" align="center" prop="userName" />
<el-table-column label="退款金额" align="center" prop="amount" />
<el-table-column label="退款原因" align="center" prop="reason" />
<el-table-column label="退款时间" align="center" prop="createTime" width="180">
@ -107,24 +74,6 @@
</template>
</el-table-column>
<el-table-column label="退款项目说明" align="center" prop="itemDesc" />
<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:refund:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:refund:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination

View File

@ -115,9 +115,14 @@
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="注册号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[3].visible" width="120" />
<el-table-column label="手机号" align="center" key="phonenumber" prop="phonenumber" v-if="columns[3].visible" width="120" />
<el-table-column label="移动端" align="center" key="appName" prop="appName" v-if="columns[3].visible" width="120" />
<el-table-column label="余额" align="center" key="balance" prop="balance" v-if="columns[4].visible" width="120" />
<el-table-column label="最后登录时间" align="center" prop="createTime" v-if="columns[5].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.loginDate) }}</span>
</template>
</el-table-column>
<el-table-column label="注册时间" align="center" prop="createTime" v-if="columns[5].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -133,7 +138,11 @@
></el-switch>
</template>
</el-table-column>
<!-- <el-table-column label="绑定设备数" align="center" key="bindDeviceNum" prop="bindDeviceNum" v-if="columns[6].visible" :show-overflow-tooltip="true" />-->
<el-table-column label="是否实名" align="center" prop="isAuthentication">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_user_is_authentication" :value="scope.row.isAuthentication" />
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
@ -270,6 +279,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="角色" prop="role">
<el-select v-model="role" placeholder="请选择角色">
<el-option
v-for="dict in dict.type.et_asuser_role"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
@ -318,7 +337,7 @@ import { listUser as getSysUserList } from "@/api/system/user";
export default {
name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'],
dicts: ['sys_normal_disable', 'sys_user_sex','et_user_is_authentication','et_asuser_role'],
data() {
return {
//
@ -339,6 +358,7 @@ export default {
sysUserList: null,
sysUserOptions: null,
userId:null,
role: null,
//
title: "",
//
@ -511,7 +531,7 @@ export default {
submitBand: function () {
console.log(this.form.userId)
console.log(this.userId)
bandSystemUser({userId:this.form.userId,sysUserId:this.userId}).then(response => {
bandSystemUser({userId:this.form.userId,sysUserId:this.userId,role:this.role}).then(response => {
this.$modal.msgSuccess("绑定成功");
this.open2 = false;
this.getList();
@ -549,7 +569,7 @@ export default {
handleBandSysUser(row){
this.reset();
const userId = row.userId || this.ids;
getSysUserList(userId).then(response => {
getSysUserList({"userType":"00"}).then(response => {
this.sysUserOptions = response.rows;
this.form.userId = userId;
this.open2 = true;