mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-07 23:48:05 +08:00
update 修改/新增鉴权卡新增运营商字段
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.web.controller.pile;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.jsowell.pile.dto.PileAuthCardDTO;
|
import com.jsowell.pile.dto.PileAuthCardDTO;
|
||||||
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -86,6 +87,7 @@ public class PileAuthCardController extends BaseController {
|
|||||||
@Log(title = "充电站鉴权卡", businessType = BusinessType.INSERT)
|
@Log(title = "充电站鉴权卡", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody PileAuthCardDTO dto) {
|
public AjaxResult add(@RequestBody PileAuthCardDTO dto) {
|
||||||
|
logger.info("新增充电站鉴权卡 params:{}", JSON.toJSONString(dto));
|
||||||
return toAjax(pileAuthCardService.addAuthCard(dto));
|
return toAjax(pileAuthCardService.addAuthCard(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,20 @@
|
|||||||
|
|
||||||
<!-- 添加或修改充电站鉴权卡对话框 -->
|
<!-- 添加或修改充电站鉴权卡对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="一级运营商" prop="merchantId">
|
||||||
|
<el-select
|
||||||
|
v-model="form.merchantId"
|
||||||
|
clearable placeholder="请选择一级运营商"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in firstLevelMerchantList"
|
||||||
|
:key="item.merchantName"
|
||||||
|
:label="item.merchantName"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="逻辑卡号" prop="logicCard">
|
<el-form-item label="逻辑卡号" prop="logicCard">
|
||||||
<el-input v-model="form.logicCard" :disabled = "isDisabled" placeholder="请输入逻辑卡号" />
|
<el-input v-model="form.logicCard" :disabled = "isDisabled" placeholder="请输入逻辑卡号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -172,6 +185,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listCard, getCard, delCard, addCard, updateCard, deactivateCard} from "@/api/pile/card";
|
import {listCard, getCard, delCard, addCard, updateCard, deactivateCard} from "@/api/pile/card";
|
||||||
|
import {queryFirstLevelMerchant} from "@/api/pile/merchant";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "card",
|
name: "card",
|
||||||
@@ -198,11 +212,13 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
// 卡号是否可填写
|
// 卡号是否可填写
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
|
firstLevelMerchantList: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
logicCard: null,
|
logicCard: null,
|
||||||
|
merchantId: null,
|
||||||
physicsCard: null,
|
physicsCard: null,
|
||||||
memberId: null,
|
memberId: null,
|
||||||
phoneNumber: null
|
phoneNumber: null
|
||||||
@@ -211,6 +227,13 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
merchantId:[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择一级运营商",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
],
|
||||||
phoneNumber: [
|
phoneNumber: [
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
@@ -231,6 +254,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getFirstLevelMerchantList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询充电站鉴权卡列表 */
|
/** 查询充电站鉴权卡列表 */
|
||||||
@@ -242,6 +266,13 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 获取一级运营商列表
|
||||||
|
getFirstLevelMerchantList() {
|
||||||
|
queryFirstLevelMerchant().then(response =>{
|
||||||
|
console.log("getFirstLevelMerchantList", response)
|
||||||
|
this.firstLevelMerchantList = response.rows;
|
||||||
|
});
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -254,6 +285,7 @@ export default {
|
|||||||
logicCard: null,
|
logicCard: null,
|
||||||
physicsCard: null,
|
physicsCard: null,
|
||||||
memberId: null,
|
memberId: null,
|
||||||
|
merchantId: null,
|
||||||
phoneNumber: null,
|
phoneNumber: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
@@ -300,6 +332,7 @@ export default {
|
|||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
console.log("submitForm", this.form);
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateCard(this.form).then(response => {
|
updateCard(this.form).then(response => {
|
||||||
|
|||||||
Reference in New Issue
Block a user