1.调整
This commit is contained in:
parent
0edaeb9761
commit
c341347a6a
|
@ -54,6 +54,14 @@ export function updateArea(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
// 修改运营区
|
||||
export function updateArea2(data) {
|
||||
return request({
|
||||
url: '/system/area/guide',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除运营区
|
||||
export function delArea(areaId) {
|
||||
|
|
|
@ -58,9 +58,10 @@ export function getBalance(){
|
|||
})
|
||||
}
|
||||
// 查询运营商信息
|
||||
export function getDeptByToken(){
|
||||
export function getDeptByToken(deptId){
|
||||
return request({
|
||||
url: '/system/dept/getDept',
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
params: {deptId: deptId}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -76,6 +76,14 @@ export function oneClickWarehousing(deviceId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 更新设备
|
||||
export function refreshDevice(deviceId) {
|
||||
return request({
|
||||
url: '/system/device/refreshDevice/' + deviceId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询所有车辆信息
|
||||
export function allDevice() {
|
||||
|
|
|
@ -122,6 +122,7 @@ export default {
|
|||
// 标点
|
||||
this.removeAllMarker();
|
||||
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.$emit('map-geo', res, this.initLng, this.initLat);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<!-- </el-row>-->
|
||||
</el-form>
|
||||
<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>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -362,11 +362,6 @@
|
|||
<el-input-number v-model="form.error" placeholder="还车误差"></el-input-number>
|
||||
</el-form-item>
|
||||
</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-col :span="24">
|
||||
|
@ -375,10 +370,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</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-col :span="12">
|
||||
<el-form-item label="经度" prop="longitude">
|
||||
|
@ -401,7 +392,7 @@
|
|||
</template>
|
||||
|
||||
<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 { listFee } from "@/api/system/fee";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
|
@ -736,6 +727,10 @@ export default {
|
|||
data.areaOutReturn = data.areaOutReturn ? "1" : "0";
|
||||
data.isDepositDeduction = data.isDepositDeduction ? "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(this.form,'formformformformform');
|
||||
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) {
|
||||
const areaIds = row.areaId || this.ids;
|
||||
|
|
|
@ -137,6 +137,17 @@
|
|||
v-hasPermi="['system:device:edit']"
|
||||
>一键入仓</el-button>
|
||||
</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-button
|
||||
type="danger"
|
||||
|
@ -508,7 +519,7 @@
|
|||
reboot,
|
||||
oneClickListing,
|
||||
oneClickWarehousing,
|
||||
seatCushionLock
|
||||
seatCushionLock, refreshDevice
|
||||
} from '@/api/system/device'
|
||||
import Map from "@/components/Map";
|
||||
import OrderRecord from "@/views/system/device/components/orderRecord.vue";
|
||||
|
@ -633,6 +644,11 @@ export default {
|
|||
listHardwareVersion(this.queryParams).then(response => {
|
||||
this.hardwareVersionOptions = response.rows;
|
||||
});
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.modelId': function(newVal) {
|
||||
|
@ -760,6 +776,14 @@ export default {
|
|||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 更新*/
|
||||
refresh(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
refreshDevice(deviceIds).then(response => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
});
|
||||
},
|
||||
/** 一键入仓*/
|
||||
oneClickWarehousing(row){
|
||||
const deviceIds = row.deviceId || this.ids;
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<el-radio-group v-model="form.rentalUnit" @change="handleUnitChange">
|
||||
<el-radio label="minutes">按分钟</el-radio>
|
||||
<el-radio label="hours">按小时</el-radio>
|
||||
<el-radio label="day">按天</el-radio>
|
||||
<!-- <el-radio label="day">按天</el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- 计费周期和封顶金额,只在非按天计费时显示 -->
|
||||
|
@ -289,10 +289,10 @@
|
|||
style="width: 80px; display: inline-block; margin-left: 10px;" />
|
||||
小时
|
||||
</el-radio>
|
||||
<el-radio label="2">
|
||||
自定义时刻
|
||||
<el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" />
|
||||
</el-radio>
|
||||
<!-- <el-radio label="2">-->
|
||||
<!-- 自定义时刻-->
|
||||
<!-- <el-time-picker v-model="time2" value-format="HH:mm:ss" placeholder="选择时间" style="margin-left: 10px;" />-->
|
||||
<!-- </el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.rentalUnit != 'day'">
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<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="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">
|
||||
|
|
|
@ -328,7 +328,8 @@
|
|||
offset: new AMap.Pixel(0, -30)
|
||||
});
|
||||
//设备点标记
|
||||
this.deviceMarker();
|
||||
console.log("this.areaId============="+this.areaId)
|
||||
this.deviceMarker(this.areaId);
|
||||
//运营区边界
|
||||
this.areaList.forEach(area => {
|
||||
this.addArea(JSON.parse(area.boundaryStr) || []);
|
||||
|
@ -359,10 +360,24 @@
|
|||
freshMarker(points) {
|
||||
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) {
|
||||
this.cluster.setData(points);
|
||||
}else {
|
||||
if (this.cluster) {
|
||||
try {
|
||||
this.cluster.setData(points);
|
||||
} catch (error) {
|
||||
console.error("Error setting cluster data: ", error);
|
||||
}
|
||||
} else {
|
||||
// 插件未加载的情况
|
||||
this.map.plugin(["AMap.MarkerCluster"], () => {
|
||||
that.cluster = new AMap.MarkerCluster(
|
||||
this.map, //地图实例
|
||||
|
@ -372,7 +387,13 @@
|
|||
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);
|
||||
|
||||
console.log("title============="+title)
|
||||
// console.log("title============="+title)
|
||||
// 创建一个 Text 实例来显示标题
|
||||
let text = new AMap.Text({
|
||||
text: title,
|
||||
|
@ -543,11 +564,12 @@
|
|||
|
||||
// 将文本标签添加到地图实例
|
||||
this.map.add(text);
|
||||
console.log("text=============",text)
|
||||
// console.log("text=============",text)
|
||||
this.labels.push(text)
|
||||
},
|
||||
deviceMarker(){
|
||||
listDevice({pageNum: 1,pageSize: 999}).then(response => {
|
||||
deviceMarker(areaId){
|
||||
this.data = [];
|
||||
listDevice({pageNum: 1,pageSize: 999,areaId:areaId}).then(response => {
|
||||
this.deviceList = response.rows;
|
||||
this.deviceList.forEach(device => {
|
||||
// 检查经纬度是否为空且为有效数字
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5" v-if="userName != 'admin'">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
@ -92,7 +92,7 @@
|
|||
<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="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">
|
||||
|
@ -129,6 +129,25 @@
|
|||
<!-- 添加或修改资金流水对话框 -->
|
||||
<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="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-input style="width: 40%" v-model="form.amount" placeholder="请输入提现金额" /> 元
|
||||
</el-form-item>
|
||||
|
@ -153,11 +172,11 @@
|
|||
<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.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-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.amount }}</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">
|
||||
|
@ -186,14 +205,18 @@
|
|||
</template>
|
||||
|
||||
<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 { updateWithdraw } from '@/api/system/withdraw'
|
||||
import { getDeptByToken } from '@/api/system/dept'
|
||||
import { getDeptByToken, listDept } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
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: {
|
||||
formattedFee() {
|
||||
console.log("handlingCharge===========",this.handlingCharge)
|
||||
|
@ -229,6 +252,7 @@ export default {
|
|||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
deptOptions: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
@ -261,7 +285,8 @@ export default {
|
|||
orderNo: null,
|
||||
outTradeNo: null,
|
||||
type: null,
|
||||
busType: '5',
|
||||
busType: '',
|
||||
typeList: '5,6',
|
||||
amount: null,
|
||||
handlingCharge: null,
|
||||
operatorDividend: null,
|
||||
|
@ -297,8 +322,19 @@ export default {
|
|||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getAreaList();
|
||||
if(this.userName === 'admin'){
|
||||
listDept({status: '0' }).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDept(deptId){
|
||||
getDeptByToken(deptId).then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
},
|
||||
/** 审核 */
|
||||
handleEdit(row) {
|
||||
this.open3 = true;
|
||||
|
@ -379,7 +415,8 @@ export default {
|
|||
operatorBalance: null,
|
||||
partnerDividend: null,
|
||||
payType: null,
|
||||
createTime: null
|
||||
createTime: null,
|
||||
method: "1"
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
@ -401,11 +438,13 @@ export default {
|
|||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
//查询余额
|
||||
getDeptByToken().then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
if(this.userName != 'admin'){
|
||||
//查询余额
|
||||
getDeptByToken().then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
});
|
||||
}
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "申请提现";
|
||||
|
|
Loading…
Reference in New Issue
Block a user