notice.html
11 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
{template 'common/header'}
{template 'common'}
<ul class="nav nav-tabs">
<li {if $operation == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('notice', array('op' => 'display'))}">站内短信息管理</a></li>
</ul>
{if $operation == 'display'}
<div class="main">
<div class="panel panel-info">
<div class="panel-heading">筛选</div>
<div class="panel-body">
<form action="" class="form-horizontal" >
<input type="hidden" name="c" value="site" />
<input type="hidden" name="a" value="entry" />
<input type="hidden" name="m" value="wwx_fxxt" />
<input type="hidden" name="do" value="notice" />
<input type="hidden" name="op" value="display" />
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
<div class="col-sm-8 col-lg-9 col-xs-12">
<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="可查询关键字">
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">类型</label>
<div class="col-sm-8 col-lg-9 col-xs-12">
<select class="form-control" name="type">
<option value="-1" selected>所有</option>
<option value="0" {if $type==0} selected{/if}>系统</option>
<option value="1" {if $type==1} selected{/if}>维权</option>
<option value="2" {if $type==2} selected{/if}>询问</option>
<option value="3" {if $type==3} selected{/if}>用户</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">状态</label>
<div class="col-sm-8 col-lg-9 col-xs-12">
<select class="form-control" name="status">
<option value="5" selected="selected">所有</option>
<option value="-2" {if $status==-2} selected="selected"{/if}>接收者删除</option>
<option value="-1" {if $status==-1} selected="selected"{/if}>发送者删除</option>
<option value="0" {if $status==0} selected="selected"{/if}>正常</option>
<option value="1" {if $status==1} selected="selected"{/if}>已读</option>
<option value="2" {if $status==2} selected="selected"{/if}>已回复</option>
<option value="3" {if $status==3} selected="selected"{/if}>管理员已评论</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">日期范围</label>
<div class="col-sm-8 col-lg-9 col-xs-12">
<button style="margin:0;" class="btn span5" id="date-range" type="button"><span class="date-title">{php echo tpl_form_field_date('starttime', date('Y-m-d H:i', $starttime), true)} 至 {php echo tpl_form_field_date('endtime', date('Y-m-d H:i', $endtime), true)}
</span> <i class="icon-caret-down"></i></button>
</div>
</div>
<div class="form-group"> <input type="submit" name="submit" value="搜 索" class="btn btn-primary"></div>
</form>
</div>
</div>
<div class="alert alert-info">(点击ID至状态可回复操作,点击用户名称可对其发送消息)</div>
<form class="form-horizontal" method="post" role="form">
<input type="hidden" id="content_id" value="" />
<input type="hidden" id="content_num" value="" />
<div class="panel panel-default">
<div class="panel-heading">消息数量:<span class="label label-success">{$total}</span> 条 <a style=" margin-left:80%;" class="label label-danger" href="{php echo $this->createWebUrl('notice', array('op' => 'deleteout'))}" onclick="return confirm('此操作不可恢复,确认清空所有数据?');return false;">全部清空(慎用)</a></div>
<div class="panel-body table-responsive">
<table class="table table-hover">
<thead class="navbar-inner">
<tr>
<th style="width:6%;">ID</th>
<th style="width:6%;">商品ID</th>
<th style="width:12%;">订单号</th>
<th style="width:6%;">类型</th>
<th style="width:10%;">状态</th>
<th style="width:13%;">发送者</th>
<th style="width:12%;">接收者</th>
<th style="width:20%;">内容</th>
<th style="text-align:right;width:15%;">操作</th>
</tr>
</thead>
<tbody>
{loop $list $item}
<tr>
<td onclick="myQrcode({$item['id']});">{$item['id']}</td>
<td style="word-break: break-all;" onclick="myQrcode({$item['id']});">{if !empty($item['feedbackid'])}{$item['feedbackid']}{else}无{/if}</td>
<td style="word-break: break-all;" onclick="myQrcode({$item['id']});">{if !empty($item['transid'])}{$item['transid']}{else}无{/if}</td>
<td onclick="myQrcode({$item['id']});">{php echo $this->getFeedbackType($item['type']);}</td>
<td onclick="myQrcode({$item['id']});"><span class="label {if $item['status'] == -2}label-default{elseif $item['status'] == -1}label-default{elseif $item['status'] == 0}label-success{elseif $item['status'] == 1}label-warning{elseif $item['status'] == 2}label-info{elseif $item['status'] == 3}label-danger{/if}">{php echo $this->getFeedbackStatus($item['status']);}</span></td>
<td><a href="javascript:;" onclick="newQrcode({$item['id']},1,'{php echo $this->getRealname($item['openid']);}');">{php echo $this->getRealname($item['openid']);}</a></td>
<td><a href="javascript:;" onclick="newQrcode({$item['id']},2,'{php echo $this->getRealname($item['backopenid']);}');">{php echo $this->getRealname($item['backopenid']);}</a></td>
<td><span class="label label-success">{$item['reason']}</span></td>
<td style="text-align:right;">
{if !empty($item['transid'])}
<a target="_blank" href="{php echo $this->createWebUrl('order', array('id' => $this->getOrderid($item['transid']), 'op' => 'detail'))}">订单详情</a>
{/if}
{if !empty($item['feedbackid'])}
<a target="_blank" href="{php echo $this->createWebUrl('goods', array('id' => $item['feedbackid'], 'op' => 'post'))}">商品详情</a>
{/if}
<a href="{php echo $this->createWebUrl('notice', array('id' => $item['id'], 'op' => 'delete'))}" onclick="return confirm('此操作不可恢复,确认删除?');return false;">删除</a>
</td>
</tr>
<tr>
<td colspan="10">
<div class="btn btn-primary" id="shade_{$item['id']}" style="text-align:left;display:none">发送内容:{$item['reason']} ({php echo date('Y-m-d H:i:s', $item['createtime'])})<br>回复内容:<span id="solution_{$item['id']}" class="label label-warning">{$item['solution']}</span> {if !empty($item['updatetime'])}({php echo date('Y-m-d H:i:s', $item['updatetime'])}){/if}{if empty($item['solution']) && (empty($item['backopenid']) || $adminmsg == $item['backopenid'])}<input type="text" name="adminsolution_{$item['id']}" id="adminsolution_{$item['id']}" maxlength="200" class="form-control" onblur="reMsg({$item['id']});" />{/if}<br>管理员评介:<span id="remark_{$item['id']}" class="label label-danger">{$item['remark']}</span>{if empty($item['remark'])}<input type="text" name="adminremark_{$item['id']}" id="adminremark_{$item['id']}" maxlength="200" class="form-control" onblur="saveMsg({$item['id']});" /><br/><span style="display:none;" id="tip_{$item['id']}" class="label label-success"></span>{/if}</div>
<div class="btn btn-primary" id="content_{$item['id']}" style="text-align:left;display:none">发送给:<span id="content_name_{$item['id']}" class="label label-danger"></span><br>发送新信息<input type="text" name="content_reason_{$item['id']}" id="content_reason_{$item['id']}" maxlength="200" class="form-control" /><br/><button id="newbtn_{$item['id']}" type="button" class="btn" onclick="newMsg({$item['id']});">发送</button> <button type="button" class="btn" onclick="newOut({$item['id']});">关闭</button> <span style="display:none;" id="content_tip_{$item['id']}" class="label label-success"></span></div>
</td>
</tr>
{/loop}
</tbody>
</table>
{$pager}
</div>
</div>
</form>
</div>
<script type="text/javascript" src="{WWX_FXXT_ROOT}/recouse/js/cascade.js?x=14"></script>
<script type="text/javascript">
function saveMsg(id) {
var remark = $('#adminremark_'+id).val();
$.post('{php echo $_W["siteroot"].'app/'.$this->createMobileUrl("adminre")}', {
'id' : id,
'op' : 'adminpost',
'content' : remark
}, function(s) {
if (s.message == -1) {
$('#tip_'+id).html('评论内容为空,请填写后再更新!');
}
if (s.message == 0) {
$('#tip_'+id).html('评论失败!');
}
if (s.message.id > 0) {
$('#tip_'+id).html('评论成功!');
$('#remark_'+id).html(s.message.remark);
$('#adminremark_'+id).hide();
}
$('#tip_'+id).show();
}, 'json');
}
function reMsg(id) {
var solution = $('#adminsolution_'+id).val();
$.post('{php echo $_W["siteroot"].'app/'.$this->createMobileUrl("adminre")}', {
'id' : id,
'op' : 'adminpostre',
'content' : solution
}, function(s) {
if (s.message == -1) {
$('#tip_'+id).html('回复内容为空,请填写后再更新!');
}
if (s.message == 0) {
$('#tip_'+id).html('回复失败!');
}
if (s.message.id > 0) {
$('#tip_'+id).html('回复成功!');
$('#solution_'+id).html(s.message.solution);
$('#adminsolution_'+id).hide();
}
$('#tip_'+id).show();
}, 'json');
}
function newMsg(id) {
var id = $('#content_id').val();
var num = $('#content_num').val();
var reason = $('#content_reason_'+id).val();
$.post('{php echo $_W["siteroot"].'app/'.$this->createMobileUrl("adminre")}', {
'id' : id,
'num' : num,
'op' : 'adminpostnew',
'content' : reason
}, function(s) {
if (s.message == -2) {
$('#content_tip_'+id).html('不能发送给设置的管理员!');
}
if (s.message == -1) {
$('#content_tip_'+id).html('内容为空,请填写后再更新!');
}
if (s.message == 0) {
$('#content_tip_'+id).html('消息发送失败!');
}
if (s.message.id > 0) {
$('#content_tip_'+id).html('消息发送成功,更新页面可见!');
$('#newbtn_'+id).attr("disabled", true);
$('#content_reason_'+id).val('');
$('#content_reason_'+id).hide();
}
$('#content_tip_'+id).show();
}, 'json');
}
</script>
<script type="text/javascript">
function myQrcode(id){
var shade = window.document.getElementById('shade_'+id).style.display;
if (shade == 'block') {
window.document.getElementById('shade_'+id).style.display = 'none';
}else {
window.document.getElementById('shade_'+id).style.display = 'block';
}
}
function newQrcode(id,num,name){
var shade = window.document.getElementById('content_'+id).style.display;
$('#content_id').val(id);
$('#content_num').val(num);
$('#content_name_'+id).html(name);
window.document.getElementById('content_'+id).style.display = 'block';
}
function newOut(id){
$('#content_'+id).hide();
$('#content_id').val('');
$('#content_num').val('');
$('#newbtn_'+id).attr("disabled", false);
$('#content_reason_'+id).show();
}
</script>
{/if}
{template 'common/footer'}