1.快速生成
This commit is contained in:
parent
9e742910ec
commit
6550ddd032
|
@ -43,6 +43,15 @@ export function addDept(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 快速生成
|
||||
export function fastAddDept(data) {
|
||||
return request({
|
||||
url: '/system/dept/fastCreate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export function updateDept(data) {
|
||||
return request({
|
||||
|
|
|
@ -119,6 +119,7 @@ export default {
|
|||
// },
|
||||
|
||||
async getAreas(areaId) {
|
||||
if(areaId !=null){
|
||||
getArea(this.areaId).then(response => {
|
||||
|
||||
console.log(response,'responseresponse');
|
||||
|
@ -141,6 +142,7 @@ export default {
|
|||
this.initAMap();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
initAMap() {
|
||||
AMapLoader.load({
|
||||
|
|
|
@ -61,6 +61,16 @@
|
|||
@click="toggleExpandAll"
|
||||
>展开/折叠</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="fastAdd"
|
||||
v-hasPermi="['system:dept:add']"
|
||||
>快速生成</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -209,7 +219,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-row v-if="!isFastAdd">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="绑定运营区" label-width="90">
|
||||
<el-select style="width: 91%" v-model="form.areaIds" multiple placeholder="请绑定运营区">
|
||||
|
@ -305,6 +315,69 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isFastAdd">
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="运营区"
|
||||
prop="areaName"
|
||||
data-tip="这是运营区输入框">
|
||||
<el-input v-model="form.areaName" placeholder="请输入运营区" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="运营区域" data-tip="这是运营区域选择框">
|
||||
<el-select
|
||||
v-model="form.province"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请选择省"
|
||||
class="filter-item"
|
||||
style="width: 90px"
|
||||
@change="provinceChange($event)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in form.provinceList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="form.city"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请选择城市"
|
||||
class="filter-item"
|
||||
style="width: 100px"
|
||||
@change="cityChange($event)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in form.cityList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-select
|
||||
v-model="form.county"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请选择区县"
|
||||
class="filter-item"
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in form.countyList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
||||
<el-form-item label="appSecret" prop="appSecret">
|
||||
|
@ -329,7 +402,6 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -346,6 +418,7 @@
|
|||
<el-radio
|
||||
v-for="dict in dict.type.et_withdraw_method"
|
||||
:key="dict.value"
|
||||
v-if="dict.value === '1'"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -376,7 +449,7 @@
|
|||
addDept,
|
||||
updateDept,
|
||||
listDeptExcludeChild,
|
||||
listDept2
|
||||
listDept2, fastAddDept
|
||||
} from '@/api/system/dept'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
@ -385,6 +458,7 @@ import { fastSearch } from '@/api/user/user'
|
|||
import { getUser } from '@/api/system/user'
|
||||
import { withdraw } from '@/api/system/flow'
|
||||
import { listChannel } from '@/api/system/channel'
|
||||
import { getDistrictList } from '@/api/common/common'
|
||||
|
||||
export default {
|
||||
name: "Dept",
|
||||
|
@ -441,6 +515,15 @@ export default {
|
|||
// 表格树数据
|
||||
deptList: [],
|
||||
// appUserId: null,
|
||||
isFastAdd: false,
|
||||
province: null,
|
||||
city: null,
|
||||
county: null,
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
countyList: [],
|
||||
CITY: [],
|
||||
XIAN: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 代理商树选项
|
||||
|
@ -476,7 +559,13 @@ export default {
|
|||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
// isProfitSharing: 'N'
|
||||
payChannel: 2,
|
||||
province: "",
|
||||
city: "",
|
||||
county: "",
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
countyList: [],
|
||||
},
|
||||
form2: {
|
||||
method: '1'
|
||||
|
@ -646,6 +735,7 @@ export default {
|
|||
email: undefined,
|
||||
status: "0",
|
||||
// isProfitSharing: false,
|
||||
payChannel: 2,
|
||||
separateAccount: 'N',
|
||||
platformServiceFee: '4',
|
||||
handlingCharge: '5.4',
|
||||
|
@ -657,7 +747,13 @@ export default {
|
|||
notifyUrl: null,
|
||||
privateKeyPath: null,
|
||||
merchantSerialNumber: null,
|
||||
refundNotifyUrl: null
|
||||
refundNotifyUrl: null,
|
||||
province: "",
|
||||
city: "",
|
||||
county: "",
|
||||
provinceList: [],
|
||||
cityList: [],
|
||||
countyList: []
|
||||
};
|
||||
this.balance = 0,
|
||||
this.form2 = {
|
||||
|
@ -680,9 +776,22 @@ export default {
|
|||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.addHandle(row,1);
|
||||
},
|
||||
fastAdd(row){
|
||||
this.addHandle(row,2);
|
||||
},
|
||||
addHandle(row,type){
|
||||
this.reset();
|
||||
this.open = true;
|
||||
if(type === 1){
|
||||
this.title = "添加代理商";
|
||||
this.isFastAdd = false
|
||||
}else{
|
||||
this.title = "快速生成";
|
||||
this.isFastAdd = true;
|
||||
}
|
||||
this.getCityList();
|
||||
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
|
||||
// console.log("response=============",response)
|
||||
this.deptOptions = response.data;
|
||||
|
@ -694,6 +803,83 @@ export default {
|
|||
this.channelOptions = response.rows;
|
||||
});
|
||||
});
|
||||
console.log("provinceList======"+JSON.stringify(this.form))
|
||||
},
|
||||
getCityList() {
|
||||
getDistrictList().then((res) => {
|
||||
this.form.provinceList = JSON.parse(res.data);
|
||||
// this.form.provinceList = res.data.districts[0].districts /* 省*/
|
||||
/* 进行遍历赋值*/
|
||||
/* 市区和县区*/
|
||||
let newProvince = this.form.provinceList;
|
||||
for (let i = 0; i < newProvince.length; i++) {
|
||||
/* 省级*/
|
||||
for (let j = 0; j < newProvince[i].districts.length; j++) {
|
||||
/* 市级*/
|
||||
let city = newProvince[i].districts[j].name;
|
||||
this.CITY.push({ id: j + 1, name: city, code: i + 1 });
|
||||
for (
|
||||
let k = 0;
|
||||
k < newProvince[i].districts[j].districts.length;
|
||||
k++
|
||||
) {
|
||||
/* 县级*/
|
||||
let xian = newProvince[i].districts[j].districts[k].name;
|
||||
this.XIAN.push({
|
||||
id: k + 1,
|
||||
name: xian,
|
||||
code: j + 1,
|
||||
cityCountyName: city,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let m = 0; m < newProvince.length; m++) {
|
||||
newProvince[m] = { ...newProvince[m], ...{ code: m + 1 } };
|
||||
}
|
||||
// console.log("newProvince======"+JSON.stringify(newProvince))
|
||||
this.form.provinceList = newProvince;
|
||||
// this.loading = true
|
||||
// console.log("this.form.provinceList222222222222",this.form.provinceList)
|
||||
});
|
||||
},
|
||||
cityChange(that) {
|
||||
let countyCode = 0;
|
||||
let cityname = "";
|
||||
let newCountyArry = [];
|
||||
this.form.cityList.forEach((item, index) => {
|
||||
if (item.name == that) {
|
||||
countyCode = item.id;
|
||||
cityname = item.name;
|
||||
}
|
||||
});
|
||||
if (countyCode) {
|
||||
this.form.countyList = [];
|
||||
this.XIAN.forEach((item, index) => {
|
||||
if (item.code == countyCode && item.cityCountyName == cityname) {
|
||||
this.form.countyList.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
provinceChange(that) {
|
||||
// 根据选中省,匹配市
|
||||
let cityCode = 0;
|
||||
let newCityArry = [];
|
||||
this.form.provinceList.forEach((item, index) => {
|
||||
if (item.name == that) {
|
||||
cityCode = item.code;
|
||||
}
|
||||
});
|
||||
// console.log(cityCode)
|
||||
if (cityCode) {
|
||||
this.form.cityList = [];
|
||||
this.CITY.forEach((item, index) => {
|
||||
if (item.code == cityCode) {
|
||||
this.form.cityList.push(item);
|
||||
}
|
||||
}); /* 市匹配成功*/
|
||||
}
|
||||
},
|
||||
/** 展开/折叠操作 */
|
||||
toggleExpandAll() {
|
||||
|
@ -756,6 +942,13 @@ export default {
|
|||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
if(this.isFastAdd){
|
||||
fastAddDept(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}else{
|
||||
addDept(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
|
@ -764,6 +957,7 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
|
|
@ -128,6 +128,21 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车型" prop="modelId" v-if="userName == 'admin'">
|
||||
<el-select
|
||||
v-model="queryParams.modelId"
|
||||
filterable
|
||||
placeholder="选择车型"
|
||||
style="width: 120px"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in modelOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.model"
|
||||
:value="item.modelId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -787,7 +802,7 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<h2 style="font-weight: bold; font-size: 18px; padding: 0; margin: 0">
|
||||
定位更新1
|
||||
定位更新
|
||||
</h2>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="经度:">{{ form.longitude }}</el-form-item>
|
||||
|
@ -1003,6 +1018,7 @@ export default {
|
|||
mac: null,
|
||||
sn: null,
|
||||
areaId: null,
|
||||
modelId: null,
|
||||
onlineStatus: null,
|
||||
status: null,
|
||||
version: null,
|
||||
|
@ -1080,6 +1096,7 @@ export default {
|
|||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
if (this.userName === "admin") {
|
||||
console.log("admin==========================="+this.userName)
|
||||
listHardwareVersionExcludeParent(this.queryParams).then((response) => {
|
||||
this.hardwareVersionOptions = response.data;
|
||||
this.loading2 = false;
|
||||
|
@ -1109,10 +1126,15 @@ export default {
|
|||
}
|
||||
},
|
||||
"form.hardwareVersionId": function (hardwareVersionId) {
|
||||
if (hardwareVersionId && this.username == 'admin') {
|
||||
if (hardwareVersionId && this.userName == 'admin') {
|
||||
this.selectHardwareVersion(hardwareVersionId);
|
||||
}
|
||||
},
|
||||
"queryParams.deptId": function (newVal) {
|
||||
if (!this.isUpdating) {
|
||||
this.fetchData4(newVal);
|
||||
}
|
||||
},
|
||||
open2(val) {
|
||||
if (!val) {
|
||||
console.log("========关闭地图=============");
|
||||
|
@ -1215,6 +1237,7 @@ export default {
|
|||
: (this.form.areaId = null);
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
// console.log("=======1111111111=======",this.modelOptions.length)
|
||||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
|
@ -1227,6 +1250,25 @@ export default {
|
|||
// this.form.modelId = null;
|
||||
}
|
||||
},
|
||||
/** 当选择代理商时 根据代理商id,获取运营区和型号 */
|
||||
fetchData4(deptId) {
|
||||
if (deptId) {
|
||||
// this.isUpdating = true; // 设置标志位
|
||||
selectAreaListByDeptId(deptId).then((response) => {
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
}).finally(() => {
|
||||
// this.isUpdating = false; // 清除标志位
|
||||
});
|
||||
} else {
|
||||
this.reset2();
|
||||
// this.form.areaId = null;
|
||||
// this.form.modelId = null;
|
||||
}
|
||||
},
|
||||
/** 当选择运营区时 根据运营区id,获取代理商和型号 */
|
||||
fetchData3(areaId) {
|
||||
if (areaId) {
|
||||
|
@ -1389,6 +1431,9 @@ export default {
|
|||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listModel(this.queryParams).then((response) => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
@ -1432,6 +1477,7 @@ export default {
|
|||
}
|
||||
);
|
||||
}
|
||||
// console.log(33333333333)
|
||||
listModel(this.queryParams).then((response) => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
|
@ -1440,7 +1486,6 @@ export default {
|
|||
});
|
||||
},
|
||||
reset2() {
|
||||
console.log(11111);
|
||||
this.form.areaId = null;
|
||||
this.form.deptId = null;
|
||||
this.form.modelId = null;
|
||||
|
@ -1451,12 +1496,13 @@ export default {
|
|||
}
|
||||
);
|
||||
}
|
||||
listModel(this.queryParams).then((response) => {
|
||||
this.modelOptions = response.rows;
|
||||
});
|
||||
listArea(this.queryParams).then((response) => {
|
||||
this.areaOptions = response.rows;
|
||||
});
|
||||
// console.log(88888888888888);
|
||||
// listModel(this.queryParams).then((response) => {
|
||||
// this.modelOptions = response.rows;
|
||||
// });
|
||||
// listArea(this.queryParams).then((response) => {
|
||||
// this.areaOptions = response.rows;
|
||||
// });
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
|
@ -1485,6 +1531,7 @@ export default {
|
|||
this.open2 = true;
|
||||
console.log("row======" + JSON.stringify(row));
|
||||
this.form.areaId = row.areaId;
|
||||
console.log("this.form.areaId======" + this.form.areaId);
|
||||
|
||||
this.form = row;
|
||||
console.log(this.form, "this.formthis.formthis.form");
|
||||
|
@ -1543,6 +1590,20 @@ export default {
|
|||
const deviceId = row.deviceId || this.ids;
|
||||
getDevice(deviceId).then((response) => {
|
||||
this.form = response.data;
|
||||
console.log("111111111111111111",this.form)
|
||||
selectAreaListByDeptId(response.data.deptId).then((response) => {
|
||||
this.areaOptions = response.data.areaList;
|
||||
let areaOptions = response.data.areaList;
|
||||
areaOptions.length > 0
|
||||
? (this.form.areaId = areaOptions[0].areaId)
|
||||
: (this.form.areaId = null);
|
||||
this.modelOptions = response.data.modelList;
|
||||
let modelOptions = response.data.modelList;
|
||||
console.log("==============",this.modelOptions.length)
|
||||
modelOptions.length > 0
|
||||
? (this.form.modelId = modelOptions[0].modelId)
|
||||
: (this.form.modelId = null);
|
||||
});
|
||||
this.open = true;
|
||||
this.title = "修改设备";
|
||||
});
|
||||
|
|
|
@ -2,6 +2,21 @@
|
|||
<div class="app-container">
|
||||
<el-col :span="24" :xs="24">
|
||||
<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"
|
||||
filterable
|
||||
placeholder="选择代理商"
|
||||
style="width: 120px"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in deptOptions2"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
|
@ -260,6 +275,7 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
|||
import { getToken } from "@/utils/auth";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { listDept2 } from '@/api/system/dept'
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
|
@ -285,6 +301,7 @@ export default {
|
|||
title: "",
|
||||
// 部门树选项
|
||||
deptOptions: undefined,
|
||||
deptOptions2: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 部门名称
|
||||
|
@ -374,13 +391,23 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
console.log("当前用户信息:",this.$store.state.user.name)
|
||||
this.userName = this.$store.state.user.name;
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
if(this.userName === 'admin'){
|
||||
this.getDeptList2();
|
||||
}
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
this.initPassword = response.msg;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getDeptList2() {
|
||||
listDept2({ status: "0", pageNum: 1, pageSize: 999 }).then((response) => {
|
||||
this.deptOptions2 = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -782,14 +782,13 @@ export default {
|
|||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.form.userName = this.form.phonenumber;
|
||||
this.form.userType = '00';
|
||||
// 判空检查
|
||||
if (!this.form.roleIds || this.form.roleIds.length === 0) {
|
||||
this.$modal.msgError("请选择角色"); // 弹窗提示
|
||||
return; // 退出方法
|
||||
}
|
||||
this.form.roleIds = [this.form.roleIds];
|
||||
console.log("roleIds"+this.form.roleIds)
|
||||
console.log("roleIds===="+this.form.roleIds)
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.userId != undefined) {
|
||||
|
@ -799,6 +798,9 @@ export default {
|
|||
this.getList();
|
||||
});
|
||||
} else {
|
||||
if(this.form.roleIds == 4){
|
||||
this.form.userType = '03';
|
||||
}
|
||||
addUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
<el-radio
|
||||
v-for="dict in dict.type.et_withdraw_method"
|
||||
:key="dict.value"
|
||||
v-if="dict.value === '1'"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -224,14 +225,17 @@ export default {
|
|||
computed: {
|
||||
formattedFee() {
|
||||
let fee;
|
||||
// console.log("this.handlingChargeType", this.handlingChargeType)
|
||||
if(this.handlingChargeType === '1'){
|
||||
let handlingCharge = parseFloat(this.handlingCharge)/1000;
|
||||
// console.log("1111111111111")
|
||||
let withdrawHandlingCharge = parseFloat(this.withdrawHandlingCharge)/1000;
|
||||
// 计算手续费
|
||||
let fee1 = this.form.amount * handlingCharge;
|
||||
let fee1 = this.form.amount * withdrawHandlingCharge;
|
||||
// 保留两位小数,并确保四舍五入
|
||||
fee = fee1.toFixed(2);
|
||||
}else{
|
||||
fee = parseFloat(this.handlingCharge);
|
||||
// console.log("22222222222")
|
||||
fee = parseFloat(this.withdrawHandlingCharge);
|
||||
}
|
||||
// 判断手续费是否为0
|
||||
if (fee === 0) {
|
||||
|
@ -243,14 +247,16 @@ export default {
|
|||
actualAmount() {
|
||||
let amount = this.form.amount;
|
||||
let fee;
|
||||
console.log("this.handlingChargeType", this.handlingChargeType)
|
||||
console.log("this.withdrawHandlingCharge", this.withdrawHandlingCharge)
|
||||
if(this.handlingChargeType === '1'){
|
||||
let handlingCharge = parseFloat(this.handlingCharge)/1000;
|
||||
let handlingCharge = parseFloat(this.withdrawHandlingCharge)/1000;
|
||||
let fee1 = this.form.amount * handlingCharge;
|
||||
// 四舍五入到两位小数
|
||||
fee = Math.round(fee1 * 100) / 100;
|
||||
// 计算实际到账金额并四舍五入到两位小数
|
||||
}else{
|
||||
fee = parseFloat(this.handlingCharge);
|
||||
fee = parseFloat(this.withdrawHandlingCharge);
|
||||
}
|
||||
let actual = amount - fee;
|
||||
actual = actual.toFixed(2);
|
||||
|
@ -304,7 +310,9 @@ export default {
|
|||
payType: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
method: '1',
|
||||
},
|
||||
form3: {},
|
||||
collectionCode:null,
|
||||
// 表单校验
|
||||
|
@ -353,7 +361,8 @@ export default {
|
|||
getDept(deptId){
|
||||
getDeptByToken(deptId).then(response => {
|
||||
this.balance = response.data.balance;
|
||||
this.handlingCharge = response.data.handlingCharge;
|
||||
// this.handlingCharge = response.data.handlingCharge;
|
||||
this.withdrawHandlingCharge = response.data.withdrawHandlingCharge;
|
||||
this.handlingChargeType = response.data.handlingChargeType;
|
||||
this.form.amount = 0;
|
||||
// console.log("11111handlingCharge===========",this.handlingCharge)
|
||||
|
|
Loading…
Reference in New Issue
Block a user