This commit is contained in:
磷叶 2025-06-05 18:02:29 +08:00
parent e1bba257a5
commit 0b41a53d62
7 changed files with 133 additions and 74 deletions

View File

@ -312,4 +312,8 @@
background-color: #fff8e1;
border-color: rgb(255, 245, 208);
color: #f5a524;
}
.el-form-item__label {
font-weight: normal !important;
}

View File

@ -48,12 +48,12 @@
<form-col :span="span * 2" label="运营区外断电" prop="areaOutOutage" label-width="8em" tip="开启后,当车辆超出运营区后将断电">
<el-switch v-model="form.areaOutOutage" active-text="断电" inactive-text="不断电"/>
</form-col>
<form-col :span="span * 2" v-if="form.areaOutOutage" label="靠近边界警告" prop="boundaryDistance" label-width="8em" tip="当车辆靠近边界此距离内,将语音播报提醒">
<form-col :span="span * 2" v-if="form.areaOutOutage" label="靠近边界警告" prop="boundaryDistance" label-width="8em" tip="当车辆靠近边界此距离内,将语音播报提醒建议不小于20米">
<el-input v-model="form.boundaryDistance" placeholder="请输入靠近边界播报距离" type="number">
<template #append></template>
</el-input>
</form-col>
<form-col :span="span * 2" v-if="form.areaOutOutage" label="出界断电距离" prop="outageDistance" label-width="8em" tip="当车辆超出运营区此距离后将强制断电,直到车辆返回运营区内重新上电">
<form-col :span="span * 2" v-if="form.areaOutOutage" label="出界断电距离" prop="outageDistance" label-width="8em" tip="当车辆超出运营区此距离后将强制断电,直到车辆返回运营区内重新上电建议不小于20米">
<el-input v-model="form.outageDistance" placeholder="请输入超出运营区外断电距离" type="number">
<template #append></template>
</el-input>
@ -99,7 +99,7 @@
<template #append></template>
</el-input>
</form-col>
<form-col :span="span * 2" label="还车审核" prop="returnVerify" tip="开启后,用户还车时需要审核后才能退还剩余的押金">
<form-col :span="span * 2" label="还车审核" prop="returnVerify" tip="开启后,用户还车后,需要等待运营商审核后才能退还剩余的押金">
<el-switch v-model="form.returnVerify" active-text="需要审核" inactive-text="无需审核"/>
</form-col>
<form-col :span="span * 2" label="强制停车点还车" prop="parkingReturn" label-width="9em" tip="开启后,用户必须在停车点才允许还车">
@ -231,14 +231,14 @@ export default {
parkingOutDispatch: true,
areaOutDispatch: true,
noRidingOutage: true,
authentication: true,
authentication: [],
msgSwitch: false,
undercharge: 10,
error: 5,
error: 15,
agreement: null,
deposit: 10,
dispatchFee: 0,
vehicleManagementFee: 0,
dispatchFee: 20,
vehicleManagementFee: 20,
areaTimeStart: "00:00:00",
areaTimeEnd: "23:59:59",
parkingReturn: true,

View File

@ -14,7 +14,7 @@
<el-input v-model="form.mac" placeholder="请输入设备Mac号" :disabled="form.id != null"/>
</form-col>
<form-col :span="span" label="SN" prop="sn">
<el-input v-model="form.sn" placeholder="请输入设备SN号" :disabled="form.id != null" />
<el-input v-model="form.sn" placeholder="请输入设备SN号" :disabled="!isSysAdmin()" />
</form-col>
<form-col :span="span" label="硬件版本" prop="hardwareVersionId">
<hardware-version-select
@ -53,14 +53,14 @@
</template>
<script>
import { getDevice, addDevice, updateDevice } from "@/api/bst/device";
import FormCol from "@/components/FormCol/index.vue";
import UserInput from '@/components/Business/User/UserInput.vue';
import { addDevice, getDevice, updateDevice } from "@/api/bst/device";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import {RoleKeys} from '@/utils/enums';
import { mapGetters } from 'vuex';
import ModelRemoteSelect from '@/components/Business/Model/ModelRemoteSelect.vue';
import HardwareVersionSelect from '@/components/Business/HardwareVersion/HardwareVersionSelect.vue';
import ModelRemoteSelect from '@/components/Business/Model/ModelRemoteSelect.vue';
import UserInput from '@/components/Business/User/UserInput.vue';
import FormCol from "@/components/FormCol/index.vue";
import { RoleKeys } from '@/utils/enums';
import { mapGetters } from 'vuex';
export default {

View File

@ -1,6 +1,6 @@
<template>
<el-dialog
title="划拨运营区"
title="划拨"
:visible.sync="dialogVisible"
width="500px"
append-to-body
@ -10,7 +10,10 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<form-col label="运营区" prop="areaId">
<area-remote-select v-model="form.areaId" style="width: 100%;"/>
<area-remote-select v-model="form.areaId" style="width: 100%;" @change="onChangeArea"/>
</form-col>
<form-col label="所属人" prop="mchId" v-if="checkPermi(['system:user:list'])">
<user-input v-model="form.mchId" :text.sync="form.mchName" style="width: 100%;"/>
</form-col>
</el-row>
</el-form>
@ -22,13 +25,14 @@
</template>
<script>
import FormCol from "@/components/FormCol/index.vue";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import { transferDevice } from "@/api/bst/device";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import UserInput from '@/components/Business/User/UserInput.vue';
import FormCol from "@/components/FormCol/index.vue";
export default {
name: 'DeviceTransferDialog',
components: { FormCol, AreaRemoteSelect },
components: { FormCol, AreaRemoteSelect, UserInput },
props: {
visible: {
type: Boolean,
@ -60,6 +64,16 @@ export default {
},
},
methods: {
/**
* 运营区更换事件
* 如果所属人没有选择则自动选择运营区所属人
*/
onChangeArea(area) {
if (this.form.mchId == null) {
this.form.mchId = area.userId;
this.form.mchName = area.userName;
}
},
handleOpen() {
this.reset();
},
@ -67,6 +81,8 @@ export default {
this.form = {
ids: this.ids,
areaId: null,
mchId: null,
mchName: null,
};
this.$nextTick(() => {
this.$refs.form && this.$refs.form.clearValidate();

View File

@ -4,21 +4,17 @@
<el-col :span="18">
<el-card class="card-box">
<div class="button-group">
<el-button-group>
<el-button icon="el-icon-bell" size="mini" @click="handleRing">响铃</el-button>
<el-button icon="el-icon-unlock" size="mini" @click="handleUnlockSeat">开坐垫锁</el-button>
<el-button type="warning" plain icon="el-icon-unlock" size="mini" @click="handleUnlock" v-if="canUnlock(detail)">开锁</el-button>
<el-button type="warning" plain icon="el-icon-lock" size="mini" @click="handleLock" v-if="canAdminLock(detail)">锁车</el-button>
<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleReboot">重启</el-button>
</el-button-group>
<el-button-group style="margin-left: 4px">
<el-button icon="el-icon-upload" size="mini" @click="handleOut" v-if="DeviceStatus.canOut().includes(detail.status)">出仓</el-button>
<el-button icon="el-icon-download" size="mini" @click="handleIn" v-if="DeviceStatus.canIn().includes(detail.status)">入仓</el-button>
<el-button type="danger" plain icon="el-icon-close" size="mini" @click="handleDisable" v-if="DeviceStatus.canDisable().includes(detail.status)">禁用</el-button>
<el-button type="success" plain icon="el-icon-check" size="mini" @click="handleEnable" v-if="DeviceStatus.canEnable().includes(detail.status)">启用</el-button>
</el-button-group>
<el-button style="margin-left: 4px" icon="el-icon-refresh" size="mini" @click="handleRefresh">刷新</el-button>
<device-sn style="margin-left: 4px" :sn="detail.sn">
<el-button icon="el-icon-bell" size="mini" @click="handleRing">响铃</el-button>
<el-button icon="el-icon-unlock" size="mini" @click="handleUnlockSeat">开坐垫锁</el-button>
<el-button type="warning" plain icon="el-icon-unlock" size="mini" @click="handleUnlock" v-if="canUnlock(detail)">开锁</el-button>
<el-button type="warning" plain icon="el-icon-lock" size="mini" @click="handleLock" v-if="canAdminLock(detail)">锁车</el-button>
<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleReboot">重启</el-button>
<el-button icon="el-icon-upload" size="mini" @click="handleOut" v-if="DeviceStatus.canOut().includes(detail.status)">出仓</el-button>
<el-button icon="el-icon-download" size="mini" @click="handleIn" v-if="DeviceStatus.canIn().includes(detail.status)">入仓</el-button>
<el-button type="danger" plain icon="el-icon-close" size="mini" @click="handleDisable" v-if="DeviceStatus.canDisable().includes(detail.status)">禁用</el-button>
<el-button type="success" plain icon="el-icon-check" size="mini" @click="handleEnable" v-if="DeviceStatus.canEnable().includes(detail.status)">启用</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="handleRefresh">刷新</el-button>
<device-sn style="margin-left: 8px" :sn="detail.sn">
<el-button type="primary" plain icon="el-icon-picture" size="mini">设备二维码</el-button>
</device-sn>
</div>
@ -196,13 +192,16 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
unlockDevice({ id: this.detail.id }).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已开锁");
this.getDetail();
}
})
}).catch(() => {});
}).catch(() => {
this.loading = false;
});
})
},
//
handleLock() {
@ -211,12 +210,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
lockDevice({ id: this.detail.id }).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已锁车");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -226,12 +228,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
ringDevice({ id: this.detail.id }).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已响铃");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -241,12 +246,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
rebootDevice({ id: this.detail.id }).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已重启");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -256,12 +264,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
unlockSeatDevice({ id: this.detail.id }).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,坐垫锁已开");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -283,12 +294,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
outDevice([this.detail.id]).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已出仓");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -298,12 +312,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
inDevice([this.detail.id]).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已入仓");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -313,12 +330,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
disableDevice([this.detail.id]).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已禁用");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
},
//
@ -328,12 +348,15 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
enableDevice([this.detail.id]).then((res) => {
if (res.code === 200) {
this.$message.success("操作成功,设备已启用");
this.getDetail();
}
})
}).catch(() => {
this.loading = false;
});
}).catch(() => {});
}
}

View File

@ -17,7 +17,6 @@
end-placeholder="结束日期"
placeholder="请选择日期"
@change="handleQuery"
clearable
/>
</el-form-item>
<el-form-item label="支付渠道" prop="channelId">
@ -71,10 +70,10 @@
<template v-if="column.key === 'id'">
{{d.row[column.key]}}
</template>
<template v-else-if="['actualAmount', 'userActualBonus', 'platformActualBonus', 'actualBonus', 'orderActualAmount'].includes(column.key)">
<template v-else-if="redFields.includes(column.key)">
<span style="color: red">{{d.row[column.key] | fix2 | dv}}</span>
</template>
<template v-else-if="['payAmount', 'refundAmount', 'userBonus', 'userBonusRefund', 'platformBonus', 'platformBonusRefund', 'totalBonus', 'totalBonusRefund', 'orderPayAmount', 'orderRefundAmount'].includes(column.key)">
<template v-else-if="normalFields.includes(column.key)">
{{d.row[column.key] | fix2 | dv}}
</template>
<template v-else-if="['difference'].includes(column.key)">
@ -101,11 +100,11 @@
</template>
<script>
import { listReconciliationDateGroupByChannel, listReconciliationDateGroupByArea, listReconciliationDateGroupByDate, getReconciliationDate, delReconciliationDate, addReconciliationDate, updateReconciliationDate } from "@/api/bst/reconciliationDate";
import { $showColumns } from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue'
import { addReconciliationDate, delReconciliationDate, getReconciliationDate, listReconciliationDateGroupByArea, listReconciliationDateGroupByChannel, listReconciliationDateGroupByDate, updateReconciliationDate } from "@/api/bst/reconciliationDate";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue';
import ChannelSelect from '@/components/Business/Channel/ChannelSelect.vue';
import FormCol from "@/components/FormCol/index.vue";
import { $showColumns } from '@/utils/mixins';
//
const defaultSort = {
@ -127,22 +126,43 @@ export default {
{key: 'date', visible: true, label: '日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
{key: 'channelName', visible: false, label: '渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'areaName', visible: false, label: '运营区', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderPayAmount', visible: false, label: '骑行支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderRefundAmount', visible: false, label: '骑行退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderActualAmount', visible: false, label: '骑行实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'payAmount', visible: true, label: '支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'refundAmount', visible: true, label: '退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'actualAmount', visible: true, label: '实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'userBonus', visible: true, label: '分成', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'userBonusRefund', visible: true, label: '分成退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'userActualBonus', visible: true, label: '分成实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'platformBonus', visible: true, label: '手续费', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'platformBonusRefund', visible: true, label: '手续费退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'platformActualBonus', visible: true, label: '手续费实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'totalBonus', visible: false, label: '分成总金额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'totalBonusRefund', visible: false, label: '分成退款总金额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'actualBonus', visible: false, label: '实际分成金额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'difference', visible: true, label: '差额', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'payAmount', visible: true, label: '合计支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'refundAmount', visible: true, label: '合计退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'actualAmount', visible: true, label: '合计实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderPayAmount', visible: true, label: '骑行支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderRefundAmount', visible: true, label: '骑行退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderActualAmount', visible: true, label: '骑行实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'vipPayAmount', visible: true, label: '卡券支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'vipRefundAmount', visible: true, label: '卡券退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'vipActualAmount', visible: true, label: '卡券实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'depositPayAmount', visible: true, label: '押金支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'depositRefundAmount', visible: true, label: '押金退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'depositActualAmount', visible: true, label: '押金实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
],
redFields: [
'actualAmount',
'userActualBonus',
'platformActualBonus',
'actualBonus',
'orderActualAmount',
'vipActualAmount',
'depositActualAmount'
],
normalFields: [
'payAmount',
'refundAmount',
'userBonus',
'userBonusRefund',
'platformBonus',
'platformBonusRefund',
'totalBonus',
'totalBonusRefund',
'orderPayAmount',
'orderRefundAmount',
'vipPayAmount',
'vipRefundAmount',
'depositPayAmount',
'depositRefundAmount'
],
//
orderSorts: ['ascending', 'descending', null],

View File

@ -65,11 +65,7 @@
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="id" />-->
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="更新内容" align="center">
<template slot-scope="scope">
<div v-html="scope.row.content"></div>
</template>
</el-table-column>
<el-table-column label="更新内容" align="center" prop="content" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -105,7 +101,7 @@
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
<el-form-item label="更新内容">
<editor v-model="form.content" :min-height="192"/>
<el-input v-model="form.content" type="textarea" :rows="4" maxlength="500" show-word-limit placeholder="请输入更新内容"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -117,7 +113,7 @@
</template>
<script>
import { listSoftwareVersion, getSoftwareVersion, delSoftwareVersion, addSoftwareVersion, updateSoftwareVersion } from "@/api/bst/softwareVersion";
import { addSoftwareVersion, delSoftwareVersion, getSoftwareVersion, listSoftwareVersion, updateSoftwareVersion } from "@/api/bst/softwareVersion";
export default {
name: "SoftwareVersion",