FnaInvoiceInterfaceSetAdd.jsp
22.1 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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
<%@page import="java.text.DecimalFormat"%>
<%@page import="weaver.fna.invoice.common.FnaInvoiceCommon"%>
<%@page import="weaver.fna.encrypt.Des"%>
<%@page import="weaver.workflow.field.BrowserComInfo"%>
<%@page import="weaver.fna.budget.FnaWfSet"%>
<%@page import="weaver.systeminfo.label.LabelComInfo"%>
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browserTag" prefix="brow"%>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@page import="weaver.hrm.User"%>
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="UserDefaultManager" class="weaver.docs.tools.UserDefaultManager" scope="session" />
<%
if(!HrmUserVarify.checkUserRight("FnaInvoiceInterface:Set", user)){
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
DecimalFormat df = new DecimalFormat("####################################################0.00");
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelNames("82,132211,32363",user.getLanguage());
String needfav ="1";
String needhelp ="";
/*查询配置文件baiwang.properties 的type
type=0 无token方式 type=1 有token的方式
*/
BaseBean bb = new BaseBean();
int baiwangtype = Util.getIntValue(bb.getPropValue("baiwang", "type"),0);
String type = "";
String interfaceurl = "";
String status = "0";
String userName = "";
String password = "";
String interfaceType = "";
double weightPercent = 80.00;
String gettokenurl = "";
String getopenIDurl = "";
String client_id = "";
String client_secret = "";
String sqm = "";
String Client = "";
String GTAXID = "";
int id = Util.getIntValue(request.getParameter("id"),-1);
if(id != -1){
rs.execute("select * from fnainvoiceinterface where id = "+id);
if(rs.next()){
type = Util.null2String(rs.getString("type"));
interfaceurl = Util.null2String(rs.getString("interfaceurl"));
status = Util.null2String(rs.getString("status"));
userName = Util.null2String(rs.getString("userName"));
interfaceType = Util.null2String(rs.getString("interfaceType"));
password = Util.null2String(rs.getString("password"));
weightPercent = Util.getDoubleValue(rs.getString("weightPercent"),80.00);
if(!"".equals(password)){
password = FnaInvoiceCommon.MDE_CODE;
}
gettokenurl = Util.null2String(rs.getString("tokenurl"));
getopenIDurl = Util.null2String(rs.getString("openIDurl"));
client_id = Util.null2String(rs.getString("client_id"));
client_secret = Util.null2String(rs.getString("client_secret"));
sqm = Util.null2String(rs.getString("sqm"));
Client = Util.null2String(rs.getString("Client"));
GTAXID = Util.null2String(rs.getString("GTAXID"));
if(!"".equals(client_secret)){
client_secret = FnaInvoiceCommon.MDE_CODE_CLIENT_SECRET;
}
if(!"".equals(sqm)){
sqm = FnaInvoiceCommon.MDE_CODE_SQM;
}
}
titlename=SystemEnv.getHtmlLabelNames("93,132211,32363",user.getLanguage());
}
%>
<%@page import="weaver.filter.XssUtil"%><HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDrag_wev8.js"></script>
<script language="javascript" src="/js/weaver_wev8.js"></script>
<script language="javascript" src="/fna/js/e8Common_wev8.js?r=3"></script>
</head>
<BODY style="overflow:hidden;">
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{" + SystemEnv.getHtmlLabelName(86, user.getLanguage())
+ ",javascript:doSave(false),_self} ";
RCMenu += "{" + SystemEnv.getHtmlLabelName(25496, user.getLanguage())
+ ",javascript:testurl(0),_self} ";
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<div class="zDialog_div_content">
<jsp:include page="/systeminfo/commonTabHead.jsp">
<jsp:param name="mouldID" value="fna"/>
<jsp:param name="navName" value="<%=titlename %>"/>
</jsp:include>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr><td> </td>
<td class="rightSearchSpan" style="text-align: right;">
<input class="e8_btn_top" type="button" id="btnSave" onclick="doSave(false);"
value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%>"/><!-- 保存 -->
<input class="e8_btn_top" type="button" id="btnSave" onclick="testurl(0);"
value="<%=SystemEnv.getHtmlLabelName(25496,user.getLanguage())%>"/><!-- 测试 -->
<span title="<%=SystemEnv.getHtmlLabelName(23036,user.getLanguage()) %>" class="cornerMenu"></span><!-- 菜单 -->
</td>
</tr>
</table>
<form action="">
<input type='text' id='interfaceid' name='interfaceid' hidden="hidden" value="<%=id%>">
<wea:layout type="2col">
<wea:group context='<%=SystemEnv.getHtmlLabelName(1361,user.getLanguage())%>'>
<wea:item attributes="{'customAttrs':'id=tD1types'}"><%=SystemEnv.getHtmlLabelName(383093,user.getLanguage())%></wea:item><!-- 接口类型 -->
<wea:item attributes="{'customAttrs':'id=tD2types'}">
<select id="type" name="type" onchange="type_onchange();">
<option <%if("2".equals(type)){%>selected<%} %> value="2"><%=SystemEnv.getHtmlLabelName(384556,user.getLanguage()) %></option>
</select>
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD5WfValidate'}"><%=SystemEnv.getHtmlLabelName(383093,user.getLanguage())%></wea:item><!-- 接口类型 -->
<wea:item attributes="{'customAttrs':'id=tD6WfValidate'}">
<select id="interfaceType" name="interfaceType" onchange="interfaceType_change();">
<%--<option <%if("0".equals(interfaceType) && "2".equals(type)){%>selected<%} %> value="0"><%=SystemEnv.getHtmlLabelName(384750,user.getLanguage()) %></option>--%>
<option <%if("0".equals(interfaceType) && "3".equals(type)){%>selected<%} %> value="2"><%=SystemEnv.getHtmlLabelName(132211,user.getLanguage())+SystemEnv.getHtmlLabelName(384750,user.getLanguage()).substring(2,4)+SystemEnv.getHtmlLabelName(32363,user.getLanguage()) %></option>
<option <%if("1".equals(interfaceType)){%>selected<%} %> value="1"><%=SystemEnv.getHtmlLabelName(384751,user.getLanguage()) %></option>
</select>
<%-- <SPAN class=".e8tips" style="CURSOR: hand" id="remind" title="<%=SystemEnv.getHtmlLabelName(84168,user.getLanguage())%>"> --%>
<!-- <IMG id=ext-gen124 align=absMiddle src="/images/remind_wev8.png"></SPAN> -->
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1interfaceurl'}"><%=SystemEnv.getHtmlLabelName(130838,user.getLanguage())%></wea:item><!-- 接口地址 -->
<wea:item attributes="{'customAttrs':'id=tD2interfaceurl'}">
<input class="inputstyle" id="interfaceurl" name="interfaceurl" value="<%=interfaceurl %>" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1WfValidate'}"><%=SystemEnv.getHtmlLabelName(2072,user.getLanguage())%></wea:item><!-- 用户名 -->
<wea:item attributes="{'customAttrs':'id=tD2WfValidate'}">
<input style="display:none" type="text" name="userName"/>
<input style="display:none" type="password" name="password"/>
<input class="inputstyle" id="userName" name="userName" value='<%=userName %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD3WfValidate'}"><%=SystemEnv.getHtmlLabelName(409,user.getLanguage())%></wea:item><!-- 密码 -->
<wea:item attributes="{'customAttrs':'id=tD4WfValidate'}">
<input class="inputstyle" type="password" id="password" name="password" value='<%=password %>' autocomplete="off" style="width: 90%;">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD7WfValidate'}"><%=SystemEnv.getHtmlLabelName(384893,user.getLanguage())%></wea:item><!-- 置信度 -->
<wea:item attributes="{'customAttrs':'id=tD8WfValidate'}">
<input class="inputstyle" type="text" id="weightPercent" name="weightPercent" value='<%=df.format(weightPercent) %>' style="width: 20%;" _noMultiLang="true">  %
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi1'}"><%=SystemEnv.getHtmlLabelName(385496,user.getLanguage())%></wea:item><!-- 获取Token地址 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi1'}">
<input class="inputstyle" id="gettokenurl" name="gettokenurl" value='<%=gettokenurl %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi2'}"><%=SystemEnv.getHtmlLabelName(385497,user.getLanguage())%></wea:item><!-- 获取openID地址 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi2'}">
<input class="inputstyle" id="getopenIDurl" name="getopenIDurl" value='<%=getopenIDurl %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi3'}"><%=SystemEnv.getHtmlLabelName(385498,user.getLanguage())%></wea:item><!-- 查验发票地址 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi3'}">
<input class="inputstyle" id="verifyurl" name="verifyurl" value='<%=interfaceurl %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi4'}"><%=SystemEnv.getHtmlLabelName(385499,user.getLanguage())%></wea:item><!-- 企业client_id -->
<wea:item attributes="{'customAttrs':'id=tD2openapi4'}">
<input class="inputstyle" id="client_id" name="client_id" value='<%=client_id %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi5'}"><%=SystemEnv.getHtmlLabelName(385500,user.getLanguage())%></wea:item><!-- client_id密钥 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi5'}">
<input style="display:none" type="password" name="client_secret"/>
<input type="password" class="inputstyle" id="client_secret" name="client_secret" value='<%=client_secret %>' autocomplete="off" style="width: 90%;">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi6'}"><%=SystemEnv.getHtmlLabelName(385501,user.getLanguage())%></wea:item><!-- 企业授权码 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi6'}">
<input style="display:none" type="password" name="sqm"/>
<input type="password" class="inputstyle" id="sqm" name="sqm" value='<%=sqm %>' autocomplete="off" style="width: 90%;">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi7'}"><%=SystemEnv.getHtmlLabelName(385502,user.getLanguage())%></wea:item><!-- 企业名称 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi7'}">
<input class="inputstyle" id="Client" name="Client" value='<%=Client %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item attributes="{'customAttrs':'id=tD1openapi8'}"><%=SystemEnv.getHtmlLabelName(385503,user.getLanguage())%></wea:item><!-- 企业纳税人识别号 -->
<wea:item attributes="{'customAttrs':'id=tD2openapi8'}">
<input class="inputstyle" id="GTAXID" name="GTAXID" value='<%=GTAXID %>' autocomplete="off" style="width: 90%;" _noMultiLang="true">
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(383100,user.getLanguage())%></wea:item><!-- 是否生效 -->
<wea:item>
<select id="status" name="status">
<option <%if("0".equals(status)){%>selected<%} %> value="0"><%=SystemEnv.getHtmlLabelName(161,user.getLanguage())%></option><!-- 否 -->
<option <%if("1".equals(status)){%>selected<%} %> value="1"><%=SystemEnv.getHtmlLabelName(163,user.getLanguage())%></option><!-- 是 -->
</select>
</wea:item>
</wea:group>
</wea:layout>
</form>
<jsp:include page="/systeminfo/commonTabFoot.jsp"></jsp:include>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">'
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{'groupDisplay':'none'}">
<wea:item type="toolbar">
<input class="zd_btn_cancle" type="submit" id="btnClose" onclick="doClose();"
value="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>"/><!-- 取消 -->
</wea:item>
</wea:group>
</wea:layout>
</div>
<script language=javascript>
var _Label33574 = "<%=SystemEnv.getHtmlLabelName(33574,user.getLanguage()) %>";//正在处理数据,请不要离开该页面,请稍等...
jQuery(document).ready(function(){
controlNumberCheck_jQuery("weightPercent", true, 2, false, 2);
hideType();
});
resizeDialog(document);
function workflowid_callback(){
}
//关闭
function doClose(){
var dialog = parent.getDialog(window);
dialog.closeByHand();
}
function testurl(flag){
var link = 0;
var interfaceType = jQuery("#interfaceType").val();
var baiwangtype = "<%=baiwangtype%>";
if(baiwangtype == 0 || interfaceType == 0 || interfaceType==2){
var interfaceurl = null2String(jQuery("#interfaceurl").val()).trim();
if(interfaceurl==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(384783,user.getLanguage()) %>");//请填写正确的接口地址!
return "1";
}
var _data = "operation=testurl&url="+interfaceurl;
jQuery.ajax({
url : "/fna/invoice/invoiceWf/FnaInvoiceWfSetOp.jsp",
type : "post",
cache : false,
processData : false,
data : _data,
dataType : "json",
async:false,
success: function do4Success(_json){
try{
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(_json.flag){
if(flag == 0){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(385007,user.getLanguage()) %>");
}
}else{
link = 1;
top.Dialog.alert(_json.msg);
}
showRightMenuIframe();
}catch(e1){
link = 1;
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(384850,user.getLanguage()) %>");
showRightMenuIframe();
}
}
});
}else{
var gettokenurl = null2String(jQuery("#gettokenurl").val()).trim();
var getopenIDurl = null2String(jQuery("#getopenIDurl").val()).trim();
var verifyurl = null2String(jQuery("#verifyurl").val()).trim();
if(gettokenurl==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(385531,user.getLanguage()) %>");//请填写正确的获取Token地址!
return "1";
}
if(getopenIDurl==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(385532,user.getLanguage()) %>");//请填写正确的获取openID地址!
return "1";
}
if(verifyurl==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(385533,user.getLanguage()) %>");//请填写正确的查验发票地址!
return "1";
}
var _data = "operation=testurl2&url1="+gettokenurl+"&url2="+getopenIDurl+"&url3="+verifyurl;
jQuery.ajax({
url : "/fna/invoice/invoiceWf/FnaInvoiceWfSetOp.jsp",
type : "post",
cache : false,
processData : false,
data : _data,
dataType : "json",
async:false,
success: function do4Success(_json){
try{
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(_json.flag){
if(flag == 0){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(385007,user.getLanguage()) %>");
}
}else{
link = 1;
top.Dialog.alert(_json.msg);
}
showRightMenuIframe();
}catch(e1){
link = 1;
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(384850,user.getLanguage()) %>");
showRightMenuIframe();
}
}
});
}
return link;
}
//保存
function doSave(_openEditPage){
var link = testurl(1);
if(link == 1){
return false;
}
var baiwangtype = "<%=baiwangtype%>";
var type = null2String(jQuery("#type").val());
var interfaceType = null2String(jQuery("#interfaceType").val());
var interfaceid = null2String(jQuery("#interfaceid").val());
var status = null2String(jQuery("#status").val());
if(baiwangtype == 0 || interfaceType == 0 || interfaceType == 2){
var interfaceurl = null2String(jQuery("#interfaceurl").val()).trim();
var userName = null2String(jQuery("#userName").val()).trim();
var password = null2String(jQuery("#password").val()).trim();
var weightPercent = null2String(jQuery("#weightPercent").val()).trim();
if(interfaceurl==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(30702,user.getLanguage()) %>");//必填信息不完整
return false;
}
if(type == "2" && (userName == ""||password=="")){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(30702,user.getLanguage()) %>");//必填信息不完整
return false;
}
if(type == "2" && interfaceType == "0" && weightPercent == ""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(30702,user.getLanguage()) %>");//必填信息不完整
return false;
}
hideRightMenuIframe();
try{
if(type == "1"){
userName="";password="";weightPercent="";
}
if(type == "2" && interfaceType != "0"){
weightPercent="0.00";
}
var _data = "operation=addInterface&interfaceid="+interfaceid+"&type="+type+"&interfaceurl="+encodeURIComponent(interfaceurl)+
"&status="+status+"&userName="+encodeURIComponent(userName)+
"&password="+encodeURIComponent(password)+"&interfaceType="+interfaceType+"&weightPercent="+weightPercent;
openNewDiv_FnaBudgetViewInner1(_Label33574);
jQuery.ajax({
url : "/fna/invoice/invoiceWf/FnaInvoiceWfSetOp.jsp",
type : "post",
cache : false,
processData : false,
data : _data,
dataType : "json",
success: function do4Success(_json){
try{
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(_json.flag){
top.Dialog.alert(_json.msg);
var parentWin = parent.getParentWindow(window);
parentWin._table.reLoad();
onCancel();
}else{
top.Dialog.alert(_json.msg);
}
showRightMenuIframe();
}catch(e1){
showRightMenuIframe();
}
}
});
}catch(e1){
showRightMenuIframe();
}
}else{
var gettokenurl = null2String(jQuery("#gettokenurl").val()).trim();
var getopenIDurl = null2String(jQuery("#getopenIDurl").val()).trim();
var verifyurl = null2String(jQuery("#verifyurl").val()).trim();
var client_id = null2String(jQuery("#client_id").val()).trim();
var client_secret = null2String(jQuery("#client_secret").val()).trim();
var sqm = null2String(jQuery("#sqm").val()).trim();
var Client = null2String(jQuery("#Client").val()).trim();
var GTAXID = null2String(jQuery("#GTAXID").val()).trim();
if(client_id == "" || client_secret == "" || sqm == "" || Client == "" || GTAXID == ""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(30702,user.getLanguage()) %>");//必填信息不完整
return false;
}
hideRightMenuIframe();
try{
var _data = "operation=addInterface2&interfaceid="+interfaceid+"&gettokenurl="+encodeURIComponent(gettokenurl)+"&getopenIDurl="+encodeURIComponent(getopenIDurl)+"&status="+status+
"&verifyurl="+encodeURIComponent(verifyurl)+"&client_id="+client_id+"&client_secret="+encodeURIComponent(client_secret)+"&sqm="+sqm+"&Client="+Client+">AXID="+GTAXID+
"&type="+type+"&interfaceType="+interfaceType;
openNewDiv_FnaBudgetViewInner1(_Label33574);
jQuery.ajax({
url : "/fna/invoice/invoiceWf/FnaInvoiceWfSetOp.jsp",
type : "post",
cache : false,
processData : false,
data : _data,
dataType : "json",
success: function do4Success(_json){
try{
try{closeNewDiv_FnaBudgetViewInner1();}catch(ex1){}
if(_json.flag){
top.Dialog.alert(_json.msg);
var parentWin = parent.getParentWindow(window);
parentWin._table.reLoad();
onCancel();
}else{
top.Dialog.alert(_json.msg);
}
showRightMenuIframe();
}catch(e1){
showRightMenuIframe();
}
}
});
}catch(e1){
showRightMenuIframe();
}
}
}
function onCancel(){
var dialog = parent.getDialog(window);
dialog.close();
}
function type_onchange(){
var type = jQuery("#type").val();
var idArray = ["tD1WfValidate","tD3WfValidate","tD5WfValidate","tD7WfValidate"];
if(type=="1"){
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().hide();
jQuery("#"+idArray[i]).parent().next().hide();
}
}else{
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().show();
jQuery("#"+idArray[i]).parent().next().show();
}
}
}
function hideType(){
var idArray = ["tD1types"];
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().hide();
jQuery("#"+idArray[i]).parent().next().hide();
}
}
function interfaceType_change(){
var baiwangtype = "<%=baiwangtype%>";
var type = jQuery("#type").val();
var interfaceType = jQuery("#interfaceType").val();
var idArray2 = ["tD1openapi1","tD2openapi2","tD2openapi3","tD2openapi4","tD2openapi5","tD2openapi6","tD2openapi7","tD2openapi8"];
if(interfaceType=="0"){
var idArray = ["tD7WfValidate","tD1interfaceurl","tD1WfValidate","tD3WfValidate"]
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().show();
jQuery("#"+idArray[i]).parent().next().show();
}
for(var i=0;i<idArray2.length;i++){
jQuery("#"+idArray2[i]).parent().hide();
jQuery("#"+idArray2[i]).parent().next().hide();
}
}else if(interfaceType=="2"){
var idArray = ["tD1interfaceurl","tD1WfValidate","tD3WfValidate"];
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().show();
jQuery("#"+idArray[i]).parent().next().show();
}
for(var i=0;i<idArray2.length;i++){
jQuery("#"+idArray2[i]).parent().hide();
jQuery("#"+idArray2[i]).parent().next().hide();
}
jQuery("#tD7WfValidate").parent().hide();
jQuery("#tD7WfValidate").parent().next().hide();
//睿琪的OCR接口隐藏id为tD7WfValidate,即隐藏置信度
}else{
if(baiwangtype == 0){
var idArray = ["tD7WfValidate"];
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().hide();
jQuery("#"+idArray[i]).parent().next().hide();
}
for(var i=0;i<idArray2.length;i++){
jQuery("#"+idArray2[i]).parent().hide();
jQuery("#"+idArray2[i]).parent().next().hide();
}
}else{
var idArray = ["tD7WfValidate","tD1interfaceurl","tD1WfValidate","tD3WfValidate"];
for(var i=0;i<idArray.length;i++){
jQuery("#"+idArray[i]).parent().hide();
jQuery("#"+idArray[i]).parent().next().hide();
}
for(var i=0;i<idArray2.length;i++){
jQuery("#"+idArray2[i]).parent().show();
jQuery("#"+idArray2[i]).parent().next().show();
}
}
}
}
type_onchange();
interfaceType_change();
</script>
</BODY>
</HTML>