order-number.php
3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
use domain\trade\RepairOrderStatus;
$this->title = '订单使用虚拟号';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel panel-default">
<div class="panel-body">
<?php if (!empty($rList)) : ?>
<table class="table table-striped table-bordered" id="brand-table">
<thead>
<tr>
<th>订单号</th>
<th style="width:10%;">订单状态</th>
<th >下单时间</th>
<th >虚拟号码</th>
<th >用户号码</th>
<th >工程师号</th>
<th>绑定时间</th>
<th >发起绑定</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($rList as $item) : ?>
<tr>
<td>
<?= $item['order_no'] ?>
</td>
<td>
<?= RepairOrderStatus::statusLabels($item['order_status']) ?>
</td>
<td>
<?= date('Y-m-d H:i:s', $item['created_at']) ?>
</td>
<td >
<?= $item['virtual_number'] ?>
</td>
<td >
<?= $item['a_party'] ?>
</td>
<td >
<?= $item['b_party'] ?>
</td>
<td>
<?= date('Y-m-d H:i:s', $item['bind_at']) ?>
</td>
<td>
<?= $item['bind_desc'] ?>
</td>
<td >
<a href="javascript:void(0)" data-id="<?= $item['id'] ?>" class="unbindBtn btn" role="button">解绑</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else : ?>
<p class="text-center">
没有找到数据
</p>
<?php endif; ?>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>
<script>
$(function(){
var unBindURL = '<?= Url::toRoute(['/setting/private-number/unbind-number']); ?>';
$('.unbindBtn').click(function(){
if (!confirm('确定解绑?')) {
return false;
}
$(this).addClass('disabled');
var bind_id = $(this).attr('data-id');
$.post(unBindURL, {
id:bind_id
}, function(res){
$(this).removeClass('disabled');
if (true == res.succes) {
window.location.reload();
} else {
alert(res.error)
}
},'json' )
})
})
</script>