From fd165faf6a8a6500da2ebbae2a77fafdc139d5a0 Mon Sep 17 00:00:00 2001
From: 18650502300 <18650502300@163.com>
Date: Thu, 12 Sep 2024 16:30:33 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=AE=9A=E4=BD=8D=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/area.js | 6 +-
src/api/system/dept.js | 2 +-
src/api/system/locationLog.js | 44 +++
src/router/index.js | 16 +-
src/views/index.vue | 4 +-
src/views/system/area/areaSet.vue | 12 +-
src/views/system/area/index.vue | 16 +-
src/views/system/article/index.vue | 6 +-
src/views/system/articleClassify/index.vue | 2 +-
src/views/system/dept/index.vue | 28 +-
src/views/system/device/index.vue | 43 ++-
src/views/system/fee/index.vue | 12 +-
src/views/system/flow/index.vue | 10 +-
src/views/system/locationLog/index.vue | 379 +++++++++++++++++++++
src/views/system/model/index.vue | 29 +-
src/views/system/order/index.vue | 89 +++--
src/views/system/reconciliation/index.vue | 4 +-
src/views/system/user/index.vue | 24 +-
src/views/system/withdraw/index.vue | 8 +-
src/views/system/withdrawAudit/index.vue | 8 +-
20 files changed, 628 insertions(+), 114 deletions(-)
create mode 100644 src/api/system/locationLog.js
create mode 100644 src/views/system/locationLog/index.vue
diff --git a/src/api/system/area.js b/src/api/system/area.js
index b7beddb..daae54d 100644
--- a/src/api/system/area.js
+++ b/src/api/system/area.js
@@ -87,7 +87,7 @@ export function optionselect() {
})
}
-// 根据运营商id获取运营商列表
+// 根据代理商id获取代理商列表
export function selectAreaListByDeptId(deptId) {
return request({
url: '/system/area/selectAreaListByDeptId/'+deptId,
@@ -95,14 +95,14 @@ export function selectAreaListByDeptId(deptId) {
})
}
-// 根据运营区id获取运营商
+// 根据运营区id获取代理商
export function selectDeptByAreaId(areaId) {
return request({
url: '/system/area/selectDeptByAreaId/'+areaId,
method: 'get'
})
}
-// 根据运营区id获取运营商
+// 根据运营区id获取代理商
export function getleaderboard(type,timeLimit) {
return request({
url: '/index/admim/leaderboard?type='+type+'&timeLimit='+timeLimit,
diff --git a/src/api/system/dept.js b/src/api/system/dept.js
index 29a11fd..1efe5c6 100644
--- a/src/api/system/dept.js
+++ b/src/api/system/dept.js
@@ -66,7 +66,7 @@ export function getBalance(){
method: 'get'
})
}
-// 查询运营商信息
+// 查询代理商信息
export function getDeptByToken(deptId){
return request({
url: '/system/dept/getDept',
diff --git a/src/api/system/locationLog.js b/src/api/system/locationLog.js
new file mode 100644
index 0000000..f8ee0c2
--- /dev/null
+++ b/src/api/system/locationLog.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询定位日志列表
+export function listLocationLog(query) {
+ return request({
+ url: '/system/locationLog/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询定位日志详细
+export function getLocationLog(locationId) {
+ return request({
+ url: '/system/locationLog/' + locationId,
+ method: 'get'
+ })
+}
+
+// 新增定位日志
+export function addLocationLog(data) {
+ return request({
+ url: '/system/locationLog',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改定位日志
+export function updateLocationLog(data) {
+ return request({
+ url: '/system/locationLog',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除定位日志
+export function delLocationLog(locationId) {
+ return request({
+ url: '/system/locationLog/' + locationId,
+ method: 'delete'
+ })
+}
diff --git a/src/router/index.js b/src/router/index.js
index 0c115a8..94dfbf2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -200,7 +200,7 @@ export const dynamicRoutes = [
path: 'index/:owner',
component: () => import('@/views/system/dept'),
name: 'Data',
- meta: { title: '运营商列表', activeMenu: '/system/dept' }
+ meta: { title: '代理商列表', activeMenu: '/system/dept' }
}
]
},
@@ -330,6 +330,20 @@ export const dynamicRoutes = [
}
]
},
+ {
+ path: '/system/locationLog',
+ component: Layout,
+ hidden: true,
+ permissions: ['system:locationLog:query'],
+ children: [
+ {
+ path: 'index/:mac',
+ component: () => import('@/views/system/locationLog'),
+ name: 'Data',
+ meta: { title: '定位日志', activeMenu: '/system/locationLog' }
+ }
+ ]
+ },
{
path: '/tool/gen-edit',
component: Layout,
diff --git a/src/views/index.vue b/src/views/index.vue
index ed72206..278dc27 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -3,7 +3,7 @@
-
运营商数
+
代理商数
{{ StatisticsInfo.operatorCount }}
独立小程序:{{ StatisticsInfo.appCount }}
-
+
{{ index + 1 }}
diff --git a/src/views/system/area/areaSet.vue b/src/views/system/area/areaSet.vue
index 420dc4a..1a91403 100644
--- a/src/views/system/area/areaSet.vue
+++ b/src/views/system/area/areaSet.vue
@@ -25,19 +25,19 @@
-
+
-
-
+
+
-
+
@@ -173,8 +173,8 @@
-
-
+
+
@@ -482,7 +482,7 @@ export default {
// 运营区表格数据
areaList: [],
userName: null,
- // 运营商树选项
+ // 代理商树选项
deptOptions: undefined,
// 弹出层标题
title: "",
@@ -513,7 +513,7 @@ export default {
// contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
// phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }],
autoReplacementOrder: [{ required: true, message: "最低电量不能为空", trigger: "blur" }],
- deptId: [{ required: true, message: "运营商不能为空", trigger: "blur" }],
+ deptId: [{ required: true, message: "代理商不能为空", trigger: "blur" }],
},
};
},
@@ -557,7 +557,7 @@ export default {
console.log(console.log(this.form.provinceList, ' this.form.provinceList'))
})
},
- /** 查询运营商下拉树结构 */
+ /** 查询代理商下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
diff --git a/src/views/system/article/index.vue b/src/views/system/article/index.vue
index cd60533..e79b227 100644
--- a/src/views/system/article/index.vue
+++ b/src/views/system/article/index.vue
@@ -1,8 +1,8 @@
-
-
+
+
-
+
diff --git a/src/views/system/articleClassify/index.vue b/src/views/system/articleClassify/index.vue
index 7214e0c..129ac16 100644
--- a/src/views/system/articleClassify/index.vue
+++ b/src/views/system/articleClassify/index.vue
@@ -67,7 +67,7 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
-
+
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index c7a76d1..13799e6 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -1,10 +1,10 @@
-
+
@@ -26,7 +26,7 @@
/>
-
+
-
+
@@ -147,13 +147,13 @@
-
+
-
-
+
+
@@ -466,7 +466,7 @@ export default {
// appUserId: null,
// 总条数
total: 0,
- // 运营商树选项
+ // 代理商树选项
deptOptions: [],
balance: null,
options: [],
@@ -505,10 +505,10 @@ export default {
// 表单校验
rules: {
parentId: [
- { required: true, message: "上级运营商不能为空", trigger: "blur" }
+ { required: true, message: "上级代理商不能为空", trigger: "blur" }
],
deptName: [
- { required: true, message: "运营商名称不能为空", trigger: "blur" }
+ { required: true, message: "代理商名称不能为空", trigger: "blur" }
],
handlingChargeType: [
{ required: true, message: "手续费类型不能为空", trigger: "blur" }
@@ -626,7 +626,7 @@ export default {
this.options = []
}
},
- /** 查询运营商列表 */
+ /** 查询代理商列表 */
getList() {
this.loading = true;
listDept2(this.queryParams).then(response => {
@@ -635,7 +635,7 @@ export default {
this.loading = false;
});
},
- /** 转换运营商数据结构 */
+ /** 转换代理商数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
@@ -700,7 +700,7 @@ export default {
handleAdd(row) {
this.reset();
this.open = true;
- this.title = "添加运营商";
+ this.title = "添加代理商";
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
// console.log("response=============",response)
this.deptOptions = response.data;
@@ -725,7 +725,7 @@ export default {
this.form = response.data;
this.$set(this.form, "areaIds", response.areaIds);
this.open = true;
- this.title = "修改运营商";
+ this.title = "修改代理商";
// this.form.isProfitSharing = this.form.isProfitSharing === 'true';
this.form.isUsePlatformApp = this.form.isUsePlatformApp === 'true';
console.log("userName==========="+response.data.userName)
diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue
index c13f689..761c817 100644
--- a/src/views/system/device/index.vue
+++ b/src/views/system/device/index.vue
@@ -8,11 +8,11 @@
v-show="showSearch"
label-width="68px"
>
-
+
@@ -269,7 +269,7 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -521,6 +535,14 @@
v-hasPermi="['system:device:log']"
>日志
+ 定位日志
-
+
-
-
+
+
-
+
@@ -93,7 +93,7 @@
-
+
{
- console.log("根据运营商id,获取运营区和型号=========",response.data)
+ console.log("根据代理商id,获取运营区和型号=========",response.data)
this.areaOptions = response.data.areaList;
let areaOptions = response.data.areaList;
if(this.form.areaId != null){
diff --git a/src/views/system/flow/index.vue b/src/views/system/flow/index.vue
index 2f4f793..5919650 100644
--- a/src/views/system/flow/index.vue
+++ b/src/views/system/flow/index.vue
@@ -132,7 +132,7 @@
-
+
@@ -193,11 +193,11 @@
-
-
+
+
-
-
+
+
diff --git a/src/views/system/locationLog/index.vue b/src/views/system/locationLog/index.vue
new file mode 100644
index 0000000..98d7222
--- /dev/null
+++ b/src/views/system/locationLog/index.vue
@@ -0,0 +1,379 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.longitude }}, {{ scope.row.latitude }}
+
+
+
+
+
+
+ {{ parseTime(scope.row.at, '{y}-{m}-{d} {h}:{i}:{s}' ) }}
+
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}' ) }}
+
+
+
+
+
+
+ {{ formatStatus(scope.row.status2) }}
+
+
+
+
+
+ {{ formatVoltage(scope.row.bat) }}
+
+
+
+
+
+ {{ scope.row.csq }}
+
+
+
+
+
+ {{ scope.row.s }}
+
+
+
+
+
+ {{ scope.row.q }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详细
+
+
+
+
+
+
+
+
+
+
+ {{ form.mac }}
+
+
+ {{ form.sn }}
+
+
+ {{ form.longitude }}
+
+
+ {{ form.latitude }}
+
+
+ {{ form.onenetMsg }}
+
+
+ {{ form.at }}
+
+
+ {{ form.createTime }}
+
+
+
+ {{ formatStatus(form.status2) }}
+
+
+ {{ formatVoltage(form.bat) }}
+
+
+ {{ form.csq }}
+
+
+ {{ form.s }}
+
+
+ {{ form.q }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/model/index.vue b/src/views/system/model/index.vue
index 2e2ba69..42395b0 100644
--- a/src/views/system/model/index.vue
+++ b/src/views/system/model/index.vue
@@ -1,8 +1,8 @@
-
-
+
+
-
+
@@ -121,8 +121,8 @@
-
-
+
+
-
+
-
+
+
+
+
@@ -194,7 +197,7 @@ export default {
isUpdating: false, // 标志位
// 选中数组
ids: [],
- // 运营商树选项
+ // 代理商树选项
deptOptions: [],
// 区域列表
areaOptions: [],
@@ -223,14 +226,16 @@ export default {
operator: null,
},
// 表单参数
- form: {},
+ form: {
+ lowBatteryReminderSwitch: false,
+ },
// 表单校验
rules: {
model: [
{ required: true, message: "车型不能为空", trigger: "blur" }
],
operator: [
- { required: true, message: "运营商不能为空", trigger: "blur" }
+ { required: true, message: "代理商不能为空", trigger: "blur" }
],
fullVoltage: [
{ required: true, message: "满电电压不能为空", trigger: "blur" },
@@ -270,7 +275,7 @@ export default {
},
},
methods: {
- /** 当选择运营商时 根据运营商id,获取运营区和型号 */
+ /** 当选择代理商时 根据代理商id,获取运营区和型号 */
fetchData2(deptId,oldVal) {
console.log("deptId1111",deptId)
console.log("oldVal1111",oldVal)
@@ -375,7 +380,7 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
- /** 查询运营商下拉树结构 */
+ /** 查询代理商下拉树结构 */
getDeptTree() {
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
this.deptOptions = response.rows;
diff --git a/src/views/system/order/index.vue b/src/views/system/order/index.vue
index eabbfc9..986144f 100644
--- a/src/views/system/order/index.vue
+++ b/src/views/system/order/index.vue
@@ -87,17 +87,33 @@
-
+
- {{ scope.row.orderNo }}
+ 订单号: {{ scope.row.orderNo }}
- {{ scope.row.userName }}
+ {{scope.row.realName? scope.row.realName+':':''}}{{ scope.row.userName }}
+
+ 时长: {{ formatDuration(scope.row) }}
+
+ 距离: {{ formatDistance(scope.row) }}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -113,8 +129,8 @@
SN: {{ scope.row.sn }}
-
- 车牌号: {{ scope.row.vehicleNum }}
+
+ 车牌号: {{ scope.row.vehicleNum || '无' }}
@@ -179,31 +195,49 @@
- 总:{{ formatFee(scope.row.totalFee) }}
- 预约费:{{ formatFee(scope.row.appointmentFee) }}
- 骑行费:{{ formatFee(scope.row.ridingFee) }}
- 运营区外调度费:{{ formatFee(scope.row.dispatchFee) }}
- 停车点外调度费:{{ formatFee(scope.row.manageFee) }}
+
+ 结算金额:{{ formatFee(calculateSettlementAmount(scope.row)) }}
+
+
+ 预约费:{{ formatFee(scope.row.appointmentFee) }}
+
+
+ 骑行费:{{ formatFee(scope.row.ridingFee) }}
+
+
+ 运营区外调度费:{{ formatFee(scope.row.dispatchFee) }}
+
+
+ 停车点外调度费:{{ formatFee(scope.row.manageFee) }}
+
+
+ 订单金额:{{ formatFee(scope.row.totalFee) }}
+
+
+ 退款金额:
+ {{ formatFee(scope.row.totalRefundFee) }}
+
+
-
+
-
+
-
-
-
- 时长: {{ formatDuration(scope.row) }}
- 距离: {{ formatDistance(scope.row) }}
-
-
-
+
+
+
+
+
+
+
+
@@ -362,7 +396,14 @@
{{ form.payTime }}
- {{ form.rule.name }}
+
+
+ {{ form.rule.name }}
+
+
+ {{ form.rule.description }}
+
+
@@ -814,6 +855,12 @@ export default {
const formattedFee = parseFloat(fee).toFixed(2);
return `${formattedFee}元`;
},
+ calculateSettlementAmount(row) {
+ // 计算结算金额 = 总费用 - 退款金额
+ const totalFee = row.totalFee || 0;
+ const totalRefundFee = row.totalRefundFee || 0;
+ return totalFee - totalRefundFee;
+ },
calculateNetFee() {
// 计算总退款
let totalRefund = this.form.etRefunds.reduce((total, refund) => {
diff --git a/src/views/system/reconciliation/index.vue b/src/views/system/reconciliation/index.vue
index f1c33a2..4d8a23a 100644
--- a/src/views/system/reconciliation/index.vue
+++ b/src/views/system/reconciliation/index.vue
@@ -45,14 +45,14 @@
-
+
-
+
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 9e9fe06..c3bccca 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,12 +1,12 @@
-
+
-
+
@@ -228,8 +228,8 @@
-
-
+
+
@@ -416,12 +416,12 @@ export default {
userList: null,
// 弹出层标题
title: "",
- // 运营商树选项
+ // 代理商树选项
deptOptions: undefined,
// 是否显示弹出层
open: false,
open2: false,
- // 运营商名称
+ // 代理商名称
deptName: undefined,
// 默认密码
initPassword: undefined,
@@ -468,7 +468,7 @@ export default {
{ key: 0, label: `用户编号`, visible: true },
{ key: 1, label: `用户名称`, visible: true },
{ key: 2, label: `用户昵称`, visible: true },
- { key: 3, label: `运营商`, visible: true },
+ { key: 3, label: `代理商`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 5, label: `状态`, visible: true },
{ key: 6, label: `创建时间`, visible: true }
@@ -496,7 +496,7 @@ export default {
}
],
deptId: [
- { required: true, message: "所属运营商不能为空", trigger: "blur" }
+ { required: true, message: "所属代理商不能为空", trigger: "blur" }
]
}
};
@@ -505,7 +505,7 @@ export default {
'form.deptId': function(newVal) {
this.getAreaListByDeptId(newVal);
},
- // 根据名称筛选运营商树
+ // 根据名称筛选代理商树
deptName(val) {
this.$refs.tree.filter(val);
}
@@ -523,7 +523,7 @@ export default {
getAreaListByDeptId(deptId){
if(deptId) {
selectAreaListByDeptId(deptId).then(response => {
- console.log("根据运营商id,获取运营区和型号=========", response.data)
+ console.log("根据代理商id,获取运营区和型号=========", response.data)
this.areaOptions = response.data.areaList;
console.log("this.areaOptions:", this.areaOptions)
});
@@ -612,7 +612,7 @@ export default {
this.areaOptions = response.rows;
});
},
- /** 查询运营商下拉树结构 */
+ /** 查询代理商下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
diff --git a/src/views/system/withdraw/index.vue b/src/views/system/withdraw/index.vue
index 95645f2..0f40d8b 100644
--- a/src/views/system/withdraw/index.vue
+++ b/src/views/system/withdraw/index.vue
@@ -1,8 +1,8 @@
-
-
+
+
-
+
@@ -168,7 +168,7 @@
- {{ form3.deptName }}
+ {{ form3.deptName }}
{{ form3.withdrawNo }}
diff --git a/src/views/system/withdrawAudit/index.vue b/src/views/system/withdrawAudit/index.vue
index 9a929dd..a531749 100644
--- a/src/views/system/withdrawAudit/index.vue
+++ b/src/views/system/withdrawAudit/index.vue
@@ -99,7 +99,7 @@
-
+
@@ -135,8 +135,8 @@
-
-
+
+
{{ form3.amount + form3.handlingCharge }} 元
{{ form3.handlingCharge }} 元
{{ form3.amount }} 元
- {{ form3.operatorBalance }} 元
+ {{ form3.operatorBalance }} 元
{{ form3.createTime }}