store_sms.html
8.4 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<include file="public/layout" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/css/layer.css"/>
<style type="text/css">
.dn{display: none;}
.recharge_num{width: 250px;text-align: center;padding-top: 10px; font-size: 14px;color: #333333;}
.recharge_num input{font-family: "Microsoft Yahei";}
.recharge_num .btnBox{margin-top:10px;font-size: 0;}
.recharge_num .btn{font-size: 14px; width: 50%; cursor: pointer; color: #FFFFFF;vertical-align: middle;display: inline-block;*display: inline;*zoom: 1;height: 40px;line-height: 40px;}
.btnRed{background-color:#C4182E ;}
.btnBlack{background-color: #999999;}
</style>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="ftitle">
<h3>商家短信</h3>
<h5>(共{$list|count}条记录)</h5>
<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
</div>
</div>
</div>
<!-- 操作说明 -->
<!--<div id="explanation" class="explanation" style="color: rgb(44, 188, 163); background-color: rgb(237, 251, 248); width: 99%; height: 100%;">-->
<!--<div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>-->
<!--<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>-->
<!--<span title="收起提示" id="explanationZoom" style="display: block;"></span>-->
<!--</div>-->
<!--<ul>-->
<!--<li>商家列表管理, 可修改商家的信息</li>-->
<!--</ul>-->
<!--</div>-->
<div class="flexigrid">
<div class="mDiv">
<form class="navbar-form form-inline" action="{:U('Admin/store_sms')}" method="get">
<div class="sDiv">
是否使用ERP
<div class="sDiv2" style="margin-right: 10px;border:none;">
<select name="is_usererp" id="is_usererp">
<option value="" <if condition="$Think.request.is_usererp eq ''">selected</if>>请选择</option>
<option value="2" <if condition="$Think.request.is_usererp eq 2">selected</if>>否</option>
<option value="1" <if condition="$Think.request.is_usererp eq 1">selected</if>>是</option>
</select>
</div>
每<input type="text" size="2" maxlength="3" name="pagenum" class="qsbox" value="{$pagenum}">条/页
<div class="sDiv2">
<input type="text" size="30" name="keywords" class="qsbox" placeholder="请输入商家名称或帐套" value="{$keywords}">
<input type="submit" class="btn" value="搜索">
</div>
</div>
</form>
</div>
<div class="hDiv">
<div class="hDivBox">
<table cellspacing="0" cellpadding="0">
<thead>
<tr>
<th align="left" abbr="article_title" axis="col3" class="w50">
<div style="text-align: left;" class="">ID</div>
</th>
<th align="left" abbr="ac_id" axis="col4" class="w200">
<div style="text-align: left;" class="">商家名</div>
</th>
<th align="left" abbr="ac_id" axis="col4" class="w100">
<div style="text-align: left;" class="">帐套/手机</div>
</th>
<th align="center" abbr="article_time" axis="col4" class="w200">
<div style="text-align: left;" class="">当前短信数量</div>
</th>
<th align="center" axis="col1" class="handle w200">
<div style="text-align: center;">操作</div>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="bDiv" style="height: auto;">
<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
<table>
<tbody>
<foreach name="list" item="vo" key="k" >
<tr>
<td align="left" class="w50">
<div style="text-align: left;">{$vo.store_id}</div>
</td>
<td align="left" class="w200">
<div style="text-align: left;">{$vo.store_name}</div>
</td>
<td align="left" class="w100">
<div style="text-align: left; ">
<if condition="$vo.ERPId">
{$vo.ERPId}
<else/>
{$vo.reg_mobile}
</if>
</div>
</td>
<td align="left" class="w200">
<div style="text-align: left; ">{$vo.smsqty}</div>
</td>
<td align="center" class="handle w200">
<div style="text-align: center;">
<a href="javascript:void(0)" class="recharge btn blue" stoid="{$vo.store_id}"><i class="fa fa-pencil-square-o"></i>充值</a>
<a href="{:U('Admin/store_sms_recharge',array('store_id'=>$vo.store_id))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>充值记录</a>
<a href="{:U('Admin/store_sms_log',array('store_id'=>$vo.store_id))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>短信日志</a>
</div>
</td>
</tr>
</foreach>
</tbody>
</table>
</div>
<div class="iDiv" style="display: none;"></div>
</div>
<!--分页位置-->
{$page} </div>
</div>
<div class="layermbox dn">
<div class="laymshade"></div>
<div class="layermmain">
<div class="section">
<div class="layermchild layermanim">
<div class="recharge_num">
<label>充值数量</label>
<input type="text" value="0" id="qty"/>
<p style="color:red">支持负数回收</p>
<div class="btnBox">
<div class="btn btnRed">充值</div>
<div class="btn btnBlack">取消</div>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" id="hidstoid" name="hidstoid" value="0">
<script>
$(document).ready(function(){
// 表格行点击选中切换
$('#flexigrid > table>tbody >tr').click(function(){
$(this).toggleClass('trSelected');
});
// 点击刷新数据
$('.fa-refresh').click(function(){
location.href = location.href;
});
//充值
$(".btnBox .btnRed").click(function(){
var qty = $("#qty").val();
var store_id =$("#hidstoid").val();
if(qty == undefined || qty == '' || qty == 0){
layer.alert("充值数量不能为空或者为0", {icon: 2}); //alert('删除失败');
return false;
}
layer.msg('加载中', {
icon: 16
,shade: 0.01
});
$.ajax({
type: 'post',
url: "{:U('Admin/ajax_Sms_Recharge')}",
data : {qty:qty,store_id:store_id},
dataType: 'json',
success: function (data) {
console.log(data);
if (data.status == 1) {
layer.closeAll();
layer.alert(data.msg, {icon: 1});
window.setTimeout(function(){
location=location
} , 1000);
}
else{
layer.closeAll();
layer.alert(data.msg +"请刷新后重试", {icon: 2});
}
}
})
});
$(".recharge").click(function(){
$("#hidstoid").val($(this).attr("stoid"));
$(".layermbox").removeClass("dn");
});
//取消
$(".btnBox .btnBlack").click(function(){
$(".layermbox").addClass("dn");
});
});
function changer_audit(type,obj) {
layer.msg('加载中', {
icon: 16
,shade: 0.01
});
$.ajax({
type: 'post',
url: "{:U('Admin/changer_audit')}",
data : {type:type,store_id:$(obj).attr('data-id')},
dataType: 'json',
success: function (data) {
if (data.status == 1) {
layer.closeAll();
layer.alert(data.msg, {icon: 1});
window.setTimeout(function(){
location=location
} , 1000);
} else {
layer.closeAll();
layer.alert(data.msg, {icon: 2}); //alert('删除失败');
}
}
})
}
function delfun(obj) {
// 删除按钮
layer.confirm('确认删除?', {
btn: ['确定', '取消'] //按钮
}, function () {
$.ajax({
type: 'post',
url: $(obj).attr('data-url'),
data : {act:'del',store_id:$(obj).attr('data-id')},
dataType: 'json',
success: function (data) {
if (data == 1) {
$(obj).parent().parent().parent().remove();
layer.closeAll();
} else {
layer.alert('删除失败', {icon: 2}); //alert('删除失败');
}
}
})
}, function () {
});
}
</script>
</body>
</html>