|
|
1
|
+<style>
|
|
|
2
|
+ .parent{ border-bottom: 1px solid #f1f1f1;}
|
|
|
3
|
+ .parent span{ display: inline-block; width:200px;}
|
|
|
4
|
+</style>
|
1
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
5
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
2
|
|
6
|
|
3
|
|
7
|
|
|
@@ -9,8 +13,8 @@ |
|
@@ -9,8 +13,8 @@ |
9
|
?>
|
13
|
?>
|
10
|
<input type="hidden" name="pid" id="pid" value="{$row.p_user.pid}" />
|
14
|
<input type="hidden" name="pid" id="pid" value="{$row.p_user.pid}" />
|
11
|
<div id="users">
|
15
|
<div id="users">
|
12
|
- <p>上级微信昵称:{$row.p_user.nickname|htmlentities},上级ID:{$row.p_user.pid|htmlentities},上级联系电话:{$row.p_user.mobile|default=""} </p>
|
|
|
13
|
- <a onclick="findupuser()" id="arraw" class="fa fa-arrow-right" style="cursor:pointer; margin-left:10px; font-size: 20px;"></a>
|
16
|
+ <p class="parent"><span>上级微信昵称:{$row.p_user.nickname|default="-"},</span><span>上级ID:{$row.p_user.pid|default="-"},</span><span>上级员工姓名:{$row.p_user.staff_name|default="-"},</span><span>上级联系电话:{$row.p_user.staff_phone|default="-"}</span> </p>
|
|
|
17
|
+ <a onclick="findupuser()" id="arraw" class="fa fa-arrow-right" style="cursor:pointer; margin-left:10px; font-size: 16px;"> 查询上级</a>
|
14
|
</div>
|
18
|
</div>
|
15
|
<?php
|
19
|
<?php
|
16
|
}else{
|
20
|
}else{
|
|
@@ -30,6 +34,7 @@ |
|
@@ -30,6 +34,7 @@ |
30
|
<script>
|
34
|
<script>
|
31
|
function findupuser(){
|
35
|
function findupuser(){
|
32
|
var id = $("#pid").val();
|
36
|
var id = $("#pid").val();
|
|
|
37
|
+ var t = $(this);
|
33
|
$.ajax({
|
38
|
$.ajax({
|
34
|
type: 'get',
|
39
|
type: 'get',
|
35
|
url: 'verification/order/findidbyid',
|
40
|
url: 'verification/order/findidbyid',
|
|
@@ -38,13 +43,17 @@ |
|
@@ -38,13 +43,17 @@ |
38
|
|
43
|
|
39
|
// 会自动帮我们把返回的数据根据响应头设置的类型进行转换好(也就是会自动转成json对象)
|
44
|
// 会自动帮我们把返回的数据根据响应头设置的类型进行转换好(也就是会自动转成json对象)
|
40
|
success: function (res) {
|
45
|
success: function (res) {
|
41
|
-
|
|
|
42
|
if(res){
|
46
|
if(res){
|
43
|
- var html = '<p>上级微信昵称:'+res.nickname+',上级ID:'+res.pid+',上级联系电话:'+res.mobile+'</p>';
|
47
|
+ var html = '<p class="parent"><span>上级微信昵称:'
|
|
|
48
|
+ +(res.nickname?res.nickname:'-')+',</span><span>上级ID:'
|
|
|
49
|
+ +(res.pid?res.pid:'-')+',</span><span>上级员工姓名:'
|
|
|
50
|
+ +(res.staff_name?res.staff_name:'-')+',</span><span>上级联系电话:'+
|
|
|
51
|
+ (res.mobile?res.mobile:'-')+'</span></p>';
|
44
|
$("#arraw").before(html);
|
52
|
$("#arraw").before(html);
|
45
|
$("#pid").val(res.pid);
|
53
|
$("#pid").val(res.pid);
|
46
|
}else{
|
54
|
}else{
|
47
|
- alert('没有了');
|
55
|
+ $("#arraw").before("<span>没有了</span>");
|
|
|
56
|
+ $("#arraw").remove();
|
48
|
}
|
57
|
}
|
49
|
},
|
58
|
},
|
50
|
// xhr是ajax对象
|
59
|
// xhr是ajax对象
|