Commit 664711f5 by ym

edit

1 parent fb818580
...@@ -24,7 +24,8 @@ const findAllDictData = params => { ...@@ -24,7 +24,8 @@ const findAllDictData = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//主营品牌
const getCarbrandTree = params => { const getCarbrandTree = params => {
params.method = 'cn.com.glsx.merchants.merchantCommon.getCarbrandTree' params.method = 'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
return http({ return http({
...@@ -33,7 +34,8 @@ const getCarbrandTree = params => { ...@@ -33,7 +34,8 @@ const getCarbrandTree = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//详情
const findMerchantDetail = params => { const findMerchantDetail = params => {
params.method = 'cn.com.glsx.merchants.merchant.findMerchantDetail' params.method = 'cn.com.glsx.merchants.merchant.findMerchantDetail'
return http({ return http({
...@@ -42,7 +44,8 @@ const findMerchantDetail = params => { ...@@ -42,7 +44,8 @@ const findMerchantDetail = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//下一步
const saveMerchant = params => { const saveMerchant = params => {
params.method = 'cn.com.glsx.merchants.merchant.saveMerchant' params.method = 'cn.com.glsx.merchants.merchant.saveMerchant'
return http({ return http({
...@@ -52,6 +55,17 @@ const saveMerchant = params => { ...@@ -52,6 +55,17 @@ const saveMerchant = params => {
sign: true sign: true
}) })
} }
const updateMerchant = params => {
params.method = 'cn.com.glsx.merchants.merchant.updateMerchant'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
//功能权限
const findPermissionsByMerId = params => { const findPermissionsByMerId = params => {
params.method = 'cn.com.glsx.merchants.merchant.findPermissionsByMerId' params.method = 'cn.com.glsx.merchants.merchant.findPermissionsByMerId'
return http({ return http({
...@@ -60,7 +74,8 @@ const findPermissionsByMerId = params => { ...@@ -60,7 +74,8 @@ const findPermissionsByMerId = params => {
data: params, data: params,
sign: true sign: true
}) })
} }
//功能权限
const findMenuFunTreeByMerId = params => { const findMenuFunTreeByMerId = params => {
params.method = 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId' params.method = 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
return http({ return http({
...@@ -69,6 +84,16 @@ const findMenuFunTreeByMerId = params => { ...@@ -69,6 +84,16 @@ const findMenuFunTreeByMerId = params => {
data: params, data: params,
sign: true sign: true
}) })
}
//草稿保存
const updatePermissions = params => {
params.method = 'cn.com.glsx.merchants.merchant.updatePermissions'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
} }
export default { export default {
findMerchantByPage, findMerchantByPage,
...@@ -76,6 +101,8 @@ export default { ...@@ -76,6 +101,8 @@ export default {
getCarbrandTree, getCarbrandTree,
findMerchantDetail, findMerchantDetail,
saveMerchant, saveMerchant,
updateMerchant,
findPermissionsByMerId, findPermissionsByMerId,
findMenuFunTreeByMerId findMenuFunTreeByMerId,
updatePermissions
} }
\ No newline at end of file \ No newline at end of file
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([{
name: 'home', name: 'account',
path: '/', path: '/account/index',
meta: {}, meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve) component: resolve => require([`@/views/account/index.vue`], resolve)
}, },
{ {
name: 'addAccount', name: 'addAccount',
path: '/acount/addAccount', path: '/account/addAccount',
meta: {}, meta: {},
component: resolve => require([`@/views/home/addAccount.vue`], resolve) component: resolve => require([`@/views/account/addAccount.vue`], resolve)
}, },
{ {
name: 'editAccount', name: 'editAccount',
path: '/acount/editAccount', path: '/account/editAccount',
meta: {}, meta: {},
component: resolve => require([`@/views/home/editAccount.vue`], resolve) component: resolve => require([`@/views/account/editAccount.vue`], resolve)
}, },
{ {
name: 'role', name: 'role',
......
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<div v-show="!parentId"> <div v-show="step == 1">
<div class="account-header scrm-flex-between scrm-box-f">创建子商户/门店</div> <div class="account-header scrm-flex-between scrm-box-f">
<span>创建子商户/门店</span>
<el-select v-model="status" slot="prepend" placeholder="请选择">
<el-option label="门店" :value="1"></el-option>
<el-option label="商户" :value="2"></el-option>
</el-select>
</div>
<div class="account-body scrm-box-f"> <div class="account-body scrm-box-f">
<div class="form-title">企业基本信息</div> <div class="form-title">企业基本信息</div>
<el-form <el-form
...@@ -69,12 +75,14 @@ ...@@ -69,12 +75,14 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商户地址"> <el-form-item size="small" label="商户地址" class="form-row">
<el-input size="small" v-model="accountAddForm.merchantAddress"> <el-input v-model="accountAddForm.merchantAddress"> </el-input>
<el-button slot="append" @click="dialogMapVisible = true" <el-button
type="primary"
class="form-btn"
@click="dialogMapVisible = true"
>选择地址</el-button >选择地址</el-button
> >
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -195,6 +203,24 @@ ...@@ -195,6 +203,24 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="门店照片"> <el-form-item label="门店照片">
<div class="store-upload-list">
<template
v-if="
accountAddForm.merchantFiles &&
accountAddForm.merchantFiles.length > 0
"
>
<div
:key="index"
v-for="(item, index) in accountAddForm.merchantFiles"
class="store-border"
>
<img :src="item.fileUrl" />
<div class="uploader-del-icon">
<i class="el-icon-delete-solid" @click.stop="delImg(index)"></i>
</div>
</div>
</template>
<el-upload <el-upload
action="" action=""
class="image-uploader" class="image-uploader"
...@@ -205,6 +231,8 @@ ...@@ -205,6 +231,8 @@
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div>
<div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div> <div class="tips">图片格式仅支持JPG,PNG格式,大小1M</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -237,6 +265,7 @@ ...@@ -237,6 +265,7 @@
<el-form-item label="账户等级"> <el-form-item label="账户等级">
<el-select <el-select
size="small" size="small"
:disabled="nextStatus"
v-model="accountDetail.merchantAccountLevel" v-model="accountDetail.merchantAccountLevel"
placeholder="请选择" placeholder="请选择"
> >
...@@ -254,6 +283,7 @@ ...@@ -254,6 +283,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录账户名" prop="merchantLoginAccount"> <el-form-item label="登录账户名" prop="merchantLoginAccount">
<el-input <el-input
:disabled="nextStatus"
size="small" size="small"
v-model="accountInfoForm.merchantLoginAccount" v-model="accountInfoForm.merchantLoginAccount"
placeholder="请输入登录账户名" placeholder="请输入登录账户名"
...@@ -263,6 +293,7 @@ ...@@ -263,6 +293,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录密码" prop="merchantLoginPassword"> <el-form-item label="登录密码" prop="merchantLoginPassword">
<el-input <el-input
:disabled="nextStatus"
size="small" size="small"
type="password" type="password"
v-model="accountInfoForm.merchantLoginPassword" v-model="accountInfoForm.merchantLoginPassword"
...@@ -279,6 +310,7 @@ ...@@ -279,6 +310,7 @@
:key="index" :key="index"
:btnLabel="item.accounttypeName" :btnLabel="item.accounttypeName"
:btnValue="item.accounttypeId" :btnValue="item.accounttypeId"
:stopClick="nextStatus"
@getBtnStatus="getBtnStatus" @getBtnStatus="getBtnStatus"
></auto-button> ></auto-button>
</el-form-item> </el-form-item>
...@@ -288,14 +320,20 @@ ...@@ -288,14 +320,20 @@
</div> </div>
</div> </div>
<select-product <select-product
v-show="parentId" v-show="step == 2"
ref="productForm"
:parentId="parentId" :parentId="parentId"
:pid="accountAddForm.parentId" :pid="accountAddForm.parentId"
:accountlevel="accountDetail.merchantAccountLevel" :accountlevel="accountDetail.merchantAccountLevel"
></select-product> ></select-product>
<div class="footer-panel"> <div class="footer-panel">
<el-button type="primary" @click="handleNext">下一步</el-button> <el-button type="primary" @click="handleNext" v-show="step == 1">下一步</el-button>
<el-button type="primary">取消</el-button> <el-button type="primary" @click="handleSave(1)" v-show="step == 2"
>存草稿</el-button
>
<el-button type="primary" @click="handlePrev" v-show="step == 2">上一步</el-button>
<el-button type="primary" @click="handleSave(2)" v-show="step == 2">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
<el-dialog :visible.sync="dialogMapVisible" width="60%"> <el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
...@@ -320,20 +358,22 @@ export default { ...@@ -320,20 +358,22 @@ export default {
}, },
data() { data() {
return { return {
nextStatus: false,
filterText: "", filterText: "",
brandData: [], brandData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label", label: "label",
}, },
parentId: "1", parentId: "",
step: 1,
mapHeight: 400, mapHeight: 400,
typeLabel: "",
typeStatus: false, typeStatus: false,
loadingImg: false, loadingImg: false,
dialogMapVisible: false, dialogMapVisible: false,
businessScopeCustomize: [{ name: "" }], businessScopeCustomize: [{ name: "" }],
accountAddForm: { accountAddForm: {
status: 1,
merchantType: "1", merchantType: "1",
businessScope: [], businessScope: [],
parentId: "", parentId: "",
...@@ -343,7 +383,6 @@ export default { ...@@ -343,7 +383,6 @@ export default {
accountInfoForm: {}, accountInfoForm: {},
accountDetail: {}, accountDetail: {},
accountLevel: [], accountLevel: [],
accountType: [],
businessOption: [], businessOption: [],
accountValidityPeriod: [], accountValidityPeriod: [],
baseRules: { baseRules: {
...@@ -375,7 +414,6 @@ export default { ...@@ -375,7 +414,6 @@ export default {
getAddress() { getAddress() {
this.dialogMapVisible = false; this.dialogMapVisible = false;
this.accountAddForm.merchantAddress = this.$refs.mapForm.address; this.accountAddForm.merchantAddress = this.$refs.mapForm.address;
console.log(this.accountAddForm.merchantAddress);
}, },
getBtnStatus(status, value) { getBtnStatus(status, value) {
if (status) { if (status) {
...@@ -419,6 +457,24 @@ export default { ...@@ -419,6 +457,24 @@ export default {
}; };
} }
}, },
handleSave(status) {
let accountTypes = this.$refs.productForm.accountTypes;
if (!accountTypes.every((item) => item.products)) {
this.$message.error("请选择产品");
}
let params = {
status,
merchantId: this.parentId,
accountTypes: this.$refs.productForm.accountTypes,
};
this.$apis.store.updatePermissions(params).then((res) => {
console.log(res);
});
},
handleCancel() {},
handlePrev() {
this.step = 1;
},
//下一步 //下一步
handleNext() { handleNext() {
const pm1 = new Promise((resolve, reject) => { const pm1 = new Promise((resolve, reject) => {
...@@ -445,11 +501,23 @@ export default { ...@@ -445,11 +501,23 @@ export default {
let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name); let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name);
params.businessScopeCustomize = businessScopeCustomize.join(","); params.businessScopeCustomize = businessScopeCustomize.join(",");
params.accounttypeId = this.accounttypeId.join(","); params.accounttypeId = this.accounttypeId.join(",");
let merchant;
if (this.nextStatus) {
merchant = "updateMerchant";
params.id = this.parentId;
} else {
merchant = "saveMerchant";
}
Promise.all([pm1, pm2]).then(() => { Promise.all([pm1, pm2]).then(() => {
this.$apis.store.saveMerchant(params).then((res) => { this.$apis.store[merchant](params).then((res) => {
if (res) { if (res) {
this.step = 2;
this.nextStatus = true;
if (typeof res == "number") {
this.parentId = res; this.parentId = res;
} }
this.twoMerchantDetail(this.parentId);
}
}); });
}); });
}, },
...@@ -462,13 +530,6 @@ export default { ...@@ -462,13 +530,6 @@ export default {
if (dictType == "account_level") { if (dictType == "account_level") {
this.accountLevel = res; this.accountLevel = res;
} }
if (dictType == "account_type") {
this.accountType = res;
let idx = this.accountType.findIndex(
(item) => (item.dictValue = this.accountDetail.accountType)
);
this.typeLabel = this.accountType[idx].dictLabel;
}
if (dictType == "business_scope") { if (dictType == "business_scope") {
this.businessOption = res; this.businessOption = res;
} }
...@@ -485,7 +546,15 @@ export default { ...@@ -485,7 +546,15 @@ export default {
this.accountDetail = await this.$apis.store.findMerchantDetail({ this.accountDetail = await this.$apis.store.findMerchantDetail({
id: this.accountAddForm.parentId, id: this.accountAddForm.parentId,
}); });
this.findAllDictData("account_type"); },
twoMerchantDetail(pid) {
this.$apis.store
.findMerchantDetail({
id: pid,
})
.then((res) => {
console.log(res);
});
}, },
getCarbrandTree() { getCarbrandTree() {
this.$apis.store.getCarbrandTree({}).then((res) => { this.$apis.store.getCarbrandTree({}).then((res) => {
...@@ -543,6 +612,49 @@ export default { ...@@ -543,6 +612,49 @@ export default {
&-form { &-form {
width: 80%; width: 80%;
margin: 20px auto; margin: 20px auto;
.form-row {
/deep/ .el-form-item__content {
display: flex;
}
.form-btn {
margin-left: 10px;
}
}
.store-upload-list {
display: flex;
flex-wrap: wrap;
.store-border {
position: relative;
width: 120px;
height: 80px;
border-radius: 2px;
margin-right: 15px;
margin-bottom: 15px;
}
.uploader-del-icon {
position: absolute;
top: 0px;
right: 0px;
width: 30px;
height: 30px;
line-height: 30px;
background: rgba(0, 0, 0, 0.4);
border-radius: 0px 0px 0px 100px;
cursor: pointer;
}
.el-icon-delete-solid {
color: #c5c5c5;
font-size: 14px;
margin-left: 12px;
}
}
.image-uploader {
/deep/ .el-upload {
width: 120px;
height: 80px;
line-height: 80px;
}
}
.brand-tree { .brand-tree {
height: 300px; height: 300px;
overflow-y: auto; overflow-y: auto;
......
...@@ -16,32 +16,46 @@ ...@@ -16,32 +16,46 @@
v-show="tabName == item.accounttypeId" v-show="tabName == item.accounttypeId"
> >
<label>选择产品</label> <label>选择产品</label>
<el-checkbox-group v-model="item.productsArr" @change="selectPro(index)"> <el-checkbox-group v-model="item.productsArr" @change="selectPro()">
<el-checkbox <el-checkbox v-for="(itm, idx) in item.products" :label="itm" :key="idx">{{
v-for="(itm, idx) in item.products" itm.productName
:label="itm.productName" }}</el-checkbox>
:key="idx"
></el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="account-select-menu">请选择产品权限</div> <div class="account-select-menu">请选择产品权限</div>
<div class="menu-box"> <div class="menu-box">
<div class="menu-box-panel">
<div :key="index" v-for="(item, index) in tabMenu"> <div :key="index" v-for="(item, index) in tabMenu">
<div class="menu-box-tab" v-show="tabName == item.accounttypeId">
<div <div
class="menu-box-tab" v-show="item.productsArr.indexOf(itm) != -1"
v-show="tabName == item.accounttypeId" class="tab-item text-hide"
:class="{ 'select-checked': item.productId == itm.productId }"
@click="item.productId = itm.productId"
v-for="(itm, idx) in item.products"
:key="idx"
> >
<div class="tab-item text-hide" v-for="(itm, idx) in item.productsArr" :key="idx"> {{ itm.productName }}
{{ itm }}
</div> </div>
</div> </div>
<div v-if="item.products[0]" class="menu-box-tree" v-show="tabName == item.accounttypeId && item.productsArr.indexOf(item.accounttypeName) != -1"> <div
v-show="tabName == item.accounttypeId"
class="menu-box-tree"
v-if="item.products"
:style="{ height: treeHeight + 'px' }"
>
<div
v-for="(itm, idx) in item.products"
:key="idx"
v-show="item.productId == itm.productId"
>
<el-tree <el-tree
:data="item.products[0].merchantProTreeResponses" :data="itm.merchantProTreeResponses"
show-checkbox show-checkbox
default-expand-all default-expand-all
node-key="id" node-key="id"
ref="brandTree" :class="'tree_'+ itm.productId"
:ref="'tree_'+ itm.productId"
highlight-current highlight-current
:props="defaultProps" :props="defaultProps"
> >
...@@ -50,6 +64,8 @@ ...@@ -50,6 +64,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
...@@ -70,8 +86,10 @@ export default { ...@@ -70,8 +86,10 @@ export default {
data() { data() {
return { return {
treeHeight: 300,
tabMenu: [], tabMenu: [],
selectIndex: 0, selectIndex: 0,
productId: 0,
products: [], products: [],
productsArr: [], productsArr: [],
tabName: "", tabName: "",
...@@ -83,12 +101,29 @@ export default { ...@@ -83,12 +101,29 @@ export default {
}, },
methods: { methods: {
selectPro() {}, selectPro() {
this.accountTypes = this.tabMenu.map((item) => {
let products = [];
item.productsArr.forEach((itm) => {
console.log(this.$refs[`tree_+ ${itm.productId}`]?this.$refs[`tree_+ ${itm.productId}`][0].getCheckedKeys():0)
products.push({
productId: itm.productId,
functionIds: itm.functionIds,
menuIds: this.$refs[`tree_+ ${itm.productId}`]?this.$refs[`tree_+ ${itm.productId}`][0].getCheckedKeys():[]
})
});
return {
accounttypeId: item.accounttypeId,
products,
};
});
console.log(this.accountTypes)
},
findPermissionsByMerId() { findPermissionsByMerId() {
let params = { let params = {
accountlevel: 2, accountlevel: 2,
parentId: 41513, parentId: 41568,
id: 41555, id: 41570,
}; };
this.$apis.store.findMenuFunTreeByMerId(params).then((res) => { this.$apis.store.findMenuFunTreeByMerId(params).then((res) => {
this.tabMenu = res.map((item) => { this.tabMenu = res.map((item) => {
...@@ -97,6 +132,14 @@ export default { ...@@ -97,6 +132,14 @@ export default {
products: item.products, products: item.products,
accounttypeName: item.accounttypeName, accounttypeName: item.accounttypeName,
accounttypeId: item.accounttypeId, accounttypeId: item.accounttypeId,
merchantProTreeResponses: item.merchantProTreeResponses,
productId: "",
};
});
this.accountTypes = res.map((item) => {
return {
products: null,
accounttypeId: item.accounttypeId,
}; };
}); });
this.tabName = this.tabMenu[0].accounttypeId; this.tabName = this.tabMenu[0].accounttypeId;
...@@ -153,9 +196,21 @@ export default { ...@@ -153,9 +196,21 @@ export default {
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
font-weight: 400; font-weight: 400;
color: #322ad9; color: #37383a;
text-align: center; text-align: center;
padding: 12px 0px; padding: 12px 0px;
cursor: pointer;
&.select-checked {
color: #322ad9;
font-weight: 700;
border-bottom: none;
}
}
.menu-box-tab {
display: flex;
}
.menu-box-tree {
background: #ffffff;
} }
} }
} }
......
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<el-tabs v-model="step" @tab-click="handleClick" class="tab-edit-status">
<el-tab-pane label="修改功能权限" name="first"></el-tab-pane>
<el-tab-pane label="修改基本信息" name="second"></el-tab-pane>
</el-tabs>
<div v-show="step == 'second'">
<div class="account-body scrm-box-f"> <div class="account-body scrm-box-f">
<div class="form-title">修改账户信息</div> <div class="form-title">修改账户信息</div>
<el-form <el-form
...@@ -32,10 +37,19 @@ ...@@ -32,10 +37,19 @@
> >
<el-input <el-input
type="password" type="password"
:readonly="pwdStatus ? 'readonly' : false"
v-model="accountInfoForm.merchantLoginPassword" v-model="accountInfoForm.merchantLoginPassword"
placeholder="请输入登录密码" placeholder="请输入登录密码"
></el-input> ></el-input>
<el-button type="primary" class="form-btn">重置密码</el-button> <el-button
type="primary"
class="form-btn"
@click="
pwdStatus = false;
accountInfoForm.merchantLoginPassword = '';
"
>重置密码</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -47,7 +61,11 @@ ...@@ -47,7 +61,11 @@
:key="index" :key="index"
:btnLabel="item.accounttypeName" :btnLabel="item.accounttypeName"
:btnValue="item.accounttypeId" :btnValue="item.accounttypeId"
typeStatus="true" :typeStatus="
accountAddForm.accountTypeNames.search(item.accounttypeName) == -1
? false
: true
"
stopClick="true" stopClick="true"
></auto-button> ></auto-button>
</el-form-item> </el-form-item>
...@@ -122,12 +140,11 @@ ...@@ -122,12 +140,11 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="商户地址"> <el-form-item size="small" label="商户地址" class="form-row">
<el-input size="small" v-model="accountAddForm.merchantAddress"> <el-input readonly size="small" v-model="accountAddForm.merchantAddress"> </el-input>
<el-button slot="append" @click="dialogMapVisible = true" <el-button type="primary" class="form-btn" @click="dialogMapVisible = true"
>选择地址</el-button >选择地址</el-button
> >
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -251,13 +268,13 @@ ...@@ -251,13 +268,13 @@
<div class="store-upload-list"> <div class="store-upload-list">
<template <template
v-if=" v-if="
accountAddForm.merchantFileResponses && accountAddForm.merchantFiles &&
accountAddForm.merchantFileResponses.length > 0 accountAddForm.merchantFiles.length > 0
" "
> >
<div <div
:key="index" :key="index"
v-for="(item, index) in accountAddForm.merchantFileResponses" v-for="(item, index) in accountAddForm.merchantFiles"
class="store-border" class="store-border"
> >
<img :src="item.fileUrl" /> <img :src="item.fileUrl" />
...@@ -284,6 +301,10 @@ ...@@ -284,6 +301,10 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
</div>
<div v-show="step == 'first'">
<select-product></select-product>
</div>
<div class="footer-panel"> <div class="footer-panel">
<el-button type="primary" @click="handleNext">确定</el-button> <el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary">取消</el-button> <el-button type="primary">取消</el-button>
...@@ -301,15 +322,18 @@ ...@@ -301,15 +322,18 @@
<script> <script>
import mapView from "@/components/mapView/index"; import mapView from "@/components/mapView/index";
import autoButton from "@/components/auto-button/index"; import autoButton from "@/components/auto-button/index";
import selectProduct from "./components/selectProduct";
export default { export default {
name: "index", name: "index",
components: { components: {
mapView, mapView,
autoButton, autoButton,
selectProduct
}, },
data() { data() {
return { return {
activeName: "first", pwdStatus: true,
step: "first",
filterText: "", filterText: "",
brandData: [], brandData: [],
defaultProps: { defaultProps: {
...@@ -378,7 +402,7 @@ export default { ...@@ -378,7 +402,7 @@ export default {
} }
}, },
delImg(index) { delImg(index) {
this.accountAddForm.merchantFileResponses.splice(index, 1); this.accountAddForm.merchantFiles.splice(index, 1);
}, },
upLoadImg(file) { upLoadImg(file) {
let fileName = file.name; let fileName = file.name;
...@@ -408,7 +432,9 @@ export default { ...@@ -408,7 +432,9 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res) { if (res) {
console.log(res); self.accountAddForm.merchantFiles.push({
fileUrl: res,
});
} }
}); });
}; };
...@@ -436,7 +462,6 @@ export default { ...@@ -436,7 +462,6 @@ export default {
} }
params.merchantBrand = this.$refs.brandTree.getCheckedKeys().join(","); params.merchantBrand = this.$refs.brandTree.getCheckedKeys().join(",");
params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0); params.isloginName ? (params.isloginName = 1) : (params.isloginName = 0);
params.merchantAccountLevel = this.accountDetail.merchantAccountLevel;
let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name); let businessScopeCustomize = this.businessScopeCustomize.map((item) => item.name);
params.businessScopeCustomize = businessScopeCustomize.join(","); params.businessScopeCustomize = businessScopeCustomize.join(",");
params.accounttypeId = this.accounttypeId.join(","); params.accounttypeId = this.accounttypeId.join(",");
...@@ -466,9 +491,12 @@ export default { ...@@ -466,9 +491,12 @@ export default {
this.businessScopeCustomize.splice(index, 1); this.businessScopeCustomize.splice(index, 1);
}, },
async findMerchantDetail() { async findMerchantDetail() {
this.accountAddForm = await this.$apis.store.findMerchantDetail({ this.$apis.store
.findMerchantDetail({
id: this.accountAddForm.parentId, id: this.accountAddForm.parentId,
}); })
.then((res) => {
this.accountAddForm = res;
this.accountInfoForm.merchantLoginAccount = this.accountAddForm.merchantLoginAccount; this.accountInfoForm.merchantLoginAccount = this.accountAddForm.merchantLoginAccount;
this.accountInfoForm.merchantLoginPassword = this.accountAddForm.merchantLoginPassword; this.accountInfoForm.merchantLoginPassword = this.accountAddForm.merchantLoginPassword;
this.accountTypes = this.accountAddForm.accountTypes; this.accountTypes = this.accountAddForm.accountTypes;
...@@ -486,12 +514,28 @@ export default { ...@@ -486,12 +514,28 @@ export default {
]; ];
let businessScopeCustomize = this.accountAddForm.businessScopeCustomize let businessScopeCustomize = this.accountAddForm.businessScopeCustomize
? this.accountAddForm.businessScopeCustomize.split(",") ? this.accountAddForm.businessScopeCustomize.split(",")
: []; : [""];
this.businessScopeCustomize = businessScopeCustomize.map((item) => { this.businessScopeCustomize = businessScopeCustomize.map((item) => {
return { return {
name: item, name: item,
}; };
}); });
this.accountAddForm.merchantFiles = this.accountAddForm.merchantFileResponses.map(
(item) => {
return {
fileUrl: item.fileUrl,
};
}
);
let merchantBrand = this.accountAddForm.merchantBrand
? this.accountAddForm.merchantBrand.split(",")
: [];
for (let i in merchantBrand) {
merchantBrand[i] = parseInt(merchantBrand[i]);
}
this.$refs.brandTree.setCheckedKeys(merchantBrand);
});
}, },
getCarbrandTree() { getCarbrandTree() {
this.$apis.store.getCarbrandTree({}).then((res) => { this.$apis.store.getCarbrandTree({}).then((res) => {
...@@ -509,6 +553,11 @@ export default { ...@@ -509,6 +553,11 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab-edit-status {
/deep/ .el-tabs__nav-wrap::after {
display: none;
}
}
.account-header { .account-header {
height: 78px; height: 78px;
box-sizing: border-box; box-sizing: border-box;
...@@ -531,8 +580,8 @@ export default { ...@@ -531,8 +580,8 @@ export default {
} }
} }
.account-body { .account-body {
&:nth-of-type(3) {
margin-top: 20px; margin-top: 20px;
&:nth-of-type(2) {
margin-bottom: 70px; margin-bottom: 70px;
} }
.form-title { .form-title {
......
...@@ -141,9 +141,11 @@ export default { ...@@ -141,9 +141,11 @@ export default {
}, },
methods: { methods: {
handleLook() {}, handleLook() {},
handleEdit() {}, handleEdit(scope) {
this.$router.push({path:'/account/editAccount',query:{id:scope.id}})
},
handleAdd(scope) { handleAdd(scope) {
this.$router.push({path:'/acount/addAccount',query:{id:scope.id}}) this.$router.push({path:'/account/addAccount',query:{id:scope.id}})
}, },
findAllDictData(dictType) { findAllDictData(dictType) {
var params = { var params = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!