lb_write_off.html
6.16 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
<include file="public/layout" />
<style type="text/css">
html, body {overflow: visible;}
.flexigrid .bDiv a.ncap-btn-big:hover{text-decoration: none;}
a.grey_b {
background-color: gainsboro;
border-color: gainsboro;
color: grey;
}
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title"><a class="back" href="{:U('Admin/Order/return_list')}" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
<div class="subject">
<h3>礼包核销</h3>
<h5>用户礼包中商品进行核销</h5>
</div>
</div>
</div>
<div class="flexigrid ">
<div class="mDiv" style="white-space: inherit;">
<form class="navbar-form form-inline" id="search-form" method="get">
<div class="sDiv" style="width: 100%; height: auto; word-wrap: break-word;">
请输入核销码:
<div class="sDiv2" style="border: 0">
<input type="text" id="code" name="code" placeholder="核销码" onkeydown="strkeydown(event, this, 'sear_btn')"
class="input-txt" style="width: 250px"/>
</div>
<div class="sDiv2">
<input id="sear_btn" class="btn" value="搜索" type="button" onclick="seach_code()">
</div>
</div>
<div class="clear"></div>
</form>
</div>
<!--<div id="statistics" style="height: 400px;"></div>-->
<div class="hDiv seac_ok dn">
<div class="hDivBox">
<table cellspacing="0" cellpadding="0">
<thead id="first_tr">
<tr>
<th align="center" abbr="article_title" axis="col3" class="w140">
<div style="text-align: center;" class="" field='add_time' >商品编号</div>
</th>
<th align="center" abbr="article_title" axis="col3" class="w160">
<div style="text-align: center; " class="" field='order_sn' >商品名称</div>
</th>
<th align="center" abbr="article_title" axis="col3" class="w140">
<div style="text-align: center; " class="" field='exp_type'>总数量</div>
</th>
<th align="center" abbr="article_title" axis="col3" class="w140">
<div style="text-align: center; " class="" field='exp_type'>使用数量</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w80">
<div style="text-align: center; " class="" field='order_status'>单位</div>
</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="bDiv seac_ok dn" style="height: auto;">
<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
<table><tbody id="seach_list"></tbody> </table>
</div>
<div class="iDiv" style="border: none;margin-left: 240px; margin-top: 50px">
<a id="hxbtn" href="JavaScript:void(0);" onclick="confirm_wf();" style="color: #fff"
class="ncap-btn-big ncap-btn-green">确认核销</a>
<p style="margin-top: 5px">注:核销后不可撤回</p>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//先搜索核销码
function seach_code() {
var code=$("#code").val();
var ai = layer.msg('搜索中...', {icon: 16, shade: [0.5, '#f5f5f5'], scrollbar: false, offset: '200px', time: 0});
$.ajax({
type: "get",
url: "/index.php?m=admin&c=libao&a=lb_wf_ajax&code=" + code,
success: function (data) {
layer.close(ai);
if (data!="-1") {
$(".seac_ok").show();
$("#seach_list").html(data);
if( $("#hxbtn").hasClass("grey_b")) {
$("#hxbtn").removeClass('grey_b');
$("#hxbtn").addClass('ncap-btn-green');
}
} else {
layer.msg("未找到商品或者已经核销!", {icon: 2, time: 1000});
$(".seac_ok").hide();
}
},
error:function(XMLHttpRequest, textStatus, errorThrown){
layer.close(ai);
$(".seac_ok").hide();
}
});
}
function confirm_wf() {
var code=$("#code").val();
if(code==""){
layer.msg("请输入核销码!", {icon: 2, time: 1000});
return false;
}
var ai = layer.msg('核销中...', {icon: 16, shade: [0.5, '#f5f5f5'], scrollbar: false, offset: '200px', time: 0});
$.ajax({
type: "get",
url: "/index.php?m=admin&c=libao&a=getcodepro&code=" + code,
dateType:'json',
success: function (data) {
layer.close(ai);
if (data.state==1) {
$("#hxbtn").addClass('grey_b');
$("#hxbtn").removeClass('ncap-btn-green');
layer.msg("核销成功!", {icon: 1, time: 1000});
}else if (data.state==0) {
$("#hxbtn").addClass('grey_b');
$("#hxbtn").removeClass('ncap-btn-green');
layer.msg("已经核销!", {icon: 2, time: 1000});
}
else {
layer.msg(data.msg, {icon: 2, time: 1000});
}
},
error:function(XMLHttpRequest, textStatus, errorThrown){
layer.close(ai);
layer.msg("核销失败!", {icon: 2, time: 1000});
}
});
}
</script>
</body>
</html>