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