1.一键出仓、一键入仓

2.提现
3.地图切换运营区
This commit is contained in:
邱贞招 2024-07-17 09:52:24 +08:00
parent bda10f0ff1
commit c4872b2050
16 changed files with 801 additions and 51 deletions

View File

@ -59,6 +59,24 @@ export function oneClickOffline(deviceId) {
}) })
} }
// 一键出仓
export function oneClickListing(deviceId) {
return request({
url: '/system/device/oneClickListing/' + deviceId,
method: 'post'
})
}
// 一键入仓
export function oneClickWarehousing(deviceId) {
return request({
url: '/system/device/oneClickWarehousing/' + deviceId,
method: 'post'
})
}
// 查询所有车辆信息 // 查询所有车辆信息
export function allDevice() { export function allDevice() {
return request({ return request({

View File

@ -42,3 +42,20 @@ export function delFlow(flowId) {
method: 'delete' method: 'delete'
}) })
} }
// 提现
export function withdraw(data) {
return request({
url: '/system/flow/withdraw',
method: 'post',
data: data
})
}
// 提现失败
export function rejectWithdraw(data) {
return request({
url: '/system/flow/rejectWithdraw',
method: 'post',
data: data
})
}

View File

@ -112,3 +112,12 @@ export function authoritypass(orderNo) {
}) })
} }
// 查询押金订单
export function getDepositOrder(query) {
return request({
url: '/appVerify/getDepositOrder',
method: 'get',
params: query
})
}

View File

@ -21,7 +21,7 @@ export function getUser(userId) {
// 绑定APP用户 // 绑定APP用户
export function bandAppUser(data) { export function bandAppUser(data) {
return request({ return request({
url: '/system/user/bandAppUser', url: '/system/dept/bandAppUser',
method: 'put', method: 'put',
data: data data: data
}) })

View File

@ -55,6 +55,8 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download Vue.prototype.download = download
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
// 创建全局事件总线
Vue.prototype.$eventBus = new Vue();
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag) Vue.component('DictTag', DictTag)

View File

@ -289,21 +289,12 @@
<el-dialog title="官方审核" :visible.sync="open5" width="700px" append-to-body> <el-dialog title="官方审核" :visible.sync="open5" width="700px" append-to-body>
<el-form :model="form5" ref="form5" label-width="100px" size="mini"> <el-form :model="form5" ref="form5" label-width="100px" size="mini">
<el-form-item label="押金金额"> <el-form-item label="押金金额:">
<span style="color: red;font-weight: 700">200</span> <span style="color: red;font-weight: 700">{{deposit}}</span>
</el-form-item> </el-form-item>
<el-form-item label="扣款金额" prop="deductionAmount"> <el-form-item label="扣款金额:" prop="deductionAmount">
<span style="color: red;font-weight: 700">{{form5.deductionAmount}}</span> <span style="color: red;font-weight: 700">{{form5.deductionAmount}}</span>
</el-form-item> </el-form-item>
<!-- <video v-if="form5.videoUrl" :src="form5.videoUrl" controls width="70%" height="auto"></video>-->
<!-- <p v-else>暂无视频</p>-->
<!-- 展示音频 -->
<span>展示音频</span>
<!-- <el-col :span="24">-->
<!-- <el-form-item label="上传录音" prop="soundRecording" >-->
<!-- <audio-upload v-model="form5.audioFiles" :limit="5" :file-size="10" :file-type="['mp3', 'wav', 'ogg', 'aac','m4a']" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button v-show="view == true" @click="open5 = false"> </el-button> <el-button v-show="view == true" @click="open5 = false"> </el-button>
@ -346,7 +337,7 @@
changePrice, changePrice,
refund, refund,
returnVehicle, returnVehicle,
deduction, passAudit, rejectAudit, authoritypass deduction, passAudit, rejectAudit, authoritypass, getDepositOrder
} from '@/api/system/order' } from '@/api/system/order'
import TrajectoryMap from '@/components/Map/TrajectoryMap' import TrajectoryMap from '@/components/Map/TrajectoryMap'
import { getArea, optionselect as getAreaOptionselect } from '@/api/system/area' import { getArea, optionselect as getAreaOptionselect } from '@/api/system/area'
@ -392,6 +383,7 @@ export default {
view5: false, view5: false,
vehicleNum: null, vehicleNum: null,
audioFiles: [], audioFiles: [],
deposit: null,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -526,6 +518,10 @@ export default {
}, },
/**官方审核通过 自动退押金 */ /**官方审核通过 自动退押金 */
authorityPass(){ authorityPass(){
if(this.deposit < this.form5.deductionAmount){
this.$modal.msgError("押金小于扣款金额!")
return
}
this.$refs["form5"].validate(valid => { this.$refs["form5"].validate(valid => {
if (valid) { if (valid) {
if (this.form5.orderNo != null) { if (this.form5.orderNo != null) {
@ -580,10 +576,14 @@ export default {
this.view = false; this.view = false;
}, },
handleAuthorityAudit(row){ handleAuthorityAudit(row){
this.open5 = true; getDepositOrder({userId:row.userId}).then(response => {
this.form5 = row; this.open5 = true;
console.log("this.form5============="+JSON.stringify(this.form5)) this.form5 = row;
this.view5 = false; this.deposit = response.data.payFee;
console.log("this.form5============="+JSON.stringify(this.form5))
console.log("this.deposit============="+JSON.stringify(this.deposit))
this.view5 = false;
});
}, },
getTypeText(type) { getTypeText(type) {
switch (type) { switch (type) {

View File

@ -58,6 +58,13 @@
> >
<el-table-column prop="deptName" label="运营商名称" width="260"></el-table-column> <el-table-column prop="deptName" label="运营商名称" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column> <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="phone" label="电话" align="center" ></el-table-column>
<el-table-column label="余额" align="center">
<template slot-scope="scope">
<span class="balance-cell">{{ scope.row.balance }}</span>
</template>
</el-table-column>
<el-table-column prop="handlingCharge" label="手续费(‰)" align="center" ></el-table-column>
<el-table-column prop="status" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
@ -84,6 +91,14 @@
@click="handleAdd(scope.row)" @click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']" v-hasPermi="['system:dept:add']"
>新增</el-button> >新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-link"
v-if="scope.row.parentId != 0 && scope.row.appUserId == null"
@click="bandWxUser(scope.row)"
v-hasPermi="['system:dept:edit']"
>绑定微信用户</el-button>
<el-button <el-button
v-if="scope.row.parentId != 0" v-if="scope.row.parentId != 0"
size="mini" size="mini"
@ -268,6 +283,35 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加或修改提现记录对话框 -->
<el-dialog :title="title2" :visible.sync="open2" width="500px" append-to-body>
<el-form ref="form2" :model="form2" :rules="rules2" label-width="120px">
<el-form-item label="手机号码" prop="phonenumber">
<el-select
ref="headerSearchSelect"
v-model="form2.phonenumber"
:remote-method="queryPhonenumber"
filterable
default-first-option
remote
:loading="loading2"
placeholder="输入手机号搜索"
class="header-search-select" >
<el-option
v-for="item in options"
:key="item.value"
:label="item.label+'---'+item.appName"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm2"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -276,6 +320,8 @@ import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild }
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listArea } from '../../../api/system/area' import { listArea } from '../../../api/system/area'
import { fastSearch } from '@/api/user/user'
import { bandAppUser, getUser } from '@/api/system/user'
export default { export default {
name: "Dept", name: "Dept",
@ -291,12 +337,17 @@ export default {
deptList: [], deptList: [],
// //
deptOptions: [], deptOptions: [],
options: [],
// //
areaOptions: [], areaOptions: [],
// //
title: "", title: "",
title2: "",
userName:null,
// //
open: false, open: false,
open2: false,
loading2: false,
// //
isExpandAll: true, isExpandAll: true,
// //
@ -304,10 +355,12 @@ export default {
// //
queryParams: { queryParams: {
deptName: undefined, deptName: undefined,
status: undefined status: undefined,
phonenumber: null
}, },
// //
form: {}, form: {},
form2: {},
// //
rules: { rules: {
parentId: [ parentId: [
@ -334,13 +387,60 @@ export default {
trigger: "blur" trigger: "blur"
} }
] ]
},
rules2: {
phonenumber: [
{ required: true, message: "手机号码不能为空", trigger: "blur" },
]
} }
}; };
}, },
created() { created() {
console.log("当前用户信息:",this.$store.state.user.id)
this.userName = this.$store.state.user.name;
let userId = this.$store.state.user.id;
getUser(userId).then(response => {
this.user = response.data;
});
this.getList(); this.getList();
}, },
methods: { methods: {
submitForm2: function() {
let form2 = this.form2
this.$refs['form2'].validate(valid => {
if (valid) {
this.$modal.confirm('是否确认绑定?').then(function() {
return bandAppUser({appUserId:form2.phonenumber,deptId:form2.deptId})
}).then(() => {
//
location.reload()
this.$modal.msgSuccess('操作成功')
}).catch(() => {
})
}
})
},
queryPhonenumber(query) {
console.log("query:",query)
if (query !== '') {
this.loading2 = true;
setTimeout(() => {
this.loading2 = false;
fastSearch({"phonenumber":query}).then(response => {
this.options = response.data;
}
);
}, 200);
} else {
this.options = []
}
},
bandWxUser(row){
this.reset();
this.form2 = row;
this.open2 = true;
this.title2 = "绑定微信用户";
},
/** 查询运营商列表 */ /** 查询运营商列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -363,6 +463,7 @@ export default {
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.open2 = false;
this.reset(); this.reset();
}, },
// //
@ -381,6 +482,7 @@ export default {
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
@ -463,3 +565,9 @@ export default {
} }
}; };
</script> </script>
<style>
.balance-cell {
font-weight: bold;
color: red;
}
</style>

View File

@ -4,7 +4,8 @@
<el-table-column align="center" type="index" label="#"></el-table-column> <el-table-column align="center" type="index" label="#"></el-table-column>
<el-table-column align="center" label="订单编号" width="200" prop="orderNo"> <el-table-column align="center" label="订单编号" width="200" prop="orderNo">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="'/system/order/index/' + scope.row.orderNo" class="link-type"> <router-link :to="'/system/order/index/' + scope.row.orderNo" class="link-type"
@click.native="closeAllDialogs">
<span>{{ scope.row.orderNo }}</span> <span>{{ scope.row.orderNo }}</span>
</router-link> </router-link>
</template> </template>
@ -83,6 +84,9 @@ export default {
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
}); });
},
closeAllDialogs() {
this.$eventBus.$emit('close-all-dialogs');
} }
} }
} }

View File

@ -93,22 +93,11 @@
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="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:device:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-edit" icon="el-icon-unlock"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="oneClickOnline" @click="oneClickOnline"
@ -117,7 +106,7 @@
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="info"
plain plain
icon="el-icon-lock" icon="el-icon-lock"
size="mini" size="mini"
@ -126,6 +115,39 @@
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-upload"
size="mini"
:disabled="multiple"
@click="oneClickListing"
v-hasPermi="['system:device:edit']"
>一键出仓</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-download"
size="mini"
:disabled="multiple"
@click="oneClickWarehousing"
v-hasPermi="['system:device:edit']"
>一键入仓</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:device:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -151,7 +173,12 @@
<el-table-column label="版本" align="center" prop="version" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/> <el-table-column label="版本" align="center" prop="version" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/>
<el-table-column label="信号" align="center" prop="signalStrength" sortable="custom" :sort-orders="['descending', 'ascending']"/> <el-table-column label="信号" align="center" prop="signalStrength" sortable="custom" :sort-orders="['descending', 'ascending']"/>
<el-table-column label="卫星" align="center" prop="satellites" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/> <el-table-column label="卫星" align="center" prop="satellites" width="70" sortable="custom" :sort-orders="['descending', 'ascending']"/>
<el-table-column label="质量" align="center" prop="quality" width="60"/> <el-table-column label="钥匙" align="center" prop="quality" width="60"/>
<el-table-column label="定位时间" align="center" prop="lastLocationTime" width="90">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.lastLocationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="电压" align="center" prop="voltage" width="60" :formatter="formatVoltage"/> <el-table-column label="电压" align="center" prop="voltage" width="60" :formatter="formatVoltage"/>
<el-table-column label="电量" align="center" prop="remainingPower" width="70" sortable="custom" :sort-orders="['descending', 'ascending']" :formatter="formatPower"/> <el-table-column label="电量" align="center" prop="remainingPower" width="70" sortable="custom" :sort-orders="['descending', 'ascending']" :formatter="formatPower"/>
<el-table-column label="车辆状态" align="center" prop="status"> <el-table-column label="车辆状态" align="center" prop="status">
@ -346,7 +373,7 @@
</el-dialog> </el-dialog>
<!-- 设备详情对话框 --> <!-- 设备详情对话框 -->
<el-dialog style="font-weight: bold;" title="设备详情" :visible.sync="open2" width="1000px" append-to-body> <el-dialog style="font-weight: bold;" title="设备详情" :close-on-click-modal="true" :visible.sync="open2" width="1000px" append-to-body>
<el-form ref="form" :model="form" label-width="100px" size="mini"> <el-form ref="form" :model="form" label-width="100px" size="mini">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -377,12 +404,20 @@
</el-row> </el-row>
<el-row> <el-row>
<h2 style="font-weight: bold;font-size: 18px">自动更新</h2> <h2 style="font-weight: bold;font-size: 18px">自动更新</h2>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="经度:">{{ form.longitude }}</el-form-item> <el-form-item label="经度:">{{ form.longitude }}</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="6">
<el-form-item label="纬度:">{{ form.latitude }}</el-form-item> <el-form-item label="纬度:">{{ form.latitude }}</el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="form.gps === '1'">
<el-form-item label="最后更新时间:" label-width="120">{{ form.lastTime }}</el-form-item>
</el-col>
<el-col :span="4" v-else>
<span style="color: red;font-weight: 700">
当前无gps信号
</span>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-row v-if="selected != null" style="margin-bottom: 0.5em" > <el-row v-if="selected != null" style="margin-bottom: 0.5em" >
当前选择 {{selected.address}}, {{selected.lng}}, {{selected.lat}} 当前选择 {{selected.address}}, {{selected.lng}}, {{selected.lat}}
@ -433,7 +468,7 @@
addDevice, addDevice,
updateDevice, updateDevice,
handleLock, handleLock,
handleUnlocking, ring, oneClickOnline, oneClickOffline, reboot handleUnlocking, ring, oneClickOnline, oneClickOffline, reboot, oneClickListing, oneClickWarehousing
} 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";
@ -531,6 +566,7 @@ export default {
const vehicleNum = this.$route.params && this.$route.params.vehicleNum; const vehicleNum = this.$route.params && this.$route.params.vehicleNum;
console.log("sn------",sn) console.log("sn------",sn)
console.log("vehicleNum------",vehicleNum) console.log("vehicleNum------",vehicleNum)
this.$eventBus.$on('close-all-dialogs', this.closeDialog);
if (sn != null) { if (sn != null) {
this.queryParams.sn = sn; this.queryParams.sn = sn;
} }
@ -570,7 +606,13 @@ export default {
} }
} }
}, },
beforeDestroy() {
this.$eventBus.$off('close-all-dialogs', this.closeDialog);
},
methods: { methods: {
closeDialog() {
this.open2 = false;
},
/** 当选择车型时调用 */ /** 当选择车型时调用 */
fetchData(modelId) { fetchData(modelId) {
// console.log("id"+modelId) // console.log("id"+modelId)
@ -616,6 +658,26 @@ export default {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 一键出仓*/
oneClickListing(row){
const deviceIds = row.deviceId || this.ids;
this.$modal.confirm('确认一键出仓?').then(function() {
return oneClickListing(deviceIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
},
/** 一键入仓*/
oneClickWarehousing(row){
const deviceIds = row.deviceId || this.ids;
this.$modal.confirm('确认一键入仓?').then(function() {
return oneClickWarehousing(deviceIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
},
onMapGeo(data, lat, lng) { onMapGeo(data, lat, lng) {
console.log("onMapGeo", data) console.log("onMapGeo", data)
let component = data.regeocode.addressComponent; let component = data.regeocode.addressComponent;

View File

@ -153,14 +153,16 @@
<div v-if="form.ridingRule == '1'"> <div v-if="form.ridingRule == '1'">
<el-form-item label="起步价"> <el-form-item label="起步价">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6"> <el-col :span="4">
<el-input v-model="startingPrice" placeholder="请输入起步价" /> <el-input v-model="startingPrice" placeholder="请输入起步价" />
</el-col> </el-col>
<el-col :span="2" style="line-height: 32px;"> <el-col :span="2" style="line-height: 32px;">
</el-col> </el-col>
<el-col :span="6"> <el-col :span="4">
<el-input v-model="startingTime" placeholder="请输入起步时间" /> <el-form-item prop="startingTime">
<el-input v-model="form.startingTime" placeholder="请输入起步时间" />
</el-form-item>
</el-col> </el-col>
<el-col :span="2" style="line-height: 32px;"> <el-col :span="2" style="line-height: 32px;">
{{ timeUnit }}) {{ timeUnit }})
@ -169,14 +171,16 @@
</el-form-item> </el-form-item>
<el-form-item label="超出价"> <el-form-item label="超出价">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6"> <el-col :span="4">
<el-input v-model="timeoutPrice" placeholder="请输入超出价格" /> <el-input v-model="timeoutPrice" placeholder="请输入超出价格" />
</el-col> </el-col>
<el-col :span="2" style="line-height: 32px;"> <el-col :span="2" style="line-height: 32px;">
/ /
</el-col> </el-col>
<el-col :span="6"> <el-col :span="4">
<el-input v-model="timeoutTime" placeholder="请输入超出时间" /> <el-form-item prop="timeoutTime">
<el-input v-model="form.timeoutTime" placeholder="请输入超出时间" />
</el-form-item>
</el-col> </el-col>
<el-col :span="4" style="line-height: 32px;"> <el-col :span="4" style="line-height: 32px;">
{{ timeUnit }}超出起步价后 {{ timeUnit }}超出起步价后
@ -419,6 +423,14 @@ export default {
sectionCharges: [ sectionCharges: [
{ required: true, message: '请输入区间收费', trigger: 'blur' }, { required: true, message: '请输入区间收费', trigger: 'blur' },
], ],
startingTime: [
{ required: true, message: '请输入起步时间', trigger: 'blur' },
{ pattern: /^\d+$/, message: '起步时间必须为正整数', trigger: 'blur' }
],
timeoutTime: [
{ required: true, message: '请输入超时时间', trigger: 'blur' },
{ pattern: /^\d+$/, message: '超时时间必须为正整数', trigger: 'blur' }
],
}, },
}; };
}, },

View File

@ -111,6 +111,11 @@
<dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/> <dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_flow_status" :value="scope.row.status"/>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -193,7 +198,7 @@ import { optionselect as getAreaOptionselect } from '@/api/system/area'
export default { export default {
name: "Flow", name: "Flow",
dicts: ['et_business_type', 'et_pay_type', 'et_flow_type'], dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_status'],
data() { data() {
return { return {
// //

View File

@ -35,6 +35,17 @@
<span class="span-class">未上架/下线</span> <span class="span-class">未上架/下线</span>
</div> </div>
</div> </div>
<div class="area-options">
<span >切换运营区</span>
<el-select v-model="areaId" placeholder="请选择运营区" clearable @change="handleAreaChange">
<el-option
v-for="item in areaOptions"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
></el-option>
</el-select>
</div>
<div class="input-card"> <div class="input-card">
<el-button @click="setFitView()">全局查看</el-button> <el-button @click="setFitView()">全局查看</el-button>
<el-button @click="changeMapStyle()">切换地图</el-button> <el-button @click="changeMapStyle()">切换地图</el-button>
@ -97,7 +108,7 @@
import AMapLoader from "@amap/amap-jsapi-loader"; import AMapLoader from "@amap/amap-jsapi-loader";
import globalConfig from "@/utils/config/globalConfig"; import globalConfig from "@/utils/config/globalConfig";
import { getDevice, listDevice } from '@/api/system/device' import { getDevice, listDevice } from '@/api/system/device'
import {listArea} from "@/api/system/area"; import { listArea, optionselect as getAreaOptionselect } from '@/api/system/area'
import { listParking } from '@/api/system/parking' import { listParking } from '@/api/system/parking'
import LocationMap from '@/components/Map/location/LocationMap' import LocationMap from '@/components/Map/location/LocationMap'
import OrderRecord from '@/views/system/device/components/orderRecord' import OrderRecord from '@/views/system/device/components/orderRecord'
@ -143,6 +154,7 @@
tips: null, tips: null,
// //
areaList: [], areaList: [],
userName: undefined,
lon: null, lon: null,
lat: null, lat: null,
area:null, area:null,
@ -159,6 +171,8 @@
open2: false, open2: false,
// //
form: {}, form: {},
areaId: 14,
areaOptions: [],
infoWindow: null, infoWindow: null,
// //
deviceList: [], deviceList: [],
@ -170,12 +184,26 @@
} }
}, },
mounted() { mounted() {
this.getAreaList(); console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name;
this.getAreaList(this.areaId);
this.getAreaOptions();
}, },
unmounted() { unmounted() {
this.map?.destroy(); this.map?.destroy();
}, },
methods: { methods: {
handleAreaChange(newAreaId) {
console.log('newAreaId:', newAreaId);
this.areaId = newAreaId;
this.getAreaList(this.areaId);
},
getAreaOptions() {
getAreaOptionselect().then(response => {
this.areaOptions = response.data;
console.log("areaOptions", this.areaOptions)
});
},
onMapGeo(data, lat, lng) { onMapGeo(data, lat, lng) {
console.log("onMapGeo", data) console.log("onMapGeo", data)
let component = data.regeocode.addressComponent; let component = data.regeocode.addressComponent;
@ -228,8 +256,8 @@
element.style.visibility = this.show ? 'hidden' : 'visible'; element.style.visibility = this.show ? 'hidden' : 'visible';
}); });
}, },
async getAreaList(){ async getAreaList(areaId){
listArea().then(response => { listArea({areaId: areaId}).then(response => {
this.areaList = response.rows; this.areaList = response.rows;
if (this.areaList.length > 0) { // if (this.areaList.length > 0) { //
const firstArea = this.areaList[0]; // const firstArea = this.areaList[0]; //
@ -695,6 +723,20 @@
margin-right: 10px; /* 图片与文字间距,根据需要调整 */ margin-right: 10px; /* 图片与文字间距,根据需要调整 */
} }
} }
.area-options{
display: flex;
flex-direction: row;
position: absolute;
top: 15px;
right: 15px;
span{
display: flex;
align-items: center;
padding-right: 10px;
font-size: 13px;
color: #535353;
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
.apiary-marker{ .apiary-marker{

View File

@ -189,7 +189,7 @@
/> />
<!-- 添加或修改订单对话框 --> <!-- 添加或修改订单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> <el-dialog :title="title" :close-on-click-modal="true" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" label-width="140px"> <el-form ref="form" :model="form" label-width="140px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">

View File

@ -143,6 +143,7 @@
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
<el-table-column label="运营商" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> <el-table-column label="运营商" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
<el-table-column label="关联APP用户" align="center" key="appUserName" prop="appUserName" v-if="columns[5].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible"> <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch

View File

@ -0,0 +1,470 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="运营区" prop="areaId" v-if="userName == 'admin'">
<el-select v-model="queryParams.areaId" placeholder="请选择运营区" clearable>
<el-option
v-for="item in areaOptions"
:key="item.areaId"
:label="item.areaName"
:value="item.areaId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="关联订单号" label-width="90" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入关联订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="第三方交易单号" label-width="100" prop="outTradeNo">
<el-input
v-model="queryParams.outTradeNo"
placeholder="请输入第三方交易单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收支类型" prop="type">
<el-select style="width: 100px" v-model="queryParams.type" placeholder="请选择收支类型" clearable>
<el-option
v-for="dict in dict.type.et_flow_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="busType">
<el-select style="width: 150px" v-model="queryParams.busType" placeholder="请选择业务类型" clearable>
<el-option
v-for="dict in dict.type.et_business_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="userName != 'admin'">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:withdraw:add']"
>申请</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="flowList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="交易时间" align="center" prop="createTime" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="区域" align="center" prop="areaName" />
<el-table-column label="所属人" align="center" prop="owner" />
<el-table-column label="关联订单号" width="260" align="center" prop="orderNo" />
<el-table-column label="第三方交易单号" width="250" align="center" prop="outTradeNo" />
<el-table-column label="收支类型" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_flow_type" :value="scope.row.type"/>
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" prop="busType">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_business_type" :value="scope.row.busType"/>
</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="platformServiceFee" :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="partnerDividend" :formatter="formatAmount"/>-->
<el-table-column label="支付方式" align="center" prop="payType">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_pay_type" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.et_flow_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="scope.row.busType == '5' && scope.row.status == '0'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleEdit(scope.row)"
v-hasPermi="['system:flow:audit']"
>审核</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改资金流水对话框 -->
<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-item label="提现金额:" prop="amount">
<el-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" />
</el-form-item>
<el-form-item label="可用余额">
<span style="color: red;font-weight: 700">{{balance}}</span>
</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>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="提现详细" :visible.sync="open3" width="700px" append-to-body>
<el-form ref="form3" :model="form3" label-width="100px" size="mini">
<el-row>
<el-col :span="24">
<el-form-item label="申请人:">{{ form3.owner }}</el-form-item>
<el-form-item label="区域:">{{ form3.areaName }}</el-form-item>
</el-col>
<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.handlingCharge }}</span> </el-form-item>
</el-col>
<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.operatorBalance }}</span> </el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="申请时间:">{{ form3.createTime }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态:">
<dict-tag :options="dict.type.et_flow_status" :value="form3.status"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="驳回原因" prop="rejectReason">
<el-input v-model="form3.rejectReason" type="textarea" placeholder="请输入驳回原因"
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-show="view == true" @click="open3 = false"> </el-button>
<el-button v-show="view == false" type="success" @click="pass"> </el-button>
<el-button v-show="view == false" type="danger" @click="reject"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFlow, getFlow, delFlow, addFlow, updateFlow, withdraw, rejectWithdraw } from '@/api/system/flow'
import { optionselect as getAreaOptionselect } from '@/api/system/area'
import { updateWithdraw } from '@/api/system/withdraw'
import { getDeptByToken } from '@/api/system/dept'
export default {
name: "Flow",
dicts: ['et_business_type', 'et_pay_type', 'et_flow_type','et_flow_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 {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
areaOptions: [],
balance: null,
//
userName: undefined,
//
dateRange: [],
view: false,
//
total: 0,
//
flowList: [],
//
title: "",
//
open: false,
open3: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
areaId: null,
orderNo: null,
outTradeNo: null,
type: null,
busType: null,
amount: null,
handlingCharge: null,
operatorDividend: null,
operatorBalance: null,
partnerDividend: null,
payType: null,
},
//
form: {},
form3: {},
//
rules: {
amount: [
{ required: true, message: "提现金额不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '提现金额必须为正整数', trigger: 'blur' },
// balance
{
validator: (rule, value, callback) => {
if (value > this.balance) {
callback(new Error('提现金额不能超过可用余额'));
} else {
callback();
}
},
trigger: 'blur',
},
]
}
};
},
created() {
console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name;
this.getList();
this.getAreaList();
},
methods: {
/** 审核 */
handleEdit(row) {
this.open3 = true;
this.form3 = row;
this.view = false;
},
/** 通过 */
pass(){
this.$refs["form3"].validate(valid => {
if (valid) {
if (this.form3.flowId != null) {
this.form3.status = "8";
// console.log("---------"+JSON.stringify(this.form3))
updateFlow(this.form3).then(response => {
this.$modal.msgSuccess("操作成功");
this.open3 = false;
this.getList();
});
}
}
});
},
/** 拒绝 */
reject(){
// console.log("-===========",this.form3.rejectReason)
if(this.form3.rejectReason == undefined || this.form3.rejectReason == ''){
this.$modal.msgError("驳回原因不能为空");
return
}
this.$refs["form3"].validate(valid => {
if (valid) {
if (this.form3.flowId != null) {
rejectWithdraw(this.form3).then(response => {
this.$modal.msgSuccess("操作成功");
this.open3 = false;
this.getList();
});
}
}
});
},
/** 查询字典类型列表 */
getAreaList() {
getAreaOptionselect().then(response => {
this.areaOptions = response.data;
});
},
formatAmount(row, column) {
const key = column.property;
return parseFloat(row[key] || 0).toFixed(2);
},
/** 查询资金流水列表 */
getList() {
this.loading = true;
listFlow(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.flowList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
flowId: null,
areaId: null,
orderNo: null,
outTradeNo: null,
type: null,
busType: null,
amount: null,
handlingCharge: null,
operatorDividend: null,
operatorBalance: null,
partnerDividend: null,
payType: null,
createTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.flowId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
//
getDeptByToken().then(response => {
this.balance = response.data.balance;
this.handlingCharge = response.data.handlingCharge;
});
this.reset();
this.open = true;
this.title = "申请提现";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const flowId = row.flowId || this.ids
getFlow(flowId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改资金流水";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
withdraw(this.form).then(response => {
this.$modal.msgSuccess("操作成功");
this.open = false;
this.getList();
});
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const flowIds = row.flowId || this.ids;
this.$modal.confirm('是否确认删除资金流水编号为"' + flowIds + '"的数据项?').then(function() {
return delFlow(flowIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/flow/export', {
...this.queryParams
}, `flow_${new Date().getTime()}.xlsx`)
}
}
};
</script>
<style>
.amoun-tips{
color: red;
font-size: 12px;
font-weight: 700;
}
</style>

View File

@ -571,7 +571,7 @@ export default {
handleBandSysUser(row){ handleBandSysUser(row){
this.reset(); this.reset();
const userId = row.userId || this.ids; const userId = row.userId || this.ids;
getSysUserList({"userType":"00"}).then(response => { getSysUserList({userType:"00",pageSize:9999,pageNum:1}).then(response => {
this.sysUserOptions = response.rows; this.sysUserOptions = response.rows;
this.form.userId = userId; this.form.userId = userId;
this.open2 = true; this.open2 = true;