mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 02:20:12 +08:00
集团站点
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
<el-col>
|
||||
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addasite">添加站点</el-button>
|
||||
</el-col>
|
||||
<el-table :data="sitesList" stripe style="width: 100%" v-loading="loading">
|
||||
<el-table-column label="站点名称" align="center" prop="memberId" />
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getMemberList" style="margin-bottom: 20px" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
@@ -91,11 +97,151 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加站点 -->
|
||||
<el-dialog title="添加站点" :visible.sync="getSite" :before-close="getCancel" width="500px" append-to-body>
|
||||
<el-select v-model="selectSite" placeholder="请选择站点" clearable filterable style="width:300px">
|
||||
<el-option v-for="(station, index) in stationList" :key="index" :label="station.stationName"
|
||||
:value="station.id" />
|
||||
</el-select>
|
||||
<el-dialog title="添加站点" :visible.sync="getSite" :before-close="getCancel" width="1000px" append-to-body>
|
||||
<el-form ref="exchangeRate" :model="exchangeRate" :rules="dialogRules">
|
||||
<el-form-item label="请选择站点">
|
||||
<el-select v-model="selectSite" placeholder="请选择站点" filterable style="width:300px" @change="queryInfo">
|
||||
<el-option v-for="(station, index) in stationList" :key="index" :label="station.stationName"
|
||||
:value="station.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20" style="margin-top: 15px;">
|
||||
<el-col :span="4">
|
||||
<div class="grid-content bg-purple" style="padding-left: 25px;"> 时段</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="text-align: center;" class="grid-content bg-purple">原电费(元/度)</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="text-align: center;" class="grid-content bg-purple">原服务费(元/度)</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="text-align: center;" class="grid-content bg-purple">电费(元/度)</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="text-align: center;" class="grid-content bg-purple">服务费(元/度)</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-top: 15px;">
|
||||
<el-col :span="4">
|
||||
<el-button type="danger">尖时段</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="electricityPriceA">
|
||||
<el-input v-model="exchangeRate.electricityPriceA" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="servicePriceA">
|
||||
<el-input v-model="exchangeRate.servicePriceA" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyServiceA">
|
||||
<el-input v-model="exchangeRate.modifyServiceA" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyElectricityA">
|
||||
<el-input v-model="exchangeRate.modifyElectricityA" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 峰 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-button type="warning">峰时段</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="electricityPriceB">
|
||||
<el-input v-model="exchangeRate.electricityPriceB" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="servicePriceB">
|
||||
<el-input v-model="exchangeRate.servicePriceB" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyServiceB">
|
||||
<el-input v-model="exchangeRate.modifyServiceB" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyElectricityB">
|
||||
<el-input v-model="exchangeRate.modifyElectricityB" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 平 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-button type="success">平时段</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="electricityPriceC">
|
||||
<el-input v-model="exchangeRate.electricityPriceC" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="servicePriceC">
|
||||
<el-input v-model="exchangeRate.servicePriceC" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyServiceC">
|
||||
<el-input v-model="exchangeRate.modifyServiceC" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyElectricityC">
|
||||
<el-input v-model="exchangeRate.modifyElectricityC" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 谷 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-button type="info">谷时段</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="electricityPriceD">
|
||||
<el-input v-model="exchangeRate.electricityPriceD" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="servicePriceD">
|
||||
<el-input v-model="exchangeRate.servicePriceD" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyServiceD">
|
||||
<el-input v-model="exchangeRate.modifyServiceD" type="number" class="clearInputScore"
|
||||
placeholder="0" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item prop="modifyElectricityD">
|
||||
<el-input v-model="exchangeRate.modifyElectricityD" placeholder="0" clearable type="number"
|
||||
class="clearInputScore" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="getCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="siteConfirmation">确 定</el-button>
|
||||
@@ -105,13 +251,71 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { queryOrderList, addMember, queryMemberList } from "@/api/member/memberGroup";
|
||||
import { addMember, queryMemberList } from "@/api/member/memberGroup";
|
||||
import { listOrder } from "@/api/order/order";
|
||||
import { getStationListByMerchantId } from "@/api/pile/station";
|
||||
import { queryStationBillingTemplateList, getTemplate } from "@/api/billing/template.js";
|
||||
export default {
|
||||
name: 'JsowellUiDetail',
|
||||
dicts: ['member_status', 'start_mode', 'pay_mode', 'pay_status'],
|
||||
data() {
|
||||
// 自定义校验
|
||||
var validatePassA = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.electricityPriceA) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassB = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.servicePriceA) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassC = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.electricityPriceB) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassD = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.servicePriceB) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassE = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.electricityPriceC) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassF = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.servicePriceC) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassG = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.electricityPriceD) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePassH = (rule, value, callback) => {
|
||||
if (value >= this.exchangeRate.servicePriceD) {
|
||||
callback(new Error('输入金额不能大于原金额'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
// 遮罩
|
||||
loading: false,
|
||||
@@ -145,7 +349,54 @@ export default {
|
||||
defaultImg: [{ img: require('../../../assets/images/headPort.png') }],//默认头像
|
||||
getSite: false, //添加站点框状态
|
||||
stationList: [], //站点列表
|
||||
selectSite: '' //选中的站点
|
||||
selectSite: '',//选中的站点
|
||||
open: false, //修改费率
|
||||
exchangeRate: {
|
||||
electricityPriceA: '',
|
||||
servicePriceA: '',
|
||||
electricityPriceB: '',
|
||||
servicePriceB: '',
|
||||
electricityPriceC: '',
|
||||
servicePriceC: '',
|
||||
electricityPriceD: '',
|
||||
servicePriceD: '',
|
||||
modifyServiceA: '',
|
||||
modifyElectricityA: '',
|
||||
modifyServiceB: '',
|
||||
modifyElectricityB: '',
|
||||
modifyServiceC: '',
|
||||
modifyElectricityC: '',
|
||||
modifyServiceD: '',
|
||||
modifyElectricityD: '',
|
||||
},
|
||||
// 校验
|
||||
dialogRules: {
|
||||
modifyServiceA: [
|
||||
{ validator: validatePassA, trigger: 'blur' }
|
||||
],
|
||||
modifyElectricityA: [
|
||||
{ validator: validatePassB, trigger: 'blur' }
|
||||
],
|
||||
modifyServiceB: [
|
||||
{ validator: validatePassC, trigger: 'blur' }
|
||||
],
|
||||
modifyElectricityB: [
|
||||
{ validator: validatePassD, trigger: 'blur' }
|
||||
],
|
||||
modifyServiceC: [
|
||||
{ validator: validatePassE, trigger: 'blur' }
|
||||
],
|
||||
modifyElectricityC: [
|
||||
{ validator: validatePassF, trigger: 'blur' }
|
||||
],
|
||||
modifyServiceD: [
|
||||
{ validator: validatePassG, trigger: 'blur' }
|
||||
],
|
||||
modifyElectricityD: [
|
||||
{ validator: validatePassH, trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
sitesList: [],//站点列表
|
||||
};
|
||||
},
|
||||
|
||||
@@ -214,11 +465,49 @@ export default {
|
||||
getCancel() {
|
||||
this.getSite = false;
|
||||
this.selectSite = '';
|
||||
this.exchangeRate = {
|
||||
electricityPriceA: "",
|
||||
servicePriceA: "",
|
||||
electricityPriceB: "",
|
||||
servicePriceB: "",
|
||||
electricityPriceC: "",
|
||||
servicePriceC: "",
|
||||
electricityPriceD: "",
|
||||
servicePriceD: "",
|
||||
modifyServiceA: "",
|
||||
modifyElectricityA: "",
|
||||
modifyServiceB: "",
|
||||
modifyElectricityB: "",
|
||||
modifyServiceC: "",
|
||||
modifyElectricityC: "",
|
||||
modifyServiceD: "",
|
||||
modifyElectricityD: "",
|
||||
}
|
||||
},
|
||||
// 站点弹框确认
|
||||
siteConfirmation(){
|
||||
|
||||
}
|
||||
siteConfirmation() {
|
||||
this.$refs["exchangeRate"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log('验证成功');
|
||||
} else {
|
||||
console.log('验证失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查计费模板详情
|
||||
queryInfo(stationId) {
|
||||
console.log(stationId);
|
||||
queryStationBillingTemplateList(stationId).then((response) => {
|
||||
console.log("通过站点id查询计费模板 result: ", response.rows, response.rows[0].templateId);
|
||||
this.stationBillingTemplate = response.rows;
|
||||
getTemplate(response.rows[0].templateId).then((response) => {
|
||||
console.log("查询计费模板详情", response);
|
||||
this.exchangeRate = response.data;
|
||||
// 重置验证
|
||||
this.$refs["exchangeRate"].resetFields();
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="groupCode" label="集团编号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="'/member/memberGroup/detail/' + scope.row.groupCode" class="link-type">
|
||||
<router-link :to="'/member/memberGroup/detail/' + scope.row.groupCode + `&${scope.row.merchantId}`"
|
||||
class="link-type">
|
||||
<span>{{ scope.row.groupCode }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
@@ -24,7 +25,7 @@
|
||||
<dict-tag :options="dict.type.group_type" :value="scope.row.groupType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="折扣率" align="center" prop="discount" >
|
||||
<el-table-column label="折扣率" align="center" prop="discount">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.discount }}折</span>
|
||||
</template>
|
||||
@@ -53,8 +54,8 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="站点" prop="stationId">
|
||||
<el-select v-model="form.stationId" placeholder="请选择站点" clearable filterable style="width: 140px">
|
||||
<!-- <el-form-item label="站点" prop="stationId">
|
||||
<el-select v-model="form.stationId" placeholder="请选择站点" clearable filterable>
|
||||
<el-option v-for="(station, index) in stationList" :key="index" :label="station.stationName"
|
||||
:value="station.id" />
|
||||
</el-select>
|
||||
@@ -68,7 +69,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="折扣率" prop="discount">
|
||||
<el-input v-model="form.discount" placeholder="请输入折扣率" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -172,6 +173,7 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMemberGroup(this.queryParams).then(response => {
|
||||
console.log('查询会员组列表', response);
|
||||
this.memberGroupList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user