mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-12 01:58:00 +08:00
添加单位
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
<!-- 电汽车 -->
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<div class="grid-content bg-purple" style="margin-left: 20px">
|
||||
<div
|
||||
class="grid-content bg-purple"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
时段
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -156,7 +159,11 @@
|
||||
v-for="item in dynamicTags"
|
||||
:key="item.label"
|
||||
:type="item.type"
|
||||
style="margin: 10px 10px 10px 0; width: 160px; height: 30px"
|
||||
style="
|
||||
margin: 10px 10px 10px 0;
|
||||
width: 160px;
|
||||
height: 30px;
|
||||
"
|
||||
effect="dark"
|
||||
>
|
||||
{{ item.label }}
|
||||
@@ -164,11 +171,16 @@
|
||||
class="el-icon-edit el-icon--right"
|
||||
@click="editBtn(item.label)"
|
||||
/>
|
||||
<i class="el-icon-close" @click="deleteBtn(item.label)" />
|
||||
<i
|
||||
class="el-icon-close"
|
||||
@click="deleteBtn(item.label)"
|
||||
/>
|
||||
</el-tag>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="reviseVisible = true">增加计费时段</el-button>
|
||||
<el-button @click="reviseVisible = true"
|
||||
>增加计费时段</el-button
|
||||
>
|
||||
<!--<el-button>占桩收费模板</el-button>-->
|
||||
<!--<div style="position: absolute; bottom: 0px; right: 10px">
|
||||
<el-button @click="hCancel">取 消</el-button>
|
||||
@@ -187,7 +199,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span class="time"> (/分钟)</span>
|
||||
<el-col :span="11" class="cols">
|
||||
<el-form-item label="站桩费率" prop="stationRate">
|
||||
<el-input
|
||||
v-model="form.stationRate"
|
||||
@@ -197,8 +210,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<span class="min"> (/分钟)</span>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- 电单车页面 -->
|
||||
@@ -218,7 +231,11 @@
|
||||
prop="minMoney"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-input v-model="form.minMoney" type="text" placeholder="0" />
|
||||
<el-input
|
||||
v-model="form.minMoney"
|
||||
type="text"
|
||||
placeholder="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="txt">
|
||||
<p>
|
||||
@@ -238,7 +255,11 @@
|
||||
prop="minute"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-input v-model="form.minute" type="text" placeholder="5" />
|
||||
<el-input
|
||||
v-model="form.minute"
|
||||
type="text"
|
||||
placeholder="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 按钮 -->
|
||||
@@ -251,7 +272,9 @@
|
||||
@click="dialogFormVisible = true"
|
||||
/>
|
||||
</el-link>
|
||||
<el-link :underline="false"><i class="el-icon-close" /></el-link>
|
||||
<el-link :underline="false"
|
||||
><i class="el-icon-close"
|
||||
/></el-link>
|
||||
</div>
|
||||
<div class="energy">
|
||||
电费:1元<span>{{ num }}小时</span>
|
||||
@@ -262,7 +285,8 @@
|
||||
style="width: 170px"
|
||||
type="text"
|
||||
@click="dialogFormVisible = true"
|
||||
>增加测试功率分段</el-button>
|
||||
>增加测试功率分段</el-button
|
||||
>
|
||||
测试
|
||||
<el-divider />
|
||||
</div>
|
||||
@@ -305,7 +329,10 @@
|
||||
append-to-body
|
||||
>
|
||||
<el-form :model="form">
|
||||
<el-form-item label="充电功率(W):" :label-width="formLabelWidth">
|
||||
<el-form-item
|
||||
label="充电功率(W):"
|
||||
:label-width="formLabelWidth"
|
||||
>
|
||||
<el-input
|
||||
v-model.number="form.name"
|
||||
min="0"
|
||||
@@ -313,7 +340,10 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="费用(1元X小时):" :label-width="formLabelWidth">
|
||||
<el-form-item
|
||||
label="费用(1元X小时):"
|
||||
:label-width="formLabelWidth"
|
||||
>
|
||||
<el-input
|
||||
v-model.number="form.region"
|
||||
type="number"
|
||||
@@ -339,7 +369,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addBillingTemplate, getTemplate, updateBillingTemplate} from "@/api/billing/template.js";
|
||||
import {
|
||||
addBillingTemplate,
|
||||
getTemplate,
|
||||
updateBillingTemplate,
|
||||
} from "@/api/billing/template.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -428,7 +462,11 @@ export default {
|
||||
],
|
||||
// 电单车校验规则
|
||||
minMoney: [
|
||||
{ required: true, message: "最小单位费用多少元", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
message: "最小单位费用多少元",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
pattern: /^[0-9]+(.[0-9]{1,5})?$/,
|
||||
message: "可以保留五位小数",
|
||||
@@ -436,8 +474,16 @@ export default {
|
||||
},
|
||||
],
|
||||
minute: [
|
||||
{ required: true, message: "免费充电时长", trigger: "blur" },
|
||||
{ pattern: /^\d+$/, message: "请输入数字", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
message: "免费充电时长",
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
pattern: /^\d+$/,
|
||||
message: "请输入数字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
// 父组件传来的id
|
||||
@@ -538,7 +584,7 @@ export default {
|
||||
this.form = {
|
||||
name: "",
|
||||
remark: "",
|
||||
type: '1',
|
||||
type: "1",
|
||||
electricityPriceA: "",
|
||||
servicePriceA: "",
|
||||
electricityPriceB: "",
|
||||
@@ -569,7 +615,7 @@ export default {
|
||||
// this.carBillList();
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.billingTemplateId === '') {
|
||||
if (this.billingTemplateId === "") {
|
||||
// 没有id 新增
|
||||
this.create();
|
||||
} else {
|
||||
@@ -589,7 +635,7 @@ export default {
|
||||
});
|
||||
},
|
||||
update() {
|
||||
this.$set(this.form, 'billingTemplateId', this.billingTemplateId);
|
||||
this.$set(this.form, "billingTemplateId", this.billingTemplateId);
|
||||
updateBillingTemplate(this.form).then((response) => {
|
||||
console.log("接口返回", response);
|
||||
this.$message.success("修改成功");
|
||||
@@ -602,13 +648,13 @@ export default {
|
||||
this.form = response.data;
|
||||
console.log("timeArray", this.form.timeArray);
|
||||
const selectStartTimeArr = [];
|
||||
this.form.timeArray.forEach(x => {
|
||||
this.form.timeArray.forEach((x) => {
|
||||
const startTime = {
|
||||
startTime: x.startTime,
|
||||
type: x.type
|
||||
type: x.type,
|
||||
};
|
||||
selectStartTimeArr.push(startTime);
|
||||
})
|
||||
});
|
||||
this.selectStartTime = selectStartTimeArr;
|
||||
});
|
||||
},
|
||||
@@ -647,7 +693,7 @@ export default {
|
||||
// 接受父组件的值
|
||||
props: {
|
||||
billingTemplateId: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
mounted() {
|
||||
// console.log("billingTemplateId 的值是:", this.billingTemplateId);
|
||||
@@ -667,7 +713,7 @@ export default {
|
||||
if (newId !== "") {
|
||||
this.queryInfo(newId);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
dynamicTags() {
|
||||
@@ -749,4 +795,16 @@ export default {
|
||||
// min-height: 100px;
|
||||
// padding-bottom: 95px;
|
||||
}
|
||||
.min {
|
||||
display: block;
|
||||
margin-top: 42px;
|
||||
}
|
||||
.time {
|
||||
position: absolute;
|
||||
top: 42px;
|
||||
right: 605px;
|
||||
}
|
||||
.cols {
|
||||
padding-left: 50px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user