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 8d628282
authored
Aug 11, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
UI提出需要改动的样式
1 parent
8d6dd5fb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
51 deletions
css/employee.css
css/layui.css
css/main.css
css/merchant.css
html/employee/index.html
html/merchant/detail.html
html/merchant/index.html
html/role/index.html
js/helper.js
css/employee.css
View file @
8d62828
.bg-white
{
background-color
:
#fff
;
margin
:
20px
;
/* background-color: #F7F7F7; */
/* margin: 20px; */
}
.content-title
{
...
...
css/layui.css
View file @
8d62828
...
...
@@ -6,7 +6,15 @@
.layui-textarea
:focus
{
border-color
:
#1989FA
!important
;
}
.layui-input
{
border-radius
:
4px
;
}
.layui-form-pane
.layui-input-inline
{
margin-left
:
-4px
;
}
.layui-form-pane
.layui-form-item
[
pane
]
{
border-style
:
none
;
}
.layui-form-label.required
::before
{
content
:
'*'
;
display
:
inline-block
;
...
...
@@ -16,6 +24,7 @@
.layui-laypage-btn
,
.layui-btn
{
background-color
:
#1989FA
!important
;
border-radius
:
4px
;
color
:
#ffffff
;
}
...
...
@@ -96,15 +105,33 @@
border-color
:
#1989FA
!important
;
}
/* 分页器的修改 */
.layui-laypage
button
{
border-radius
:
4px
;
}
.layui-laypage
.layui-laypage-skip
input
:focus
{
border-color
:
#1989FA
!important
;
}
.layui-laypage
a
,
.layui-laypage
span
,
.layui-laypage
.layui-laypage-skip
{
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
}
/* 表格行内容高度自适应 */
.layui-table-cell
{
height
:
auto
;
overflow
:
visible
;
text-overflow
:
inherit
;
white-space
:
normal
;
/* 高度最多四行,超出省略号结尾 */
/* display: -webkit-box;
-webkit-box-orient: vertical;
line-clamp: 4;
overflow: hidden;
word-break: break-all; */
}
.layui-table-cell
li
{
list-style
:
disc
;
...
...
@@ -113,4 +140,4 @@ border-color: #1989FA!important;
}
.layui-table-cell
li
::marker
{
color
:
#1989FA
;
}
\ No newline at end of file
}
css/main.css
View file @
8d62828
...
...
@@ -10,6 +10,7 @@ html, body {
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
background-color
:
#f7f7f7
;
}
header
{
...
...
@@ -25,7 +26,7 @@ main::-webkit-scrollbar {
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.1
);
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
38
px
;
padding
:
0
20
px
;
}
.header-nav
{
...
...
@@ -93,9 +94,20 @@ main {
flex
:
1
;
min-height
:
calc
(
100%
-
60px
-
30px
);
overflow
:
auto
;
background-color
:
#f8f8f8
;
background-color
:
#F7F7F7
;
}
.search-block
{
padding
:
8px
20px
;
background-color
:
#ffffff
;
}
main
.table-page
{
background-color
:
#ffffff
;
margin
:
15px
20px
;
padding
:
5px
;
}
main
.table-page
tr
th
:last-child
.layui-table-cell
{
text-align
:
center
;
}
footer
{
height
:
30px
;
flex-shrink
:
0
;
...
...
css/merchant.css
View file @
8d62828
...
...
@@ -4,6 +4,8 @@
}
.merchant-left
{
width
:
500px
;
box-sizing
:
border-box
;
padding-left
:
20px
;
}
.merchant-right
{
flex
:
1
;
...
...
html/employee/index.html
View file @
8d62828
This diff is collapsed.
Click to expand it.
html/merchant/detail.html
View file @
8d62828
...
...
@@ -20,12 +20,17 @@
}
.merchant-content
#secondmerchantName
{
margin-left
:
15px
;
width
:
250px
;
height
:
24px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
24px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
.merchant-content
>
div
:not
(
:first-child
)
{
...
...
@@ -48,12 +53,18 @@
line-height
:
40px
;
}
.merchant-right
.companyName
{
display
:
inline-block
;
width
:
300px
;
height
:
36px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
36px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
.merchant-right
.layui-btn
{
position
:
absolute
;
...
...
@@ -168,7 +179,7 @@
<div
class=
"merchant-headerMsg"
>
<div
class=
"merchantImg"
><img
src=
"../../css/img/merchantImg.png"
alt=
""
></div>
<div
class=
"merchant-content"
>
<div
id=
"secondmerchantName"
></div>
<div
id=
"secondmerchantName"
></div>
<div>
商户号:
<span
id=
"secondmerchantId"
></span></div>
<div>
您共有
<span
id=
"numberOfSubMerchants"
></span>
个子商户,共有
<span
id=
"numberOfStores"
></span>
家门店
</div>
</div>
...
...
@@ -393,10 +404,12 @@
console
.
log
(
res
.
data
)
var
data
=
res
.
data
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
$
(
'#secondmerchantName'
).
attr
(
'title'
,
data
.
merchantName
);
$
(
'#secondmerchantId'
).
text
(
data
.
merchantNo
)
$
(
'#numberOfSubMerchants'
).
text
(
data
.
numberOfSubMerchants
)
$
(
'#numberOfStores'
).
text
(
data
.
numberOfStores
)
$
(
'#merchantNameTable'
).
text
(
data
.
merchantName
)
$
(
'#merchantNameTable'
).
attr
(
'title'
,
data
.
merchantName
+
'员工列表'
);
})
}
...
...
html/merchant/index.html
View file @
8d62828
...
...
@@ -10,13 +10,13 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<style>
.search-block
{
padding
:
8px
20px
;
background-color
:
#ffffff
;
}
/*
.merchant .layui-table-view {
margin
:
10px
20px
;
margin: -5px 20px;
} */
.merchant
.layui-table
{
margin
:
0
;
}
/* .merchant .layui-table-cell {
...
...
@@ -38,6 +38,10 @@
.layui-btn-xs
{
cursor
:
pointer
;
}
.channel
,
.accountLevel
,
.accountType
,
.customerStatus
{
margin-left
:
20px
;
}
</style>
<title>
商户管理
</title>
</head>
...
...
@@ -48,11 +52,11 @@
<!-- <div id="tree"></div> -->
<div
class=
"context-block"
>
<div
class=
"search-block"
>
<form
class=
"layui-form"
lay-filter=
"searchFilter"
id=
"searchForm"
>
<form
class=
"layui-form
layui-form-pane
"
lay-filter=
"searchFilter"
id=
"searchForm"
>
<div
class=
"layui-inline"
id=
"operateEl"
>
<button
class=
"layui-btn"
id=
"addBtn"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建商户
</button>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
channel"
pane
>
<label
class=
"layui-form-label"
>
渠道:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"channelId"
id=
"channelIdEl"
>
...
...
@@ -60,7 +64,7 @@
</select>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountLevel"
pane
>
<label
class=
"layui-form-label"
>
账户等级:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"merchantAccountLevel"
id=
"accountLevelEl"
>
...
...
@@ -68,7 +72,7 @@
</select>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountType"
pane
>
<label
class=
"layui-form-label"
>
账户类型:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"accounttypeId"
id=
"accountTypeIdEl"
>
...
...
@@ -77,7 +81,7 @@
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
loginName"
pane
>
<div
class=
"layui-input-inline"
style=
"width: 120px;"
>
<select
name=
"name"
lay-filter=
"nameFilter"
>
<option
value=
"0"
>
账号登陆名
</option>
...
...
@@ -88,7 +92,7 @@
<input
class=
"layui-input"
placeholder=
"请输入"
name=
"merchantLoginAccount"
>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
customerStatus"
pane
>
<label
class=
"layui-form-label"
>
客户状态:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"status"
id=
"searchStatusEl"
>
...
...
@@ -106,8 +110,10 @@
</div>
</form>
</div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
class=
"align-center"
></div>
<div
class=
"table-page"
>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
class=
"align-center"
></div>
</div>
</div>
</main>
</div>
...
...
@@ -221,6 +227,7 @@
field
:
'accountTypeNames'
,
title
:
'账户类型'
,
align
:
'left'
,
width
:
100
,
templet
:
'#accountTypeTpl'
},
{
field
:
'merchantLoginAccount'
,
...
...
@@ -250,17 +257,18 @@
field
:
'merchantAddress'
,
title
:
'商户地址'
,
align
:
'center'
,
width
:
1
4
0
width
:
1
8
0
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
align
:
'center'
,
width
:
120
},
{
align
:
'left'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
width
:
220
//
fixed: 'right'
width
:
220
,
fixed
:
'right'
}]
]
})
...
...
@@ -386,8 +394,7 @@
})
// console.log(params)
request
(
params
,
function
(
res
)
{
// console.log(res)
var
data
=
res
.
data
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
page
.
pageSize
*
(
page
.
pageNum
-
1
)
item
.
btn
=
{
...
...
@@ -528,6 +535,7 @@
getTabelList
()
}
})
</script>
</body>
...
...
html/role/index.html
View file @
8d62828
...
...
@@ -9,37 +9,47 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<title>
角色管理
</title>
<style>
.companyName
,
.searchBtn
{
margin-left
:
20px
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<div>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"layui-form-item"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建角色
</button>
<div
class=
"layui-inline"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"search-block"
>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"layui-form-item"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建角色
</button>
<div
class=
"layui-inline companyName"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
</select>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
角色名称
</label>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
</select>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
角色名称
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
<div
class=
"layui-inline searchBtn"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button>
</div>
</
div
>
<div
class=
"layui-inline"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button
>
<
/div
>
</form
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
<div
id=
"rolePage"
class=
"align-center"
></div>
</
form
>
</div
>
<div
class=
"table-page"
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
<div
id=
"rolePage"
class=
"align-center"
></div
>
<
/div
>
</div>
</main>
</div>
...
...
@@ -68,7 +78,7 @@
{
field
:
'roleCode'
,
title
:
'角色号'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'所属商户名'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#roleBar'
}
]
]
...
...
js/helper.js
View file @
8d62828
...
...
@@ -52,9 +52,35 @@ layui.define(['store'], function (exports) {
},
delay
)
}
}
//将后台返回数据中数值为空的字段全部替换为“-”
function
formateNullFieldData
(
initialData
)
{
const
isEmpty
=
function
(
val
)
{
if
(
String
(
val
)
===
'null'
)
{
return
'-'
;
}
return
val
;
}
if
(
initialData
instanceof
Array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
array
[
key
]
=
formateNullFieldData
(
val
)
})
}
else
if
(
initialData
instanceof
Object
)
{
for
(
let
pro
in
initialData
)
{
initialData
[
pro
]
=
formateNullFieldData
(
initialData
[
pro
])
}
}
else
{
//数据为基本类型时
initialData
=
isEmpty
(
initialData
)
}
return
initialData
;
}
exports
(
'helper'
,
{
clone
:
clone
,
store
:
layui
.
store
,
debounce
:
debounce
debounce
:
debounce
,
formateNullFieldData
:
formateNullFieldData
})
})
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