调整
This commit is contained in:
parent
88a638c7e2
commit
34274f8a24
|
@ -57,3 +57,10 @@ export function getBalance(){
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询运营商信息
|
||||||
|
export function getDeptByToken(){
|
||||||
|
return request({
|
||||||
|
url: '/system/dept/getDept',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -90,3 +90,11 @@ export function ring(data){
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重启设备
|
||||||
|
export function reboot(data){
|
||||||
|
return request({
|
||||||
|
url: '/system/device/device/reboot?mac='+data.mac,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -96,10 +96,14 @@ export default {
|
||||||
this.marker = new AMap.Marker({
|
this.marker = new AMap.Marker({
|
||||||
map: this.map,
|
map: this.map,
|
||||||
position: line[0],
|
position: line[0],
|
||||||
icon: globalConfig.icon.blue,
|
icon: new AMap.Icon({
|
||||||
offset: new AMap.Pixel(-26, -15),
|
image: globalConfig.icon.trajectory,
|
||||||
|
size: new AMap.Size(25, 39), // 设置图标的宽高
|
||||||
|
imageSize: new AMap.Size(25, 39) // 设置图标的实际显示尺寸
|
||||||
|
}),
|
||||||
|
offset: new AMap.Pixel(-12.5, -19.5),
|
||||||
autoRotation: true,
|
autoRotation: true,
|
||||||
angle: -90
|
angle: 90
|
||||||
});
|
});
|
||||||
// 绘制轨迹
|
// 绘制轨迹
|
||||||
let polyline = new AMap.Polyline({
|
let polyline = new AMap.Polyline({
|
||||||
|
@ -130,7 +134,7 @@ export default {
|
||||||
startAnimation() {
|
startAnimation() {
|
||||||
this.marker.moveAlong(this.line, {
|
this.marker.moveAlong(this.line, {
|
||||||
// 每一段的时长
|
// 每一段的时长
|
||||||
duration: 100,//可根据实际采集时间间隔设置
|
duration: 200,//可根据实际采集时间间隔设置
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pauseAnimation() {
|
pauseAnimation() {
|
||||||
|
|
|
@ -134,6 +134,34 @@ export const dynamicRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/system/device/sn',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['system:device:list'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:sn(\\d+)',
|
||||||
|
component: () => import('@/views/system/device'),
|
||||||
|
name: 'Data',
|
||||||
|
meta: { title: '车辆列表', activeMenu: '/system/device' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/system/device/vehicleNum',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['system:device:list'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:vehicleNum',
|
||||||
|
component: () => import('@/views/system/device'),
|
||||||
|
name: 'Data',
|
||||||
|
meta: { title: '车辆列表', activeMenu: '/system/device' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/system/area-parking',
|
path: '/system/area-parking',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -169,11 +169,18 @@
|
||||||
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
|
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
||||||
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="手续费(‰)" label-width="120" prop="handlingCharge">
|
||||||
|
<el-input style="width: 65%" v-model="form.handlingCharge" placeholder="请输入手续费" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -206,38 +206,45 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-upload"
|
||||||
@click="handleListing(scope.row)"
|
@click="handleListing(scope.row)"
|
||||||
v-hasPermi="['system:fault:edit']"
|
v-hasPermi="['system:fault:edit']"
|
||||||
>{{ scope.row.status === '0' ? '出仓' : '回仓' }}</el-button>
|
>{{ scope.row.status === '0' ? '出仓' : '回仓' }}</el-button>
|
||||||
<el-button v-if="scope.row.status!= '3'"
|
<el-button v-if="scope.row.status!= '3'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-unlock"
|
||||||
@click="handleUnlocking(scope.row)"
|
@click="handleUnlocking(scope.row)"
|
||||||
v-hasPermi="['system:device:unlocking']"
|
v-hasPermi="['system:device:unlocking']"
|
||||||
>开锁</el-button>
|
>开锁</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-lock"
|
||||||
@click="handleLock(scope.row)"
|
@click="handleLock(scope.row)"
|
||||||
v-hasPermi="['system:device:unlocking']"
|
v-hasPermi="['system:device:unlocking']"
|
||||||
>关锁</el-button>
|
>关锁</el-button>
|
||||||
<el-button v-if="scope.row.status!= '0'"
|
<el-button v-if="scope.row.status!= '0'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-check"
|
||||||
@click="handleOnline(scope.row)"
|
@click="handleOnline(scope.row)"
|
||||||
v-hasPermi="['system:device:online']"
|
v-hasPermi="['system:device:online']"
|
||||||
>{{ scope.row.status === '8' ? '解禁' : '禁用' }}</el-button>
|
>{{ scope.row.status === '8' ? '解禁' : '禁用' }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-bell"
|
||||||
@click="ring(scope.row)"
|
@click="ring(scope.row)"
|
||||||
v-hasPermi="['system:device:ring']"
|
v-hasPermi="['system:device:ring']"
|
||||||
>响铃寻车</el-button>
|
>响铃</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="reboot(scope.row)"
|
||||||
|
v-hasPermi="['system:device:reboot']"
|
||||||
|
>重启</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -419,7 +426,7 @@
|
||||||
addDevice,
|
addDevice,
|
||||||
updateDevice,
|
updateDevice,
|
||||||
handleLock,
|
handleLock,
|
||||||
handleUnlocking, ring,oneClickOnline,oneClickOffline
|
handleUnlocking, ring, oneClickOnline, oneClickOffline, reboot
|
||||||
} from '@/api/system/device'
|
} from '@/api/system/device'
|
||||||
import Map from "@/components/Map";
|
import Map from "@/components/Map";
|
||||||
import OrderRecord from "@/views/system/device/components/orderRecord.vue";
|
import OrderRecord from "@/views/system/device/components/orderRecord.vue";
|
||||||
|
@ -513,6 +520,16 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log("当前用户信息:",this.$store.state.user.name)
|
console.log("当前用户信息:",this.$store.state.user.name)
|
||||||
|
const sn = this.$route.params && this.$route.params.sn;
|
||||||
|
const vehicleNum = this.$route.params && this.$route.params.vehicleNum;
|
||||||
|
console.log("sn------",sn)
|
||||||
|
console.log("vehicleNum------",vehicleNum)
|
||||||
|
if (sn != null) {
|
||||||
|
this.queryParams.sn = sn;
|
||||||
|
}
|
||||||
|
if (vehicleNum != null) {
|
||||||
|
this.queryParams.vehicleNum = vehicleNum;
|
||||||
|
}
|
||||||
this.getDicts("as_device_status").then(response => {
|
this.getDicts("as_device_status").then(response => {
|
||||||
// console.log("response.data------",response.data)
|
// console.log("response.data------",response.data)
|
||||||
let options = response.data;
|
let options = response.data;
|
||||||
|
@ -788,6 +805,17 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
reboot(row) {
|
||||||
|
this.reset();
|
||||||
|
const deviceId = row.deviceId || this.ids
|
||||||
|
getDevice(deviceId).then(response => {
|
||||||
|
let form1 = response.data;
|
||||||
|
reboot(form1).then(response => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
|
@ -600,7 +600,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ruleIds = row.ruleId || this.ids;
|
const ruleIds = row.ruleId || this.ids;
|
||||||
this.$confirm('是否确认删除收费方式编号为"' + ruleIds + '"的数据项?')
|
this.$confirm('删除计费规则会导致正在骑行中的订单计费错乱,是否确认删除计费规则为"' + ruleIds + '"的记录?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return delFee(ruleIds);
|
return delFee(ruleIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
<el-table-column label="交易金额" align="center" prop="amount" :formatter="formatAmount"/>
|
||||||
<el-table-column label="手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
<el-table-column label="支付手续费" align="center" prop="handlingCharge" :formatter="formatAmount"/>
|
||||||
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
<el-table-column label="平台服务费" align="center" prop="platformServiceFee" :formatter="formatAmount"/>
|
||||||
<el-table-column label="运营商分账" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
<el-table-column label="运营商分账" align="center" prop="operatorDividend" :formatter="formatAmount"/>
|
||||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||||
|
@ -155,8 +155,8 @@
|
||||||
<el-form-item label="交易金额" prop="amount">
|
<el-form-item label="交易金额" prop="amount">
|
||||||
<el-input v-model="form.amount" placeholder="请输入交易金额" />
|
<el-input v-model="form.amount" placeholder="请输入交易金额" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手续费" prop="handlingCharge">
|
<el-form-item label="支付手续费" prop="handlingCharge">
|
||||||
<el-input v-model="form.handlingCharge" placeholder="请输入手续费" />
|
<el-input v-model="form.handlingCharge" placeholder="请输入支付手续费" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="运营商分账" prop="operatorDividend">
|
<el-form-item label="运营商分账" prop="operatorDividend">
|
||||||
<el-input v-model="form.operatorDividend" placeholder="请输入运营商分账" />
|
<el-input v-model="form.operatorDividend" placeholder="请输入运营商分账" />
|
||||||
|
|
|
@ -79,8 +79,20 @@
|
||||||
<el-table-column label="区域" align="center" prop="area" />
|
<el-table-column label="区域" align="center" prop="area" />
|
||||||
<el-table-column label="订单号" align="center" prop="orderNo" width="200"/>
|
<el-table-column label="订单号" align="center" prop="orderNo" width="200"/>
|
||||||
<el-table-column label="用户" align="center" prop="userName" width="100"/>
|
<el-table-column label="用户" align="center" prop="userName" width="100"/>
|
||||||
<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" />
|
<template slot-scope="scope">
|
||||||
|
<router-link :to="'/system/device/sn/index/' + scope.row.sn" class="link-type">
|
||||||
|
<span>{{ scope.row.sn }}</span>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车牌号" align="center" prop="vehicleNum" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<router-link :to="'/system/device/vehicleNum/index/' + scope.row.vehicleNum" class="link-type">
|
||||||
|
<span>{{ scope.row.vehicleNum }}</span>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<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"/>
|
||||||
|
@ -142,7 +154,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
v-if="scope.row.status == 1 || scope.row.status == 3"
|
v-if="scope.row.status == 1 || scope.row.status == 3"
|
||||||
v-show="scope.row.isDepositDeduction == '1'"
|
v-show="scope.row.isDepositDeduction == '1'"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-wallet"
|
||||||
@click="deduction(scope.row)"
|
@click="deduction(scope.row)"
|
||||||
v-hasPermi="['system:order:edit']"
|
v-hasPermi="['system:order:edit']"
|
||||||
>押金抵扣</el-button>
|
>押金抵扣</el-button>
|
||||||
|
@ -150,7 +162,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
v-if="scope.row.status == 4"
|
v-if="scope.row.status == 4"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-money"
|
||||||
@click="refund(scope.row)"
|
@click="refund(scope.row)"
|
||||||
v-hasPermi="['system:order:edit']"
|
v-hasPermi="['system:order:edit']"
|
||||||
>退款</el-button>
|
>退款</el-button>
|
||||||
|
@ -158,7 +170,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
v-if="scope.row.status == 2"
|
v-if="scope.row.status == 2"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-refresh-left"
|
||||||
@click="returnVehicle(scope.row)"
|
@click="returnVehicle(scope.row)"
|
||||||
v-hasPermi="['system:order:edit']"
|
v-hasPermi="['system:order:edit']"
|
||||||
>辅助还车</el-button>
|
>辅助还车</el-button>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.rechargeType == '2'"
|
v-if="scope.row.rechargeType == '2' && !scope.row.isRefunded"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
|
|
|
@ -125,6 +125,9 @@
|
||||||
<el-form-item label="提现金额:" prop="amount">
|
<el-form-item label="提现金额:" prop="amount">
|
||||||
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.amount" label="提示:" style="font-weight: 300;color: red">
|
||||||
|
<span class="amoun-tips" >提现金额:{{form.amount}}元,手续费:{{formattedFee}} 元,实际到账:{{actualAmount}} 元</span>
|
||||||
|
</el-form-item>
|
||||||
</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 type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
@ -199,15 +202,45 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listWithdraw, getWithdraw, delWithdraw, addWithdraw, updateWithdraw } from "@/api/system/withdraw";
|
import { listWithdraw, getWithdraw, delWithdraw, addWithdraw, updateWithdraw } from "@/api/system/withdraw";
|
||||||
import { getBalance, listDept } from '@/api/system/dept'
|
import { getDeptByToken, listDept } from '@/api/system/dept'
|
||||||
import { fastSearch } from '@/api/user/user'
|
import { fastSearch } from '@/api/user/user'
|
||||||
import { bandAppUser, getUser } from '@/api/system/user'
|
import { bandAppUser, getUser } from '@/api/system/user'
|
||||||
import { getInfo } from '@/api/login'
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Withdraw",
|
name: "Withdraw",
|
||||||
dicts: ['et_call_status', 'et_withdraw_status'],
|
dicts: ['et_call_status', 'et_withdraw_status'],
|
||||||
|
computed: {
|
||||||
|
formattedFee() {
|
||||||
|
console.log("handlingCharge===========",this.handlingCharge)
|
||||||
|
// 将handlingCharge转换为浮点类型
|
||||||
|
let handlingCharge = parseFloat(this.handlingCharge)/1000;
|
||||||
|
console.log("handlingCharge1===========", handlingCharge);
|
||||||
|
console.log("this.form.amount===========", this.form.amount);
|
||||||
|
// 计算手续费
|
||||||
|
let fee = this.form.amount * handlingCharge;
|
||||||
|
// 保留两位小数,并确保四舍五入
|
||||||
|
fee = fee.toFixed(2);
|
||||||
|
|
||||||
|
// 判断手续费是否为0
|
||||||
|
if (fee === 0) {
|
||||||
|
return '0.00 (免手续费)';
|
||||||
|
} else {
|
||||||
|
return `${fee} `;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actualAmount() {
|
||||||
|
let amount = this.form.amount;
|
||||||
|
let handlingCharge = parseFloat(this.handlingCharge)/1000;
|
||||||
|
let fee = this.form.amount * handlingCharge;
|
||||||
|
// 四舍五入到两位小数
|
||||||
|
fee = Math.round(fee * 100) / 100;
|
||||||
|
// 计算实际到账金额并四舍五入到两位小数
|
||||||
|
let actual = amount - fee;
|
||||||
|
actual = actual.toFixed(2);
|
||||||
|
return `${actual} `;
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -408,8 +441,9 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
//查询余额
|
//查询余额
|
||||||
getBalance().then(response => {
|
getDeptByToken().then(response => {
|
||||||
this.balance = response.data;
|
this.balance = response.data.balance;
|
||||||
|
this.handlingCharge = response.data.handlingCharge;
|
||||||
});
|
});
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
@ -484,3 +518,10 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.amoun-tips{
|
||||||
|
color: red;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user