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 b50d21a5
authored
Nov 15, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
code
1 parent
d1256ca3
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
246 additions
and
62 deletions
src/assets/css/common.scss
src/components/mapView/index.vue
src/utils/util.js
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/baseInfo/relevance.vue
src/views/role/components/selectProduct.vue
src/assets/css/common.scss
View file @
b50d21a
...
...
@@ -131,7 +131,7 @@ img {
::-webkit-scrollbar
{
/*滚动条整体样式*/
width
:
6px
;
height
:
1
px
;
height
:
4
px
;
}
::-webkit-scrollbar-thumb
{
...
...
src/components/mapView/index.vue
View file @
b50d21a
...
...
@@ -12,7 +12,7 @@
<
script
>
import
AMap
from
"AMap"
;
let
map
,
placeSearch
;
let
map
,
marker
,
placeSearch
;
export
default
{
name
:
"map"
,
props
:
{
...
...
@@ -49,17 +49,20 @@ export default {
map
.
on
(
"click"
,
this
.
getAddress
);
placeSearch
.
on
(
"markerClick"
,
this
.
getAddress
);
},
// addMarker(lnglat) {
// let position = [lnglat.lng,lnglat.lat]
// const marker = new AMap.Marker({
// icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
// position,
// offset: new AMap.Pixel(-13, -30)
// });
// marker.setMap(map);
// },
addMarker
(
lnglat
)
{
let
position
=
[
lnglat
.
lng
,
lnglat
.
lat
]
marker
=
new
AMap
.
Marker
({
icon
:
new
AMap
.
Icon
({
image
:
"//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png"
,
size
:
new
AMap
.
Size
(
27
,
34
),
//图标大小
imageSize
:
new
AMap
.
Size
(
27
,
34
)
}),
position
:
position
,
offset
:
new
AMap
.
Pixel
(
-
13
,
-
30
)
});
marker
.
setMap
(
map
);
},
getAddress
(
e
)
{
console
.
log
(
e
)
let
self
=
this
;
let
lnglat
;
if
(
e
.
type
==
"click"
)
{
...
...
@@ -68,6 +71,10 @@ export default {
let
{
lng
,
lat
}
=
e
.
data
.
entr_location
?
e
.
data
.
entr_location
:
e
.
data
.
location
;
lnglat
=
[
lng
,
lat
];
}
if
(
marker
)
{
marker
.
setMap
(
null
);
marker
=
null
;
}
self
.
addMarker
(
lnglat
)
AMap
.
plugin
(
"AMap.Geocoder"
,
()
=>
{
const
geocoder
=
new
AMap
.
Geocoder
();
...
...
src/utils/util.js
View file @
b50d21a
...
...
@@ -25,9 +25,83 @@ util.checkPhone = function(mobile) {
/**
* 校验手机号码格式
*/
util
.
checkisCard
=
function
(
card
)
{
let
myreg
=
/^
(
^
\d{15}
$
)
|
(
^
\d{17}([
0-9
]
|X
)
$
)
/
;
return
myreg
.
test
(
card
);
util
.
checkIdCard
=
function
(
code
)
{
var
city
=
{
11
:
'北京'
,
12
:
'天津'
,
13
:
'河北'
,
14
:
'山西'
,
15
:
'内蒙古'
,
21
:
'辽宁'
,
22
:
'吉林'
,
23
:
'黑龙江'
,
31
:
'上海'
,
32
:
'江苏'
,
33
:
'浙江'
,
34
:
'安徽'
,
35
:
'福建'
,
36
:
'江西'
,
37
:
'山东'
,
41
:
'河南'
,
42
:
'湖北'
,
43
:
'湖南'
,
44
:
'广东'
,
45
:
'广西'
,
46
:
'海南'
,
50
:
'重庆'
,
51
:
'四川'
,
52
:
'贵州'
,
53
:
'云南'
,
54
:
'西藏'
,
61
:
'陕西'
,
62
:
'甘肃'
,
63
:
'青海'
,
64
:
'宁夏'
,
65
:
'新疆'
,
71
:
'台湾'
,
81
:
'香港'
,
82
:
'澳门'
,
91
:
'国外 '
}
// var tip = ''
var
pass
=
true
// 身份证位数为15或18位
// if (![15, 18].includes(code.length)) {
if
(
!
((
code
.
length
==
15
)
||
(
code
.
length
==
18
)))
{
pass
=
false
}
else
if
(
!
code
||
(
code
.
length
===
18
&&
!
/^
\d{6}(
18|19|20
)\d{2}(
0
[
1-9
]
|1
[
012
])(
0
[
1-9
]
|
[
12
]\d
|3
[
01
])\d{3}(\d
|X
)
$/i
.
test
(
code
)))
{
// tip = '身份证号格式错误'
pass
=
false
}
else
if
(
code
.
length
===
15
&&
!
/^
\d{6}\d{2}(
0
[
1-9
]
|1
[
012
])(
0
[
1-9
]
|
[
12
]\d
|3
[
01
])\d{3}
$/i
.
test
(
code
))
{
pass
=
false
}
else
if
(
!
city
[
code
.
substr
(
0
,
2
)])
{
// tip = '地址编码错误'
pass
=
false
}
else
{
// 18位身份证需要验证最后一位校验位
if
(
code
.
length
===
18
)
{
code
=
code
.
split
(
''
)
// ∑(ai×Wi)(mod 11)
// 加权因子
var
factor
=
[
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
]
// 校验位
var
parity
=
[
1
,
0
,
'X'
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
]
var
sum
=
0
var
ai
=
0
var
wi
=
0
for
(
var
i
=
0
;
i
<
17
;
i
++
)
{
ai
=
code
[
i
]
wi
=
factor
[
i
]
sum
+=
ai
*
wi
}
// var last = parity[sum % 11]
if
(
parity
[
sum
%
11
]
!=
code
[
17
])
{
// tip = '校验位错误'
pass
=
false
}
}
}
return
pass
}
util
.
deepClone
=
function
(
obj
)
{
// Handle the 3 simple types, and null or undefined or function
...
...
src/views/account/addAccount.vue
View file @
b50d21a
...
...
@@ -178,7 +178,7 @@ export default {
dialogMapVisible
:
false
,
businessScopeCustomize
:
[{
name
:
""
}],
accountAddForm
:
{
status
:
1
,
status
:
""
,
merchantFiles
:
[],
merchantType
:
1
,
businessScope
:
[],
...
...
@@ -204,7 +204,7 @@ export default {
{
min
:
3
,
max
:
15
,
message
:
"长度在 3 到 15 个字符"
,
trigger
:
"blur"
},
],
merchantLoginPassword
:
[
{
required
:
true
,
message
:
"请输入登录
账户名
"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入登录
密码
"
,
trigger
:
"blur"
},
{
min
:
6
,
max
:
15
,
message
:
"长度在 6 到 15 个字符"
,
trigger
:
"blur"
},
],
},
...
...
@@ -225,11 +225,12 @@ export default {
}
},
handleSave
(
status
)
{
if
(
this
.
$refs
.
productForm
.
getSelectInfo
().
length
==
0
)
{
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
if
(
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
this
.
$message
.
error
(
"请选择产品"
);
return
;
}
let
accountTypes
=
JSON
.
stringify
(
this
.
$refs
.
productForm
.
getSelectInfo
()
);
let
accountTypes
=
JSON
.
stringify
(
product
);
let
params
=
{
accountTypes
,
status
,
...
...
@@ -245,6 +246,7 @@ export default {
this
.
$router
.
push
(
"/account/index"
);
},
handlePrev
()
{
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
this
.
step
=
1
;
},
//下一步
...
...
@@ -252,11 +254,27 @@ export default {
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
else
{
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"is-error"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
reject
();
}
});
});
const
pm2
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
accountInfoForm
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
else
{
pm1
.
then
(()
=>
{
document
.
querySelector
(
"#app"
).
scrollTop
=
1000
;
});
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"is-error"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
}
});
});
if
(
this
.
accounttypeId
.
length
==
0
)
{
...
...
@@ -266,9 +284,26 @@ export default {
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
check
is
Card
(
this
.
accountAddForm
.
merchantOrgcode
)
!
util
.
check
Id
Card
(
this
.
accountAddForm
.
merchantOrgcode
)
)
{
this
.
$message
.
error
(
"请输入正确的身份证号码"
);
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"card-input"
);
isError
[
0
].
querySelectorAll
(
".el-input__inner"
)[
1
].
focus
();
},
100
);
return
;
}
if
(
this
.
accountAddForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
accountAddForm
.
residentPhone
)
)
{
this
.
$message
.
error
(
"请输入正确的驻店电话"
);
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"phone-input"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
return
;
}
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
);
...
...
@@ -279,16 +314,17 @@ export default {
if
(
params
.
businessScope
)
{
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
}
console
.
log
(
this
.
$refs
.
baseInfoForm
);
params
.
merchantBrand
=
this
.
$refs
.
baseInfoForm
.
$refs
.
brandTree
.
getCheckedKeys
()
.
join
(
","
);
params
.
isloginName
?
(
params
.
isloginName
=
1
)
:
(
params
.
isloginName
=
0
);
params
.
merchantAccountLevel
=
this
.
accountDetail
.
merchantAccountLevel
;
params
.
status
=
this
.
accountDetail
.
status
;
params
.
channelId
=
this
.
accountDetail
.
channelId
;
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
params
.
accounttypeId
=
this
.
accounttypeId
.
join
(
","
);
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
params
.
merchantFiles
=
JSON
.
stringify
(
params
.
merchantFiles
)
;
params
.
merchantModel
=
this
.
accountDetail
.
merchantModel
;
let
merchant
;
if
(
this
.
nextStatus
)
{
...
...
@@ -297,6 +333,7 @@ export default {
}
else
{
merchant
=
"saveMerchant"
;
}
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
Promise
.
all
([
pm1
,
pm2
]).
then
(()
=>
{
this
.
$apis
.
store
[
merchant
](
params
).
then
((
res
)
=>
{
if
(
res
)
{
...
...
@@ -309,7 +346,7 @@ export default {
id
:
this
.
parentId
,
parentId
:
this
.
accountAddForm
.
parentId
,
};
this
.
$refs
.
productForm
.
findMenuFunTreeByMerId
(
para
,
this
.
accounttypeId
);
this
.
$refs
.
productForm
.
findMenuFunTreeByMerId
(
para
,
this
.
accounttypeId
);
}
this
.
twoMerchantDetail
(
this
.
parentId
);
}
...
...
@@ -344,12 +381,12 @@ export default {
return
item
.
dictValue
!=
1
&&
item
.
dictValue
!=
3
;
});
this
.
accountDetail
.
merchantAccountLevel
=
2
;
}
else
if
(
this
.
accountDetail
.
merchantAccountLevel
==
2
)
{
}
else
if
(
this
.
accountDetail
.
merchantAccountLevel
==
2
)
{
this
.
accountLevel
=
res
.
filter
((
item
)
=>
{
return
item
.
dictValue
!=
1
&&
item
.
dictValue
!=
2
;
});
this
.
accountDetail
.
merchantAccountLevel
=
3
;
}
else
{
}
else
{
this
.
accountLevel
=
res
.
filter
((
item
)
=>
{
return
item
.
dictValue
==
4
;
});
...
...
src/views/account/components/baseInfo.vue
View file @
b50d21a
...
...
@@ -47,6 +47,7 @@
<el-input
size=
"small"
maxlength=
"18"
class=
"card-input"
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入正确的身份证号"
v-if=
"accountAddForm.merchantType == 1"
...
...
@@ -113,6 +114,7 @@
<el-input
maxlength=
"11"
size=
"small"
class=
"phone-input"
v-model=
"accountAddForm.residentPhone"
placeholder=
"请输入驻店电话"
></el-input>
...
...
@@ -202,9 +204,11 @@
:key=
"index"
v-for=
"(item, index) in accountAddForm.merchantFiles"
class=
"store-border"
@
mouseenter=
"imgIndex = index"
@
mouseleave=
"imgIndex = ''"
>
<img
:src=
"item.fileUrl"
/>
<div
class=
"uploader-del-icon"
>
<div
class=
"uploader-del-icon"
v-if=
"imgIndex === index"
>
<i
class=
"el-icon-delete-solid"
@
click
.
stop=
"delImg(index)"
></i>
</div>
</div>
...
...
@@ -267,6 +271,7 @@ export default {
}
};
return
{
imgIndex
:
''
,
filterText
:
""
,
defaultProps
:
{
children
:
"children"
,
...
...
@@ -319,13 +324,17 @@ export default {
upLoadImg
(
file
)
{
let
fileName
=
file
.
name
;
if
(
file
.
name
.
lastIndexOf
(
"."
)
===
-
1
)
{
this
.
$message
.
info
(
"路径不正确"
);
this
.
$message
.
warning
(
"路径不正确"
);
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
(
"图片格式不正确"
);
this
.
$message
.
warning
(
"图片格式不正确"
);
return
false
;
}
if
(
this
.
accountAddForm
.
merchantFiles
.
length
==
3
)
{
this
.
$message
.
warning
(
"最多上传3张"
);
return
false
;
}
// if (fileSize < 3145728) {
...
...
src/views/account/detailAccount.vue
View file @
b50d21a
...
...
@@ -11,21 +11,21 @@
<span
class=
"content-title"
>
账户信息
</span>
<div
class=
"detail-content"
>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
登录账户名:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
merchantLoginAccount
||
'-'
}}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
账户等级:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
accountLevelName
||
'-'
}}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
开通模式:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
merchantModelName
||
'-'
}}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
账户状态:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
statusName
||
'-'
}}
...
...
@@ -33,11 +33,11 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
关联企业微信名:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
entmicroName
||
'-'
}}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
账户有效期:
</span>
<span
class=
"itemValue"
>
{{
firstPageObj
.
effectiveTimeName
}}
</span>
</el-col>
...
...
@@ -82,13 +82,13 @@
<div
class=
"MsgWrap companyMsg"
>
<div
class=
"grayLine"
></div>
<span
class=
"content-title"
>
企业信息
</span>
<div
class=
"detail-content"
>
<div
class=
"detail-content"
style=
"flex"
>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
商户名称:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantName || '-' }}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
简称:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantAbbreviation || '-' }}
...
...
@@ -96,40 +96,43 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
商户类型:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantTypeName || '-' }}
</span>
</el-col>
<el-col
:span=
"10"
>
<span
class=
"itemName itemNameCol2"
>
身份证:
</span>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
v-if=
"firstPageObj.merchantType == 2"
>
组织机构代码:
</span>
<span
class=
"itemName itemNameCol2"
v-else
>
身份证:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantOrgcode || '-' }}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
地址:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantAddress || '-' }}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
联系人:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantLegalPerson || '-' }}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
class=
"flexCol"
>
<span
class=
"itemName"
>
联系电话:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantLegalPersonPhone || '-' }}
</span>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
class=
"flexCol"
>
<span
class=
"itemName itemNameCol2"
>
营业范围:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.businessScopName || '-' }}
</span>
<!-- roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize -->
<span
class=
"itemValue"
>
{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
24
"
>
<el-col
:span=
"
12"
class=
"flexCol
"
>
<span
class=
"itemName"
>
主营品牌:
</span>
<span
class=
"itemValue"
>
{{ firstPageObj.merchantBrandName || '-' }}
</span>
</el-col>
...
...
@@ -164,7 +167,8 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"filterTreeListFun"
>
查询
</el-button>
</div>
<div
class=
"secondTreeWrap"
>
<el-tree
ref=
"tree"
:default-expanded-keys=
"expandedIds"
:data=
"secondTreeList"
node-key=
"id"
:filter-node-method=
"filterNode"
>
<!-- :default-expanded-keys="expandedIds" -->
<el-tree
ref=
"tree"
default-expand-all
:data=
"secondTreeList"
node-key=
"id"
:filter-node-method=
"filterNode"
>
<!--知识点过长处理,鼠标悬浮文字弹框显示全部内容-->
<span
slot-scope=
"{ node }"
class=
"custom-tree-node"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"node.label"
placement=
"top-start"
>
...
...
@@ -291,7 +295,7 @@ export default {
},
{
label
:
'修改内容'
,
prop
:
'
modifyContent
'
prop
:
'
action
'
},
{
label
:
'操作人'
,
...
...
@@ -515,6 +519,9 @@ export default {
//
padding-bottom
:
30px
;
.el-row
{
margin-top
:
20px
;
.flexCol
{
display
:
flex
;
}
.itemName
{
display
:
inline-block
;
margin-right
:
10px
;
...
...
@@ -527,14 +534,17 @@ export default {
line-height
:
20px
;
}
.itemNameCol2
{
width
:
9
0px
;
width
:
10
0px
;
}
.itemValue
{
height
:
20px
;
//
height
:
20px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
20px
;
//
line-height
:
20px
;
display
:
inline-block
;
width
:
calc
(
100%
-
200px
);
}
.account-type-span
{
display
:
inline-block
;
...
...
src/views/account/editAccount.vue
View file @
b50d21a
...
...
@@ -241,7 +241,8 @@ export default {
{
required
:
true
,
message
:
"请输入登录账户名"
,
trigger
:
"blur"
},
],
merchantLoginPassword
:
[
{
required
:
true
,
message
:
"请输入登录账户名"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入登录密码"
,
trigger
:
"blur"
},
{
min
:
6
,
max
:
15
,
message
:
"长度在 6 到 15 个字符"
,
trigger
:
"blur"
}
],
},
};
...
...
@@ -306,7 +307,8 @@ export default {
},
//保存
handleSave
(
status
)
{
if
(
this
.
$refs
.
productForm
.
getSelectInfo
().
length
==
0
)
{
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
if
(
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
this
.
$message
.
error
(
"请选择产品"
);
return
;
}
...
...
@@ -327,13 +329,46 @@ export default {
const
pm1
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"is-error"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
});
});
const
pm2
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
.
accountInfoForm
.
validate
((
valid
)
=>
{
if
(
valid
)
resolve
();
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"is-error"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
});
});
if
(
this
.
accountAddForm
.
merchantType
==
1
&&
this
.
accountAddForm
.
merchantOrgcode
&&
!
util
.
checkIdCard
(
this
.
accountAddForm
.
merchantOrgcode
)
)
{
this
.
$message
.
error
(
"请输入正确的身份证号码"
);
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"card-input"
);
isError
[
0
].
querySelectorAll
(
".el-input__inner"
)[
1
].
focus
();
},
100
);
return
;
}
if
(
this
.
accountAddForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
accountAddForm
.
residentPhone
)
)
{
this
.
$message
.
error
(
"请输入正确的驻店电话"
);
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
"phone-input"
);
isError
[
0
].
querySelector
(
"input"
).
focus
();
},
100
);
return
;
}
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
);
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
];
...
...
@@ -418,7 +453,11 @@ export default {
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
,
}
=
res
;
this
.
accountInfoForm
.
merchantLoginAccount
=
merchantLoginAccount
;
this
.
accountInfoForm
.
merchantLoginPassword
=
merchantLoginPassword
;
...
...
@@ -442,9 +481,9 @@ export default {
};
});
}
accounttypeId
=
accounttypeId
?
accounttypeId
.
split
(
","
)
:
[];
if
(
accounttypeId
.
length
>
0
)
{
this
.
accounttypeId
=
accounttypeId
.
map
((
item
)
=>
{
this
.
accounttypeId
=
accountType
?
accountType
.
split
(
","
)
:
[];
if
(
this
.
accounttypeId
.
length
>
0
)
{
this
.
accounttypeId
=
this
.
accounttypeId
.
map
((
item
)
=>
{
return
{
name
:
item
,
};
...
...
@@ -477,7 +516,12 @@ export default {
residentPhone
,
merchantAccountLevel
,
merchantModel
,
parentId
,
channelId
,
status
,
accounttypeId
:
accountType
,
});
console
.
log
(
accounttypeId
);
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
;
});
...
...
src/views/account/index.vue
View file @
b50d21a
...
...
@@ -201,6 +201,9 @@ export default {
{
label
:
"上级商户"
,
prop
:
"parentMerchant"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
"--"
;
},
},
{
label
:
"账户状态"
,
...
...
@@ -221,7 +224,7 @@ export default {
},
{
label
:
"更新时间"
,
prop
:
"updatedTime"
prop
:
"updatedTime"
,
},
],
},
...
...
@@ -250,13 +253,13 @@ export default {
this
.
$apis
.
store
.
findAllDictData
(
params
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
dictType
==
"account_level"
)
{
this
.
accountLevel
=
res
;
this
.
accountLevel
=
[{
dictValue
:
""
,
dictLabel
:
"全部"
}].
concat
(
res
)
;
}
if
(
dictType
==
"account_type"
)
{
this
.
accountType
=
res
;
}
if
(
dictType
==
"merchant_status"
)
{
this
.
merchantStatus
=
res
;
this
.
merchantStatus
=
[{
dictValue
:
""
,
dictLabel
:
"全部"
}].
concat
(
res
)
;
}
}
});
...
...
src/views/baseInfo/relevance.vue
View file @
b50d21a
...
...
@@ -125,7 +125,7 @@ export default {
this
.
$refs
.
cascaderRef
.
dropDownVisible
=
false
},
getDepartmentList
()
{
this
.
$apis
.
baseInfo
.
getDepartment
({
id
:
1
}).
then
(
res
=>
{
this
.
$apis
.
baseInfo
.
getDepartment
({
id
:
1
,
flag
:
'false'
}).
then
(
res
=>
{
this
.
departmentList
=
this
.
traverse
(
1
,
res
,
'relevanceMerchant'
)
})
},
...
...
src/views/role/components/selectProduct.vue
View file @
b50d21a
...
...
@@ -370,7 +370,7 @@ export default {
// this.findPermissionsByMerId()
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.account-body
{
...
...
@@ -469,4 +469,4 @@ export default {
margin-bottom
:
12px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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