提现
This commit is contained in:
parent
3d0334df5a
commit
29924c6da7
|
@ -49,4 +49,11 @@ export function delDept(deptId) {
|
|||
url: '/system/dept/' + deptId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 查询余额
|
||||
export function getBalance(){
|
||||
return request({
|
||||
url: '/system/dept/getBalance',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -18,6 +18,15 @@ export function getUser(userId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 绑定APP用户
|
||||
export function bandAppUser(data) {
|
||||
return request({
|
||||
url: '/system/user/bandAppUser',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export function addUser(data) {
|
||||
return request({
|
||||
|
|
44
src/api/system/withdraw.js
Normal file
44
src/api/system/withdraw.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询提现记录列表
|
||||
export function listWithdraw(query) {
|
||||
return request({
|
||||
url: '/system/withdraw/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询提现记录详细
|
||||
export function getWithdraw(id) {
|
||||
return request({
|
||||
url: '/system/withdraw/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增提现记录
|
||||
export function addWithdraw(data) {
|
||||
return request({
|
||||
url: '/system/withdraw',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改提现记录
|
||||
export function updateWithdraw(data) {
|
||||
return request({
|
||||
url: '/system/withdraw',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除提现记录
|
||||
export function delWithdraw(id) {
|
||||
return request({
|
||||
url: '/system/withdraw/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -10,6 +10,16 @@ export function listUser(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 根据手机号快速搜索用户列表
|
||||
export function fastSearch(query) {
|
||||
return request({
|
||||
url: '/user/user/fast/search',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) {
|
||||
return request({
|
||||
|
|
1
src/assets/icons/svg/withdraw.svg
Normal file
1
src/assets/icons/svg/withdraw.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1719491574837" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4324" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M-112.64 2567.68z" p-id="4325" fill="#bfbfbf"></path><path d="M1018.88 98.304c0-21.504-7.68-43.008-22.528-60.928l-0.512 0.512c14.336 17.92 22.016 39.424 22.528 60.928l0.512-0.512z" fill="#bfbfbf" p-id="4326"></path><path d="M922.624 8.192h-821.76c-50.176 0-91.136 40.96-91.136 91.136v189.44c0 50.176 40.96 91.136 91.136 91.136h30.72V924.16c0 50.176 40.96 91.136 91.136 91.136h577.536c50.176 0 91.136-40.96 91.136-91.136V378.88h30.72c50.176 0 91.136-40.96 91.136-91.136V98.816c0-20.48-7.68-41.472-21.504-58.368-16.384-19.968-42.496-32.256-69.12-32.256zM834.56 922.624c0 9.728-3.584 18.432-9.728 25.088-5.632 6.656-15.36 10.752-25.088 10.752H222.208c-19.968 0-35.328-15.872-35.328-35.84v-701.44h647.68v701.44z m87.04-599.04h-30.72V220.16h3.584c13.312-2.56 23.04-13.312 23.04-27.136 0-15.36-12.8-27.648-28.16-27.648H133.12a27.533 27.533 0 0 0-27.648 27.648c0 13.312 10.24 25.088 23.552 27.136h3.072v103.424h-30.208c-19.968 0-35.84-15.872-35.84-35.84V98.304c0-19.968 15.872-35.328 35.84-35.328H921.6c19.968 0 35.84 15.872 35.84 35.328l0.512 189.44c-2.048 20.48-17.408 35.84-36.352 35.84z" p-id="4327" fill="#bfbfbf"></path><path d="M1015.808 98.304h2.56c0-21.504-8.192-43.008-22.528-60.928l-2.048 1.536c13.312 16.896 22.016 37.376 22.016 59.392z" fill="#bfbfbf" p-id="4328"></path><path d="M992.768 40.96c13.312 16.384 20.992 36.864 21.504 57.856h2.048c0-22.016-8.704-43.008-22.016-59.392l-1.536 1.536z" fill="#bfbfbf" p-id="4329"></path><path d="M473.6 535.04h-66.048c-14.336 0-26.624 12.288-26.624 26.624s12.288 26.624 26.624 26.624h83.968v60.416h-84.48c-15.872 0-29.184 13.312-29.184 29.184s13.312 29.184 29.184 29.184h84.48V780.8c0 14.336 12.288 26.624 26.624 26.624 14.336 0 26.624-12.288 26.624-26.624v-74.24h83.456c15.872 0 29.184-13.312 29.184-29.184s-13.312-29.184-29.184-29.184h-83.968v-60.416h84.48c14.336 0 26.624-12.288 26.624-26.624s-12.288-26.624-26.624-26.624h-68.608L669.696 424.96c5.12-5.12 8.192-11.776 8.192-18.432s-2.56-13.312-8.192-18.432c-10.24-9.728-27.136-9.216-37.376 1.024l-115.2 114.688-115.712-115.712c-5.12-5.12-11.776-8.192-18.432-8.192s-13.312 2.56-18.432 8.192c-5.12 5.12-8.192 11.776-8.192 18.432 0 7.168 2.56 13.312 8.192 18.432L473.6 535.04z" p-id="4330" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -58,7 +58,7 @@ export default {
|
|||
lat2: null
|
||||
};
|
||||
},
|
||||
props: ["pathList", "dataId","lon","lat"],
|
||||
props: ["pathList", "dataId","lon","lat","zoom"],
|
||||
mounted() {
|
||||
if (this.dataId) {
|
||||
this.start();
|
||||
|
@ -132,7 +132,7 @@ export default {
|
|||
this.map = new AMap.Map("container", {
|
||||
//设置地图容器id
|
||||
viewMode: "3D", //是否为3D地图模式
|
||||
zoom: 13, //初始化地图级别
|
||||
zoom: this.zoom?this.zoom:13, //初始化地图级别
|
||||
center: [this.lon2, this.lat2], // 初始化地图中心点位置
|
||||
});
|
||||
this.map.setFitView();
|
||||
|
|
|
@ -54,6 +54,10 @@ export default {
|
|||
type: String,
|
||||
default: '0'
|
||||
},
|
||||
deviceSn: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -124,7 +128,7 @@ export default {
|
|||
// 标点
|
||||
this.removeAllMarker();
|
||||
console.log("添加标记点")
|
||||
this.addMarker(this.initLng, this.initLat, res.regeocode.formattedAddress, 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);
|
||||
|
||||
// 地区
|
||||
|
@ -140,14 +144,35 @@ export default {
|
|||
},
|
||||
addMarker(lng, lat, title,status,onlineStatus) {
|
||||
//创建一个 Marker 实例:
|
||||
console.log("title==========="+title)
|
||||
let marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(lng, lat), //经纬度对象
|
||||
icon: this.formarStatus(status,onlineStatus),
|
||||
title: title,
|
||||
offset: new AMap.Pixel(-20, -40)
|
||||
});
|
||||
//将创建的点标记添加到已有的地图实例:
|
||||
this.map.add(marker);
|
||||
this.markers.push(marker);
|
||||
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
anchor: 'center', // 设置文本的锚点
|
||||
position: new AMap.LngLat(lng, lat), // 经纬度对象
|
||||
offset: new AMap.Pixel(0, -55),
|
||||
style: {
|
||||
'background-color': '#1890ff', // 背景颜色为蓝色
|
||||
'border': 'none', // 边框颜色与背景一致
|
||||
'border-radius': '5px', // 圆角 5px
|
||||
'color': 'white', // 文字颜色为白色
|
||||
'font-size': '14px', // 字体大小
|
||||
'padding': '5px 10px' // 内边距,调整文本框的大小
|
||||
}
|
||||
});
|
||||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
},
|
||||
formarStatus(status,onlineStatus){
|
||||
if(onlineStatus == "0"){
|
||||
|
|
|
@ -336,7 +336,7 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="安全协议">
|
||||
<el-form-item label="弹窗公告">
|
||||
<editor v-model="form.agreement" :min-height="192" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<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="dictType">
|
||||
<el-form-item label="运营区" prop="dictType">
|
||||
<el-select v-model="queryParams.areaId">
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
|
@ -146,7 +146,7 @@
|
|||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="边界" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
<area-map :key="key" :zoom="19" v-model="form.boundaryStr" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
</el-form-item>
|
||||
<!-- <span style="color: red">双击区域可重新编辑</span>-->
|
||||
</el-col>
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="边界" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
<area-map :key="key" :zoom="19" v-model="form.boundaryStr" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
</el-form-item>
|
||||
<!-- <span style="color: red">双击区域可重新编辑</span>-->
|
||||
</el-col>
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="id" align="center" prop="parkingId" />
|
||||
<el-table-column label="名称" align="center" prop="parkingName" />
|
||||
<el-table-column label="误差距离" align="center" prop="error" :formatter="formatDistance"/>
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_parking_type" :value="scope.row.type"/>
|
||||
|
@ -149,10 +150,15 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="还车误差(米)" label-width="100">
|
||||
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="边界" prop="boundaryStr">
|
||||
<area-map :key="key" v-model="form.boundaryStr" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
<area-map :key="key" v-model="form.boundaryStr" :zoom="19" :dataId="form.areaId" :lon="areaLon" :lat="areaLat" :pathList="form.boundaryStr" @mapList="mapList" @center="center" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col >
|
||||
|
@ -244,7 +250,10 @@ export default {
|
|||
],
|
||||
boundaryStr: [
|
||||
{ required: true, message: "边界不能为空", trigger: "blur" }
|
||||
]
|
||||
],
|
||||
error: [
|
||||
{ pattern: /^[0-9]*$/, message: "还车误差必须为正整数", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -254,6 +263,13 @@ export default {
|
|||
this.getAreaList();
|
||||
},
|
||||
methods: {
|
||||
formatDistance(row) {
|
||||
if (typeof row.error === 'number') {
|
||||
return `${row.error} 米`;
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
mapList(data){
|
||||
let mapListJson = JSON.stringify(data);
|
||||
console.log("mapListJson:"+mapListJson);
|
||||
|
@ -346,6 +362,8 @@ export default {
|
|||
const parkingId = row.parkingId || this.ids
|
||||
getParking(parkingId).then(response => {
|
||||
this.form = response.data;
|
||||
this.areaLon = response.data.longitude;
|
||||
this.areaLat = response.data.latitude;
|
||||
this.open = true;
|
||||
this.title = "修改停车区";
|
||||
this.key++;
|
||||
|
|
|
@ -373,6 +373,7 @@
|
|||
:init-lng="form.longitude"
|
||||
:status="form.status"
|
||||
:online-status="form.onlineStatus"
|
||||
:device-sn="form.sn"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
import globalConfig from "@/utils/config/globalConfig";
|
||||
import {listDevice} from "@/api/system/device";
|
||||
import {listArea} from "@/api/system/area";
|
||||
import { listParking } from '@/api/system/parking'
|
||||
|
||||
|
||||
export default {
|
||||
|
@ -26,18 +27,55 @@
|
|||
tips: null,
|
||||
// 运营区表格数据
|
||||
areaList: [],
|
||||
lon: null,
|
||||
lat: null,
|
||||
area:null,
|
||||
// 设备表格数据
|
||||
deviceList: [],
|
||||
parkingList: [],
|
||||
noParkingList: [],
|
||||
noridingList: [],
|
||||
type: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initAMap();
|
||||
this.getAreaList();
|
||||
},
|
||||
unmounted() {
|
||||
this.map?.destroy();
|
||||
},
|
||||
methods: {
|
||||
async getAreaList(){
|
||||
listArea().then(response => {
|
||||
this.areaList = response.rows;
|
||||
if (this.areaList.length > 0) { // 确保数组不为空
|
||||
const firstArea = this.areaList[0]; // 获取第一个元素
|
||||
this.area = firstArea;
|
||||
console.log('第一个区域的信息:', firstArea);
|
||||
this.lon = firstArea.longitude;
|
||||
this.lat = firstArea.latitude;
|
||||
console.log("area============="+JSON.stringify(this.area))
|
||||
listParking({areaId: this.area.areaId}).then(response => {
|
||||
let list = response.rows;
|
||||
list.forEach(item => {
|
||||
if (item.type === '1') {
|
||||
this.parkingList.push(item);
|
||||
} else if (item.type === '2') {
|
||||
this.noParkingList.push(item);
|
||||
} else if (item.type === '3') {
|
||||
this.noridingList.push(item);
|
||||
}
|
||||
});
|
||||
console.log("parkingList============="+JSON.stringify(this.parkingList));
|
||||
console.log("noParkingList============="+JSON.stringify(this.noParkingList));
|
||||
console.log("noriding============="+JSON.stringify(this.noridingList));
|
||||
this.initAMap();
|
||||
});
|
||||
}else{
|
||||
console.log('区域列表为空');
|
||||
}
|
||||
});
|
||||
},
|
||||
changeMapStyle(){
|
||||
// 创建一个默认的图层组件
|
||||
let defaultLayer = new AMap.TileLayer();
|
||||
|
@ -73,12 +111,29 @@
|
|||
// 设置地图容器id
|
||||
viewMode: "3D", // 是否为3D地图模式
|
||||
zoom: 13, // 初始化地图级别
|
||||
center: [120.356031,26.94088], //初始化地图中心点位置--大嵛山岛
|
||||
center: [this.lon,this.lat], //初始化地图中心点位置
|
||||
});
|
||||
//设备点标记
|
||||
this.deviceMarker();
|
||||
//运营区边界
|
||||
this.areaBoundary();
|
||||
this.areaList.forEach(area => {
|
||||
this.addArea(JSON.parse(area.boundaryStr) || []);
|
||||
});
|
||||
//停车区
|
||||
this.parkingList.forEach(parking => {
|
||||
this.addParking(JSON.parse(parking.boundaryStr) || [],parking.parkingName,parking.longitude,parking.latitude);
|
||||
this.addMarker2(parking,"https://lxnapi.ccttiot.com/FqcYf6ecsnbC0OT6YYAF5npgu-kh",parking.parkingName,"#1890ff");
|
||||
});
|
||||
//禁停区
|
||||
this.noParkingList.forEach(noparking => {
|
||||
this.addNoParking(JSON.parse(noparking.boundaryStr) || []);
|
||||
this.addMarker2(noparking,"https://lxnapi.ccttiot.com/FjKE5PWbnEnZUq3k-wVIvV4lv8Ab",noparking.parkingName,"#ff4444");
|
||||
});
|
||||
//禁行区
|
||||
this.noridingList.forEach(noriding => {
|
||||
this.addNoriding(JSON.parse(noriding.boundaryStr) || [],noriding.parkingName,noriding.longitude,noriding.latitude);
|
||||
this.addMarker2(noriding,"https://lxnapi.ccttiot.com/FmX1diEPPbFYe1vcUfKp6qbKzzh2",noriding.parkingName,"#ffcc00");
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setFitView();
|
||||
}, 1000);
|
||||
|
@ -86,6 +141,38 @@
|
|||
console.log(e);
|
||||
});
|
||||
},
|
||||
addMarker2(parking, icon,title,color) {
|
||||
let marker = new AMap.Marker({
|
||||
map: this.map,
|
||||
icon: new AMap.Icon({
|
||||
image: icon,
|
||||
size: new AMap.Size(38, 55), // 设置图标的宽高
|
||||
imageSize: new AMap.Size(38, 55) // 设置图标的实际显示尺寸
|
||||
}),
|
||||
position: [parking.longitude, parking.latitude],
|
||||
offset: new AMap.Pixel(-20, -50)
|
||||
});
|
||||
|
||||
console.log("title============="+title)
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
anchor: 'center', // 设置文本的锚点
|
||||
position: [parking.longitude, parking.latitude],
|
||||
offset: new AMap.Pixel(0, -70),
|
||||
style: {
|
||||
'background-color': color, // 背景颜色为蓝色
|
||||
'border': 'none', // 边框颜色与背景一致
|
||||
'border-radius': '5px', // 圆角 5px
|
||||
'color': 'white', // 文字颜色为白色
|
||||
'font-size': '14px', // 字体大小
|
||||
'padding': '5px 10px' // 内边距,调整文本框的大小
|
||||
}
|
||||
});
|
||||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
},
|
||||
deviceMarker(){
|
||||
listDevice({pageNum: 1,pageSize: 999}).then(response => {
|
||||
this.deviceList = response.rows;
|
||||
|
@ -93,7 +180,7 @@
|
|||
// 检查经纬度是否为空且为有效数字
|
||||
if (device.longitude !== null && device.latitude !== null &&
|
||||
!isNaN(device.longitude) && !isNaN(device.latitude)) {
|
||||
this.addMarker(device.longitude, device.latitude, device.status, device.onlineStatus);
|
||||
this.addMarker(device.longitude, device.latitude, device.status, device.onlineStatus,device.sn);
|
||||
} else {
|
||||
console.warn(`无效的经纬度值: 经度=${device.longitude}, 纬度=${device.latitude}`);
|
||||
}
|
||||
|
@ -102,15 +189,7 @@
|
|||
console.error('获取设备列表失败:', error);
|
||||
});
|
||||
},
|
||||
areaBoundary(){
|
||||
listArea().then(response => {
|
||||
this.areaList = response.rows;
|
||||
this.areaList.forEach(area => {
|
||||
this.addPolygon(JSON.parse(area.boundaryStr) || []);
|
||||
});
|
||||
});
|
||||
},
|
||||
addMarker(lng, lat, status, onlineStatus) {
|
||||
addMarker(lng, lat, status, onlineStatus,title) {
|
||||
function formarStatus(status,onlineStatus) {
|
||||
if(onlineStatus == "0"){
|
||||
return globalConfig.icon.red;
|
||||
|
@ -137,12 +216,31 @@
|
|||
map: this.map,
|
||||
icon: formarStatus(status,onlineStatus),
|
||||
position: [lng, lat],
|
||||
// offset: new AMap.Pixel(-13, -30)
|
||||
offset: new AMap.Pixel(-20, -40)
|
||||
});
|
||||
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
anchor: 'center', // 设置文本的锚点
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(0, -55),
|
||||
style: {
|
||||
'background-color': '#1890ff', // 背景颜色为蓝色
|
||||
'border': 'none', // 边框颜色与背景一致
|
||||
'border-radius': '5px', // 圆角 5px
|
||||
'color': 'white', // 文字颜色为白色
|
||||
'font-size': '14px', // 字体大小
|
||||
'padding': '5px 10px' // 内边距,调整文本框的大小
|
||||
}
|
||||
});
|
||||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
},
|
||||
|
||||
//添加多边形
|
||||
addPolygon(data) {
|
||||
//添加运营区边界
|
||||
addArea(data) {
|
||||
let polygon = new AMap.Polygon({
|
||||
path: data,
|
||||
fillColor: '#ccebc5',
|
||||
|
@ -153,20 +251,124 @@
|
|||
strokeStyle: 'dashed',
|
||||
strokeDasharray: [5, 5],
|
||||
});
|
||||
// polygon.on('mouseover', () => {
|
||||
// polygon.setOptions({
|
||||
// fillOpacity: 0.7,
|
||||
// fillColor: '#7bccc4'
|
||||
// })
|
||||
// })
|
||||
// polygon.on('mouseout', () => {
|
||||
// polygon.setOptions({
|
||||
// fillOpacity: 0.5,
|
||||
// fillColor: '#ccebc5'
|
||||
// })
|
||||
// })
|
||||
this.map.add(polygon);
|
||||
},
|
||||
addParking(data,title,lon,lat) {
|
||||
let polygon = new AMap.Polygon({
|
||||
path: data,
|
||||
fillColor: '#ccebc5',
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.5,
|
||||
strokeColor: '#3b7ed9', // 修改边界颜色为红色
|
||||
strokeWeight: 2, // 加粗边界
|
||||
strokeStyle: 'solid',
|
||||
strokeDasharray: [5, 5],
|
||||
});
|
||||
polygon.on('mouseover', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.7,
|
||||
fillColor: '#7bccc4'
|
||||
})
|
||||
})
|
||||
fillColor: '#71b7cc' // 鼠标悬浮时填充颜色为红色
|
||||
});
|
||||
});
|
||||
polygon.on('mouseout', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.5,
|
||||
fillColor: '#ccebc5'
|
||||
|
||||
})
|
||||
})
|
||||
fillColor: '#a7c1d0' // 鼠标移出时恢复填充颜色
|
||||
});
|
||||
});
|
||||
this.map.add(polygon);
|
||||
|
||||
// 创建文本标注
|
||||
// let text = new AMap.Text({
|
||||
// text: title,
|
||||
// anchor: 'center', // 设置文本标注锚点位置
|
||||
// style: {
|
||||
// 'background-color': 'transparent', // 背景透明
|
||||
// 'border': 'none', // 无边框
|
||||
// 'color': '#ff0000', // 文本颜色
|
||||
// 'font-size': '14px'
|
||||
// },
|
||||
// position: [lon,lat] // 设置文本标注的位置
|
||||
// });
|
||||
//
|
||||
// this.map.add(text);
|
||||
},
|
||||
addNoParking(data) {
|
||||
let polygon = new AMap.Polygon({
|
||||
path: data,
|
||||
fillColor: '#ccebc5',
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.5,
|
||||
strokeColor: '#ff0000', // 修改边界颜色为红色
|
||||
strokeWeight: 2, // 加粗边界
|
||||
strokeStyle: 'solid',
|
||||
strokeDasharray: [5, 5],
|
||||
});
|
||||
polygon.on('mouseover', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.7,
|
||||
fillColor: '#ff0000' // 鼠标悬浮时填充颜色为红色
|
||||
});
|
||||
});
|
||||
polygon.on('mouseout', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.5,
|
||||
fillColor: '#cc7b7b' // 鼠标移出时恢复填充颜色
|
||||
});
|
||||
});
|
||||
this.map.add(polygon);
|
||||
},
|
||||
addNoriding(data,title,lon,lat) {
|
||||
let polygon = new AMap.Polygon({
|
||||
path: data,
|
||||
fillColor: '#ccebc5',
|
||||
strokeOpacity: 1,
|
||||
fillOpacity: 0.5,
|
||||
strokeColor: '#ffcc00', // 修改边界颜色为红色
|
||||
strokeWeight: 2, // 加粗边界
|
||||
strokeStyle: 'solid',
|
||||
strokeDasharray: [5, 5],
|
||||
});
|
||||
polygon.on('mouseover', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.7,
|
||||
fillColor: '#FFEBA4FF'
|
||||
});
|
||||
});
|
||||
polygon.on('mouseout', () => {
|
||||
polygon.setOptions({
|
||||
fillOpacity: 0.5,
|
||||
fillColor: '#ffeba4'
|
||||
});
|
||||
});
|
||||
this.map.add(polygon);
|
||||
|
||||
// 创建文本标注
|
||||
// let text = new AMap.Text({
|
||||
// text: title,
|
||||
// anchor: 'center', // 设置文本标注锚点位置
|
||||
// style: {
|
||||
// 'background-color': 'transparent', // 背景透明
|
||||
// 'border': 'none', // 无边框
|
||||
// 'color': '#ff0000', // 文本颜色
|
||||
// 'font-size': '14px'
|
||||
// },
|
||||
// position: [lon,lat] // 设置文本标注的位置
|
||||
// });
|
||||
//
|
||||
// this.map.add(text);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<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="area">
|
||||
<el-input
|
||||
v-model="queryParams.area"
|
||||
placeholder="请输入区域"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<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="订单号" prop="orderNo">
|
||||
<el-input
|
||||
|
@ -27,12 +29,22 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="设备SN" prop="sn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceMac"
|
||||
v-model="queryParams.sn"
|
||||
placeholder="请输入设备SN"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.et_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
|
@ -298,6 +310,7 @@
|
|||
<script>
|
||||
import { listOrder, getOrder, delOrder, addOrder, updateOrder, changePrice, refund,returnVehicle } from '@/api/system/order'
|
||||
import TrajectoryMap from '@/components/Map/TrajectoryMap'
|
||||
import { optionselect as getAreaOptionselect } from '@/api/system/area'
|
||||
|
||||
export default {
|
||||
name: "Order",
|
||||
|
@ -308,6 +321,7 @@ export default {
|
|||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
userName: undefined,
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
|
@ -317,6 +331,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 通过key重新渲染area-map组件
|
||||
key: 0,
|
||||
areaOptions: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单表格数据
|
||||
|
@ -389,9 +404,12 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.reset();
|
||||
this.reset2();
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
},
|
||||
methods: {
|
||||
getTypeText(type) {
|
||||
|
@ -408,6 +426,12 @@ export default {
|
|||
return ''; // 或者根据实际情况返回其他默认值
|
||||
}
|
||||
},
|
||||
/** 查询字典类型列表 */
|
||||
getAreaList() {
|
||||
getAreaOptionselect().then(response => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
changePrice(row){
|
||||
// console.log('changePrice')
|
||||
const orderId = row.orderId || this.ids
|
||||
|
|
473
src/views/system/withdraw/index.vue
Normal file
473
src/views/system/withdraw/index.vue
Normal file
|
@ -0,0 +1,473 @@
|
|||
<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="deptId" v-if="userName == 'admin'">
|
||||
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
|
||||
<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="提现单号" prop="withdrawNo">
|
||||
<el-input
|
||||
v-model="queryParams.withdrawNo"
|
||||
placeholder="请输入提现单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择申请状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.et_withdraw_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
<el-col :span="1.5" v-if="userName != 'admin' && user.appUserId == null" >
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-link"
|
||||
size="mini"
|
||||
@click="bandWxUser"
|
||||
v-hasPermi="['system:withdraw:add']"
|
||||
>绑定微信用户</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:withdraw:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="withdrawList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="提现id" align="center" prop="id" />-->
|
||||
<el-table-column label="运营商" align="center" prop="deptName" v-if="userName == 'admin'"/>
|
||||
<el-table-column label="提现单号" align="center" prop="withdrawNo" />
|
||||
<el-table-column label="提现金额:元" align="center" prop="amount" />
|
||||
<el-table-column label="申请状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_withdraw_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" prop="applicant" />
|
||||
<el-table-column label="微信openid" align="center" prop="wxopenid" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="回调状态" align="center" prop="callStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.et_call_status" :value="scope.row.callStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="userName == 'admin'" label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.status == 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:fault:query']"
|
||||
>审核</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="可用余额">
|
||||
<span style="color: red;font-weight: 700">{{balance}}</span> 元
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="提现金额:元" prop="amount">
|
||||
<el-input style="width: 70%" v-model="form.amount" placeholder="请输入提现金额" />
|
||||
</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="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>
|
||||
|
||||
<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.deptName }}</el-form-item>
|
||||
<el-form-item label="提现单号:">{{ form3.withdrawNo }}</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="申请人:">{{ form3.applicant }}</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_withdraw_status" :value="form3.status"/>
|
||||
</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 { listWithdraw, getWithdraw, delWithdraw, addWithdraw, updateWithdraw } from "@/api/system/withdraw";
|
||||
import { getBalance, listDept } from '@/api/system/dept'
|
||||
import { fastSearch } from '@/api/user/user'
|
||||
import { bandAppUser } from '@/api/system/user'
|
||||
import { getInfo } from '@/api/login'
|
||||
|
||||
|
||||
export default {
|
||||
name: "Withdraw",
|
||||
dicts: ['et_call_status', 'et_withdraw_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
deptOptions: [],
|
||||
search: '',
|
||||
options: [],
|
||||
fuse: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
loading2: false,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 提现记录表格数据
|
||||
withdrawList: [],
|
||||
balance: null,
|
||||
userName:null,
|
||||
user: null,
|
||||
view: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
title2: "",
|
||||
// 弹出层标题
|
||||
open2: false,
|
||||
// 是否显示弹出层
|
||||
open3: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
withdrawNo: null,
|
||||
deptId: null,
|
||||
status: null,
|
||||
applicant: null,
|
||||
phonenumber: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单参数
|
||||
form2: {},
|
||||
form3: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: "提现金额不能为空", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: '满电续航必须为正整数', trigger: 'blur' },
|
||||
// 不能超过 balance 值
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value > this.form.balance) {
|
||||
callback(new Error('提现金额不能超过余额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
]
|
||||
},
|
||||
rules2: {
|
||||
phonenumber: [
|
||||
{ required: true, message: "手机号码不能为空", trigger: "blur" },
|
||||
// { pattern: /^1[3-9]\d{9}$/, message: '手机号码格式不正确', trigger: 'blur' },
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
getInfo().then(response => {
|
||||
this.user = response.user;
|
||||
});
|
||||
this.getList();
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 审核 */
|
||||
handleEdit(row) {
|
||||
this.open3 = true;
|
||||
this.form3 = row;
|
||||
this.view = false;
|
||||
},
|
||||
/** 通过 */
|
||||
pass(){
|
||||
this.$refs["form3"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form3.id != null) {
|
||||
this.form3.status = "1";
|
||||
console.log("---------"+JSON.stringify(this.form3))
|
||||
updateWithdraw(this.form3).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open3 = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 拒绝 */
|
||||
reject(){
|
||||
this.$refs["form3"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form3.id != null) {
|
||||
this.form3.status = "2";
|
||||
updateWithdraw(this.form3).then(response => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open3 = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
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 = []
|
||||
}
|
||||
},
|
||||
/** 查询提现记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWithdraw(this.queryParams).then(response => {
|
||||
this.withdrawList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
withdrawNo: null,
|
||||
amount: null,
|
||||
deptId: null,
|
||||
status: null,
|
||||
applicant: null,
|
||||
wxopenid: null,
|
||||
createTime: null,
|
||||
callStatus: null
|
||||
};
|
||||
this.form2 = {
|
||||
appUserId: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
this.resetForm("form2");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
//查询余额
|
||||
getBalance().then(response => {
|
||||
this.balance = response.data;
|
||||
});
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "申请提现";
|
||||
},
|
||||
bandWxUser(){
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.title2 = "绑定微信用户";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWithdraw(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改提现记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateWithdraw(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWithdraw(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
submitForm2: function() {
|
||||
let form2 = this.form2
|
||||
this.$refs['form2'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$modal.confirm('绑定微信用户操作需要重新登录,是否确认绑定?').then(function() {
|
||||
return bandAppUser({appUserId:form2.phonenumber})
|
||||
}).then(() => {
|
||||
console.log(2222222222)
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除提现记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delWithdraw(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/withdraw/export', {
|
||||
...this.queryParams
|
||||
}, `withdraw_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user