Commit d9996f13 by cwq0219

商户表格

1 parent a0431127
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head>
<head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta content="IE=edge" /> <meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
...@@ -8,31 +9,82 @@ ...@@ -8,31 +9,82 @@
<meta name="author" content="GLSX Web Team" /> <meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" /> <meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" /> <link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
.search-block {
padding: 8px 8px;
}
</style>
<title>商户管理</title> <title>商户管理</title>
</head> </head>
<body>
<body>
<div id="app"> <div id="app">
<main> <main>
<div id="tree"></div> <!-- <div id="tree"></div> -->
<div class="search-block">
<form class="layui-form">
<div class="layui-inline">
<div class="layui-input-inline" style="width: 120px;">
<select name="name" id="searchName" lay-filter="nameFilter"></select>
</div>
<div class="layui-input-inline" style="width: 300px;">
<input class="layui-input" placeholder="请输入" name="nameVal">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">客户状态:</label>
<div class="layui-input-inline">
<select name="status">
<option value="">请选择客户状态</option>
<option value="0">正常</option>
<option value="1">异常</option>
</select>
</div>
</div>
<div style="float: right;">
<div class="layui-inline">
<input class="layui-input" placeholder="请输入客户名称">
</div>
<div class="layui-inline">
<button class="layui-btn">查询</button>
</div>
</div>
</form>
</div>
<table class="layui-table" id="merchantTable"></table>
</main> </main>
</div> </div>
<script src="https://www.layuicdn.com/layui/layui.js"></script> <script src="https://www.layuicdn.com/layui/layui.js"></script>
<script src="/js/load.js"></script> <script src="/js/load.js"></script>
<script> <script>
layui.use(['gtree', 'request', 'store'], function () { layui.use(['gtree', 'request', 'store', 'table'], function () {
var tree = layui.gtree var tree = layui.gtree
var request = layui.request var request = layui.request
request({ a: 1 }) var table = layui.table
var inst = tree.create('tree', [ var form = layui.form
{ var $ = layui.$
var list = [{
id: '1',
RoleName: '账号登陆名'
}, {
id: '2',
RoleName: '手机号'
}]
var select = $("#searchName")
$.each(list, function (index, item) {
select.append(new Option(item.RoleName, item.id))
})
form.render('select')
// request({
// a: 1
// })
var inst = tree.create('tree', [{
id: 1, id: 1,
label: '一级菜单', label: '一级菜单',
children: [ children: [{
{
id: 4, id: 4,
label: '二级菜单', label: '二级菜单',
children: [ children: [{
{
id: 9, id: 9,
label: '三级功能', label: '三级功能',
children: [ children: [
...@@ -60,14 +112,12 @@ ...@@ -60,14 +112,12 @@
value: null value: null
} }
] ]
} }]
]
}, },
{ {
id: 2, id: 2,
label: '一级菜单2', label: '一级菜单2',
children: [ children: [{
{
id: 5, id: 5,
label: '二级菜单2', label: '二级菜单2',
children: [ children: [
...@@ -96,7 +146,78 @@ ...@@ -96,7 +146,78 @@
] ]
} }
]) ])
var merchantTable = table.render({
elem: '#merchantTable',
page: true,
// id: 'testReload',
cols: [
[{
field: '',
title: '序号'
}, {
field: '',
title: '商户号'
}, {
field: 'merchantName',
title: '商户名称'
}, {
field: 'accountTypeNames',
title: '账户类型'
}, {
field: 'merchantLoginAccount',
title: '登录账户'
}, {
field: 'merchantAccountLevel',
title: '账户等级'
}, {
field: '',
title: '上级商户'
}, {
field: 'status',
title: '账户状态'
}, {
field: '',
title: '联系人'
}, {
field: '',
title: '手机号'
}, {
field: '',
title: '商户地址'
}, {
field: 'expireDate',
title: '更新时间'
}]
]
})
getTabelList(merchantTable)
// 获取
function getTabelList(merchantTable, isResetPageNum = false) {
request({
pageNum: merchantTable.config.index,
pageSize: merchantTable.config.limit,
method: 'cn.com.glsx.merchants.menu.findMerchantByPage'
}, function (res) {
console.log(res)
// table.reload('testReload', {
// data: res.data.data
// })
var data = res.data
var options = {
data: data.data
}
if (isResetPageNum) {
options.page = {
curr: 1
}
}
merchantTable.reload(options)
})
}
}) })
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!