Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0c53a5a8
authored
Oct 30, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
角色管理/创建角色/修改角色
2 parents
3e06ae54
a9d049a6
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
591 additions
and
59 deletions
src/api/modules/baseInfo.js
src/components/auto-button/index.vue
src/components/mapView/index.vue
src/main.js
src/setup/qiankun.js
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/baseInfo/bloc.vue
src/views/baseInfo/relevance.vue
src/api/modules/baseInfo.js
View file @
0c53a5a
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
* @param {*} params
* @param {*} params
* @returns
* @returns
*/
*/
import
{
http
}
from
'@/main'
import
{
http
_config
}
from
'@/main'
const
getMerchantTree
=
params
=>
{
const
getMerchantTree
=
params
=>
{
params
.
method
=
'org.ore.api.common.findMerchantTreeByMerchantNo.list'
params
.
method
=
'org.ore.api.common.findMerchantTreeByMerchantNo.list'
return
http
({
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
...
@@ -18,7 +18,7 @@ const getMerchantTree = params => {
...
@@ -18,7 +18,7 @@ const getMerchantTree = params => {
}
}
const
getDepartment
=
params
=>
{
const
getDepartment
=
params
=>
{
params
.
method
=
'cn.com.glsx.entmicro.department.listDepartmentTree'
params
.
method
=
'cn.com.glsx.entmicro.department.listDepartmentTree'
return
http
({
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
...
@@ -27,7 +27,7 @@ const getDepartment = params => {
...
@@ -27,7 +27,7 @@ const getDepartment = params => {
}
}
const
toGL
=
params
=>
{
const
toGL
=
params
=>
{
params
.
method
=
'org.ore.api.common.relevanceEntmicro.list'
params
.
method
=
'org.ore.api.common.relevanceEntmicro.list'
return
http
({
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
...
@@ -36,7 +36,7 @@ const toGL = params => {
...
@@ -36,7 +36,7 @@ const toGL = params => {
}
}
const
merchantInfo
=
params
=>
{
const
merchantInfo
=
params
=>
{
params
.
method
=
'org.ore.api.common.findMerchantInfoByMerchantNo.list'
params
.
method
=
'org.ore.api.common.findMerchantInfoByMerchantNo.list'
return
http
({
return
http_config
({
url
:
'/rop-scrm-entmicro/router'
,
url
:
'/rop-scrm-entmicro/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
...
...
src/components/auto-button/index.vue
View file @
0c53a5a
<
template
>
<
template
>
<div
disabled
class=
"btn-unselect"
:class=
"
{ 'selectd-type': typeStatus }" @click="tabType">
<div
disabled
class=
"btn-unselect"
:class=
"
{ 'selectd-type': typeStatus
,'no_click': stopClick
}" @click="tabType">
<span
class=
"select-type-title"
>
{{
btnLabel
}}
</span
<span
class=
"select-type-title"
>
{{
btnLabel
}}
</span
><i
class=
"btn-icon"
:class=
"
{ 'el-icon-check': typeStatus }">
</i>
><i
class=
"btn-icon"
:class=
"
{ 'el-icon-check': typeStatus }">
</i>
</div>
</div>
...
@@ -64,6 +64,9 @@ export default {
...
@@ -64,6 +64,9 @@ export default {
background
:
#5850ff
;
background
:
#5850ff
;
}
}
}
}
&
.no_click
{
cursor
:
not-allowed
!important
;
}
.select-type-title
{
.select-type-title
{
display
:
inline-block
;
display
:
inline-block
;
padding
:
0
16px
;
padding
:
0
16px
;
...
...
src/components/mapView/index.vue
View file @
0c53a5a
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
AMap
from
"AMap"
;
let
map
,
placeSearch
;
let
map
,
placeSearch
;
export
default
{
export
default
{
name
:
"map"
,
name
:
"map"
,
...
...
src/main.js
View file @
0c53a5a
...
@@ -28,3 +28,4 @@ export { bootstrap, mount, unmount }
...
@@ -28,3 +28,4 @@ export { bootstrap, mount, unmount }
from
'@/setup'
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http_common
=
params
=>
Vue
.
prototype
.
$http_common
(
params
)
export
const
http_common
=
params
=>
Vue
.
prototype
.
$http_common
(
params
)
export
const
http_config
=
params
=>
Vue
.
prototype
.
$http_config
(
params
)
\ No newline at end of file
\ No newline at end of file
src/setup/qiankun.js
View file @
0c53a5a
...
@@ -13,7 +13,7 @@ let routes = []
...
@@ -13,7 +13,7 @@ let routes = []
let
router
=
null
let
router
=
null
let
instance
=
null
let
instance
=
null
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
})
{
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
})
{
const
{
response
,
request
,
sign
,
secret
,
request_common
}
=
await
fetchConfig
()
const
{
response
,
request
,
sign
,
secret
,
request_common
,
request_config
}
=
await
fetchConfig
()
console
.
log
(
request
)
console
.
log
(
request
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$messenger
=
messenger
...
@@ -22,6 +22,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
...
@@ -22,6 +22,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
request
:
request_common
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
request
:
request_common
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_config
=
new
common
.
Http
({
response
,
request
:
request_config
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue
.
use
(
GLButton
,
{
permissions
:
globalState
.
permissions
||
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
Vue
.
use
(
GLButton
,
{
permissions
:
globalState
.
permissions
||
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
...
...
src/views/account/addAccount.vue
View file @
0c53a5a
...
@@ -3,14 +3,12 @@
...
@@ -3,14 +3,12 @@
<div
v-show=
"step == 1"
>
<div
v-show=
"step == 1"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<div
class=
"account-header scrm-flex-between scrm-box-f"
>
<span>
创建子商户/门店
</span>
<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>
<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
<base-info
ref=
"baseInfoForm"
:brandData=
"brandData"
:accountAddForm=
"accountAddForm"
:businessScopeCustomize=
"businessScopeCustomize"
:businessOption=
"businessOption"
></base-info>
<!--
<el-form
ref=
"baseForm"
ref=
"baseForm"
:model=
"accountAddForm"
:model=
"accountAddForm"
class=
"account-body-form"
class=
"account-body-form"
...
@@ -39,9 +37,9 @@
...
@@ -39,9 +37,9 @@
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"商户类型"
class=
"merchant-row"
>
<el-form-item
size=
"small"
label=
"商户类型"
class=
"merchant-row"
>
<el-input
<el-input
size=
"small"
v-model=
"accountAddForm.merchantOrgcode"
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入组织机构号码"
placeholder=
"请输入组织机构号码"
v-if=
"accountAddForm.merchantType == 2"
v-if=
"accountAddForm.merchantType == 2"
...
@@ -75,10 +73,11 @@
...
@@ -75,10 +73,11 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"
12
"
>
<el-col
:span=
"
24
"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-input
v-model=
"accountAddForm.merchantAddress"
>
</el-input>
<el-input
v-model=
"accountAddForm.merchantAddress"
>
</el-input>
<el-button
<el-button
readonly
type=
"primary"
type=
"primary"
class=
"form-btn"
class=
"form-btn"
@
click=
"dialogMapVisible = true"
@
click=
"dialogMapVisible = true"
...
@@ -239,7 +238,7 @@
...
@@ -239,7 +238,7 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
-->
</div>
</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>
...
@@ -373,12 +372,14 @@ import util from "@/utils/util";
...
@@ -373,12 +372,14 @@ import util from "@/utils/util";
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"
;
import
selectProduct
from
"./components/selectProduct"
;
import
baseInfo
from
"./components/baseInfo"
;
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
components
:
{
components
:
{
mapView
,
mapView
,
autoButton
,
autoButton
,
selectProduct
,
selectProduct
,
baseInfo
},
},
data
()
{
data
()
{
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
...
@@ -406,7 +407,7 @@ export default {
...
@@ -406,7 +407,7 @@ export default {
businessScopeCustomize
:
[{
name
:
""
}],
businessScopeCustomize
:
[{
name
:
""
}],
accountAddForm
:
{
accountAddForm
:
{
status
:
1
,
status
:
1
,
merchantType
:
"1"
,
merchantType
:
1
,
businessScope
:
[],
businessScope
:
[],
parentId
:
""
,
parentId
:
""
,
isloginName
:
false
,
isloginName
:
false
,
...
@@ -519,7 +520,7 @@ export default {
...
@@ -519,7 +520,7 @@ export default {
//下一步
//下一步
handleNext
()
{
handleNext
()
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
base
InfoForm
.
$refs
.
base
Form
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
if
(
valid
)
resolve
();
});
});
});
});
...
@@ -548,7 +549,8 @@ export default {
...
@@ -548,7 +549,8 @@ export default {
if
(
params
.
businessScope
)
{
if
(
params
.
businessScope
)
{
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
}
}
params
.
merchantBrand
=
this
.
$refs
.
brandTree
.
getCheckedKeys
().
join
(
","
);
console
.
log
(
this
.
$refs
.
baseInfoForm
)
params
.
merchantBrand
=
this
.
$refs
.
baseInfoForm
.
$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
;
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
;
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
...
@@ -568,7 +570,7 @@ export default {
...
@@ -568,7 +570,7 @@ export default {
this
.
nextStatus
=
true
;
this
.
nextStatus
=
true
;
if
(
typeof
res
==
"number"
)
{
if
(
typeof
res
==
"number"
)
{
this
.
parentId
=
res
;
this
.
parentId
=
res
;
this
.
findMenuFunTreeByMerId
();
this
.
$refs
.
productForm
.
findMenuFunTreeByMerId
();
}
}
this
.
twoMerchantDetail
(
this
.
parentId
);
this
.
twoMerchantDetail
(
this
.
parentId
);
}
}
...
...
src/views/account/components/baseInfo.vue
0 → 100644
View file @
0c53a5a
<
template
>
<div
class=
"base-info"
>
<el-form
ref=
"baseForm"
:model=
"accountAddForm"
class=
"account-body-form"
label-width=
"120px"
:rules=
"baseRules"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"商户名称"
prop=
"merchantName"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantName"
placeholder=
"请输入商户名称"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"商户简称"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantAbbreviation"
placeholder=
"请输入商户简称"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
size=
"small"
label=
"商户类型"
class=
"merchant-row"
>
<el-input
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入组织机构号码"
v-if=
"accountAddForm.merchantType == 2"
>
<el-select
v-model=
"accountAddForm.merchantType"
slot=
"prepend"
placeholder=
"请选择"
>
<el-option
label=
"个人"
value=
"1"
></el-option>
<el-option
label=
"企业"
value=
"2"
></el-option>
</el-select>
</el-input>
<el-input
size=
"small"
maxlength=
"18"
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入正确的身份证号"
v-if=
"accountAddForm.merchantType == 1"
>
<el-select
v-model=
"accountAddForm.merchantType"
slot=
"prepend"
placeholder=
"请选择"
>
<el-option
label=
"个人"
:value=
"1"
></el-option>
<el-option
label=
"企业"
:value=
"2"
></el-option>
</el-select>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-input
readonly
v-model=
"accountAddForm.merchantAddress"
>
</el-input>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"dialogMapVisible = true"
>
选择地址
</el-button
>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系电话"
prop=
"merchantLegalPersonPhone"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"accountAddForm.merchantLegalPersonPhone"
placeholder=
"请输入联系电话"
></el-input>
<el-checkbox
v-model=
"accountAddForm.isloginName"
>
联系电话同时作为登录账户名
</el-checkbox
>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系人"
>
<el-input
size=
"small"
v-model=
"accountAddForm.merchantLegalPerson"
placeholder=
"请输入联系人"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"驻店联系人"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"accountAddForm.residentContact"
placeholder=
"请输入驻店联系人"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"驻店电话"
>
<el-input
maxlength=
"11"
size=
"small"
v-model=
"accountAddForm.residentPhone"
placeholder=
"请输入驻店电话"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"营业范围"
>
<el-checkbox-group
v-model=
"accountAddForm.businessScope"
>
<el-checkbox
v-for=
"item in businessOption"
:label=
"item.dictValue"
:key=
"item"
>
{{
item
.
dictLabel
}}
</el-checkbox
>
</el-checkbox-group>
<div
class=
"scrm-flex-center"
v-for=
"(item, index) in businessScopeCustomize"
:key=
"index"
>
<el-input
size=
"small"
v-model=
"businessScopeCustomize[index].name"
placeholder=
"请自定义营业范围,建议不超过10个"
></el-input>
<i
class=
"el-icon-circle-plus el-icon-btn"
@
click=
"addBusinessScope"
v-if=
"index == businessScopeCustomize.length - 1"
></i>
<i
class=
"el-icon-remove el-icon-btn"
@
click=
"removeBusinessScope"
v-else
></i>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"营业时间"
class=
"open-time"
>
<el-time-picker
size=
"small"
value-format=
"HH:mm:ss"
is-range
v-model=
"accountAddForm.bussinessTime"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
></el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"主营品牌"
>
<el-input
size=
"small"
v-model=
"filterText"
></el-input>
<div
class=
"brand-tree"
>
<el-tree
:data=
"brandData"
show-checkbox
default-expand-all
node-key=
"id"
ref=
"brandTree"
highlight-current
:props=
"defaultProps"
:filter-node-method=
"filterNode"
>
</el-tree>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<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
action=
""
class=
"image-uploader"
:show-file-list=
"false"
list-type=
"picture-card"
v-loading=
"loadingImg"
:before-upload=
"upLoadImg"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</div>
<div
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-dialog
:visible
.
sync=
"dialogMapVisible"
width=
"60%"
>
<map-view
ref=
"mapForm"
:mapHeight=
"mapHeight"
></map-view>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogMapVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"getAddress"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
util
from
"@/utils/util"
;
import
mapView
from
"@/components/mapView/index"
;
export
default
{
name
:
"base"
,
components
:
{
mapView
,
},
props
:
{
accountAddForm
:
{
type
:
Object
,
},
businessOption
:
{
type
:
Array
,
},
brandData
:
{
type
:
Array
,
},
businessScopeCustomize
:
{
type
:
Array
,
}
},
data
()
{
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
util
.
checkPhone
(
value
))
{
callback
(
new
Error
(
"请输入正确的手机号"
));
}
else
{
callback
();
}
};
return
{
filterText
:
""
,
defaultProps
:
{
children
:
"children"
,
label
:
"label"
,
},
dialogMapVisible
:
false
,
mapHeight
:
300
,
baseRules
:
{
merchantName
:
[{
required
:
true
,
message
:
"请输入商户名称"
,
trigger
:
"blur"
}],
merchantLegalPersonPhone
:
[
{
required
:
true
,
message
:
"请输入联系电话"
,
trigger
:
"blur"
},
{
validator
:
validatePhone
,
trigger
:
"blur"
},
],
},
};
},
methods
:
{
getAddress
()
{
this
.
dialogMapVisible
=
false
;
this
.
accountAddForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
;
},
delImg
(
index
)
{
this
.
accountAddForm
.
merchantFiles
.
splice
(
index
,
1
);
},
addBusinessScope
()
{
this
.
businessScopeCustomize
.
push
({
name
:
""
});
},
removeBusinessScope
(
index
)
{
this
.
businessScopeCustomize
.
splice
(
index
,
1
);
},
upLoadImg
(
file
)
{
let
fileName
=
file
.
name
;
if
(
file
.
name
.
lastIndexOf
(
"."
)
===
-
1
)
{
this
.
$message
.
info
(
"路径不正确"
);
return
false
;
}
let
AllImgExt
=
".jpg|.jpeg|.gif|.bmp|.png|.swf"
;
let
extName
=
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
"."
)).
toLowerCase
();
if
(
AllImgExt
.
indexOf
(
extName
+
"|"
)
===
-
1
)
{
this
.
$message
.
info
(
"图片格式不正确"
);
return
false
;
}
// if (fileSize < 3145728) {
if
(
window
.
FileReader
)
{
let
reader
=
new
FileReader
();
let
self
=
this
;
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
(
img
)
=>
{
console
.
log
(
file
);
let
type
=
fileName
.
split
(
"."
)[
1
];
let
imgUrl
=
img
.
target
.
result
.
split
(
","
)[
1
];
self
.
loadingImg
=
true
;
self
.
$apis
.
common
.
pictureUpload
({
file
:
`
${
type
}
@
${
imgUrl
}
`
,
})
.
then
((
res
)
=>
{
if
(
res
)
{
self
.
accountAddForm
.
merchantFiles
.
push
({
fileUrl
:
res
,
});
}
});
};
}
},
},
mounted
()
{},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.base-info
{
.account-body-form
{
width
:
80%
;
margin
:
20px
auto
;
.form-row
{
/deep/
.el-form-item__content
{
display
:
flex
;
}
.form-btn
{
margin-left
:
10px
;
}
}
.merchant-row
{
/deep/
{
.el-form-item__content
{
line-height
:
1
;
}
.el-select
{
.el-input
{
width
:
80px
;
}
}
}
}
.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
{
height
:
300px
;
overflow-y
:
auto
;
}
.open-time
{
/deep/
{
.el-range-editor--small.el-input__inner
{
width
:
100%
;
}
}
}
.el-icon-btn
{
color
:
#5850ff
;
font-size
:
16px
;
margin-left
:
6px
;
cursor
:
pointer
;
}
.tips
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
30px
;
}
.btn-unselect
{
display
:
inline-block
;
cursor
:
pointer
;
position
:
relative
;
height
:
30px
;
line-height
:
30px
;
margin-top
:
6px
;
padding-right
:
30px
;
cursor
:
pointer
;
font-size
:
0
;
-webkit-transition
:
0.1s
linear
;
transition
:
0.1s
linear
;
box-sizing
:
border-box
;
&.selectd-type
{
.select-type-title
{
background
:
#5850ff
;
}
}
.select-type-title
{
display
:
inline-block
;
padding
:
0
16px
;
height
:
100%
;
font-size
:
14px
;
border-radius
:
2px
0
0
2px
;
background-color
:
#d2d2d2
;
color
:
#fff
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.btn-icon
{
display
:
inline-block
;
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
30px
;
height
:
28px
;
line-height
:
28px
;
border
:
1px
solid
#dcdfe6
;
border-left
:
none
;
border-radius
:
2px
0px
0px
2px
;
color
:
#5850ff
;
font-size
:
20px
;
text-align
:
center
;
}
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/account/editAccount.vue
View file @
0c53a5a
...
@@ -75,7 +75,8 @@
...
@@ -75,7 +75,8 @@
</div>
</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
<base-info
ref=
"baseInfoForm"
:brandData=
"brandData"
:accountAddForm=
"accountAddForm"
:businessScopeCustomize=
"businessScopeCustomize"
:businessOption=
"businessOption"
></base-info>
<!--
<el-form
ref=
"baseForm"
ref=
"baseForm"
:model=
"accountAddForm"
:model=
"accountAddForm"
class=
"account-body-form"
class=
"account-body-form"
...
@@ -299,7 +300,7 @@
...
@@ -299,7 +300,7 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
-->
</div>
</div>
</div>
</div>
<div
v-show=
"step == 'first'"
>
<div
v-show=
"step == 'first'"
>
...
@@ -326,12 +327,14 @@
...
@@ -326,12 +327,14 @@
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"
;
import
selectProduct
from
"./components/selectProduct"
;
import
baseInfo
from
"./components/baseInfo"
;
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
components
:
{
components
:
{
mapView
,
mapView
,
autoButton
,
autoButton
,
selectProduct
selectProduct
,
baseInfo
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -449,7 +452,7 @@ export default {
...
@@ -449,7 +452,7 @@ export default {
//下一步
//下一步
handleNext
()
{
handleNext
()
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
base
InfoForm
.
$refs
.
base
Form
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
if
(
valid
)
resolve
();
});
});
});
});
...
@@ -466,7 +469,7 @@ export default {
...
@@ -466,7 +469,7 @@ export default {
if
(
params
.
businessScope
)
{
if
(
params
.
businessScope
)
{
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
}
}
params
.
merchantBrand
=
this
.
$refs
.
brandTree
.
getCheckedKeys
().
join
(
","
);
params
.
merchantBrand
=
this
.
$refs
.
b
aseInfoForm
.
$refs
.
b
randTree
.
getCheckedKeys
().
join
(
","
);
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
);
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
);
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
...
@@ -540,7 +543,7 @@ export default {
...
@@ -540,7 +543,7 @@ export default {
for
(
let
i
in
merchantBrand
)
{
for
(
let
i
in
merchantBrand
)
{
merchantBrand
[
i
]
=
parseInt
(
merchantBrand
[
i
]);
merchantBrand
[
i
]
=
parseInt
(
merchantBrand
[
i
]);
}
}
this
.
$refs
.
brandTree
.
setCheckedKeys
(
merchantBrand
);
this
.
$refs
.
b
aseInfoForm
.
$refs
.
b
randTree
.
setCheckedKeys
(
merchantBrand
);
});
});
},
},
getCarbrandTree
()
{
getCarbrandTree
()
{
...
...
src/views/account/index.vue
View file @
0c53a5a
<
template
>
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
>
<div
class=
"form-header"
>
<div
class=
"form-header"
>
<el-button
type=
"primary"
@
click=
"handleSearch
"
size=
"small"
icon=
"el-icon-link"
<el-button
type=
"primary"
@
click=
"handleContact
"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button
>
门店账户关联企微
</el-button
>
>
</div>
</div>
<div
class=
"follow-form"
>
<div
class=
"follow-form"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"follow-form-item"
label-width=
"80px"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"follow-form-item"
label-width=
"80px"
>
<el-row>
<el-row>
<el-form-item
size=
"small"
label=
"关联企微"
>
<el-form-item
size=
"small"
label=
"关联企微"
>
<el-select
v-model=
"searchForm.isRelevance"
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.isRelevance"
placeholder=
"请选择"
>
...
@@ -19,7 +24,12 @@
...
@@ -19,7 +24,12 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
class=
"merchant-row"
size=
"small"
>
<el-form-item
class=
"merchant-row"
size=
"small"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLoginAccount"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 1"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLoginAccount"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 1"
>
<el-select
<el-select
size=
"small"
size=
"small"
v-model=
"searchForm.accountOrPhone"
v-model=
"searchForm.accountOrPhone"
...
@@ -30,7 +40,12 @@
...
@@ -30,7 +40,12 @@
<el-option
label=
"手机号"
:value=
"2"
></el-option>
<el-option
label=
"手机号"
:value=
"2"
></el-option>
</el-select>
</el-select>
</el-input>
</el-input>
<el-input
size=
"small"
v-model=
"searchForm.merchantLegalPersonPhone"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 2"
>
<el-input
size=
"small"
v-model=
"searchForm.merchantLegalPersonPhone"
placeholder=
"请输入"
v-if=
"searchForm.accountOrPhone == 2"
>
<el-select
<el-select
size=
"small"
size=
"small"
v-model=
"searchForm.accountOrPhone"
v-model=
"searchForm.accountOrPhone"
...
@@ -75,7 +90,7 @@
...
@@ -75,7 +90,7 @@
placeholder=
"请输入商户名称/关联的企业微信名"
placeholder=
"请输入商户名称/关联的企业微信名"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
style=
"float:right"
>
<el-form-item
size=
"small"
style=
"float:
right"
>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-row>
</el-row>
...
@@ -100,8 +115,16 @@
...
@@ -100,8 +115,16 @@
</div>
</div>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"handleLook(scope.scope)"
>
查看
</el-button>
<el-button
type=
"text"
@
click=
"handleLook(scope.scope)"
>
查看
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
v-if=
"$globalState.session.merchantId != scope.scope.merchantNo"
>
修改
</el-button>
<el-button
<el-button
type=
"text"
@
click=
"handleAdd(scope.scope)"
v-if=
"scope.scope.status == 2 && $globalState.session.accountLevel != 4"
type=
"text"
@
click=
"handleEdit(scope.scope)"
v-if=
"$globalState.session.merchantId != scope.scope.merchantNo"
>
修改
</el-button
>
<el-button
type=
"text"
@
click=
"handleAdd(scope.scope)"
v-if=
"scope.scope.status == 2 && $globalState.session.accountLevel != 4"
>
创建子商户/门店
</el-button
>
创建子商户/门店
</el-button
>
>
</
template
>
</
template
>
...
@@ -157,6 +180,9 @@ export default {
...
@@ -157,6 +180,9 @@ export default {
{
{
label
:
"关联的企业微信"
,
label
:
"关联的企业微信"
,
prop
:
"entmicroName"
,
prop
:
"entmicroName"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
"--"
;
},
},
},
{
{
label
:
"账户类型"
,
label
:
"账户类型"
,
...
@@ -184,6 +210,9 @@ export default {
...
@@ -184,6 +210,9 @@ export default {
{
{
label
:
"联系人"
,
label
:
"联系人"
,
prop
:
"merchantLegalPerson"
,
prop
:
"merchantLegalPerson"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
merchantLegalPerson
?
cellValue
.
merchantLegalPerson
:
"--"
;
},
},
},
{
{
label
:
"手机号"
,
label
:
"手机号"
,
...
@@ -198,14 +227,17 @@ export default {
...
@@ -198,14 +227,17 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
handleContact
()
{
this
.
$router
.
push
(
"/baseInfo/relevance/"
);
},
handleLook
(
scope
)
{
handleLook
(
scope
)
{
this
.
$router
.
push
(
"/account/detailAccount/"
+
scope
.
id
);
this
.
$router
.
push
(
"/account/detailAccount/"
+
scope
.
id
);
},
},
handleEdit
(
scope
)
{
handleEdit
(
scope
)
{
this
.
$router
.
push
(
"/account/editAccount/"
+
scope
.
id
);
this
.
$router
.
push
(
"/account/editAccount/"
+
scope
.
id
);
},
},
handleAdd
(
scope
)
{
handleAdd
(
scope
)
{
this
.
$router
.
push
(
"/account/addAccount/"
+
scope
.
id
);
this
.
$router
.
push
(
"/account/addAccount/"
+
scope
.
id
);
},
},
findAllDictData
(
dictType
)
{
findAllDictData
(
dictType
)
{
var
params
=
{
var
params
=
{
...
...
src/views/baseInfo/bloc.vue
View file @
0c53a5a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<div
class=
"tittle1 text_w"
>
门店名称
</div>
<div
class=
"tittle1 text_w"
>
门店名称
</div>
<div
class=
"tittle2 text_w"
>
有效期
</div>
<div
class=
"tittle2 text_w"
>
有效期
</div>
</div>
</div>
<div
class=
"line_body"
>
<div
class=
"line_body"
:style=
"
{height: tableHeight+ 'px'}"
>
<template
v-if=
"list.length"
>
<template
v-if=
"list.length"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
class=
"line_wrapper"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
class=
"line_wrapper"
>
<div
class=
"tittle"
>
{{
index
+
1
}}
</div>
<div
class=
"tittle"
>
{{
index
+
1
}}
</div>
...
@@ -66,9 +66,16 @@
...
@@ -66,9 +66,16 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
''
,
name
:
''
,
props
:
{
list
:
Array
,
bloc
:
null
},
data
()
{
data
()
{
return
{
return
{
curOpenIndex
:
0
,
curOpenIndex
:
0
,
tableHeight
:
0
,
dataList
:
[],
dataList
:
[],
leftData
:
[],
leftData
:
[],
rightData
:
[],
rightData
:
[],
...
@@ -88,10 +95,7 @@ export default {
...
@@ -88,10 +95,7 @@ export default {
isOpen
:
false
isOpen
:
false
}
}
},
},
props
:
{
list
:
Array
,
bloc
:
null
},
methods
:
{
methods
:
{
// changeLeftOpenStatus(item, index) {
// changeLeftOpenStatus(item, index) {
// this.leftData[index].open = !item.open
// this.leftData[index].open = !item.open
...
@@ -116,9 +120,14 @@ export default {
...
@@ -116,9 +120,14 @@ export default {
// console.log(right)
// console.log(right)
// }
// }
},
},
mounted
()
{}
}
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
;
this
.
tableHeight
=
clientHeight
-
475
;
}
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.bloc-info-module
{
.bloc-info-module
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -167,10 +176,6 @@ export default {
...
@@ -167,10 +176,6 @@ export default {
height
:
0
;
height
:
0
;
//
transition
:
height
0.1s
ease-in-out
;
//
transition
:
height
0.1s
ease-in-out
;
}
}
.table_wrapper_open
{
height
:
378px
;
//
transition
:
height
0.1s
ease-in-out
;
}
.line_wrapper
{
.line_wrapper
{
width
:
100%
;
width
:
100%
;
min-height
:
54px
;
min-height
:
54px
;
...
@@ -211,7 +216,6 @@ export default {
...
@@ -211,7 +216,6 @@ export default {
}
}
.line_body
{
.line_body
{
width
:
100%
;
width
:
100%
;
height
:
324px
;
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
...
...
src/views/baseInfo/relevance.vue
View file @
0c53a5a
...
@@ -40,9 +40,12 @@
...
@@ -40,9 +40,12 @@
</div>
</div>
</div>
</div>
<div
style=
"height: 64px"
></div>
<div
style=
"height: 64px"
></div>
<div
class=
"fixed-footer"
>
<div
class=
"fixed-footer"
:style=
"{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<div
:style=
"{ width: customWidth + 'px' }"
class=
"btn-custom"
@
click=
"closeCurRouter"
>
取消
</div>
<div
:style=
"{ width: customWidth + 'px' }"
class=
"btn-custom"
@
click=
"closeCurRouter"
>
取消
</div>
<div
style=
"width:
4
0px"
></div>
<div
style=
"width:
2
0px"
></div>
<div
:style=
"{ width: customWidth + 'px' }"
ref=
"btnWidth"
class=
"btn-custom pruple"
@
click=
"handleMutiGL"
>
确定关联({{ dataList.length }})
</div>
<div
:style=
"{ width: customWidth + 'px' }"
ref=
"btnWidth"
class=
"btn-custom pruple"
@
click=
"handleMutiGL"
>
确定关联({{ dataList.length }})
</div>
</div>
</div>
</div>
</div>
...
@@ -51,6 +54,7 @@
...
@@ -51,6 +54,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
departmentList
:
[],
departmentList
:
[],
...
@@ -89,11 +93,7 @@ export default {
...
@@ -89,11 +93,7 @@ export default {
selectedDepartment
:
''
selectedDepartment
:
''
}
}
},
},
created
()
{
this
.
getDepartmentList
()
this
.
getMerchantList
()
},
mounted
()
{},
methods
:
{
methods
:
{
// 设置底部按钮宽度
// 设置底部按钮宽度
setBtnWidth
()
{
setBtnWidth
()
{
...
@@ -270,9 +270,20 @@ export default {
...
@@ -270,9 +270,20 @@ export default {
return
arr1
return
arr1
}
}
},
created
()
{
this
.
getDepartmentList
()
this
.
getMerchantList
()
},
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
".base-container-right"
).
offsetLeft
;
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
;
}
}
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.gl-page
{
.gl-page
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -319,7 +330,7 @@ export default {
...
@@ -319,7 +330,7 @@ export default {
}
}
.tbale-wrapper
{
.tbale-wrapper
{
width
:
100%
;
width
:
100%
;
height
:
59
0px
;
min-height
:
20
0px
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0px
10px
20px
0px
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0px
10px
20px
0px
rgba
(
88
,
80
,
255
,
0.1
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
@@ -358,7 +369,7 @@ export default {
...
@@ -358,7 +369,7 @@ export default {
border-radius
:
4px
;
border-radius
:
4px
;
cursor
:
pointer
;
cursor
:
pointer
;
text-align
:
center
;
text-align
:
center
;
padding
:
8
px
0
;
padding
:
12
px
0
;
}
}
.pruple
{
.pruple
{
background
:
#5850ff
;
background
:
#5850ff
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment