Commit 286343ce by 胡悦

商户添加搜索条件

1 parent e23acfa0
<!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" />
...@@ -81,14 +82,25 @@ ...@@ -81,14 +82,25 @@
display: -webkit-box; display: -webkit-box;
word-break: break-all; word-break: break-all;
} }
.input-before-name { .input-before-name {
width: 120px; width: 120px;
} }
input[type=number] {
-moz-appearance: textfield;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style> </style>
<title>商户管理</title> <title>商户管理</title>
</head> </head>
<body> <body>
<div class="merchant" id="app"> <div class="merchant" id="app">
<main> <main>
<div class="context-block"> <div class="context-block">
...@@ -158,14 +170,9 @@ ...@@ -158,14 +170,9 @@
</div> </div>
<!-- margin-left: -5px --> <!-- margin-left: -5px -->
<div class="layui-input-inline" style="width: 246px; margin-left: -4px"> <div class="layui-input-inline" style="width: 246px; margin-left: -4px">
<input <input class="layui-input" type="text" placeholder="请输入" name="merchantLoginAccount"
class="layui-input"
type="text"
placeholder="请输入"
name="merchantLoginAccount"
id="updateCircleAngle" id="updateCircleAngle"
onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" />
/>
</div> </div>
</div> </div>
<div id="accountType" class="layui-inline hide"> <div id="accountType" class="layui-inline hide">
...@@ -190,17 +197,24 @@ ...@@ -190,17 +197,24 @@
<input class="layui-input" type="text" placeholder="请输入" name="parentMerchant" /> <input class="layui-input" type="text" placeholder="请输入" name="parentMerchant" />
</div> </div>
</div> </div>
<div class="layui-inline">
<label class="layui-form-label">上级商户号:</label>
<div class="layui-input-inline" style="width: 246px">
<input class="layui-input" maxlength="11" type="number" placeholder="请输入" name="parentMerchantNo" />
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">商户号:</label>
<div class="layui-input-inline" style="width: 246px">
<input class="layui-input" maxlength="11" type="number" placeholder="请输入" name="merchantNo" />
</div>
</div>
<div style="display: inline-flex; justify-content: space-between"> <div style="display: inline-flex; justify-content: space-between">
<div class="layui-inline customerStatus"> <div class="layui-inline customerStatus">
<div class="layui-input-inline"> <div class="layui-input-inline">
<input <input class="layui-input" type="text" style="width: 367px; margin-left: 40px;" name="merchantName"
class="layui-input"
type="text"
style="width: 367px; margin-left: 40px;"
name="merchantName"
placeholder="请输入商户名称/关联的企业微信名" placeholder="请输入商户名称/关联的企业微信名"
onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" />
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -251,7 +265,7 @@ ...@@ -251,7 +265,7 @@
</div> </div>
</script> </script>
<script> <script>
layui.use(['gtree', 'request', 'helper', 'table', 'laypage', 'layer'], function() { layui.use(['gtree', 'request', 'helper', 'table', 'laypage', 'layer'], function () {
var tree = layui.gtree var tree = layui.gtree
var request = layui.request var request = layui.request
var table = layui.table var table = layui.table
...@@ -277,7 +291,7 @@ ...@@ -277,7 +291,7 @@
elem: 'merchantPage', elem: 'merchantPage',
groups: 5, groups: 5,
layout: ['count', 'page', 'skip'], layout: ['count', 'page', 'skip'],
jump: function(obj, first) { jump: function (obj, first) {
//obj包含了当前分页的所有参数,比如: //obj包含了当前分页的所有参数,比如:
// console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。 // console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
// console.log(obj.limit); //得到每页显示的条数 // console.log(obj.limit); //得到每页显示的条数
...@@ -473,36 +487,36 @@ ...@@ -473,36 +487,36 @@
skin: 'nob', skin: 'nob',
height: 'full-300', height: 'full-300',
cols: window.isDxternal != 1 ? [cols] : [colums], cols: window.isDxternal != 1 ? [cols] : [colums],
done: function() { done: function () {
$("[data-field='lowerHairPath']").css('display', 'none') $("[data-field='lowerHairPath']").css('display', 'none')
$('.layui-table-main tr').each(function(index, val) { $('.layui-table-main tr').each(function (index, val) {
$($('.layui-table-fixed-l .layui-table-body tbody tr')[index]).height($(val).height()) $($('.layui-table-fixed-l .layui-table-body tbody tr')[index]).height($(val).height())
$($('.layui-table-fixed-r .layui-table-body tbody tr')[index]).height($(val).height()) $($('.layui-table-fixed-r .layui-table-body tbody tr')[index]).height($(val).height())
}) })
//动态监听表头高度变化,冻结行跟着改变高度 //动态监听表头高度变化,冻结行跟着改变高度
$('.layui-table-header tr').resize(function() { $('.layui-table-header tr').resize(function () {
$('.layui-table-header tr').each(function(index, val) { $('.layui-table-header tr').each(function (index, val) {
$($('.layui-table-fixed .layui-table-header table tr')[index]).height($(val).height()) $($('.layui-table-fixed .layui-table-header table tr')[index]).height($(val).height())
}) })
}) })
//初始化高度,使得冻结行表头高度一致 //初始化高度,使得冻结行表头高度一致
$('.layui-table-header tr').each(function(index, val) { $('.layui-table-header tr').each(function (index, val) {
$($('.layui-table-fixed .layui-table-header table tr')[index]).height($(val).height()) $($('.layui-table-fixed .layui-table-header table tr')[index]).height($(val).height())
}) })
//动态监听表体高度变化,冻结行跟着改变高度 //动态监听表体高度变化,冻结行跟着改变高度
$('.layui-table-body tr').resize(function() { $('.layui-table-body tr').resize(function () {
$('.layui-table-body tr').each(function(index, val) { $('.layui-table-body tr').each(function (index, val) {
$($('.layui-table-fixed .layui-table-body table tr')[index]).height($(val).height()) $($('.layui-table-fixed .layui-table-body table tr')[index]).height($(val).height())
}) })
}) })
//初始化高度,使得冻结行表体高度一致 //初始化高度,使得冻结行表体高度一致
$('.layui-table-body tr').each(function(index, val) { $('.layui-table-body tr').each(function (index, val) {
$($('.layui-table-fixed .layui-table-body table tr')[index]).height($(val).height()) $($('.layui-table-fixed .layui-table-body table tr')[index]).height($(val).height())
}) })
} }
}) })
table.on('tool(merchant-table-filter)', function(obj) { table.on('tool(merchant-table-filter)', function (obj) {
var eventName = obj.event var eventName = obj.event
var row = obj.data var row = obj.data
switch (eventName) { switch (eventName) {
...@@ -586,12 +600,12 @@ ...@@ -586,12 +600,12 @@
row.status + row.status +
'&merchantAccountLevel=' + '&merchantAccountLevel=' +
row.merchantAccountLevel, row.merchantAccountLevel,
yes: function(index, layero) { yes: function (index, layero) {
var body = layer.getChildFrame('body', index) var body = layer.getChildFrame('body', index)
helper.store.set('isRefresh', false) helper.store.set('isRefresh', false)
body.find('#periodVerifyBtn').click() body.find('#periodVerifyBtn').click()
}, },
end: function() { end: function () {
var isRefresh = helper.store.get('isRefresh') var isRefresh = helper.store.get('isRefresh')
if (isRefresh) { if (isRefresh) {
getTabelList() getTabelList()
...@@ -608,7 +622,7 @@ ...@@ -608,7 +622,7 @@
init() init()
$('#addBtn').on('click', function(e) { $('#addBtn').on('click', function (e) {
// 1-创建新商户;2-创建子商户;3-修改 // 1-创建新商户;2-创建子商户;3-修改
// e.target.blur() // e.target.blur()
go('merchant', 'add', { go('merchant', 'add', {
...@@ -619,11 +633,11 @@ ...@@ -619,11 +633,11 @@
return false return false
}) })
$('#relevancyBtn').on('click', function() { $('#relevancyBtn').on('click', function () {
$messenger.emit('route-to', { path: '/settings/baseInfo/relevance' }) $messenger.emit('route-to', { path: '/settings/baseInfo/relevance' })
}) })
// 搜索绑定事件 // 搜索绑定事件
form.on('submit(searchSubmit)', function() { form.on('submit(searchSubmit)', function () {
getTabelList(true) getTabelList(true)
return false return false
}) })
...@@ -641,7 +655,7 @@ ...@@ -641,7 +655,7 @@
method: 'merchants.api.menu.findMerchantByPage' method: 'merchants.api.menu.findMerchantByPage'
} }
var searchData = $('#searchForm [name]').serializeArray() var searchData = $('#searchForm [name]').serializeArray()
$.each(searchData, function() { $.each(searchData, function () {
if (this.name == 'merchantLoginAccount') { if (this.name == 'merchantLoginAccount') {
var attrName = params.accountOrPhone == '0' ? 'merchantLoginAccount' : 'merchantLegalPersonPhone' var attrName = params.accountOrPhone == '0' ? 'merchantLoginAccount' : 'merchantLegalPersonPhone'
params[attrName] = this.value params[attrName] = this.value
...@@ -649,9 +663,9 @@ ...@@ -649,9 +663,9 @@
params[this.name] = this.value params[this.name] = this.value
} }
}) })
request(params, function(res) { request(params, function (res) {
var data = helper.formateNullFieldData(res.data) var data = helper.formateNullFieldData(res.data)
$.each(data.data, function(index, item) { $.each(data.data, function (index, item) {
item.index = index + 1 + page.pageSize * (page.pageNum - 1) item.index = index + 1 + page.pageSize * (page.pageNum - 1)
item.btn = { item.btn = {
edit: false, edit: false,
...@@ -777,7 +791,7 @@ ...@@ -777,7 +791,7 @@
method: 'merchants.api.menu.findAllDictData', method: 'merchants.api.menu.findAllDictData',
dictType: dictType dictType: dictType
}, },
function(res) { function (res) {
fn && fn(res) fn && fn(res)
} }
) )
...@@ -786,7 +800,7 @@ ...@@ -786,7 +800,7 @@
// 设置option // 设置option
function setSelectOption(elName, listName, optionId, optionLabel) { function setSelectOption(elName, listName, optionId, optionLabel) {
var el = $(elName) var el = $(elName)
$.each(baseData[listName], function(index, item) { $.each(baseData[listName], function (index, item) {
el.append(new Option(item[optionLabel], item[optionId])) el.append(new Option(item[optionLabel], item[optionId]))
}) })
form.render('select') form.render('select')
...@@ -794,7 +808,7 @@ ...@@ -794,7 +808,7 @@
// 获取有效期 // 获取有效期
function getVaildPeriod() { function getVaildPeriod() {
getDictData('merchant_status', function(res) { getDictData('merchant_status', function (res) {
baseData.statusList = res.data baseData.statusList = res.data
setSelectOption('#searchStatusEl', 'statusList', 'dictValue', 'dictLabel') setSelectOption('#searchStatusEl', 'statusList', 'dictValue', 'dictLabel')
}) })
...@@ -802,7 +816,7 @@ ...@@ -802,7 +816,7 @@
// 获取渠道 // 获取渠道
function getChannel() { function getChannel() {
getDictData('channel', function(res) { getDictData('channel', function (res) {
baseData.channelList = res.data baseData.channelList = res.data
setSelectOption('#channelIdEl', 'channelList', 'dictValue', 'dictLabel') setSelectOption('#channelIdEl', 'channelList', 'dictValue', 'dictLabel')
}) })
...@@ -810,7 +824,7 @@ ...@@ -810,7 +824,7 @@
// 获取账户等级 // 获取账户等级
function getAccountLevel() { function getAccountLevel() {
getDictData('account_level', function(res) { getDictData('account_level', function (res) {
baseData.accountLevelList = res.data baseData.accountLevelList = res.data
setSelectOption('#accountLevelEl', 'accountLevelList', 'dictValue', 'dictLabel') setSelectOption('#accountLevelEl', 'accountLevelList', 'dictValue', 'dictLabel')
}) })
...@@ -818,7 +832,7 @@ ...@@ -818,7 +832,7 @@
// 获取账户类型 // 获取账户类型
function getAccountType() { function getAccountType() {
getDictData('account_type', function(res) { getDictData('account_type', function (res) {
baseData.accountTypeList = res.data baseData.accountTypeList = res.data
setSelectOption('#accountTypeIdEl', 'accountTypeList', 'dictValue', 'dictLabel') setSelectOption('#accountTypeIdEl', 'accountTypeList', 'dictValue', 'dictLabel')
}) })
...@@ -826,7 +840,7 @@ ...@@ -826,7 +840,7 @@
// 获取模式 // 获取模式
function getModel() { function getModel() {
getDictData('merchant_model', function(res) { getDictData('merchant_model', function (res) {
baseData.modelList = res.data baseData.modelList = res.data
setSelectOption('#searchModelEl', 'modelList', 'dictValue', 'dictLabel') setSelectOption('#searchModelEl', 'modelList', 'dictValue', 'dictLabel')
}) })
...@@ -889,5 +903,6 @@ ...@@ -889,5 +903,6 @@
} }
}) })
</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!