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