Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
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 f14783bb
authored
Aug 11, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户名显示
1 parent
8d6dd5fb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
57 deletions
html/components/header.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
login.html
html/components/header.html
View file @
f14783b
...
...
@@ -23,17 +23,18 @@
<div
class=
"bread-crumb"
></div>
</div>
<script>
layui
.
use
([
'element'
,
'request'
,
'helper'
],
function
()
{
layui
.
use
([
'element'
,
'request'
,
'helper'
],
function
()
{
var
element
=
layui
.
element
var
helper
=
layui
.
helper
element
.
init
()
highlight
()
bindEvents
()
// console.log(isAppend()
)
// var href = location.href.split('/'
)
// console.log(href)
// if () {
// var user = helper.store.get('user'
)
//
}
var
href
=
location
.
href
.
split
(
'/'
)
var
isDxternal
=
isAppend
(
)
if
(
isDxternal
&&
href
[
href
.
length
-
1
]
!=
'login.html'
)
{
var
user
=
helper
.
store
.
get
(
'user'
)
$
(
'#curMerchantName'
).
text
(
user
.
merchantName
)
}
})
function
highlight
()
{
...
...
html/merchant/detail.html
View file @
f14783b
...
...
@@ -115,7 +115,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
商户类型:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"merchantType"
></div>
<div
class=
"layui-form-mid layui-word-aux"
id=
"merchantType
Name
"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -284,7 +284,7 @@
'accountLevelName'
,
'merchantName'
,
'merchantAbbreviation'
,
'merchantType'
,
'merchantType
Name
'
,
'merchantOrgcode'
,
'merchantAddress'
,
'merchantLegalPerson'
,
...
...
@@ -312,9 +312,13 @@
}
request
(
params
,
function
(
res
)
{
console
.
log
(
res
,
'账户信息'
)
// businessScopeCustomize
if
(
res
.
code
==
'0'
)
{
roleData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
if
(
basicArr
[
i
]
==
'businessScopName'
&&
roleData
.
businessScopeCustomize
)
{
roleData
.
businessScopName
=
roleData
.
businessScopName
?
(
roleData
.
businessScopName
+
','
+
roleData
.
businessScopeCustomize
)
:
roleData
.
businessScopeCustomize
}
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
?
roleData
[
basicArr
[
i
]]
:
''
)
}
callback
(
roleData
.
accountTypes
)
...
...
html/merchant/edit.html
View file @
f14783b
...
...
@@ -109,7 +109,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -152,8 +153,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
联系电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -196,7 +197,8 @@
<label
class=
"layui-form-label"
></label>
<div>
<div
class=
"layui-input-inline"
>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
>
</div>
<div
class=
"layui-input-inline option-btns"
>
<button
type=
"button"
class=
"layui-btn btn-no-border"
data-type=
"handleAddScope"
>
...
...
@@ -271,8 +273,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登陆密码:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
type=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登陆密码"
required
lay-verify=
"required"
>
<input
class=
"layui-input"
type=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登陆密码"
required
lay-verify=
"required"
>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -296,7 +298,7 @@
</div>
<div
class=
"layui-form-item"
style=
"text-align: center;"
>
<button
id=
"firstBtn"
class=
"layui-btn"
lay-submit
lay-filter=
"handleFirstSubmit"
>
下一步
</button>
<button
class=
"layui-btn"
data-type=
"handleFirst
Cancel"
>
取消
</button>
<button
type=
"reset"
class=
"layui-btn"
data-type=
"handle
Cancel"
>
取消
</button>
</div>
</form>
</div>
...
...
@@ -599,7 +601,8 @@
var
child1
=
$
(
'<div class="layui-input-inline"></div>'
)
var
inputEl
=
$
(
'<input class="layui-input business-scope-cust" maxlength="15" placeholder="请自定义营业范围,建议不超过10个">'
)
var
inputEl
=
$
(
'<input class="layui-input business-scope-cust" maxlength="15" placeholder="请自定义营业范围,建议不超过10个">'
)
var
child2
=
$
(
'<div class="layui-input-inline"></div>'
)
...
...
@@ -627,11 +630,6 @@
subParent
.
append
(
child2
)
parent
.
append
(
subParent
)
},
handleFirstCancel
()
{
// go(-1)
window
.
history
.
back
()
return
false
},
handleCancel
()
{
go
(
'merchant'
,
'index'
)
return
false
...
...
html/merchant/index.html
View file @
f14783b
...
...
@@ -19,18 +19,6 @@
margin
:
10px
20px
;
}
/* .merchant .layui-table-cell {
height: auto;
overflow: visible;
text-overflow: inherit;
white-space: normal;
height: auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} */
.merchant
#searchForm
.layui-inline
{
margin-bottom
:
5px
;
}
...
...
@@ -45,7 +33,6 @@
<body>
<div
class=
"merchant"
id=
"app"
>
<main
class=
"bg-white"
>
<!-- <div id="tree"></div> -->
<div
class=
"context-block"
>
<div
class=
"search-block"
>
<form
class=
"layui-form"
lay-filter=
"searchFilter"
id=
"searchForm"
>
...
...
@@ -84,7 +71,7 @@
<option
value=
"1"
>
手机号
</option>
</select>
</div>
<div
class=
"layui-input-inline"
style=
"width: 300px;"
>
<div
class=
"layui-input-inline"
style=
"width: 300px;
margin-left: -5px;
"
>
<input
class=
"layui-input"
placeholder=
"请输入"
name=
"merchantLoginAccount"
>
</div>
</div>
...
...
@@ -125,10 +112,9 @@
<
li
><
span
>
{{
item
}}
<
/span></
li
>
<!--
<
a
class
=
"layui-text"
>
{{
d
.
accountTypeNames
}}
<
/a> --
>
{{
#
});
}
else
{
}}
<
a
class
=
"layui-text"
>-<
/a
>
<
a
class
=
"layui-text"
>-<
/a
>
{{
#
}
}}
<
/ul
>
</script>
<script
type=
"text/html"
id=
"merchantBtns"
>
<
div
>
...
...
@@ -183,11 +169,10 @@
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
limit
);
//得到每页显示的条数
//
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
//
console.log(obj.limit); //得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
// getTabelList()
//首次不执行
if
(
!
first
)
{
//do something
...
...
@@ -199,10 +184,7 @@
var
merchantTable
=
table
.
render
({
elem
:
'#merchantTable'
,
page
:
false
,
skin
:
'line'
,
// done: function (res, curr, count) {
// console.log(res)
// },
skin
:
'line'
,
cols
:
[
[{
field
:
'index'
,
...
...
@@ -269,7 +251,7 @@
// console.log(obj)
var
eventName
=
obj
.
event
var
row
=
obj
.
data
console
.
log
(
row
)
//
console.log(row)
switch
(
eventName
)
{
// 查看
case
'handleDetail'
:
...
...
@@ -416,7 +398,7 @@
item
.
btn
.
createSubMerchant
=
true
}
}
else
{
// 下级商户
console
.
log
(
item
)
//
console.log(item)
item
.
btn
.
edit
=
true
item
.
btn
.
editPeriod
=
true
// 直属门店
...
...
login.html
View file @
f14783b
...
...
@@ -65,22 +65,15 @@
var
helper
=
layui
.
helper
//监听提交
form
.
on
(
'submit(formLogin)'
,
function
(
data
)
{
var
params
=
helper
.
clone
(
false
,
{
method
:
'org.ore.api.example.login'
},
data
.
field
)
var
params
=
helper
.
clone
(
false
,
{
method
:
'org.ore.api.example.login'
},
data
.
field
)
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
var
sessionId
=
result
.
data
.
sessionId
helper
.
store
.
set
(
'token'
,
sessionId
)
helper
.
store
.
set
(
'user'
,
result
.
data
)
go
(
'merchant'
,
'index'
)
// function() {
console
.
log
(
isAppend
())
if
(
isAppend
())
{
console
.
log
(
'_------'
)
var
user
=
helper
.
store
.
get
(
'user'
)
console
.
log
(
user
)
document
.
getElementById
(
'curMerchantName'
).
innerHTML
=
user
.
merchantName
||
""
;
}
// }
}
})
return
false
...
...
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