audit.html
6.77 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
<style>
.sub-info th{
font-size: 16px;
text-align: right;
width: 30%;
}
.sub-info td{
font-size: 16px;
width: 70%;
}
.btn-long {
width: 300px;
height: 40px;
line-height: 40px;
font-size: 20px;
color: white;
border-radius: 5px;
display: inline-block;
cursor: pointer;
text-align: center;
}
.btn-long:hover {
opacity: 0.9;
}
</style>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="height:90px;">
<script>
document.write(addHead('营业执照认证', '商户入驻资质审核'));
</script>
</div>
<div id="businessDiv" region="center">
<table id="businessTable" class="sub-info" frame="void" width="80%" cellpadding="16" align="center">
<tr>
<th>商户类型</th>
<td id="businessTypeStr"></td>
</tr>
<tr>
<th id="businessNameTitle">个体工商户名称</th>
<td id="businessName"></td>
</tr>
<tr>
<th>统一社会信用代码</th>
<td id="socialCreditCode"></td>
</tr>
<tr>
<th id="certNameTitle">经营者姓名</th>
<td id="certName"></td>
</tr>
<tr>
<th id="certNoTitle">经营者身份证号</th>
<td id="certNo"></td>
</tr>
<tr>
<th>营业执照有效期</th>
<td id="validDate"></td>
</tr>
<tr>
<th>营业执照正本照片</th>
<td><img id="licenseOriginalImage" height='132px;' width='211px;' class="pimg"/></td>
</tr>
<tr>
<th>营业执照副本照片</th>
<td><img id="licenseCopyImage" height='132px;' width='211px;' class="pimg"/></td>
</tr>
<tr>
<th>身份证正面照片</th>
<td><img id="certFaceImage" height='132px;' width='211px;' class="pimg"/></td>
</tr>
<tr>
<th>身份证反面照片</th>
<td><img id="certReverseImage" height='132px;' width='211px;' class="pimg"/></td>
</tr>
<tr id="rejectReasonTr">
<th>不通过原因</th>
<td id="rejectReasonTd"><textarea id="rejectReason" style="margin: 0px; width: 400px; height: 70px;"></textarea></td>
</tr>
</table>
<div id="btnList" style="text-align:center;">
<a id="rejectBtn" class="btn-long" style="background-color: rgba(217, 0, 27, 1);">不通过</a>
<a id="passBtn" class="btn-long" style="background-color: rgba(2, 125, 180, 1);">通过</a>
</div>
<br>
<br>
</div>
<div style="display: none">
<div id="dlg" class="datagrid-toolbar" style="padding:5px;">
<img id="simg" src="" width="800">
</div>
</div>
<script>
$(function() {
var param=window.location.search;
var id = getQueryString(param, "id");
getDetailInfo(id);
$("#rejectBtn").click(function(){
updateAuditReject(id, 2, $("#rejectReason").val());
});
$("#passBtn").click(function(){
updateAuditPass(id, 1,);
});
//放大图片预览
$(".pimg").click(function(){
var _this = $(this);//将当前的pimg元素作为_this传入函数
var src = _this.attr("src");
var index = src.indexOf("?");
src = src.substring(0, index);
window.open(src);
//download(src);
});
});
function download(url) {
$('#dlg').dialog({
title: '预览',
width: 800,
height: 600,
resizable: false,
closed: false,
cache: false,
modal: true
});
$("#simg").attr("src", url);
}
function updateAuditPass(id, auditStatus){
$.post(contextPath + "/businessLicense/updateAuditInfoById", {
id : id,
auditStatus : auditStatus,
rejectReason : ''
}, function(data) {
if (data.code == 200) {
document.getElementById("rejectReasonTr").style.display= "none";
document.getElementById("btnList").style.display= "none";
window.self.$.messager.show({
title : "提示",
msg : "审核成功!"
});
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
});
}
function updateAuditReject(id, auditStatus, rejectReason){
$.post(contextPath + "/businessLicense/updateAuditInfoById", {
id : id,
auditStatus : auditStatus,
rejectReason : rejectReason
}, function(data) {
if (data.code == 200) {
$("#rejectReasonTd").html(rejectReason);
document.getElementById("btnList").style.display= "none";
window.self.$.messager.show({
title : "提示",
msg : "审核成功!"
});
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
});
}
function getDetailInfo(id){
var form = new FormData();
form.append("id", id);
//发送请求
$.ajax({
type: "POST",
url: contextPath + '/businessLicense/getDetailById',
data: form,
async: false,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function (result) {
if(result.code == 200) {
var businessType = result.data.businessType;
var auditStatus = result.data.auditStatus;
if(businessType == 2){
$("#businessNameTitle").html("企业名称");
$("#certNameTitle").html("法人姓名");
$("#certNoTitle").html("法人身份证号");
}
$("#businessTypeStr").html(result.data.businessTypeStr);
$("#businessName").html(result.data.businessName);
$("#socialCreditCode").html(result.data.socialCreditCode);
$("#certName").html(result.data.certName);
$("#certNo").html(result.data.certNo);
$("#validDate").html(result.data.validDate);
$("#licenseOriginalImage").attr("src", result.data.licenseOriginalImage + "?imageView2/2/w/450/q/20");
$("#licenseCopyImage").attr("src", result.data.licenseCopyImage + "?imageView2/2/w/450/q/20");
$("#certFaceImage").attr("src", result.data.certFaceImage + "?imageView2/2/w/450/q/20");
$("#certReverseImage").attr("src", result.data.certReverseImage + "?imageView2/2/w/450/q/20");
}
else {
$.messager.alert("失败", result.message, "error");
}
}
});
}
function getQueryString(paraPart,name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = paraPart.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
</script>
</body>
</html>