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 1e072f3d
authored
Nov 16, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug
1 parent
b50d21a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
12 deletions
src/views/account/addAccount.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/employee/editEmployee.vue
src/views/account/addAccount.vue
View file @
1e072f3
...
@@ -226,7 +226,7 @@ export default {
...
@@ -226,7 +226,7 @@ export default {
},
},
handleSave
(
status
)
{
handleSave
(
status
)
{
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
if
(
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
if
(
status
==
2
&&
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
this
.
$message
.
error
(
"请选择产品"
);
this
.
$message
.
error
(
"请选择产品"
);
return
;
return
;
}
}
...
@@ -319,7 +319,7 @@ export default {
...
@@ -319,7 +319,7 @@ export default {
.
join
(
","
);
.
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
;
params
.
status
=
this
.
accountDetail
.
status
;
params
.
status
=
1
;
params
.
channelId
=
this
.
accountDetail
.
channelId
;
params
.
channelId
=
this
.
accountDetail
.
channelId
;
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
let
businessScopeCustomize
=
this
.
businessScopeCustomize
.
map
((
item
)
=>
item
.
name
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
params
.
businessScopeCustomize
=
businessScopeCustomize
.
join
(
","
);
...
@@ -411,6 +411,7 @@ export default {
...
@@ -411,6 +411,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
this
.
footerLeft
=
document
.
querySelector
(
".base-container-right"
).
offsetLeft
;
this
.
footerLeft
=
document
.
querySelector
(
".base-container-right"
).
offsetLeft
;
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
;
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
;
this
.
accountAddForm
.
parentId
=
this
.
$route
.
params
.
id
;
this
.
accountAddForm
.
parentId
=
this
.
$route
.
params
.
id
;
...
...
src/views/account/detailAccount.vue
View file @
1e072f3
...
@@ -340,6 +340,29 @@ export default {
...
@@ -340,6 +340,29 @@ export default {
// },
// },
methods
:
{
methods
:
{
//将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData
(
initialData
)
{
const
isEmpty
=
function
(
val
)
{
if
(
!
String
(
val
)
||
String
(
val
)
===
'null'
)
{
return
'-'
}
return
val
}
var
that
=
this
if
(
initialData
instanceof
Array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
array
[
key
]
=
that
.
formateNullFieldData
(
val
)
})
}
else
if
(
initialData
instanceof
Object
)
{
for
(
let
pro
in
initialData
)
{
initialData
[
pro
]
=
that
.
formateNullFieldData
(
initialData
[
pro
])
}
}
else
{
//数据为基本类型时
initialData
=
isEmpty
(
initialData
)
}
return
initialData
},
handleCancel
()
{
handleCancel
()
{
this
.
$router
.
push
(
'/account/index'
)
this
.
$router
.
push
(
'/account/index'
)
},
},
...
@@ -390,7 +413,6 @@ export default {
...
@@ -390,7 +413,6 @@ export default {
getSecondTree
()
{
getSecondTree
()
{
this
.
$apis
.
merchant
.
getSecondTree
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
this
.
$apis
.
merchant
.
getSecondTree
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'二页的树'
,
res
)
this
.
secondTreeList
=
res
this
.
secondTreeList
=
res
this
.
expandedIds
=
res
.
map
(
item
=>
item
.
id
)
this
.
expandedIds
=
res
.
map
(
item
=>
item
.
id
)
}
}
...
@@ -407,7 +429,10 @@ export default {
...
@@ -407,7 +429,10 @@ export default {
this
.
$apis
.
merchant
.
getSecondTable
(
param
).
then
(
res
=>
{
this
.
$apis
.
merchant
.
getSecondTable
(
param
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
console
.
log
(
'2'
,
res
)
console
.
log
(
'2'
,
res
)
this
.
subMerchantTableList
=
res
let
data
=
this
.
formateNullFieldData
(
res
)
this
.
subMerchantTableList
=
data
// this.subMerchantTableList = res
this
.
subMerchantTableTotal
=
res
.
length
this
.
subMerchantTableTotal
=
res
.
length
}
}
if
(
res
&&
res
.
length
==
0
)
{
if
(
res
&&
res
.
length
==
0
)
{
...
...
src/views/account/editAccount.vue
View file @
1e072f3
...
@@ -242,7 +242,7 @@ export default {
...
@@ -242,7 +242,7 @@ export default {
],
],
merchantLoginPassword
:
[
merchantLoginPassword
:
[
{
required
:
true
,
message
:
"请输入登录密码"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入登录密码"
,
trigger
:
"blur"
},
{
min
:
6
,
max
:
15
,
message
:
"长度在 6 到 15 个字符"
,
trigger
:
"blur"
}
{
min
:
6
,
max
:
15
,
message
:
"长度在 6 到 15 个字符"
,
trigger
:
"blur"
}
,
],
],
},
},
};
};
...
@@ -308,7 +308,7 @@ export default {
...
@@ -308,7 +308,7 @@ export default {
//保存
//保存
handleSave
(
status
)
{
handleSave
(
status
)
{
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
if
(
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
if
(
status
==
2
&&
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
this
.
$message
.
error
(
"请选择产品"
);
this
.
$message
.
error
(
"请选择产品"
);
return
;
return
;
}
}
...
@@ -373,6 +373,9 @@ export default {
...
@@ -373,6 +373,9 @@ export default {
if
(
params
.
bussinessTime
)
{
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
];
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
];
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
];
params
.
bussinessEndtime
=
params
.
bussinessTime
[
1
];
}
else
{
params
.
bussinessBegintime
=
""
;
params
.
bussinessEndtime
=
""
;
}
}
if
(
params
.
businessScope
)
{
if
(
params
.
businessScope
)
{
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
params
.
businessScope
=
params
.
businessScope
.
join
(
","
);
...
@@ -480,6 +483,8 @@ export default {
...
@@ -480,6 +483,8 @@ export default {
name
:
item
,
name
:
item
,
};
};
});
});
}
else
{
this
.
businessScopeCustomize
=
[{
name
:
''
}];
}
}
this
.
accounttypeId
=
accountType
?
accountType
.
split
(
","
)
:
[];
this
.
accounttypeId
=
accountType
?
accountType
.
split
(
","
)
:
[];
if
(
this
.
accounttypeId
.
length
>
0
)
{
if
(
this
.
accounttypeId
.
length
>
0
)
{
...
@@ -521,8 +526,9 @@ export default {
...
@@ -521,8 +526,9 @@ export default {
status
,
status
,
accounttypeId
:
accountType
,
accounttypeId
:
accountType
,
});
});
console
.
log
(
accounttypeId
);
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
();
this
.
editStatus
=
false
;
this
.
editStatus
=
false
;
});
});
},
},
...
@@ -533,6 +539,7 @@ export default {
...
@@ -533,6 +539,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
document
.
querySelector
(
"#app"
).
scrollTop
=
0
;
this
.
footerLeft
=
document
.
querySelector
(
".base-container-right"
).
offsetLeft
;
this
.
footerLeft
=
document
.
querySelector
(
".base-container-right"
).
offsetLeft
;
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
;
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
;
this
.
accountAddForm
.
id
=
this
.
$route
.
params
.
id
;
this
.
accountAddForm
.
id
=
this
.
$route
.
params
.
id
;
...
...
src/views/account/index.vue
View file @
1e072f3
<
template
>
<
template
>
<div
class=
"scrm-main"
>
<div
class=
"scrm-main"
>
<div
class=
"form-header"
v-if=
"$globalState.session.accountLevel == 1"
>
<div
class=
"form-header"
v-if=
"$globalState.session.accountLevel == 1
&& $globalState.session.merchantModel == 1
"
>
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
<el-button
type=
"primary"
@
click=
"handleContact"
size=
"small"
icon=
"el-icon-link"
>
门店账户关联企微
</el-button
>
门店账户关联企微
</el-button
>
>
...
...
src/views/employee/editEmployee.vue
View file @
1e072f3
...
@@ -198,7 +198,7 @@ export default {
...
@@ -198,7 +198,7 @@ export default {
merchantTree
:
[],
merchantTree
:
[],
roleList
:
[]
roleList
:
[]
}
}
}
}
;
},
},
watch
:
{
watch
:
{
...
@@ -309,7 +309,8 @@ export default {
...
@@ -309,7 +309,8 @@ export default {
this
.
editForm
.
password
=
''
this
.
editForm
.
password
=
''
},
},
handleJumpRole
()
{
handleJumpRole
()
{
this
.
$history
.
push
(
'/role/create/'
+
0
)
let
path
=
document
.
location
.
pathname
.
split
(
'/'
)[
1
]
this
.
$history
.
push
(
'/'
+
path
+
'/role/create'
)
},
},
handleRefresh
()
{
handleRefresh
()
{
this
.
editForm
.
merchantId
this
.
editForm
.
merchantId
...
@@ -371,7 +372,7 @@ export default {
...
@@ -371,7 +372,7 @@ export default {
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
this
.
setMerchantMd
()
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
this
.
setMerchantMd
()
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.config-employee
{
.config-employee
{
...
@@ -446,4 +447,4 @@ export default {
...
@@ -446,4 +447,4 @@ export default {
.config-employee
.m-l-10
{
.config-employee
.m-l-10
{
margin-left
:
10px
;
margin-left
:
10px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ 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