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:
@@ -16,6 +16,16 @@ public class CreateMerchantDTO {
|
||||
*/
|
||||
private String merchantName;
|
||||
|
||||
/**
|
||||
* 运营商等级
|
||||
*/
|
||||
private String merchantLevel;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
|
||||
@@ -121,10 +121,16 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
// dto.setId(deptId);
|
||||
dto.setDeptId(String.valueOf(deptId));
|
||||
dto.setStatus(Constants.ONE);
|
||||
// String appId = StringUtils.isBlank(dto.getAppId())
|
||||
// ? appid
|
||||
// : dto.getAppId();
|
||||
dto.setAppId(dto.getAppId());
|
||||
|
||||
// 一级运营商取前端传来的appid,二级运营商取父级的appid
|
||||
String appId;
|
||||
if (StringUtils.equals(dto.getMerchantLevel(), Constants.TWO)) {
|
||||
PileMerchantInfo firstLevelMerchant = selectPileMerchantInfoById(Long.parseLong(dto.getParentId()));
|
||||
appId = firstLevelMerchant.getAppId();
|
||||
} else {
|
||||
appId = dto.getAppId();
|
||||
}
|
||||
dto.setAppId(appId);
|
||||
|
||||
PileMerchantInfo pileMerchantInfo = new PileMerchantInfo();
|
||||
BeanUtils.copyProperties(dto, pileMerchantInfo);
|
||||
|
||||
@@ -9,6 +9,15 @@ export function listMerchant(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询充电桩运营商信息列表
|
||||
export function queryFirstLevelMerchant(query) {
|
||||
return request({
|
||||
url: '/pile/merchant/queryFirstLevelMerchant',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询充电桩运营商信息详细
|
||||
export function getMerchant(id) {
|
||||
return request({
|
||||
|
||||
@@ -193,6 +193,7 @@
|
||||
<el-form-item label="运营商名称" prop="merchantName">
|
||||
<el-input
|
||||
v-model="form.merchantName"
|
||||
maxlength="40"
|
||||
placeholder="请输入运营商名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -205,24 +206,20 @@
|
||||
<el-input
|
||||
v-model="form.organizationCode"
|
||||
placeholder="请输入组织机构代码"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入地址" />
|
||||
</el-form-item>
|
||||
<!-- <el-row>
|
||||
<el-col span="24">
|
||||
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人姓名" prop="managerName">
|
||||
<el-input
|
||||
v-model="form.managerName"
|
||||
placeholder="请输入负责人姓名"
|
||||
maxlength="10"
|
||||
minlength="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -234,27 +231,31 @@
|
||||
<el-input
|
||||
v-model="form.managerPhone"
|
||||
placeholder="请输入负责人电话号码"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客服电话号码" prop="servicePhone">
|
||||
<el-input
|
||||
v-model="form.servicePhone"
|
||||
placeholder="请输入客服电话号码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小程序APPID" prop="appId">
|
||||
<el-input
|
||||
v-model="form.appId"
|
||||
placeholder="请输入小程序APPID"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" maxlength="30" placeholder="请输入地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客服电话号码" prop="servicePhone">
|
||||
<el-input
|
||||
v-model="form.servicePhone"
|
||||
maxlength="15"
|
||||
placeholder="请输入客服电话号码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@@ -269,11 +270,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="form.merchantLevel === '2'">
|
||||
<el-form-item label="上级运营商" prop="parentId">
|
||||
<el-select v-model="form.parentId" placeholder="请选择上级运营商">
|
||||
<el-option
|
||||
v-for="item in merchantList"
|
||||
v-for="item in firstLevelMerchant"
|
||||
:key="item.merchantName"
|
||||
:label="item.merchantName"
|
||||
:value="item.id"
|
||||
@@ -281,6 +282,16 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="form.merchantLevel === '1'">
|
||||
<el-form-item label="小程序APPID" prop="appId">
|
||||
<el-input
|
||||
v-model="form.appId"
|
||||
maxlength="30"
|
||||
placeholder="请输入小程序APPID"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="公司logo" prop="logoUrl">
|
||||
<el-upload
|
||||
@@ -341,7 +352,7 @@ import {
|
||||
getMerchant,
|
||||
delMerchant,
|
||||
addMerchant,
|
||||
updateMerchant,
|
||||
updateMerchant, queryFirstLevelMerchant,
|
||||
} from "@/api/pile/merchant";
|
||||
import { checkPermi } from "@/utils/permission";
|
||||
import { getToken } from "@/utils/auth";
|
||||
@@ -370,6 +381,8 @@ export default {
|
||||
total: 0,
|
||||
// 充电桩运营商信息表格数据
|
||||
merchantList: [],
|
||||
// 一级运营商列表
|
||||
firstLevelMerchant: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@@ -454,6 +467,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getFirstMerchantList();
|
||||
},
|
||||
methods: {
|
||||
checkPermi,
|
||||
@@ -501,6 +515,12 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查询一级运营商列表
|
||||
getFirstMerchantList() {
|
||||
queryFirstLevelMerchant().then((response) => {
|
||||
this.firstLevelMerchant = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
||||
Reference in New Issue
Block a user