调整优化等
This commit is contained in:
parent
6411c17fe5
commit
65dd5f5ff6
|
@ -51,3 +51,30 @@ export function delOrder(orderId) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 改价
|
||||||
|
export function changePrice(data) {
|
||||||
|
return request({
|
||||||
|
url: '/appVerify/order/editPrice',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退款
|
||||||
|
export function refund(data) {
|
||||||
|
return request({
|
||||||
|
url: '/appVerify/order/refund',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退款
|
||||||
|
export function returnVehicle(data) {
|
||||||
|
return request({
|
||||||
|
url: '/appVerify/device/return',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -54,6 +54,8 @@ export default {
|
||||||
coordList: "",
|
coordList: "",
|
||||||
timer: "",
|
timer: "",
|
||||||
status:true,
|
status:true,
|
||||||
|
lon2: null,
|
||||||
|
lat2: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["pathList", "dataId","lon","lat"],
|
props: ["pathList", "dataId","lon","lat"],
|
||||||
|
@ -114,6 +116,8 @@ export default {
|
||||||
console.log("接收参数", this.pathList);
|
console.log("接收参数", this.pathList);
|
||||||
console.log("接收参数", this.lon);
|
console.log("接收参数", this.lon);
|
||||||
console.log("接收参数", this.lat);
|
console.log("接收参数", this.lat);
|
||||||
|
this.lon2 = this.lon === undefined ? 120.35218 : this.lon;
|
||||||
|
this.lat2 = this.lat === undefined ? 26.944335 : this.lat;
|
||||||
// console.log(typeof JSON.parse(this.pathList));
|
// console.log(typeof JSON.parse(this.pathList));
|
||||||
await AMapLoader.load({
|
await AMapLoader.load({
|
||||||
key: globalConfig.aMap.key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: globalConfig.aMap.key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
|
@ -129,7 +133,7 @@ export default {
|
||||||
//设置地图容器id
|
//设置地图容器id
|
||||||
viewMode: "3D", //是否为3D地图模式
|
viewMode: "3D", //是否为3D地图模式
|
||||||
zoom: 13, //初始化地图级别
|
zoom: 13, //初始化地图级别
|
||||||
center: [this.lon,this.lat], //初始化地图中心点位置--大嵛山岛
|
center: [this.lon2, this.lat2], // 初始化地图中心点位置
|
||||||
});
|
});
|
||||||
this.map.setFitView();
|
this.map.setFitView();
|
||||||
})
|
})
|
||||||
|
@ -222,7 +226,7 @@ export default {
|
||||||
}
|
}
|
||||||
.input-card-left {
|
.input-card-left {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -40px;
|
top: 5px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
|
|
@ -91,17 +91,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 显示轨迹
|
// 显示轨迹
|
||||||
trajectory() {
|
trajectory() {
|
||||||
console.log("this.tripRouteStr-----------------"+JSON.stringify(this.tripRouteStr))
|
|
||||||
this.line = JSON.parse(this.tripRouteStr)
|
this.line = JSON.parse(this.tripRouteStr)
|
||||||
let line = this.line;
|
let line = this.line;
|
||||||
console.log("this.tripRouteStr-----------------"+JSON.parse(this.tripRouteStr))
|
|
||||||
if (Array.isArray(line)) {
|
|
||||||
// this.lineArr 是数组
|
|
||||||
console.log("this.lineArr-是数组");
|
|
||||||
} else {
|
|
||||||
// this.lineArr 不是数组
|
|
||||||
console.log("this.lineArr-不是数组");
|
|
||||||
}
|
|
||||||
this.marker = new AMap.Marker({
|
this.marker = new AMap.Marker({
|
||||||
map: this.map,
|
map: this.map,
|
||||||
position: line[0],
|
position: line[0],
|
||||||
|
@ -136,25 +127,11 @@ export default {
|
||||||
|
|
||||||
this.map.setFitView();
|
this.map.setFitView();
|
||||||
},
|
},
|
||||||
// /**
|
|
||||||
// * 获取区域对角线的两点坐标,即这个区域内的最小坐标值和最大坐标值
|
|
||||||
// *
|
|
||||||
// * @param pointerArray [[a,b],[c,d]]
|
|
||||||
// * @return Array {min:number[a,b], max:number[c,d]}
|
|
||||||
// */
|
|
||||||
// getMaxBoundsPointer(pointerArray){
|
|
||||||
// console.log("JSON-------------"+JSON.stringify(pointerArray))
|
|
||||||
// let lngArray = pointerArray.map(item => item[0])
|
|
||||||
// let latArray = pointerArray.map(item => item[1])
|
|
||||||
// console.log("lngArray-------------"+lngArray)
|
|
||||||
// console.log("latArray-------------"+latArray)
|
|
||||||
// return {
|
|
||||||
// min: [Math.min(...lngArray), Math.min(...latArray)],
|
|
||||||
// max: [Math.max(...lngArray), Math.max(...latArray)],
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
startAnimation() {
|
startAnimation() {
|
||||||
this.marker.moveAlong(this.line, 200);
|
this.marker.moveAlong(this.line, {
|
||||||
|
// 每一段的时长
|
||||||
|
duration: 100,//可根据实际采集时间间隔设置
|
||||||
|
});
|
||||||
},
|
},
|
||||||
pauseAnimation() {
|
pauseAnimation() {
|
||||||
this.marker.pauseMove();
|
this.marker.pauseMove();
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||||
<el-table-column label="工单编号" width="180" align="center" prop="orderNo" />
|
<el-table-column label="工单编号" width="180" align="center" prop="orderNo" />
|
||||||
<el-table-column label="设备mac" align="center" prop="deviceMac" />
|
<el-table-column label="设备mac" align="center" prop="deviceMac" />
|
||||||
|
<el-table-column label="SN" align="center" prop="sn" />
|
||||||
<el-table-column label="运维人员" align="center" prop="adminName" />
|
<el-table-column label="运维人员" align="center" prop="adminName" />
|
||||||
<el-table-column label="换电前电量(%)" width="120" align="center">
|
<el-table-column label="换电前电量(%)" width="120" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -113,7 +114,7 @@
|
||||||
<dict-tag :options="dict.type.et_order_is_success" :value="scope.row.isSuccess"/>
|
<dict-tag :options="dict.type.et_order_is_success" :value="scope.row.isSuccess"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否有效1111111111" align="center" prop="isEffective">
|
<el-table-column label="是否有效" align="center" prop="isEffective">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.et_order_is_effective" :value="scope.row.isEffective"/>
|
<dict-tag :options="dict.type.et_order_is_effective" :value="scope.row.isEffective"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="停车点还车" label-width="90">
|
<el-form-item label="强制停车点还车" label-width="90">
|
||||||
<el-radio-group v-model="form.parkingReturn" style="width: 60%">
|
<el-radio-group v-model="form.parkingReturn" style="width: 60%">
|
||||||
<el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"
|
<el-radio v-for="dict in dict.type.et_business_switch" :key="dict.value"
|
||||||
:label="dict.value">{{ dict.label }}</el-radio>
|
:label="dict.value">{{ dict.label }}</el-radio>
|
||||||
|
|
|
@ -90,12 +90,6 @@
|
||||||
<dict-tag :options="dict.type.et_parking_type" :value="scope.row.type"/>
|
<dict-tag :options="dict.type.et_parking_type" :value="scope.row.type"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="照片" align="center" prop="picture" width="100">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <image-preview :src="scope.row.picture" :width="50" :height="50"/>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- <el-table-column label="区域" align="center" prop="areaId" />-->
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
@ -130,7 +124,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改禁停区对话框 -->
|
<!-- 添加或修改禁停区对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="禁停区" label-width="90" prop="parkingName">
|
<el-form-item label="禁停区" label-width="90" prop="parkingName">
|
||||||
|
@ -149,11 +143,6 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12" v-show="form.type =='1' ">-->
|
|
||||||
<!-- <el-form-item label="图片" prop="picture" >-->
|
|
||||||
<!-- <image-upload v-model="form.picture"/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="边界" prop="boundaryStr">
|
<el-form-item label="边界" prop="boundaryStr">
|
||||||
|
@ -296,7 +285,7 @@ export default {
|
||||||
latitude: null,
|
latitude: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
type: "1"
|
type: "2"
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改禁行区对话框 -->
|
<!-- 添加或修改禁行区对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="禁行区" label-width="90" prop="parkingName">
|
<el-form-item label="禁行区" label-width="90" prop="parkingName">
|
||||||
|
@ -296,7 +296,7 @@ export default {
|
||||||
latitude: null,
|
latitude: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
type: "1"
|
type: "3"
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改停车区对话框 -->
|
<!-- 添加或修改停车区对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="停车区" label-width="90" prop="parkingName">
|
<el-form-item label="停车区" label-width="90" prop="parkingName">
|
||||||
|
@ -149,11 +149,6 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="form.type =='1' ">
|
|
||||||
<el-form-item label="周边环境图片" prop="picture" >
|
|
||||||
<image-upload v-model="form.picture"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="边界" prop="boundaryStr">
|
<el-form-item label="边界" prop="boundaryStr">
|
||||||
|
@ -172,6 +167,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24" v-show="form.type =='1' ">
|
||||||
|
<el-form-item label="周边环境图片" prop="picture" >
|
||||||
|
<image-upload v-model="form.picture"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
|
|
|
@ -36,6 +36,16 @@
|
||||||
v-hasPermi="['system:articleClassify:add']"
|
v-hasPermi="['system:articleClassify:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd2"
|
||||||
|
v-hasPermi="['system:articleClassify:add']"
|
||||||
|
>新增顶级分类</el-button>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="info"
|
type="info"
|
||||||
|
@ -57,6 +67,7 @@
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="classifyName" label="分类名称" width="260"></el-table-column>
|
<el-table-column prop="classifyName" label="分类名称" width="260"></el-table-column>
|
||||||
|
<el-table-column prop="deptName" label="运营商" width="260"></el-table-column>
|
||||||
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
||||||
<el-table-column prop="status" label="状态" width="100">
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -137,6 +148,40 @@
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="title2" :visible.sync="open2" width="600px" append-to-body>
|
||||||
|
<el-form ref="form2" :model="form2" :rules="rules2" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="顶级分类名称" label-width="120" prop="classifyName">
|
||||||
|
<el-input style="width: 60%" v-model="form2.classifyName" placeholder="请输入分类名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="显示排序" prop="orderNum">
|
||||||
|
<el-input-number v-model="form2.orderNum" controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分类状态">
|
||||||
|
<el-radio-group v-model="form2.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -161,6 +206,7 @@ export default {
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
title2: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 是否展开,默认全部展开
|
// 是否展开,默认全部展开
|
||||||
|
@ -174,6 +220,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
// 表单参数
|
||||||
|
form2: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
parentId: [
|
parentId: [
|
||||||
|
@ -185,6 +233,14 @@ export default {
|
||||||
orderNum: [
|
orderNum: [
|
||||||
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
rules2: {
|
||||||
|
classifyName: [
|
||||||
|
{ required: true, message: "分类名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
orderNum: [
|
||||||
|
{ required: true, message: "显示排序不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -214,6 +270,7 @@ export default {
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.open2 = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
@ -225,7 +282,15 @@ export default {
|
||||||
orderNum: undefined,
|
orderNum: undefined,
|
||||||
status: "0"
|
status: "0"
|
||||||
};
|
};
|
||||||
|
this.form2 = {
|
||||||
|
classifyId: undefined,
|
||||||
|
parentId: "0",
|
||||||
|
classifyName: undefined,
|
||||||
|
orderNum: undefined,
|
||||||
|
status: "0"
|
||||||
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
this.resetForm("form2");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -248,6 +313,12 @@ export default {
|
||||||
this.deptOptions = this.handleTree(response.data, "classifyId");
|
this.deptOptions = this.handleTree(response.data, "classifyId");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd2() {
|
||||||
|
this.reset();
|
||||||
|
this.open2 = true;
|
||||||
|
this.title2 = "添加顶级分类";
|
||||||
|
},
|
||||||
/** 展开/折叠操作 */
|
/** 展开/折叠操作 */
|
||||||
toggleExpandAll() {
|
toggleExpandAll() {
|
||||||
this.refreshTable = false;
|
this.refreshTable = false;
|
||||||
|
@ -292,6 +363,26 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm2: function() {
|
||||||
|
this.$refs["form2"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form2.classifyId != undefined) {
|
||||||
|
updateDept(this.form2).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open2 = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addDept(this.form2).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open2 = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除名称为"' + row.classifyName + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除名称为"' + row.classifyName + '"的数据项?').then(function() {
|
||||||
|
|
|
@ -108,6 +108,8 @@
|
||||||
<el-table-column label="车牌号" align="center" prop="vehicleNum" />
|
<el-table-column label="车牌号" align="center" prop="vehicleNum" />
|
||||||
<el-table-column label="运营区" align="center" prop="areaName" />
|
<el-table-column label="运营区" align="center" prop="areaName" />
|
||||||
<el-table-column label="定位" align="center" prop="location" :show-overflow-tooltip="true"/>
|
<el-table-column label="定位" align="center" prop="location" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="电压(V)" align="center" prop="voltage" />
|
||||||
|
<el-table-column label="版本" align="center" prop="version" />
|
||||||
<el-table-column label="剩余电量(%)" align="center" prop="remainingPower" />
|
<el-table-column label="剩余电量(%)" align="center" prop="remainingPower" />
|
||||||
<el-table-column label="车辆状态" align="center" prop="status">
|
<el-table-column label="车辆状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -119,7 +121,7 @@
|
||||||
<dict-tag :options="dict.type.et_device_lock_status" :value="scope.row.lockStatus"/>
|
<dict-tag :options="dict.type.et_device_lock_status" :value="scope.row.lockStatus"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="车辆上下线" align="center" prop="onlineStatus">
|
<el-table-column label="网络状态" align="center" prop="onlineStatus">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.as_online_status" :value="scope.row.onlineStatus"/>
|
<dict-tag :options="dict.type.as_online_status" :value="scope.row.onlineStatus"/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -222,7 +224,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="SN" prop="sn">
|
<el-form-item label="SN" prop="sn">
|
||||||
<el-input v-model="form.sn" placeholder="请输入设备SN" :disabled="title=='修改设备'"/>
|
<el-input v-model="form.sn" placeholder="请输入设备SN" :disabled="title=='修改设备' && userName != 'admin'"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -249,7 +251,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="运营区" prop="areaId" >
|
<el-form-item label="运营区" prop="areaId" >
|
||||||
<el-select v-model="form.areaId" placeholder="请选择运营区">
|
<el-select v-model="form.areaId" clearable placeholder="请选择运营区">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in areaOptions"
|
v-for="item in areaOptions"
|
||||||
:key="item.areaId"
|
:key="item.areaId"
|
||||||
|
@ -313,7 +315,7 @@
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车辆上下线:" style="color: #ffcc00;font-weight: 700">{{ form.onlineStatus == 1 ? '在线' : '离线' }}</el-form-item>
|
<el-form-item label="网络状态:" style="color: #ffcc00;font-weight: 700">{{ form.onlineStatus == 1 ? '在线' : '离线' }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -455,9 +457,9 @@ export default {
|
||||||
mac: [
|
mac: [
|
||||||
{ required: true, message: "MAC不能为空", trigger: "blur" }
|
{ required: true, message: "MAC不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
areaId: [
|
// areaId: [
|
||||||
{ required: true, message: "运营区不能为空", trigger: "blur" }
|
// { required: true, message: "运营区不能为空", trigger: "blur" }
|
||||||
],
|
// ],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -595,7 +597,7 @@ export default {
|
||||||
const deviceId = row.deviceId || this.ids
|
const deviceId = row.deviceId || this.ids
|
||||||
getDevice(deviceId).then(response => {
|
getDevice(deviceId).then(response => {
|
||||||
let form1 = response.data;
|
let form1 = response.data;
|
||||||
let text = form1.status === '0'? '上架': '下架';
|
let text = form1.status === '0'? '上线': '下线';
|
||||||
form1.status = form1.status === '0'? '1': '0';
|
form1.status = form1.status === '0'? '1': '0';
|
||||||
if(form1.areaId == null){
|
if(form1.areaId == null){
|
||||||
this.$modal.msgError("未绑定运营区,无法上架!")
|
this.$modal.msgError("未绑定运营区,无法上架!")
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<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="68px">
|
||||||
<!-- <el-form-item label="用户名称" prop="userName">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- v-model="queryParams.userName"-->
|
|
||||||
<!-- placeholder="请输入用户名称"-->
|
|
||||||
<!-- clearable-->
|
|
||||||
<!-- @keyup.enter.native="handleQuery"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="故障部位" prop="type">
|
<el-form-item label="故障部位" prop="type">
|
||||||
<el-select v-model="queryParams.type" placeholder="请选择故障部位" clearable>
|
<el-select v-model="queryParams.type" placeholder="请选择故障部位" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -36,38 +28,6 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<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:fault: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:fault: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:fault:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -85,7 +45,7 @@
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!-- <el-table-column label="报修id" align="center" prop="faultId" />-->
|
<!-- <el-table-column label="报修id" align="center" prop="faultId" />-->
|
||||||
<el-table-column label="用户" align="center" prop="userName" />
|
<el-table-column label="用户" align="center" prop="userName" />
|
||||||
<el-table-column label="车辆编号" align="center" prop="deviceMac" />
|
<el-table-column label="车辆编号" align="center" prop="sn" />
|
||||||
<el-table-column label="图片" align="center" prop="picture" width="100">
|
<el-table-column label="图片" align="center" prop="picture" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<image-preview :src="scope.row.picture" :width="50" :height="50"/>
|
<image-preview :src="scope.row.picture" :width="50" :height="50"/>
|
||||||
|
@ -126,13 +86,6 @@
|
||||||
@click="handleEdit(scope.row)"
|
@click="handleEdit(scope.row)"
|
||||||
v-hasPermi="['system:fault:query']"
|
v-hasPermi="['system:fault:query']"
|
||||||
>审核</el-button>
|
>审核</el-button>
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['system:fault:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -151,7 +104,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="用户:">{{ form.userName }}</el-form-item>
|
<el-form-item label="用户:">{{ form.userName }}</el-form-item>
|
||||||
<el-form-item label="车辆编号:">{{ form.deviceMac }}</el-form-item>
|
<el-form-item label="车辆编号:">{{ form.sn }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="图片:">
|
<el-form-item label="图片:">
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
:value="dict.value"></el-option>
|
:value="dict.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="还车结算">
|
<el-form-item label="还车结算" prop="autoRefundDeposit">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-input v-model="form.autoRefundDeposit" placeholder="请输入" />
|
<el-input v-model="form.autoRefundDeposit" placeholder="请输入" />
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -386,9 +386,9 @@ export default {
|
||||||
status: [
|
status: [
|
||||||
{ required: true, message: '请选择状态', trigger: 'change' },
|
{ required: true, message: '请选择状态', trigger: 'change' },
|
||||||
],
|
],
|
||||||
// autoRefundDeposit: [
|
autoRefundDeposit: [
|
||||||
// { required: true, message: '请输入还车结算时间', trigger: 'blur' },
|
{ required: true, message: '请输入还车结算时间', trigger: 'blur' },
|
||||||
// ],
|
],
|
||||||
orderExceedMinutes: [
|
orderExceedMinutes: [
|
||||||
{ required: true, message: '请输入订单超过时间', trigger: 'blur' },
|
{ required: true, message: '请输入订单超过时间', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
|
|
|
@ -194,11 +194,13 @@ export default {
|
||||||
],
|
],
|
||||||
fullVoltage: [
|
fullVoltage: [
|
||||||
{ required: true, message: "满电电压不能为空", trigger: "blur" },
|
{ required: true, message: "满电电压不能为空", trigger: "blur" },
|
||||||
{ pattern: /^\d+$/, message: '满电电压必须为正整数', trigger: 'blur' }
|
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入最多两位小数的浮点数', trigger: 'blur' }
|
||||||
|
|
||||||
],
|
],
|
||||||
lowVoltage: [
|
lowVoltage: [
|
||||||
{ required: true, message: "亏电电压不能为空", trigger: "blur" },
|
{ required: true, message: "亏电电压不能为空", trigger: "blur" },
|
||||||
{ pattern: /^\d+$/, message: '亏电电压必须为正整数', trigger: 'blur' }
|
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入最多两位小数的浮点数', trigger: 'blur' }
|
||||||
|
|
||||||
],
|
],
|
||||||
fullEndurance: [
|
fullEndurance: [
|
||||||
{ required: true, message: "满电续航不能为空", trigger: "blur" },
|
{ required: true, message: "满电续航不能为空", trigger: "blur" },
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
<el-table-column label="订单号" :show-overflow-tooltip="true" align="center" prop="orderNo" />
|
<el-table-column label="订单号" :show-overflow-tooltip="true" align="center" prop="orderNo" />
|
||||||
<el-table-column label="用户" align="center" prop="userName" />
|
<el-table-column label="用户" align="center" prop="userName" />
|
||||||
<el-table-column label="设备SN" align="center" prop="sn" />
|
<el-table-column label="设备SN" align="center" prop="sn" />
|
||||||
|
<el-table-column label="车牌号" align="center" prop="vehicleNum" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
||||||
|
@ -98,8 +99,8 @@
|
||||||
<el-table-column label="金额(元)" align="center" prop="totalFee" />
|
<el-table-column label="金额(元)" align="center" prop="totalFee" />
|
||||||
<el-table-column label="备注" align="center" prop="mark" />
|
<el-table-column label="备注" align="center" prop="mark" />
|
||||||
<el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>
|
<el-table-column label="订单时长" align="center" prop="duration" :formatter="formatDuration"/>
|
||||||
<el-table-column label="距离" align="center" prop="distance" />
|
<el-table-column label="距离(公里)" align="center" prop="distance" :formatter="formatDistance"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -108,6 +109,30 @@
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:order:edit']"
|
v-hasPermi="['system:order:edit']"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-if="scope.row.status == 1 || scope.row.status == 3"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="changePrice(scope.row)"
|
||||||
|
v-hasPermi="['system:order:edit']"
|
||||||
|
>改价</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-if="scope.row.status == 4"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="refund(scope.row)"
|
||||||
|
v-hasPermi="['system:order:edit']"
|
||||||
|
>退款</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-if="scope.row.status == 2"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="returnVehicle(scope.row)"
|
||||||
|
v-hasPermi="['system:order:edit']"
|
||||||
|
>辅助还车</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -130,7 +155,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="租赁用户:" >{{ form.phonenumber }}</el-form-item>
|
<el-form-item label="租赁用户:" >{{ form.phonenumber }}</el-form-item>
|
||||||
<el-form-item label="行驶距离:" >{{ form.distance }}</el-form-item>
|
<el-form-item label="行驶距离:" >{{ formatDistance(form) }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -156,6 +181,7 @@
|
||||||
<trajectory-map
|
<trajectory-map
|
||||||
v-if="showPlaceSearchMap"
|
v-if="showPlaceSearchMap"
|
||||||
ref="map"
|
ref="map"
|
||||||
|
:key="key"
|
||||||
height="400px"
|
height="400px"
|
||||||
:trip-route-str="form.tripRouteStr"
|
:trip-route-str="form.tripRouteStr"
|
||||||
/>
|
/>
|
||||||
|
@ -179,11 +205,11 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="支付方式:">{{ formatType(form.wx) }}</el-form-item>
|
<el-form-item label="支付方式:">{{ formatType(form.payType) }}</el-form-item>
|
||||||
<el-form-item label="支付时间:">{{ form.payTime }}</el-form-item>
|
<el-form-item label="支付时间:">{{ form.payTime }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="收费方式:" >{{ form.areaName }}</el-form-item>
|
<el-form-item label="计费模板:" >{{ form.rule.name }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -209,15 +235,52 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 改价、退款 -->
|
||||||
|
<el-dialog :title="title2" :visible.sync="open2" width="600px" append-to-body>
|
||||||
|
<el-form ref="form2" :model="form2" label-width="110px">
|
||||||
|
<el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="预约费(元)" prop="appointmentFee">
|
||||||
|
<el-input v-model="form2.appointmentFee" placeholder="请输入预约费"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="骑行费(元)" prop="ridingFee">
|
||||||
|
<el-input v-model="form2.ridingFee" placeholder="请输入骑行费"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="调度费(元)" prop="dispatchFee">
|
||||||
|
<el-input v-model="form2.dispatchFee" placeholder="请输入调度费"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="管理费(元)" prop="manageFee">
|
||||||
|
<el-input v-model="form2.manageFee" placeholder="请输入管理费"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="title2 === '退款'">
|
||||||
|
<el-form-item label="原因" prop="reason">
|
||||||
|
<el-input v-model="form2.reason" placeholder="请输入管理费"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button v-if="title2 === '改价'" type="success" @click="submitChangePrice">确 定</el-button>
|
||||||
|
<el-button v-if="title2 === '退款'" type="success" @click="submitRefund">确 定</el-button>
|
||||||
|
<el-button @click="cancel2">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/system/order";
|
import { listOrder, getOrder, delOrder, addOrder, updateOrder, changePrice, refund,returnVehicle } from '@/api/system/order'
|
||||||
import TrajectoryMap from '@/components/Map/TrajectoryMap'
|
import TrajectoryMap from '@/components/Map/TrajectoryMap'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -236,12 +299,15 @@ export default {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
// 通过key重新渲染area-map组件
|
||||||
|
key: 0,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 订单表格数据
|
// 订单表格数据
|
||||||
orderList: [],
|
orderList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
title2: "",
|
||||||
showPlaceSearchMap: false,
|
showPlaceSearchMap: false,
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
@ -264,6 +330,9 @@ export default {
|
||||||
vehicleNum: null,
|
vehicleNum: null,
|
||||||
mac: null
|
mac: null
|
||||||
},
|
},
|
||||||
|
rule: {
|
||||||
|
name: null
|
||||||
|
},
|
||||||
status: null,
|
status: null,
|
||||||
payType: null,
|
payType: null,
|
||||||
payFee: null,
|
payFee: null,
|
||||||
|
@ -271,6 +340,10 @@ export default {
|
||||||
tripRouteStr: null,
|
tripRouteStr: null,
|
||||||
vehicleNum: null
|
vehicleNum: null
|
||||||
},
|
},
|
||||||
|
form2: {
|
||||||
|
orderNo: null,
|
||||||
|
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
orderNo: [
|
orderNo: [
|
||||||
|
@ -289,9 +362,56 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changePrice(row){
|
||||||
|
console.log('changePrice')
|
||||||
|
const orderId = row.orderId || this.ids
|
||||||
|
this.reset2();
|
||||||
|
getOrder(orderId).then(response => {
|
||||||
|
this.form2 = response.data;
|
||||||
|
console.log("this.form2============="+JSON.stringify(this.form2));
|
||||||
|
this.open2 = true;
|
||||||
|
this.title2 = "改价";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
refund(row){
|
||||||
|
console.log('changePrice')
|
||||||
|
const orderId = row.orderId || this.ids
|
||||||
|
this.reset2();
|
||||||
|
getOrder(orderId).then(response => {
|
||||||
|
this.form2 = response.data;
|
||||||
|
console.log("this.form2============="+JSON.stringify(this.form2));
|
||||||
|
this.open2 = true;
|
||||||
|
this.title2 = "退款";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
returnVehicle(row){
|
||||||
|
console.log('returnVehicle--------------'+JSON.stringify(row))
|
||||||
|
this.$modal.confirm('是否确认辅助还车MAC为:' + row.sn + '"的设备吗?').then(function() {
|
||||||
|
return returnVehicle({orderNo:row.orderNo,returnType:"2"});
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatDistance(row){
|
||||||
|
console.log("============"+JSON.stringify(row))
|
||||||
|
// console.log("============"+row.distance)
|
||||||
|
if(row == undefined || row.distance == null){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return (row.distance / 1000).toFixed(1) + ' 公里';
|
||||||
|
},
|
||||||
|
//金额格式化,如果金额是null,则返回0.00,如果本来就是两位小数则直接返回,否则保留两位小数
|
||||||
formatFee(fee){
|
formatFee(fee){
|
||||||
if (!fee) return '0.00';
|
if (!fee) return '0.00元';
|
||||||
return parseFloat(this.form.appointmentFee).toFixed(2);
|
const feeStr = fee.toString();
|
||||||
|
const twoDecimalPattern = /^\d+(\.\d{2})?$/;
|
||||||
|
if (twoDecimalPattern.test(feeStr)) {
|
||||||
|
return `${feeStr}元`;
|
||||||
|
}
|
||||||
|
const formattedFee = parseFloat(fee).toFixed(2);
|
||||||
|
return `${formattedFee}元`;
|
||||||
},
|
},
|
||||||
formatStatus(status) {
|
formatStatus(status) {
|
||||||
//状态:0-预约中,1-取消预约,2-开始骑行,3-骑行结束,4-订单结束
|
//状态:0-预约中,1-取消预约,2-开始骑行,3-骑行结束,4-订单结束
|
||||||
|
@ -350,6 +470,11 @@ export default {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel2() {
|
||||||
|
this.open2 = false;
|
||||||
|
this.reset2();
|
||||||
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
@ -367,10 +492,22 @@ export default {
|
||||||
distance: null,
|
distance: null,
|
||||||
status: null,
|
status: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
vehicleNum: null
|
device: {
|
||||||
|
vehicleNum: null,
|
||||||
|
mac: null
|
||||||
|
},
|
||||||
|
rule: {
|
||||||
|
name: null
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
reset2() {
|
||||||
|
this.form2 = {
|
||||||
|
orderId: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form2");
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -399,10 +536,28 @@ export default {
|
||||||
const orderId = row.orderId || this.ids
|
const orderId = row.orderId || this.ids
|
||||||
getOrder(orderId).then(response => {
|
getOrder(orderId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
// console.log("111111111111111111111111---------------"+JSON.stringify(response.data))
|
|
||||||
this.showPlaceSearchMap = true;
|
this.showPlaceSearchMap = true;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "订单详情";
|
this.title = "订单详情";
|
||||||
|
this.key++;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交改价 */
|
||||||
|
submitChangePrice(){
|
||||||
|
console.log("=====submitChangePrice======="+this.form2)
|
||||||
|
changePrice(this.form2).then(response => {
|
||||||
|
this.$modal.msgSuccess("改价成功");
|
||||||
|
this.open2 = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交退款 */
|
||||||
|
submitRefund(){
|
||||||
|
console.log("=====submitRefund======="+this.form2)
|
||||||
|
refund(this.form2).then(response => {
|
||||||
|
this.$modal.msgSuccess("退款成功");
|
||||||
|
this.open2 = false;
|
||||||
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user