diff --git a/src/api/system/device.js b/src/api/system/device.js index 8ac2fe7..495eb24 100644 --- a/src/api/system/device.js +++ b/src/api/system/device.js @@ -43,6 +43,22 @@ export function delDevice(deviceId) { }) } +// 一键上线 +export function oneClickOnline(deviceId) { + return request({ + url: '/system/device/oneClickOnline/' + deviceId, + method: 'post' + }) +} + +// 一键下线 +export function oneClickOffline(deviceId) { + return request({ + url: '/system/device/oneClickOffline/' + deviceId, + method: 'post' + }) +} + // 查询所有车辆信息 export function allDevice() { return request({ diff --git a/src/api/system/reconciliation.js b/src/api/system/reconciliation.js index ec6bedf..b2e10b5 100644 --- a/src/api/system/reconciliation.js +++ b/src/api/system/reconciliation.js @@ -8,3 +8,11 @@ export function listReconciliation(query) { params: query }) } + +export function getAreaList() { + return request({ + url: '/system/getAreaList', + method: 'get', + }) +} + diff --git a/src/components/Map/location/LocationMap.vue b/src/components/Map/location/LocationMap.vue index 8a3dc24..4387d8e 100644 --- a/src/components/Map/location/LocationMap.vue +++ b/src/components/Map/location/LocationMap.vue @@ -198,17 +198,19 @@ export default { getGeoAddress(lng, lat) { console.log('getGeoAddress', lng,lat); console.log('this.geocoder', this.geocoder); - return new Promise((resolve, reject) =>{ - this.geocoder.getAddress([lng, lat], (status, result) => { - if (status === 'complete' && result.info === 'OK') { - console.log('resolve', result); - resolve(result); - } else { - console.log('reject', status,result); - reject(status); - } + if(this.geocoder){ + return new Promise((resolve, reject) =>{ + this.geocoder.getAddress([lng, lat], (status, result) => { + if (status === 'complete' && result.info === 'OK') { + console.log('resolve', result); + resolve(result); + } else { + console.log('reject', status,result); + reject(status); + } + }) }) - }) + } }, // 加载逆地理编码 loadGeoCoder() { diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index bdef621..d4a8f7e 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -296,13 +296,13 @@ - + - + diff --git a/src/views/system/area/noparking.vue b/src/views/system/area/noparking.vue index 69f6617..2ad66ae 100644 --- a/src/views/system/area/noparking.vue +++ b/src/views/system/area/noparking.vue @@ -146,7 +146,7 @@ - + @@ -208,6 +208,8 @@ export default { open: false, // 通过key重新渲染area-map组件 key: 0, + areaLon: null, + areaLat: null, // 分区列表 areaOptions:[], // 类型列表 @@ -224,6 +226,15 @@ export default { form: {}, // 表单校验 rules: { + parkingName: [ + { required: true, message: "禁停区不能为空", trigger: "blur" } + ], + type: [ + { required: true, message: "类型不能为空", trigger: "blur" } + ], + boundaryStr: [ + { required: true, message: "边界不能为空", trigger: "blur" } + ] } }; }, @@ -249,6 +260,8 @@ export default { getArea(areaId) { getArea(areaId).then(response => { this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; this.defaultAreaId = response.data.areaId; this.getList(); }); @@ -266,6 +279,11 @@ export default { this.parkingList = response.rows; this.total = response.total; this.defaultAreaId = this.queryParams.areaId; + getArea(this.defaultAreaId).then(response => { + this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; + }); this.loading = false; }); }, diff --git a/src/views/system/area/noriding.vue b/src/views/system/area/noriding.vue index 0d4016a..73855b9 100644 --- a/src/views/system/area/noriding.vue +++ b/src/views/system/area/noriding.vue @@ -157,7 +157,7 @@ - + @@ -219,6 +219,8 @@ export default { open: false, // 通过key重新渲染area-map组件 key: 0, + areaLon: null, + areaLat: null, // 分区列表 areaOptions:[], // 类型列表 @@ -235,6 +237,15 @@ export default { form: {}, // 表单校验 rules: { + parkingName: [ + { required: true, message: "禁停区不能为空", trigger: "blur" } + ], + type: [ + { required: true, message: "类型不能为空", trigger: "blur" } + ], + boundaryStr: [ + { required: true, message: "边界不能为空", trigger: "blur" } + ] } }; }, @@ -260,6 +271,8 @@ export default { getArea(areaId) { getArea(areaId).then(response => { this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; this.defaultAreaId = response.data.areaId; this.getList(); }); @@ -277,6 +290,11 @@ export default { this.parkingList = response.rows; this.total = response.total; this.defaultAreaId = this.queryParams.areaId; + getArea(this.defaultAreaId).then(response => { + this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; + }); this.loading = false; }); }, diff --git a/src/views/system/area/parking.vue b/src/views/system/area/parking.vue index 5e88341..93706dd 100644 --- a/src/views/system/area/parking.vue +++ b/src/views/system/area/parking.vue @@ -152,7 +152,7 @@ - + @@ -218,6 +218,8 @@ export default { open: false, // 通过key重新渲染area-map组件 key: 0, + areaLon: null, + areaLat: null, // 分区列表 areaOptions:[], // 类型列表 @@ -234,6 +236,15 @@ export default { form: {}, // 表单校验 rules: { + parkingName: [ + { required: true, message: "禁停区不能为空", trigger: "blur" } + ], + type: [ + { required: true, message: "类型不能为空", trigger: "blur" } + ], + boundaryStr: [ + { required: true, message: "边界不能为空", trigger: "blur" } + ] } }; }, @@ -259,6 +270,8 @@ export default { getArea(areaId) { getArea(areaId).then(response => { this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; this.defaultAreaId = response.data.areaId; this.getList(); }); @@ -276,6 +289,11 @@ export default { this.parkingList = response.rows; this.total = response.total; this.defaultAreaId = this.queryParams.areaId; + getArea(this.defaultAreaId).then(response => { + this.queryParams.areaId = response.data.areaId; + this.areaLon = response.data.longitude; + this.areaLat = response.data.latitude; + }); this.loading = false; }); }, diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue index aeb73b8..2ee552d 100644 --- a/src/views/system/device/index.vue +++ b/src/views/system/device/index.vue @@ -1,6 +1,16 @@ - + - + - + - + @@ -147,7 +147,7 @@ - + {{ form.orderNo }} @@ -175,6 +175,22 @@

行程记录

+ + + @@ -191,11 +207,11 @@ {{ formatFee(form.appointmentFee) }} - {{ formatFee(form.dispatchFee) }} + {{ formatFee(form.dispatchFee) }} {{ formatFee(form.ridingFee) }} - {{ formatFee(form.manageFee) }} + {{ formatFee(form.manageFee) }} @@ -212,25 +228,25 @@ {{ form.rule.name }} - + - {{ formatFee(form.payFee) }} - {{ formatFee(form.payFee) }} + {{ formatFee(form.etRefund.appointmentFee) }} + {{ formatFee(form.etRefund.dispatchFee) }} - {{ formatFee(form.areaName) }} - {{ formatFee(form.remainingPower) }} + {{ formatFee(form.etRefund.ridingFee) }} + {{ formatFee(form.etRefund.manageFee) }} - + - {{ form.mac }} - {{ form.sn }} + {{ form.etRefund.reason }} + {{ form.etRefund.createTime }} - + - {{ formatFee(form.mac) }} + {{ formatFee(form.payFee-form.etRefund.appointmentFee-form.etRefund.dispatchFee-form.etRefund.ridingFee-form.etRefund.manageFee) }}
@@ -259,13 +275,13 @@
- - + + - + @@ -311,6 +327,7 @@ export default { showPlaceSearchMap: false, // 是否显示弹出层 open: false, + open2: false, vehicleNum: null, // 查询参数 queryParams: { @@ -330,6 +347,14 @@ export default { vehicleNum: null, mac: null }, + etRefund: { + appointmentFee: null, + ridingFee: null, + dispatchFee: null, + manageFee: null, + reason: null, + createTime: null + }, rule: { name: null }, @@ -338,11 +363,16 @@ export default { payFee: null, appointmentFee: null, tripRouteStr: null, - vehicleNum: null + vehicleNum: null, }, form2: { orderNo: null, - + appointmentFee: null, + ridingFee: null, + dispatchFee: null, + manageFee: null, + reason: null, + createTime: null }, // 表单校验 rules: { @@ -359,33 +389,49 @@ export default { }; }, created() { + this.reset(); + this.reset2(); this.getList(); }, methods: { + getTypeText(type) { + switch (type) { + case '1': + return '开锁'; + case '2': + return '临时锁车'; + case '3': + return '解锁'; + case '4': + return '关锁'; + default: + return ''; // 或者根据实际情况返回其他默认值 + } + }, changePrice(row){ - console.log('changePrice') + // 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)); + // console.log("this.form2============="+JSON.stringify(this.form2)); this.open2 = true; this.title2 = "改价"; }); }, refund(row){ - console.log('changePrice') + // 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)); + // console.log("this.form2============="+JSON.stringify(this.form2)); this.open2 = true; this.title2 = "退款"; }); }, returnVehicle(row){ - console.log('returnVehicle--------------'+JSON.stringify(row)) + // console.log('returnVehicle--------------'+JSON.stringify(row)) this.$modal.confirm('是否确认辅助还车MAC为:' + row.sn + '"的设备吗?').then(function() { return returnVehicle({orderNo:row.orderNo,returnType:"2"}); }).then(() => { @@ -395,7 +441,7 @@ export default { }); }, formatDistance(row){ - console.log("============"+JSON.stringify(row)) + // console.log("============"+JSON.stringify(row)) // console.log("============"+row.distance) if(row == undefined || row.distance == null){ return ""; @@ -437,8 +483,10 @@ export default { return '支付宝'; case 'wx': return '微信'; + case 'sys': + return '系统自动'; default: - return '未知'; + return '无'; } }, formatDuration(row) { @@ -496,6 +544,22 @@ export default { vehicleNum: null, mac: null }, + etRefund: { + appointmentFee: null, + ridingFee: null, + dispatchFee: null, + manageFee: null, + reason: null, + createTime: null + }, + appointmentFee: null, + ridingFee: null, + dispatchFee: null, + manageFee: null, + returnTime: null, + user: { + nickName: null + }, rule: { name: null } @@ -505,6 +569,14 @@ export default { reset2() { this.form2 = { orderId: null, + orderNo: null, + payTime: null, + appointmentFee: null, + ridingFee: null, + dispatchFee: null, + manageFee: null, + reason: null, + createTime: null }; this.resetForm("form2"); }, @@ -535,7 +607,11 @@ export default { this.reset(); const orderId = row.orderId || this.ids getOrder(orderId).then(response => { + console.log("=====getOrder======="+JSON.stringify(response)) this.form = response.data; + if (response.data.etRefund) { + this.form.etRefund = response.data.etRefund; + } this.showPlaceSearchMap = true; this.open = true; this.title = "订单详情"; @@ -544,7 +620,7 @@ export default { }, /** 提交改价 */ submitChangePrice(){ - console.log("=====submitChangePrice======="+this.form2) + // console.log("=====submitChangePrice======="+this.form2) changePrice(this.form2).then(response => { this.$modal.msgSuccess("改价成功"); this.open2 = false; @@ -553,7 +629,7 @@ export default { }, /** 提交退款 */ submitRefund(){ - console.log("=====submitRefund======="+this.form2) + // console.log("=====submitRefund======="+this.form2) refund(this.form2).then(response => { this.$modal.msgSuccess("退款成功"); this.open2 = false; @@ -606,4 +682,7 @@ export default { .el-form-item--mini.el-form-item { margin-bottom: 10px !important; } + .el-dialog:not(.is-fullscreen) { + margin-top: 1vh !important; + } diff --git a/src/views/system/reconciliation/index.vue b/src/views/system/reconciliation/index.vue index bd6bc41..ffd8492 100644 --- a/src/views/system/reconciliation/index.vue +++ b/src/views/system/reconciliation/index.vue @@ -1,6 +1,16 @@