checkCodePage.html
7.02 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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<script type="text/javascript" src="/mobilemode/apps/fna2/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/mobilemode/apps/fna2/js/bootstrap.min.js"></script>
<link type="text/css" rel="stylesheet" href="/mobilemode/apps/fna2/css/bootstrap.css">
<script type="text/javascript">
$(function(){
Mobile_NS.showLoader();
var imagetype = $p("imagetype");
var imagecontent = decodeURIComponent($p("imagecontent"));
var checkkey = $p("checkkey");
var checktype = $p("checktype");
var invoicecode = $p("invoicecode");
var invoicenumber = $p("invoicenumber");
var totalamount = $p("totalamount");
var invoicedate = $p("invoicedate");
var yzmsj = $p("yzmsj");
var ymmj = $p("ymmj");
var result = decodeURIComponent($p("result"));
changeData(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result);
});
function changeData(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result){
Mobile_NS.hideLoader();
$("#imagetype").val(imagetype);
$("#checkkey").val(checkkey);
$("#checktype").val(checktype);
$("#invoicecode").val(invoicecode);
$("#invoicenumber").val(invoicenumber);
$("#totalamount").val(totalamount);
$("#invoicedate").val(invoicedate);
$("#yzmsj").val(yzmsj);
$("#ymmj").val(ymmj);
$("#result").val(result);
if("01" == imagetype){
$(".prompt-span").html("请输入验证码图片中<font style='color:red;'>红色</font>文字");
}else if("02" == imagetype){
$(".prompt-span").html("请输入验证码图片中<font style='color:yellow;'>黄色</font>文字");
}else if("03" == imagetype){
$(".prompt-span").html("请输入验证码图片中<font style='color:blue;'>蓝色</font>文字");
}else if("00" == imagetype){
$(".prompt-span").html("请输入验证码图片中全部文字");
}
$(".code-img").attr("src",imagecontent);
}
function refreshCheckcode(){
var result = $("#result").val();
Mobile_NS.showLoader();
Mobile_NS.ajax("/mobilemode/apps/fna2/invoiceInfoAjax.jsp", {"result" : result,"type" : "1"}, function(responseText){
Mobile_NS.hideLoader();
if(responseText.status == 1){
var imagetype = responseText.imagetype;
var imagecontent = responseText.imagecontent;
var checkkey = responseText.checkkey;
var checktype = responseText.checktype;
var invoicecode = responseText.invoicecode;
var invoicenumber = responseText.invoicenumber;
var totalamount = responseText.totalamount;
var invoicedate = responseText.invoicedate;
var yzmsj = responseText.yzmsj;
var ymmj = responseText.ymmj;
openCheckCodePage(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result);
}else{
Mobile_NS.Alert(responseText.errMsg, false);
return;
}
},"json");
}
function openCheckCodePage(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result){
changeData(imagetype,imagecontent,checkkey,checktype,invoicecode,invoicenumber,totalamount,invoicedate,yzmsj,ymmj,result);
}
function _submit(){
var checkCode = $("#checkCode").val().trim();
if(checkCode == ""){
Mobile_NS.Alert("请输入有效的验证码!",false);
return;
}
var checkkey = $("#checkkey").val();
var checktype = "4";
var invoicecode = $("#invoicecode").val();
var invoicenumber = $("#invoicenumber").val();
var totalamount = $("#totalamount").val();
var imagecode = checkCode;
var invoicedate = $("#invoicedate").val();
var yzmsj = $("#yzmsj").val();
var ymmj = $("#ymmj").val();
var param = {"checkkey":checkkey, "checktype":checktype, "invoicecode":invoicecode,"invoicenumber":invoicenumber,"totalamount":totalamount,"imagecode":imagecode,
"invoicedate":invoicedate,"yzmsj":yzmsj,"ymmj":ymmj,"type":"2"};
Mobile_NS.showLoader();
Mobile_NS.ajax("/mobilemode/apps/fna2/invoiceInfoAjax.jsp", param, function(responseText){
Mobile_NS.hideLoader();
if(responseText.status == 1){
var title = responseText.title;
var _taxIncludedPrice = responseText._taxIncludedPrice;
var _priceWithoutTax = responseText._priceWithoutTax;
var _tax = responseText._tax;
var _invoiceNumber = responseText._invoiceNumber;
var _invoicecode = responseText._invoicecode;
var _purchaser = responseText._purchaser;
var _seller = responseText._seller;
var _billingDate = responseText._billingDate;
var fplx = responseText.fplx;
var _taxRate = responseText._taxRate;
var _invoiceServiceYype = responseText._invoiceServiceYype;
var _checkcode = responseText._checkcode;
var detaildata = responseText.detaildata;
var url = "/mobilemode/appHomepageView.jsp?appHomepageId=2&title="+title+"&_taxIncludedPrice="+_taxIncludedPrice+"&_priceWithoutTax="+_priceWithoutTax+
"&_tax="+_tax+"&_invoiceNumber="+_invoiceNumber+"&_invoicecode="+_invoicecode+"&_purchaser="+_purchaser+"&_seller="+_seller+
"&_billingDate="+_billingDate+"&fplx="+fplx+"&_taxRate="+_taxRate+"&_invoiceServiceYype="+encodeURIComponent(_invoiceServiceYype)+"&_checkCode="+_checkcode+
"&detaildata="+encodeURIComponent(JSON.stringify(detaildata));
$u_r_replace(url);
}else{
Mobile_NS.Alert(responseText.errMsg, false);
return;
}
},"json");
}
</script>
<style type="text/css">
.container{
width: 80%;
height: 40%;
margin-top: 30%;
margin-left: 10%;
}
.main-div{
width: 100%;
height: 100%;
/* text-align: center; */
}
.info-div{
width: 100%;
}
.info-text{
display: none;
/* display: block; */
}
.img-div{
margin-top: 10px;
}
.ref-span{
margin-top: 10px;
}
</style>
</head>
<body>
<input class="info-text" type="text" id="imagetype">
<input class="info-text" type="text" id="imagecontent">
<input class="info-text" type="text" id="checkkey">
<input class="info-text" type="text" id="checktype">
<input class="info-text" type="text" id="invoicecode">
<input class="info-text" type="text" id="invoicenumber">
<input class="info-text" type="text" id="totalamount">
<input class="info-text" type="text" id="invoicedate">
<input class="info-text" type="text" id="yzmsj">
<input class="info-text" type="text" id="ymmj">
<input class="info-text" type="text" id="result">
<div class="container">
<div class="main-div">
<div class="input-group">
<input id="checkCode" type="text" class="form-control" placeholder="请输入验证码">
<span class="input-group-btn">
<button class="btn btn-primary" type="button" onclick="_submit();">确认</button>
</span>
</div>
</div>
<div class="info-div">
<span class="prompt-span"></span>
</div>
<div class="img-div">
<img alt='暂无图片' class="code-img" src="" style="height: 100px;width: 100%;">
</div>
<span class="ref-span" onclick="refreshCheckcode();">点击此处刷新</span>
</div>
</body>
</html>