调整
This commit is contained in:
parent
88a638c7e2
commit
34274f8a24
|
@ -57,3 +57,10 @@ export function getBalance(){
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询运营商信息
|
||||
export function getDeptByToken(){
|
||||
return request({
|
||||
url: '/system/dept/getDept',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -90,3 +90,11 @@ export function ring(data){
|
|||
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({
|
||||
map: this.map,
|
||||
position: line[0],
|
||||
icon: globalConfig.icon.blue,
|
||||
offset: new AMap.Pixel(-26, -15),
|
||||
icon: new AMap.Icon({
|
||||
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,
|
||||
angle: -90
|
||||
angle: 90
|
||||
});
|
||||
// 绘制轨迹
|
||||
let polyline = new AMap.Polyline({
|
||||
|
@ -130,7 +134,7 @@ export default {
|
|||
startAnimation() {
|
||||
this.marker.moveAlong(this.line, {
|
||||
// 每一段的时长
|
||||
duration: 100,//可根据实际采集时间间隔设置
|
||||
duration: 200,//可根据实际采集时间间隔设置
|
||||
});
|
||||
},
|
||||
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',
|
||||
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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
||||
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
||||
</el-form-item>
|
||||
</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-col :span="12">
|
||||
|
|
|
@ -206,38 +206,45 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-upload"
|
||||
@click="handleListing(scope.row)"
|
||||
v-hasPermi="['system:fault:edit']"
|
||||
>{{ scope.row.status === '0' ? '出仓' : '回仓' }}</el-button>
|
||||
<el-button v-if="scope.row.status!= '3'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-unlock"
|
||||
@click="handleUnlocking(scope.row)"
|
||||
v-hasPermi="['system:device:unlocking']"
|
||||
>开锁</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-lock"
|
||||
@click="handleLock(scope.row)"
|
||||
v-hasPermi="['system:device:unlocking']"
|
||||
>关锁</el-button>
|
||||
<el-button v-if="scope.row.status!= '0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-check"
|
||||
@click="handleOnline(scope.row)"
|
||||
v-hasPermi="['system:device:online']"
|
||||
>{{ scope.row.status === '8' ? '解禁' : '禁用' }}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-bell"
|
||||
@click="ring(scope.row)"
|
||||
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
|
||||
size="mini"
|
||||
type="text"
|
||||
|
@ -419,7 +426,7 @@
|
|||
addDevice,
|
||||
updateDevice,
|
||||
handleLock,
|
||||
handleUnlocking, ring,oneClickOnline,oneClickOffline
|
||||
handleUnlocking, ring, oneClickOnline, oneClickOffline, reboot
|
||||
} from '@/api/system/device'
|
||||
import Map from "@/components/Map";
|
||||
import OrderRecord from "@/views/system/device/components/orderRecord.vue";
|
||||
|
@ -513,6 +520,16 @@ export default {
|
|||
},
|
||||
created() {
|
||||
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 => {
|
||||
// console.log("response.data------",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() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
|
|
@ -600,7 +600,7 @@ export default {
|
|||
},
|
||||
handleDelete(row) {
|
||||
const ruleIds = row.ruleId || this.ids;
|
||||
this.$confirm('是否确认删除收费方式编号为"' + ruleIds + '"的数据项?')
|
||||
this.$confirm('删除计费规则会导致正在骑行中的订单计费错乱,是否确认删除计费规则为"' + ruleIds + '"的记录?')
|
||||
.then(() => {
|
||||
return delFee(ruleIds);
|
||||
}).then(() => {
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<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="operatorDividend" :formatter="formatAmount"/>
|
||||
<el-table-column label="运营商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
|
||||
|
@ -155,8 +155,8 @@
|
|||
<el-form-item label="交易金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入交易金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手续费" prop="handlingCharge">
|
||||
<el-input v-model="form.handlingCharge" placeholder="请输入手续费" />
|
||||
<el-form-item label="支付手续费" prop="handlingCharge">
|
||||
<el-input v-model="form.handlingCharge" placeholder="请输入支付手续费" />
|
||||
</el-form-item>
|
||||
<el-form-item label="运营商分账" prop="operatorDividend">
|
||||
<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="orderNo" width="200"/>
|
||||
<el-table-column label="用户" align="center" prop="userName" width="100"/>
|
||||
<el-table-column label="设备SN" align="center" prop="sn" />
|
||||
<el-table-column label="车牌号" align="center" prop="vehicleNum" />
|
||||
<el-table-column label="设备SN" align="center" prop="sn" >
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_order_status" :value="scope.row.status"/>
|
||||
|
@ -142,7 +154,7 @@
|
|||
type="text"
|
||||
v-if="scope.row.status == 1 || scope.row.status == 3"
|
||||
v-show="scope.row.isDepositDeduction == '1'"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-wallet"
|
||||
@click="deduction(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>押金抵扣</el-button>
|
||||
|
@ -150,7 +162,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 4"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-money"
|
||||
@click="refund(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>退款</el-button>
|
||||
|
@ -158,7 +170,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 2"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="returnVehicle(scope.row)"
|
||||
v-hasPermi="['system:order:edit']"
|
||||
>辅助还车</el-button>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.rechargeType == '2'"
|
||||
v-if="scope.row.rechargeType == '2' && !scope.row.isRefunded"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
|
|
@ -125,6 +125,9 @@
|
|||
<el-form-item label="提现金额:" prop="amount">
|
||||
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
||||
</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
@ -199,15 +202,45 @@
|
|||
|
||||
<script>
|
||||
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 { bandAppUser, getUser } from '@/api/system/user'
|
||||
import { getInfo } from '@/api/login'
|
||||
|
||||
|
||||
export default {
|
||||
name: "Withdraw",
|
||||
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() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -408,8 +441,9 @@ export default {
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
//查询余额
|
||||
getBalance().then(response => {
|
||||
this.balance = response.data;
|
||||
getDeptByToken().then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
this.reset();
|
||||
this.open = true;
|
||||
|
@ -484,3 +518,10 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.amoun-tips{
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user