This commit is contained in:
邱贞招 2024-07-24 10:09:51 +08:00
parent 0edaeb9761
commit c341347a6a
10 changed files with 164 additions and 44 deletions

View File

@ -54,6 +54,14 @@ export function updateArea(data) {
data: data data: data
}) })
} }
// 修改运营区
export function updateArea2(data) {
return request({
url: '/system/area/guide',
method: 'put',
data: data
})
}
// 删除运营区 // 删除运营区
export function delArea(areaId) { export function delArea(areaId) {

View File

@ -58,9 +58,10 @@ export function getBalance(){
}) })
} }
// 查询运营商信息 // 查询运营商信息
export function getDeptByToken(){ export function getDeptByToken(deptId){
return request({ return request({
url: '/system/dept/getDept', url: '/system/dept/getDept',
method: 'get' method: 'get',
params: {deptId: deptId}
}) })
} }

View File

@ -76,6 +76,14 @@ export function oneClickWarehousing(deviceId) {
}) })
} }
// 更新设备
export function refreshDevice(deviceId) {
return request({
url: '/system/device/refreshDevice/' + deviceId,
method: 'post'
})
}
// 查询所有车辆信息 // 查询所有车辆信息
export function allDevice() { export function allDevice() {

View File

@ -122,6 +122,7 @@ export default {
// //
this.removeAllMarker(); this.removeAllMarker();
console.log("添加标记点") console.log("添加标记点")
console.log("====",this.initLng, this.initLat,this.deviceSn, this.status, this.onlineStatus)
this.addMarker(this.initLng, this.initLat, this.deviceSn, this.status, this.onlineStatus); this.addMarker(this.initLng, this.initLat, this.deviceSn, this.status, this.onlineStatus);
// this.$emit('map-geo', res, this.initLng, this.initLat); // this.$emit('map-geo', res, this.initLng, this.initLat);

View File

@ -114,7 +114,7 @@
<!-- </el-row>--> <!-- </el-row>-->
</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="submitForm2"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -362,11 +362,6 @@
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number> <el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="超出电子围栏多少时长断电(s)" label-width="150">-->
<!-- <el-input-number style="width: 50%" v-model="form.outage" placeholder="超出电子围栏多少时长断电(s)"></el-input-number>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -375,10 +370,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-form-item label="电子围栏" prop="boundaryStr">-->
<!-- <area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :pathList="form.boundaryStr"-->
<!-- @center="center" @mapList="mapList" />-->
<!-- </el-form-item>-->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="经度" prop="longitude"> <el-form-item label="经度" prop="longitude">
@ -401,7 +392,7 @@
</template> </template>
<script> <script>
import { listArea, getArea, delArea, addArea, updateArea } from "@/api/system/area"; import { listArea, getArea, delArea, addArea, updateArea, updateArea2 } from "@/api/system/area";
import AreaMap from "@/components/AreaMap"; import AreaMap from "@/components/AreaMap";
import { listFee } from "@/api/system/fee"; import { listFee } from "@/api/system/fee";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
@ -736,6 +727,10 @@ export default {
data.areaOutReturn = data.areaOutReturn ? "1" : "0"; data.areaOutReturn = data.areaOutReturn ? "1" : "0";
data.isDepositDeduction = data.isDepositDeduction ? "1" : "0"; data.isDepositDeduction = data.isDepositDeduction ? "1" : "0";
data.returnVerify = data.returnVerify ? "1" : "0"; data.returnVerify = data.returnVerify ? "1" : "0";
if(data.isDepositDeduction === '1' && data.returnVerify === '1'){
this.$modal.msgError("押金抵扣和拍照审核不能同时开启");
return
}
// console.log(data, 'data without cityList, countyList, provinceList'); // console.log(data, 'data without cityList, countyList, provinceList');
// console.log(this.form,'formformformformform'); // console.log(this.form,'formformformformform');
if (this.form.areaId != null) { if (this.form.areaId != null) {
@ -756,6 +751,28 @@ export default {
} }
}); });
}, },
/** 提交按钮 */
submitForm2() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.areaId != null) {
updateArea2({areaId:this.form.areaId,boundary:this.form.boundary,boundaryStr:this.form.boundaryStr}).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.mapopen = false
this.getList();
});
} else {
addArea(data).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const areaIds = row.areaId || this.ids; const areaIds = row.areaId || this.ids;

View File

@ -137,6 +137,17 @@
v-hasPermi="['system:device:edit']" v-hasPermi="['system:device:edit']"
>一键入仓</el-button> >一键入仓</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-refresh"
size="mini"
:disabled="multiple"
@click="refresh"
v-hasPermi="['system:device:edit']"
>更新</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -508,7 +519,7 @@
reboot, reboot,
oneClickListing, oneClickListing,
oneClickWarehousing, oneClickWarehousing,
seatCushionLock seatCushionLock, refreshDevice
} 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";
@ -633,6 +644,11 @@ export default {
listHardwareVersion(this.queryParams).then(response => { listHardwareVersion(this.queryParams).then(response => {
this.hardwareVersionOptions = response.rows; this.hardwareVersionOptions = response.rows;
}); });
if(this.userName === 'admin'){
listDept({status: '0' }).then(response => {
this.deptOptions = response.data;
});
}
}, },
watch: { watch: {
'form.modelId': function(newVal) { 'form.modelId': function(newVal) {
@ -760,6 +776,14 @@ export default {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 更新*/
refresh(row){
const deviceIds = row.deviceId || this.ids;
refreshDevice(deviceIds).then(response => {
this.getList();
this.$modal.msgSuccess("操作成功");
});
},
/** 一键入仓*/ /** 一键入仓*/
oneClickWarehousing(row){ oneClickWarehousing(row){
const deviceIds = row.deviceId || this.ids; const deviceIds = row.deviceId || this.ids;

View File

@ -137,7 +137,7 @@
<el-radio-group v-model="form.rentalUnit" @change="handleUnitChange"> <el-radio-group v-model="form.rentalUnit" @change="handleUnitChange">
<el-radio label="minutes">按分钟</el-radio> <el-radio label="minutes">按分钟</el-radio>
<el-radio label="hours">按小时</el-radio> <el-radio label="hours">按小时</el-radio>
<el-radio label="day">按天</el-radio> <!-- <el-radio label="day">按天</el-radio>-->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- 计费周期和封顶金额只在非按天计费时显示 --> <!-- 计费周期和封顶金额只在非按天计费时显示 -->
@ -289,10 +289,10 @@
style="width: 80px; display: inline-block; margin-left: 10px;" /> style="width: 80px; display: inline-block; margin-left: 10px;" />
小时 小时
</el-radio> </el-radio>
<el-radio label="2"> <!-- <el-radio label="2">-->
自定义时刻 <!-- 自定义时刻-->
<el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" /> <!-- <el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" />-->
</el-radio> <!-- </el-radio>-->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="form.rentalUnit != 'day'"> <el-form-item v-if="form.rentalUnit != 'day'">

View File

@ -103,7 +103,7 @@
<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"/>
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>--> <!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
<el-table-column label="支付方式" align="center" prop="payType"> <el-table-column label="支付方式" align="center" prop="payType">

View File

@ -328,7 +328,8 @@
offset: new AMap.Pixel(0, -30) offset: new AMap.Pixel(0, -30)
}); });
// //
this.deviceMarker(); console.log("this.areaId============="+this.areaId)
this.deviceMarker(this.areaId);
// //
this.areaList.forEach(area => { this.areaList.forEach(area => {
this.addArea(JSON.parse(area.boundaryStr) || []); this.addArea(JSON.parse(area.boundaryStr) || []);
@ -359,10 +360,24 @@
freshMarker(points) { freshMarker(points) {
let that = this; let that = this;
console.log("刷新点标记====",points)
// points
if (!Array.isArray(points)) {
console.error("Points data is not an array");
return;
}
console.log("this.cluster=======",this.cluster)
// //
if (this.cluster != null) { if (this.cluster) {
try {
this.cluster.setData(points); this.cluster.setData(points);
}else { } catch (error) {
console.error("Error setting cluster data: ", error);
}
} else {
//
this.map.plugin(["AMap.MarkerCluster"], () => { this.map.plugin(["AMap.MarkerCluster"], () => {
that.cluster = new AMap.MarkerCluster( that.cluster = new AMap.MarkerCluster(
this.map, // this.map, //
@ -372,7 +387,13 @@
renderMarker: this.getRenderMarker, // renderMarker: this.getRenderMarker, //
} }
); );
that.cluster.on('click', that.onClickCluster) // cluster
if (that.cluster) {
console.log("Cluster 初始化成功");
that.cluster.on('click', that.onClickCluster);
} else {
console.error("初始化失败 cluster");
}
}); });
} }
}, },
@ -525,7 +546,7 @@
this.markers.push(marker); this.markers.push(marker);
console.log("title============="+title) // console.log("title============="+title)
// Text // Text
let text = new AMap.Text({ let text = new AMap.Text({
text: title, text: title,
@ -543,11 +564,12 @@
// //
this.map.add(text); this.map.add(text);
console.log("text=============",text) // console.log("text=============",text)
this.labels.push(text) this.labels.push(text)
}, },
deviceMarker(){ deviceMarker(areaId){
listDevice({pageNum: 1,pageSize: 999}).then(response => { this.data = [];
listDevice({pageNum: 1,pageSize: 999,areaId:areaId}).then(response => {
this.deviceList = response.rows; this.deviceList = response.rows;
this.deviceList.forEach(device => { this.deviceList.forEach(device => {
// //

View File

@ -55,7 +55,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="userName != 'admin'"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
@ -92,7 +92,7 @@
<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"/>
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>--> <!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
<el-table-column label="支付方式" align="center" prop="payType"> <el-table-column label="支付方式" align="center" prop="payType">
@ -129,6 +129,25 @@
<!-- 添加或修改资金流水对话框 --> <!-- 添加或修改资金流水对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="运营商" prop="operator" v-if="userName == 'admin'">
<el-select v-model="form.deptId" clearable placeholder="请选择运营商">
<el-option
v-for="item in deptOptions"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="提现方式">
<el-radio-group v-model="form.method">
<el-radio
v-for="dict in dict.type.et_withdraw_method"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<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>
@ -153,11 +172,11 @@
<el-form-item label="区域:">{{ form3.areaName }}</el-form-item> <el-form-item label="区域:">{{ form3.areaName }}</el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="提现金额:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> </el-form-item> <el-form-item label="提现金额:"><span style="color: red;font-weight: 700">{{ form3.amount + form3.handlingCharge }}</span> </el-form-item>
<el-form-item label="支付手续费:"><span style="color: red;font-weight: 700">{{ form3.handlingCharge }}</span> </el-form-item> <el-form-item label="支付手续费:"><span style="color: red;font-weight: 700">{{ form3.handlingCharge }}</span> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount - form3.handlingCharge }}</span> </el-form-item> <el-form-item label="实际到账:"><span style="color: red;font-weight: 700">{{ form3.amount }}</span> </el-form-item>
<el-form-item label="运营商结余:"><span style="color: red;font-weight: 700">{{ form3.operatorBalance }}</span> </el-form-item> <el-form-item label="运营商结余:"><span style="color: red;font-weight: 700">{{ form3.operatorBalance }}</span> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
@ -186,14 +205,18 @@
</template> </template>
<script> <script>
import { listFlow, getFlow, delFlow, addFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow' import { listFlow, getFlow, delFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow'
import { optionselect as getAreaOptionselect } from '@/api/system/area' import { optionselect as getAreaOptionselect } from '@/api/system/area'
import { updateWithdraw } from '@/api/system/withdraw' import { getDeptByToken, listDept } from '@/api/system/dept'
import { getDeptByToken } from '@/api/system/dept'
export default { export default {
name: "Flow", name: "Flow",
dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_status'], dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_status','et_withdraw_method'],
watch: {
'form.deptId': function(newVal) {
this.getDept(newVal);
},
},
computed: { computed: {
formattedFee() { formattedFee() {
console.log("handlingCharge===========",this.handlingCharge) console.log("handlingCharge===========",this.handlingCharge)
@ -229,6 +252,7 @@ export default {
return { return {
// //
loading: true, loading: true,
deptOptions: [],
// //
ids: [], ids: [],
// //
@ -261,7 +285,8 @@ export default {
orderNo: null, orderNo: null,
outTradeNo: null, outTradeNo: null,
type: null, type: null,
busType: '5', busType: '',
typeList: '5,6',
amount: null, amount: null,
handlingCharge: null, handlingCharge: null,
operatorDividend: null, operatorDividend: null,
@ -297,8 +322,19 @@ export default {
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getList(); this.getList();
this.getAreaList(); this.getAreaList();
if(this.userName === 'admin'){
listDept({status: '0' }).then(response => {
this.deptOptions = response.data;
});
}
}, },
methods: { methods: {
getDept(deptId){
getDeptByToken(deptId).then(response => {
this.balance = response.data.balance;
this.handlingCharge = response.data.handlingCharge;
});
},
/** 审核 */ /** 审核 */
handleEdit(row) { handleEdit(row) {
this.open3 = true; this.open3 = true;
@ -379,7 +415,8 @@ export default {
operatorBalance: null, operatorBalance: null,
partnerDividend: null, partnerDividend: null,
payType: null, payType: null,
createTime: null createTime: null,
method: "1"
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -401,11 +438,13 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
if(this.userName != 'admin'){
// //
getDeptByToken().then(response => { getDeptByToken().then(response => {
this.balance = response.data.balance; this.balance = response.data.balance;
this.handlingCharge = response.data.handlingCharge; this.handlingCharge = response.data.handlingCharge;
}); });
}
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "申请提现"; this.title = "申请提现";