Compare commits

...

12 Commits

Author SHA1 Message Date
tx
0507a412d4 111 2024-12-03 10:22:28 +08:00
105269a62e 调整收费套餐页面 2024-12-03 10:04:11 +08:00
a65e254c17 调整收费套餐页面 2024-12-02 20:59:12 +08:00
094294af4a 调整收费套餐页面 2024-11-28 17:56:21 +08:00
6cd03185f5 运营区不分页 2024-11-13 10:50:55 +08:00
e592878ab6 调整 2024-11-12 16:42:53 +08:00
6ae2be2f19 Merge branch 'refs/heads/master' into tx 2024-11-08 17:42:02 +08:00
4c73c90241 Merge branch 'refs/heads/tx' 2024-11-08 17:29:59 +08:00
1a87471bc6 Merge branch 'refs/heads/tx'
# Conflicts:
#	src/views/system/device/index.vue
2024-11-08 17:26:58 +08:00
6d986d97f8 调整 2024-11-08 17:14:46 +08:00
e943ea2b9f Merge branch 'refs/heads/tx'
# Conflicts:
#	src/views/system/partner/index.vue
#	src/views/system/user/index.vue
2024-11-06 19:51:25 +08:00
6550ddd032 1.快速生成 2024-11-05 13:52:40 +08:00
18 changed files with 555 additions and 107 deletions

View File

@ -5,10 +5,10 @@ VUE_APP_TITLE = 共享电动车管理系统
ENV = 'development' ENV = 'development'
# 共享电动车管理系统/开发环境 # 共享电动车管理系统/开发环境
VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api' # VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
# VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api' # VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
# VUE_APP_BASE_API = 'http://localhost:8088' VUE_APP_BASE_API = 'http://localhost:8088'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -5,7 +5,7 @@ NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api' VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api' # VUE_APP_BASE_API = 'https://che.chuangtewl.com/prod-api'
# 共享电动车管理系统/测试环境 # 共享电动车管理系统/测试环境
# VUE_APP_BASE_API = 'https://dianche.chuantewulian.cn/stage-api' # VUE_APP_BASE_API = 'https://dianche.chuantewulian.cn/stage-api'

View File

@ -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) { export function updateDept(data) {
return request({ return request({

View File

@ -119,6 +119,7 @@ export default {
// }, // },
async getAreas(areaId) { async getAreas(areaId) {
if(areaId !=null){
getArea(this.areaId).then(response => { getArea(this.areaId).then(response => {
console.log(response,'responseresponse'); console.log(response,'responseresponse');
@ -141,6 +142,7 @@ export default {
this.initAMap(); this.initAMap();
}); });
}); });
}
}, },
initAMap() { initAMap() {
AMapLoader.load({ AMapLoader.load({

View File

@ -236,6 +236,10 @@ export default {
classify: null, classify: null,
title: null, title: null,
}, },
queryParams2: {
pageNum: 1,
pageSize: 999
},
// //
form: {}, form: {},
// //
@ -321,7 +325,7 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
listArea(this.queryParams).then(response => { listArea(this.queryParams2).then(response => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
this.open = true; this.open = true;
this.title = "添加文章"; this.title = "添加文章";

View File

@ -495,7 +495,9 @@ export default {
console.log("当前用户信息:",this.$store.state.user.name) console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.queryParams.statusList = '7'; this.queryParams.statusList = '7';
this.getDeptList() if(this.userName === 'admin'){
this.getDeptList();
}
this.reset(); this.reset();
this.reset2(); this.reset2();
this.getList(); this.getList();

View File

@ -61,6 +61,16 @@
@click="toggleExpandAll" @click="toggleExpandAll"
>展开/折叠</el-button> >展开/折叠</el-button>
</el-col> </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> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -216,7 +226,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row v-if="!isFastAdd">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="绑定运营区" label-width="90"> <el-form-item label="绑定运营区" label-width="90">
<el-select style="width: 91%" v-model="form.areaIds" multiple placeholder="请绑定运营区"> <el-select style="width: 91%" v-model="form.areaIds" multiple placeholder="请绑定运营区">
@ -312,6 +322,69 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row>
<el-col :span="12" v-show="form.isUsePlatformApp != true"> <el-col :span="12" v-show="form.isUsePlatformApp != true">
<el-form-item label="appSecret" prop="appSecret"> <el-form-item label="appSecret" prop="appSecret">
@ -336,7 +409,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -353,6 +425,7 @@
<el-radio <el-radio
v-for="dict in dict.type.et_withdraw_method" v-for="dict in dict.type.et_withdraw_method"
:key="dict.value" :key="dict.value"
v-if="dict.value === '1'"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
@ -383,7 +456,7 @@
addDept, addDept,
updateDept, updateDept,
listDeptExcludeChild, listDeptExcludeChild,
listDept2 listDept2, fastAddDept
} from '@/api/system/dept' } from '@/api/system/dept'
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";
@ -392,6 +465,7 @@ import { fastSearch } from '@/api/user/user'
import { getUser } from '@/api/system/user' import { getUser } from '@/api/system/user'
import { withdraw } from '@/api/system/flow' import { withdraw } from '@/api/system/flow'
import { listChannel } from '@/api/system/channel' import { listChannel } from '@/api/system/channel'
import { getDistrictList } from '@/api/common/common'
export default { export default {
name: "Dept", name: "Dept",
@ -448,6 +522,15 @@ export default {
// //
deptList: [], deptList: [],
// appUserId: null, // appUserId: null,
isFastAdd: false,
province: null,
city: null,
county: null,
provinceList: [],
cityList: [],
countyList: [],
CITY: [],
XIAN: [],
// //
total: 0, total: 0,
// //
@ -483,7 +566,13 @@ export default {
}, },
// //
form: { form: {
// isProfitSharing: 'N' payChannel: 2,
province: "",
city: "",
county: "",
provinceList: [],
cityList: [],
countyList: [],
}, },
form2: { form2: {
method: '1' method: '1'
@ -657,6 +746,7 @@ export default {
email: undefined, email: undefined,
status: "0", status: "0",
// isProfitSharing: false, // isProfitSharing: false,
payChannel: 2,
separateAccount: 'N', separateAccount: 'N',
platformServiceFee: '4', platformServiceFee: '4',
handlingCharge: '5.4', handlingCharge: '5.4',
@ -668,7 +758,13 @@ export default {
notifyUrl: null, notifyUrl: null,
privateKeyPath: null, privateKeyPath: null,
merchantSerialNumber: null, merchantSerialNumber: null,
refundNotifyUrl: null refundNotifyUrl: null,
province: "",
city: "",
county: "",
provinceList: [],
cityList: [],
countyList: []
}; };
this.balance = 0, this.balance = 0,
this.form2 = { this.form2 = {
@ -691,9 +787,22 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd(row) { handleAdd(row) {
this.addHandle(row,1);
},
fastAdd(row){
this.addHandle(row,2);
},
addHandle(row,type){
this.reset(); this.reset();
this.open = true; this.open = true;
if(type === 1){
this.title = "添加代理商"; this.title = "添加代理商";
this.isFastAdd = false
}else{
this.title = "快速生成";
this.isFastAdd = true;
}
this.getCityList();
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => { listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
// console.log("response=============",response) // console.log("response=============",response)
this.deptOptions = response.data; this.deptOptions = response.data;
@ -705,6 +814,83 @@ export default {
this.channelOptions = response.rows; 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() { toggleExpandAll() {
@ -767,6 +953,13 @@ export default {
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else {
if(this.isFastAdd){
fastAddDept(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}else{ }else{
addDept(this.form).then(response => { addDept(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
@ -775,6 +968,7 @@ export default {
}); });
} }
} }
}
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */

View File

@ -128,6 +128,21 @@
/> />
</el-select> </el-select>
</el-form-item> </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-form-item>
<el-button <el-button
type="primary" type="primary"
@ -794,7 +809,7 @@
</el-row> </el-row>
<el-row> <el-row>
<h2 style="font-weight: bold; font-size: 18px; padding: 0; margin: 0"> <h2 style="font-weight: bold; font-size: 18px; padding: 0; margin: 0">
定位更新1 定位更新
</h2> </h2>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="经度:">{{ form.longitude }}</el-form-item> <el-form-item label="经度:">{{ form.longitude }}</el-form-item>
@ -1015,12 +1030,18 @@ export default {
mac: null, mac: null,
sn: null, sn: null,
areaId: null, areaId: null,
modelId: null,
onlineStatus: null, onlineStatus: null,
status: null, status: null,
version: null, version: null,
hardwareVersion: null, hardwareVersion: null,
deptId:this.deptId deptId:this.deptId
}, },
//
queryParams2: {
pageNum: 1,
pageSize: 999
},
// //
columns: [ columns: [
{ key: 0, label: `代理商`, visible: true }, { key: 0, label: `代理商`, visible: true },
@ -1093,6 +1114,7 @@ export default {
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getList(); this.getList();
if (this.userName === "admin") { if (this.userName === "admin") {
console.log("admin==========================="+this.userName)
listHardwareVersionExcludeParent(this.queryParams).then((response) => { listHardwareVersionExcludeParent(this.queryParams).then((response) => {
this.hardwareVersionOptions = response.data; this.hardwareVersionOptions = response.data;
this.loading2 = false; this.loading2 = false;
@ -1100,7 +1122,7 @@ export default {
listDept2({ status: "0", pageNum: 1, pageSize: 999 }).then((response) => { listDept2({ status: "0", pageNum: 1, pageSize: 999 }).then((response) => {
this.deptOptions = response.rows; this.deptOptions = response.rows;
}); });
listArea(this.queryParams).then((response) => { listArea(this.queryParams2).then((response) => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
} }
@ -1122,10 +1144,15 @@ export default {
} }
}, },
"form.hardwareVersionId": function (hardwareVersionId) { "form.hardwareVersionId": function (hardwareVersionId) {
if (hardwareVersionId && this.username == 'admin') { if (hardwareVersionId && this.userName == 'admin') {
this.selectHardwareVersion(hardwareVersionId); this.selectHardwareVersion(hardwareVersionId);
} }
}, },
"queryParams.deptId": function (newVal) {
if (!this.isUpdating) {
this.fetchData4(newVal);
}
},
open2(val) { open2(val) {
if (!val) { if (!val) {
console.log("========关闭地图============="); console.log("========关闭地图=============");
@ -1232,6 +1259,7 @@ export default {
: (this.form.areaId = null); : (this.form.areaId = null);
this.modelOptions = response.data.modelList; this.modelOptions = response.data.modelList;
let modelOptions = response.data.modelList; let modelOptions = response.data.modelList;
// console.log("=======1111111111=======",this.modelOptions.length)
modelOptions.length > 0 modelOptions.length > 0
? (this.form.modelId = modelOptions[0].modelId) ? (this.form.modelId = modelOptions[0].modelId)
: (this.form.modelId = null); : (this.form.modelId = null);
@ -1244,6 +1272,25 @@ export default {
// this.form.modelId = null; // 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获取代理商和型号 */ /** 当选择运营区时 根据运营区id获取代理商和型号 */
fetchData3(areaId) { fetchData3(areaId) {
if (areaId) { if (areaId) {
@ -1406,6 +1453,9 @@ export default {
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
listModel(this.queryParams2).then((response) => {
this.modelOptions = response.rows;
});
}, },
// //
cancel() { cancel() {
@ -1449,15 +1499,15 @@ export default {
} }
); );
} }
// listModel(this.queryParams).then((response) => { // console.log(33333333333)
// this.modelOptions = response.rows; listModel(this.queryParams2).then((response) => {
// }); this.modelOptions = response.rows;
listArea(this.queryParams).then((response) => { });
listArea(this.queryParams2).then((response) => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
}, },
reset2() { reset2() {
console.log(11111);
this.form.areaId = null; this.form.areaId = null;
this.form.deptId = null; this.form.deptId = null;
this.form.modelId = null; this.form.modelId = null;
@ -1468,10 +1518,7 @@ export default {
} }
); );
} }
// listModel(this.queryParams).then((response) => { listArea(this.queryParams2).then((response) => {
// this.modelOptions = response.rows;
// });
listArea(this.queryParams).then((response) => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
}, },
@ -1496,11 +1543,9 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加设备"; this.title = "添加设备";
this.$nextTick(() => { this.$nextTick(() => {
if(this.deptId){ if(this.deptId){
this.form.deptId=this.deptId this.form.deptId=this.deptId
} }
}) })
}, },
@ -1509,6 +1554,7 @@ export default {
this.open2 = true; this.open2 = true;
console.log("row======" + JSON.stringify(row)); console.log("row======" + JSON.stringify(row));
this.form.areaId = row.areaId; this.form.areaId = row.areaId;
console.log("this.form.areaId======" + this.form.areaId);
this.form = row; this.form = row;
console.log(this.form, "this.formthis.formthis.form"); console.log(this.form, "this.formthis.formthis.form");
@ -1567,6 +1613,20 @@ export default {
const deviceId = row.deviceId || this.ids; const deviceId = row.deviceId || this.ids;
getDevice(deviceId).then((response) => { getDevice(deviceId).then((response) => {
this.form = response.data; 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.open = true;
this.title = "修改设备"; this.title = "修改设备";
}); });

View File

@ -231,13 +231,17 @@
<span></span> <span></span>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-input v-model="interval.start" :placeholder="'请输入'" /> <el-input v-model="interval.start" :placeholder="'请输入'" :disabled="true"/>
</el-col> </el-col>
<el-col :span="0.5" style="line-height: 32px;"> <el-col :span="0.5" style="line-height: 32px;">
~ ~
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-input v-model="interval.end" :placeholder="'请输入'" /> <el-input
v-model="interval.end"
:placeholder="'请输入'"
@input="handleIntervalEndChange(index)"
/>
</el-col> </el-col>
<el-col :span="2.5" style="line-height: 32px;"> <el-col :span="2.5" style="line-height: 32px;">
{{ timeUnit }} 之间 {{ timeUnit }} 之间
@ -267,7 +271,7 @@
<span>大于</span> <span>大于</span>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-input placeholder="请输入" v-model="more.start" /> <el-input placeholder="请输入" v-model="more.start" disabled/>
</el-col> </el-col>
<el-col :span="3" style="line-height: 32px;"> <el-col :span="3" style="line-height: 32px;">
{{ timeUnit }} 之后 {{ timeUnit }} 之后
@ -356,6 +360,23 @@ export default {
'form.deptId': function(deptId) { 'form.deptId': function(deptId) {
this.getAreaListByDeptId(deptId); this.getAreaListByDeptId(deptId);
}, },
// 'rule': {
// handler(newVal) {
// newVal.forEach((interval, index) => {
// //
// if (index > 0) {
// interval.start = newVal[index - 1].end || ''; // start
// }
// });
// // more.start end
// if (newVal.length > 0) {
// this.more.start = newVal[newVal.length - 1].end || ''; // more.start
// }
// },
// deep: true, //
// immediate: true //
// }
}, },
props: { props: {
// id // id
@ -387,6 +408,11 @@ export default {
name: null, name: null,
status: null, status: null,
}, },
//
queryParams2: {
pageNum: 1,
pageSize: 999
},
time1:'24', time1:'24',
time2:'', time2:'',
form: { form: {
@ -413,7 +439,7 @@ export default {
startingTime: '1', startingTime: '1',
timeoutPrice: '5', timeoutPrice: '5',
enablelnterval: false, enablelnterval: false,
rule: [{ start: '', end: '', eachUnit: '', fee: '' }], rule: [{ start: '0', end: '', eachUnit: '', fee: '' }],
more: { start: '', end: '9999', eachUnit: '', fee: '' }, more: { start: '', end: '9999', eachUnit: '', fee: '' },
timeUnit: '分钟', timeUnit: '分钟',
rules: { rules: {
@ -462,14 +488,6 @@ export default {
deptId: [ deptId: [
{ required: true, message: '请选择代理商', trigger: 'change' }, { required: true, message: '请选择代理商', trigger: 'change' },
] ]
// startingTime: [
// { required: true, message: '', trigger: 'blur' },
// { pattern: /^\d+$/, message: '', trigger: 'blur' }
// ],
// timeoutTime: [
// { required: true, message: '', trigger: 'blur' },
// { pattern: /^\d+$/, message: '', trigger: 'blur' }
// ],
}, },
}; };
}, },
@ -482,7 +500,7 @@ export default {
this.deptOptions = response.rows; this.deptOptions = response.rows;
}); });
} }
listArea(this.queryParams).then(response => { listArea(this.queryParams2).then(response => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
}, },
@ -502,7 +520,7 @@ export default {
} }
}); });
}else{ }else{
listArea(this.queryParams).then(response => { listArea(this.queryParams2).then(response => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
} }
@ -523,8 +541,105 @@ export default {
this.addInterval(); this.addInterval();
} }
}, },
validateMore() {
if(this.form.ridingRule == 2) {
const { start, end, eachUnit, fee } = this.more;
//
if (start === '' || end === '') {
this.$modal.msgError('区间计费:大于分钟数不能为空');
return false;
}
//
if (eachUnit === '') {
this.$modal.msgError('区间计费:大于每分钟数不能为空');
return false;
}
if (fee === '') {
this.$modal.msgError('区间计费:大于分钟之后的金额不能为空');
return false;
}
//
if (isNaN(Number(start)) || isNaN(Number(end))) {
this.$modal.msgError('区间计费:大于分钟数必须是数值');
return false;
}
//
if (isNaN(Number(eachUnit))) {
this.$modal.msgError('区间计费:大于每分钟数必须是数值');
return false;
}
if (isNaN(Number(fee))) {
this.$modal.msgError('区间计费:大于分钟之后的金额必须是数值');
return false;
}
return true; //
}
return true;
},
validateRules() {
if(this.form.ridingRule == 2 && this.rule.length > 0){
for (let i = 0; i < this.rule.length; i++) {
const { start, end, eachUnit, fee } = this.rule[i];
if (start === '' || end === '') {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的开始或结束值不能为空`);
return false;
}
if (eachUnit === '') {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的分钟数不能为空`);
return false;
}
if (fee === '') {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的金额不能为空`);
return false;
}
//
if (isNaN(Number(start)) || isNaN(Number(end))) {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的开始和结束值必须是数值`);
return false;
}
if (isNaN(Number(eachUnit))) {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的分钟数必须是数值`);
return false;
}
if (isNaN(Number(fee))) {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的金额必须是数值`);
return false;
}
if (parseFloat(start) >= parseFloat(end)) {
this.$modal.msgError(`区间计费:第 ${i + 1} 区间的结束值必须小于开始值`);
return false;
}
}
return true; //
}else {
return true; //
}
},
addInterval() { addInterval() {
this.rule.push({ start: '', end: '', eachUnit: '', fee: '' }); // this.rule.push({ start: '', end: '', eachUnit: '', fee: '' });
const lastInterval = this.rule[this.rule.length - 1];
const newInterval = { start: '', end: '', eachUnit: '', fee: '' };
// start end
if (lastInterval && lastInterval.end) {
newInterval.start = lastInterval.end;
}else{
this.$modal.msgError('请先设置上一条规则的结束值');
return;
}
this.rule.push(newInterval);
}, },
removeInterval(index) { removeInterval(index) {
this.rule.splice(index, 1); this.rule.splice(index, 1);
@ -559,7 +674,7 @@ export default {
} }
this.enablelnterval = false, this.enablelnterval = false,
this.more = { start: '', end: '9999', eachUnit: '', fee: '' } this.more = { start: '', end: '9999', eachUnit: '', fee: '' }
this.rule = [{ start: '', end: '', eachUnit: '', fee: '' }], this.rule = [{ start: '0', end: '', eachUnit: '', fee: '' }],
this.timeoutTime = '60', this.timeoutTime = '60',
this.startingPrice = '5', this.startingPrice = '5',
this.startingTime = '60', this.startingTime = '60',
@ -627,7 +742,23 @@ export default {
this.title = "修改收费方式"; this.title = "修改收费方式";
}); });
}, },
handleIntervalEndChange(index) {
//
if (index < this.rule.length - 1) {
this.rule[index + 1].start = this.rule[index].end;
}
// more.start
if (index === this.rule.length - 1) {
this.more.start = this.rule[index].end;
}
},
submitForm() { submitForm() {
if(!this.validateRules()){
return
}
if (!this.validateMore()) {
return; //
}
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
// //
@ -640,7 +771,7 @@ export default {
return; return;
} }
// this.form.rule.push(this.more) // this.form.rule.push(this.more)
console.log(this.form,'mmmmmmmmmmmmm'); console.log(JSON.stringify(this.form),'mmmmmmmmmmmmm');
let data = { ...this.form }; // 使 this.form let data = { ...this.form }; // 使 this.form

View File

@ -114,7 +114,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="flowList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="flowList" show-summary @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="流水id" align="center" prop="flowId" />--> <!-- <el-table-column label="流水id" align="center" prop="flowId" />-->
<el-table-column label="交易时间" align="center" prop="createTime" width="150"> <el-table-column label="交易时间" align="center" prop="createTime" width="150">
@ -131,7 +131,6 @@
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="关联订单号" width="180" align="center" prop="orderNo" />-->
<el-table-column align="center" label="关联订单号" width="180" prop="orderNo"> <el-table-column align="center" label="关联订单号" width="180" 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">
@ -150,22 +149,8 @@
<dict-tag :options="dict.type.et_business_type" :value="scope.row.busType"/> <dict-tag :options="dict.type.et_business_type" :value="scope.row.busType"/>
</template> </template>
</el-table-column> </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="left" prop="operatorDividend" :formatter="formatAmount2"/> <el-table-column label="账变金额" align="left" prop="operatorDividend" :formatter="formatAmount2"/>
<el-table-column label="代理商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/> <el-table-column label="代理商结余" align="center" prop="operatorBalance" :formatter="formatAmount"/>
<!-- <el-table-column label="合伙人分账" align="center" prop="partnerDividend" :formatter="formatAmount"/>-->
<!-- <el-table-column label="支付方式" align="center" prop="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" prop="model" /> <el-table-column label="车型" align="center" prop="model" />
</el-table> </el-table>
@ -316,7 +301,9 @@ export default {
this.getList(); this.getList();
this.getAreaList(); this.getAreaList();
this.getModelList(); this.getModelList();
this.getDeptList() if(this.userName === 'admin'){
this.getDeptList();
}
}, },
methods: { methods: {
getDeptList() { getDeptList() {

View File

@ -251,6 +251,11 @@ export default {
operator: this.deptId, operator: this.deptId,
// operator:, // operator:,
}, },
//
queryParams2: {
pageNum: 1,
pageSize: 999
},
// //
form: { form: {
lowBatteryReminderSwitch: false, lowBatteryReminderSwitch: false,
@ -405,7 +410,7 @@ export default {
listFee(this.queryParams).then(response => { listFee(this.queryParams).then(response => {
this.ruleOptions = response.rows; this.ruleOptions = response.rows;
}); });
listArea(this.queryParams).then((response) => { listArea(this.queryParams2).then((response) => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
}, },

View File

@ -1112,13 +1112,39 @@ export default {
}, },
/** 提交退款 */ /** 提交退款 */
submitRefund(){ submitRefund(){
// console.log("=====submitRefund======="+this.form2) console.log("=====submitRefund======="+this.form2)
if(!this.refundValidate()){
return
}
refund(this.form2).then(response => { refund(this.form2).then(response => {
this.$modal.msgSuccess("退款成功"); this.$modal.msgSuccess("退款成功");
this.open2 = false; this.open2 = false;
this.getList(); this.getList();
}); });
}, },
refundValidate(){
//
const fields = [
this.form2.appointmentFee,
this.form2.ridingFee,
this.form2.dispatchFee,
this.form2.manageFee
];
//
const total = fields.reduce((sum, fee) => sum + (Number(fee) || 0), 0);
//
console.log('总和:', total);
// 0
if (total === 0) {
this.$modal.msgError("退款金额不能为0");
return false;
}
return true;
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

View File

@ -308,6 +308,7 @@ export default {
title: "", title: "",
// //
deptOptions: undefined, deptOptions: undefined,
deptOptions2: [],
// //
open: false, open: false,
// //
@ -401,7 +402,9 @@ export default {
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getList(); this.getList();
this.getDeptTree(); this.getDeptTree();
this.getDeptList() if(this.userName === 'admin'){
this.getDeptList();
}
this.getConfigKey("sys.user.initPassword").then(response => { this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg; this.initPassword = response.msg;
}); });

View File

@ -30,6 +30,13 @@
:value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否退款" prop="isRefund">
<el-checkbox-group v-model="queryParams.isRefund" @change="handleQuery" size="mini">
<el-checkbox-button v-for="dict in dict.type.et_is_refund" :label="dict.value" :key="dict.value">
{{dict.label}}
</el-checkbox-button>
</el-checkbox-group>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -109,7 +116,7 @@
import { listDept2 } from '@/api/system/dept' import { listDept2 } from '@/api/system/dept'
export default { export default {
name: "Order", name: "Order",
dicts: ['et_order_type', 'et_pay_type', 'et_recharge_status','et_recharge_status'], dicts: ['et_order_type', 'et_pay_type', 'et_recharge_status','et_is_refund'],
props: { props: {
// id // id
deptId: { deptId: {
@ -146,6 +153,7 @@ export default {
orderNo: null, orderNo: null,
type: "2", type: "2",
userId: null, userId: null,
isRefund: ["0","1"],
deviceMac: null, deviceMac: null,
deptId: this.deptId, deptId: this.deptId,
}, },
@ -168,7 +176,9 @@ export default {
created() { created() {
this.getList(); this.getList();
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getDeptList() if(this.userName === 'admin'){
this.getDeptList();
}
}, },
methods: { methods: {
getDeptList() { getDeptList() {

View File

@ -42,7 +42,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="refundList" show-summary="total" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="refundList" show-summary @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="时间" align="center" prop="day" /> <el-table-column label="时间" align="center" prop="day" />
<el-table-column label="代理商" align="center" prop="deptName" /> <el-table-column label="代理商" align="center" prop="deptName" />

View File

@ -185,7 +185,9 @@ export default {
created() { created() {
console.log("当前用户信息:",this.$store.state.user.name) console.log("当前用户信息:",this.$store.state.user.name)
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getDeptList() if(this.userName === 'admin'){
this.getDeptList();
}
this.getList(); this.getList();
this.getAreaList(); this.getAreaList();

View File

@ -343,6 +343,10 @@ export default {
deptId: this.deptId, deptId: this.deptId,
typeList: "00,03" typeList: "00,03"
}, },
queryParams2: {
pageNum: 1,
pageSize: 999
},
// //
columns: [ columns: [
{ key: 0, label: `用户编号`, visible: true }, { key: 0, label: `用户编号`, visible: true },
@ -410,7 +414,7 @@ export default {
copy(row) { copy(row) {
const account = `账号:${row.userName}`; // const account = `账号:${row.userName}`; //
const password = `密码:${row.initPassword}`; // const password = `密码:${row.initPassword}`; //
const fixedUrl = "https://dche.ccttiot.com/"; // const fixedUrl = "https://www.baidu.com/"; //
// //
const textToCopy = `${fixedUrl}\n${account}\n${password}`; const textToCopy = `${fixedUrl}\n${account}\n${password}`;
@ -517,7 +521,7 @@ export default {
this.loading = false; this.loading = false;
} }
); );
listArea(this.queryParams).then(response => { listArea(this.queryParams2).then(response => {
this.areaOptions = response.rows; this.areaOptions = response.rows;
}); });
}, },
@ -669,7 +673,6 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.form.userName = this.form.phonenumber; this.form.userName = this.form.phonenumber;
this.form.userType = '00';
// //
if (!this.form.roleIds || this.form.roleIds.length === 0) { if (!this.form.roleIds || this.form.roleIds.length === 0) {
this.$modal.msgError("请选择角色"); // this.$modal.msgError("请选择角色"); //
@ -677,6 +680,7 @@ export default {
} }
this.form.roleIds = [this.form.roleIds]; this.form.roleIds = [this.form.roleIds];
console.log("roleIds" + this.form.roleIds) console.log("roleIds" + this.form.roleIds)
console.log("roleIds===="+this.form.roleIds)
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.userId != undefined) { if (this.form.userId != undefined) {
@ -686,6 +690,9 @@ export default {
this.getList(); this.getList();
}); });
} else { } else {
if(this.form.roleIds == 4){
this.form.userType = '03';
}
addUser(this.form).then(response => { addUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;

View File

@ -165,6 +165,7 @@
<el-radio <el-radio
v-for="dict in dict.type.et_withdraw_method" v-for="dict in dict.type.et_withdraw_method"
:key="dict.value" :key="dict.value"
v-if="dict.value === '1'"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
@ -246,14 +247,17 @@ export default {
computed: { computed: {
formattedFee() { formattedFee() {
let fee; let fee;
// console.log("this.handlingChargeType", this.handlingChargeType)
if(this.handlingChargeType === '1'){ 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); fee = fee1.toFixed(2);
}else{ }else{
fee = parseFloat(this.handlingCharge); // console.log("22222222222")
fee = parseFloat(this.withdrawHandlingCharge);
} }
// 0 // 0
if (fee === 0) { if (fee === 0) {
@ -265,14 +269,16 @@ export default {
actualAmount() { actualAmount() {
let amount = this.form.amount; let amount = this.form.amount;
let fee; let fee;
console.log("this.handlingChargeType", this.handlingChargeType)
console.log("this.withdrawHandlingCharge", this.withdrawHandlingCharge)
if(this.handlingChargeType === '1'){ if(this.handlingChargeType === '1'){
let handlingCharge = parseFloat(this.handlingCharge)/1000; let handlingCharge = parseFloat(this.withdrawHandlingCharge)/1000;
let fee1 = this.form.amount * handlingCharge; let fee1 = this.form.amount * handlingCharge;
// //
fee = Math.round(fee1 * 100) / 100; fee = Math.round(fee1 * 100) / 100;
// //
}else{ }else{
fee = parseFloat(this.handlingCharge); fee = parseFloat(this.withdrawHandlingCharge);
} }
let actual = amount - fee; let actual = amount - fee;
actual = actual.toFixed(2); actual = actual.toFixed(2);
@ -284,7 +290,6 @@ export default {
return { return {
// //
loading: true, loading: true,
deptOptions: [],
// //
ids: [], ids: [],
// //
@ -329,7 +334,9 @@ export default {
ownerId:this.deptId ownerId:this.deptId
}, },
// //
form: {}, form: {
method: '1',
},
form3: {}, form3: {},
collectionCode:null, collectionCode:null,
// //
@ -368,8 +375,6 @@ export default {
this.userName = this.$store.state.user.name; this.userName = this.$store.state.user.name;
this.getList(); this.getList();
this.getAreaList(); this.getAreaList();
this.getDeptList()
if(this.userName === 'admin'){ if(this.userName === 'admin'){
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => { listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
this.deptOptions = response.rows; this.deptOptions = response.rows;
@ -380,7 +385,8 @@ export default {
getDept(deptId){ getDept(deptId){
getDeptByToken(deptId).then(response => { getDeptByToken(deptId).then(response => {
this.balance = response.data.balance; 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.handlingChargeType = response.data.handlingChargeType;
this.form.amount = 0; this.form.amount = 0;
// console.log("11111handlingCharge===========",this.handlingCharge) // console.log("11111handlingCharge===========",this.handlingCharge)