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