|
|
|
<!doctype html>
|
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
name="viewport" />
|
<title th:text="${session.userInfo.shopName }"></title>
|
|
<!-- Set render engine for 360 browser -->
|
<meta name="renderer" content="webkit">
|
|
<!-- No Baidu Siteapp-->
|
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
<!-- Add to homescreen for Chrome on Android -->
|
<meta name="mobile-web-app-capable" content="yes">
|
|
|
<!-- Add to homescreen for Safari on iOS -->
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
|
|
|
<!-- Tile icon for Win8 (144x144 + tile color) -->
|
|
<meta name="msapplication-TileColor" content="#0e90d2">
|
<script type="text/javascript"
|
th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
|
<script type="text/javascript"
|
th:src="@{/js/systools/DDMBase.js}"></script>
|
<link rel="stylesheet"
|
th:href="@{/plugin/amazingUI/css/amazeui.min.css}">
|
<link rel="stylesheet"
|
th:href="@{/plugin/amazingUI/css/app.css}">
|
<link rel="stylesheet" type="text/css"
|
th:href= "@{/css/dingOrderSearch.css}">
|
<style type="text/css">
|
#userList {
|
height: 200px;
|
overflow: scroll;
|
overflow-x: hidden;
|
}
|
</style>
|
</head>
|
<body onkeypress="dosearch(event)">
|
<header data-am-widget="header"
|
class="am-header color-w back-m1 back-m1">
|
<div class="am-header-left am-header-nav">
|
<a th:href="@{/admin/redirect/hive/mobile/order?foot=4}" class=""> <i
|
class="am-header-icon am-icon-chevron-left"></i>
|
</a>
|
</div>
|
<h1 class="am-header-title">
|
<a href="#title-link" class=""> 会员搜索 </a>
|
</h1>
|
</header>
|
<!-- 商品搜索页面 -->
|
<div class="wrap">
|
<div class="am-g">
|
<div class="am-u-sm-9 no-right">
|
<input autocomplete="off" id="userName" name="acctNo" type="text"
|
class="am-form-field id-in am-dropdown-up" placeholder="请输入手机号或者姓名" />
|
<ul id="userList" class="userList " style="display: none">
|
</ul>
|
|
</div>
|
<div class="am-u-sm-3 no-left">
|
<button class="am-btn am-btn-default" type="button"
|
onclick="searchUser()">
|
<span class="am-icon-search"></span>
|
</button>
|
</div>
|
</div>
|
</div>
|
|
<script th:src="@{/plugin/amazingUI/js/handlebars.min.js}"></script>
|
<script
|
th:src="@{/plugin/amazingUI/js/amazeui.widgets.helper.js}"></script>
|
<!-- index js -->
|
<script>
|
$(function() {
|
|
$("#userName").bind('input propertychange', function() {
|
console.log(1);
|
var $input = $("#userName");
|
if ($input.length < 1) {
|
return false;
|
}
|
|
if ($input.val().length > 1) {
|
$
|
.AjaxProxy({
|
p : {
|
keyWord : $input.val(),
|
},
|
c : false,
|
})
|
.invoke(
|
basePath+"/admin/vipInfo/findUserByPhoto",
|
function(loj) {
|
var html = "";
|
if (loj.getRowCount() > 0) {
|
for (var i = 0; i < loj
|
.getRowCount(); i++) {
|
html += '<li onclick="selectList(\''
|
+ loj
|
.getString(
|
i,
|
'phone')
|
+ '\')" >'
|
+ loj
|
.getString(
|
i,
|
'phone')
|
+ "-"
|
+ loj
|
.getString(
|
i,
|
'vipName')
|
+ "-"
|
+ loj
|
.getString(
|
i,
|
'vipNo')
|
+ '</li>';
|
}
|
$("#userList")
|
.html(html)
|
.show();
|
} else {
|
$("#userList")
|
.empty()
|
.hide();
|
}
|
|
});
|
} else {
|
$("#userList").hide();
|
}
|
});
|
})
|
|
function searchUser() {
|
if ($("#userName").val().length < 1) {
|
layer.open({
|
shade : false,
|
content : "请输入关键词后再查询",
|
className : 'showBox',
|
time : 1,
|
});
|
return false;
|
}
|
|
$
|
.AjaxProxy({
|
p : {
|
keyWord : $("#userName").val(),
|
},
|
c : false,
|
})
|
.invoke(
|
basePath+"/admin/vipInfo/showVipInfo",
|
function(loj) {
|
if (loj.getRowCount() > 0) {
|
layer
|
.open({
|
shade : false,
|
content : "查找成功",
|
className : 'showBox',
|
time : 1,
|
end : function(elem) {
|
MTools
|
.redirect( basePath+"/admin/redirect/hive/mobile/order?foot=4");
|
}
|
});
|
|
} else {
|
layer.open({
|
shade : false,
|
content : "未查询到此会员",
|
className : 'showBox',
|
time : 2
|
});
|
}
|
});
|
}
|
function dosearch(e) {
|
if (e.keyCode == 13) {
|
e.preventDefault();
|
window.event.returnValue = false;
|
searchUser();
|
return false;
|
}
|
}
|
|
function selectList(phone) {
|
$("#userList").hide();
|
$("#userName").val(phone);
|
searchUser();
|
}
|
</script>
|
</body>
|
</html>
|