1554 lines
48 KiB
HTML
1554 lines
48 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="pragma" content="no-cache">
|
||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
|
||
<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<script type="text/javascript" src="../comm/jquery-1.6.1.js"></script>
|
||
<script type="text/javascript" src="../comm/jquery.cookie.js"></script>
|
||
<script type="text/javascript" src="../comm/jquery.json-2.3-debug.js"></script>
|
||
<script type="text/javascript" src="../comm/hxcomm.js"></script>
|
||
<script type="text/javascript" src="../comm/sginfo.js"></script>
|
||
<script type="text/javascript" src="../comm/request.js"></script>
|
||
<link rel="stylesheet" href="../css/style_yjsg.css">
|
||
</head>
|
||
|
||
<body>
|
||
<div style="position:absolute;width:680px;height:530px;overflow-y:auto;overflow-x:hidden;z-index: 1;">
|
||
<div class="container_zg" id="loadingResult">
|
||
<img src = "../images/loading.gif" width = 14px height = 14px>正在加载, 请耐心等候...
|
||
</div>
|
||
<!-- 中签提醒 -->
|
||
<div class="container_zg hideHtml" id="zqResult">
|
||
<div class="mark">
|
||
<div class="zqcontent">
|
||
<div class="header">
|
||
<div class="icon-title title-medal"></div>
|
||
<div class="header-title">恭喜您,中签啦</div>
|
||
</div>
|
||
<div class="content">
|
||
<div class="table">
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<td>证券类别</td>
|
||
<td>证券名称</td>
|
||
<td>中签数量(股)</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="zq_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="aside">
|
||
<p id="zqNoticeResult"></p>
|
||
<p><span class="cr">风险提示:</span></p>
|
||
<p><span class="cr">请充分关注定价市场化蕴含的风险,知晓新股/新债上市后可能跌破发行价,新股/新债中签后请及时关注中签缴款状况。12点会有预冻结,12点到16点间客户可以通过APP解冻预冻结资金,16点后应确保资金足额。</span></p>
|
||
|
||
<span class="cr"></span>
|
||
</div>
|
||
<br><br>
|
||
<div class="footer">
|
||
<div class="btn" onclick="handleZqModelClosed()">确定</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 已提交/未提交 -->
|
||
<div class="container_sg hideHtml" id="newSg">
|
||
<div class="header">
|
||
<!--<div class="icon-title title-new"></div>-->
|
||
<div class="header-title title-tab"><a href='javascript:;' class="cur">新股新债 <i id="xgxzNum">2</i></a><a href='gzxg.html'>北交所新股 <i id="gzxgNum">3</i></a>
|
||
<p style="float:right;color:red;font-size:14px;padding-top:14px;"><span style="color:red;">每天打新太繁琐,试试</span><span style="color:#007ef3;cursor:pointer;text-decoration:underline;" onclick="return fn_jump2menu(5733);">预约打新</span><span style="color:red;">吧。一次让您预约一周新股</span></p>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="content">
|
||
<div class="input-line">
|
||
<input type="checkbox" name="" id='gpxg' checked='checked'>
|
||
股票新股
|
||
</div>
|
||
<div class="table" >
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<td>证券类别</td>
|
||
<td>证券名称</td>
|
||
<td>申购代码</td>
|
||
<td>可申购数量</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="xg_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div id='ipoBond'>
|
||
<div class="input-line">
|
||
<input type="checkbox" name="" id='zqxg'>
|
||
债券(默认不勾选)
|
||
</div>
|
||
<div class="table" >
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<td>证券类别</td>
|
||
<td>证券名称</td>
|
||
<td>申购代码</td>
|
||
<td>可申购数量</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="zhaiquan_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="aside">
|
||
<div class="aside-section">
|
||
<p><span class="cr">注:</span>T日(今日):日终清算后,可查询配号信息;</p>
|
||
<p>T+1日:日终清算后,可查询中签信息;</p>
|
||
<p>T+2日:中签后,请确保资金账户在当日16:00有足额的新股认购资金;</p>
|
||
<p><span class="cr">其它:</span></p>
|
||
<p>   1.科创板新股申购需提前开通科创板股票交易权限;</p>
|
||
<p>   2.每只新股发行,一名投资者只能通过其名下的一个证券账户申购一次,重复的委托中国结算公司将做废单处理。</p>
|
||
<p>   3.科创板可转债转股须开通科创板股票交易权限。</p>
|
||
<p><span class="cr">风险提示:</span></p>
|
||
<p style="color:red;">请充分关注定价市场化蕴含的风险,知晓新股/新债上市后可能跌破发行价,新股/新债中签后请及时关注中签缴款状况。12点会有预冻结,12点到16点间客户可以通过APP解冻预冻结资金,16点后应确保资金足额。</p>
|
||
<p>  </p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sg-foot">
|
||
<div class="footer">
|
||
<span id="sg_not_notice_today" style="display:none;" class="noremind">
|
||
<input type="checkbox" id="sg_chk_not_notice_today" value="2" onclick="return fn_notnotice_today(this.value);">当日不再提醒</input>
|
||
</span>
|
||
<div id="yjsg" onclick="return fn_yijian_sg();"></div>
|
||
<div id = "disSg" ></div>
|
||
<span id = "jump2plsg" style="display:none;" class="notop">
|
||
<span>不想一键顶格申购的</span>
|
||
<a class="jump-menu" style="color:#007ef3;cursor:pointer;" onclick="return fn_jump2menu(5086);">请点击这里 »</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- 今日新股 -->
|
||
<div class="container_sg hideHtml" id="sgResult">
|
||
<div class="header">
|
||
<div class="icon-title title-ok"></div>
|
||
<!-- <div class="icon-title title-mistake"></div> -->
|
||
<div class="header-title">已成功提交/对不起,申购失败</div>
|
||
<div class="title-tab-sg"><a href='javascript:;' class="cur">新股新债 <i id="xgxzNum2">2</i></a><a href='gzxg.html'>北交所新股 <i id="gzxgNum2">3</i></a></div>
|
||
</div>
|
||
<div class="content">
|
||
<div class="table" id='ipoXg'>
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<td>证券类别</td>
|
||
<td>证券名称</td>
|
||
<td>申购代码</td>
|
||
<td>可申购数量</td>
|
||
<td>已申购数量</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="sg_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="table" id='ipoBond2' style='display: none;margin-top: 10px;'>
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<td>证券类别</td>
|
||
<td>证券名称</td>
|
||
<td>申购代码</td>
|
||
<td>可申购数量</td>
|
||
<td>已申购数量</td>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="zhaiquansg_tbody">
|
||
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="aside">
|
||
<p id="noticeResult"></p>
|
||
<p class="aside-explain" id="noticeSg"></p>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="sg-foot">
|
||
<div class="footer">
|
||
<span id="zq_not_notice_today" class="noremind">
|
||
<input type="checkbox" id="zq_chk_not_notice_today" value="1" onclick="return fn_notnotice_today(this.value);">当日不再提醒</input>
|
||
</span>
|
||
<span id = "jump2sgmx">
|
||
<a class="jump-menu notop" style="color:#007ef3;cursor:pointer;" onclick="return fn_jump2menu(168);">查看申购记录 »</a>
|
||
</span>
|
||
<div class="btn">确定</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="icon watermarking"></div>
|
||
<div class="winShade"></div>
|
||
<div class="popup-all">
|
||
<div class="popup-title">委托确认</div>
|
||
<div class="popup-content">
|
||
<div class="popup-xg">
|
||
<div class="popup-xgname">申购新股:</div>
|
||
<div class="popup-xgcode"></div>
|
||
</div>
|
||
<div class="popup-xz">
|
||
<div class="popup-xzname">申购新债:</div>
|
||
<div class="popup-xzcode"></div>
|
||
</div>
|
||
</div>
|
||
<div class="popup-message">您是否确认以上代码顶格申购委托?</div>
|
||
<div class="popup-xzname"><span class="cr">风险提示:</span></div>
|
||
<div class="popup-xzname"><span class="cr">请充分关注定价市场化蕴含的风险,知晓新股/新债上市后可能跌破发行价,新股/新债中签后请及时关注中签缴款状况。</span></div>
|
||
<div class="popup-bottom">
|
||
<div class="popup-yes">是</div>
|
||
<div class="popup-no">否</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<Script Language="JavaScript">
|
||
|
||
if($('#gpxg').attr('checked')){
|
||
$('#gpxg').parent().css('color','red');
|
||
}
|
||
if($('#zqxg').attr('checked')){
|
||
$('#zqxg').parent().css('color','red');
|
||
}
|
||
$('#gpxg,#zqxg').click(function(){
|
||
if($('#gpxg').attr('checked')){
|
||
$('#gpxg').parent().css('color','red');
|
||
}else{
|
||
$('#gpxg').parent().css('color','#000000');
|
||
}
|
||
if($('#zqxg').attr('checked')){
|
||
$('#zqxg').parent().css('color','red');
|
||
}else{
|
||
$('#zqxg').parent().css('color','#000000');
|
||
}
|
||
})
|
||
/*
|
||
*g_arrayXgInfo[xg_index][0] 证券名称
|
||
*g_arrayXgInfo[xg_index][1] 申购代码
|
||
*g_arrayXgInfo[xg_index][2] 可申购数量
|
||
*g_arrayXgInfo[xg_index][3] 已申购数量
|
||
*g_arrayXgInfo[xg_index][4] 市场代码
|
||
*g_arrayXgInfo[xg_index][5] 申购价格
|
||
*/
|
||
var g_arrayXgInfo = new Array();
|
||
/*
|
||
*g_arrayZqInfo[zq_index][0] 证券名称
|
||
*g_arrayZqInfo[zq_index][1] 中签数量(股)
|
||
*g_arrayZqInfo[zq_index][2] 发行价格(元)
|
||
*g_arrayZqInfo[zq_index][3] 缴款金额
|
||
*/
|
||
var g_arrayZqInfo = new Array();
|
||
/*股票新股数量、债券新股数量*/
|
||
var gpxgNum = 0;
|
||
var zqxgNum = 0;
|
||
/* 新股新债数量、北交所新股数量*/
|
||
var xgxzNum = 0;
|
||
var gzxgNum = 0;
|
||
var gpxqChoose = 'all';
|
||
/*
|
||
*变量使用原因: 用于解决快速多次点击客户端运营位问题
|
||
*使用方法: 在调用客户端函数前,变量赋值,客户端回调后变量
|
||
* 清空保证,客户端回调,一定进入到 g_callbackName
|
||
* 期望的回调函数中,
|
||
*/
|
||
var g_callbackName = ""; // 全局变量保存回调函数
|
||
var g_count = 0; // 全局变量存放申购失败错误信息的个数
|
||
var gp_count = 0; // 股票新股存放申购个数
|
||
var zq_count = 0; // 窄裙新股存放申购个数
|
||
var g_retMsg = new Array(); // 全局变量存放申购失败错误信息
|
||
var g_yjsgStatus = 0; // 一键申购按钮状态,保证只能点击一次
|
||
var g_openMode = 1; // 页面开启模式,1是初始登录加载,2是点击状态栏打开
|
||
|
||
var g_dlgSize = 'nType=0\nwidth=680\nheight=560\n'; // 页面大小nType=0\nwidth=680\nheight=490\n
|
||
{
|
||
var isIE=!!window.ActiveXObject;
|
||
var isIE6=isIE&&!window.XMLHttpRequest;
|
||
if(isIE6)
|
||
{
|
||
g_dlgSize = 'nType=0\nwidth=680\nheight=560\n';
|
||
}
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、页面JS业务流程主入口函数
|
||
* 2、向后台请求中签信息
|
||
* 3、向后台请求新股列表
|
||
*/
|
||
function fnStart(str)
|
||
{
|
||
//从北交所新股页面回来不用隐藏对话框
|
||
if(!isFromGzxg()){
|
||
fnFunction("hide_dlg", ''); //起始先隐藏一键申购对话框
|
||
fnFunction("set_caption", '新股申购'); //设置对话框标题
|
||
fnFunction("chg_dlgsize", g_dlgSize); //调整对话框尺寸
|
||
}
|
||
|
||
var array_param = new Array();
|
||
array_param = str.split('|');
|
||
if(array_param.length = 1)
|
||
g_openMode = array_param[0];
|
||
|
||
g_callbackName = "fn_callback_zq";
|
||
fn_cxZq(g_callbackName); //查询中签
|
||
|
||
g_callbackName = "fn_callback_xginfo";
|
||
fn_cxXgInfo(g_callbackName); //查询新股
|
||
fnFunction("js_run_finished", '1'); // 新版本页面设置正常完成
|
||
}
|
||
|
||
var g_sgCode = ""; // 申购代码
|
||
var g_sgCodeIndex = 0; // 数值索引
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、查询新股信息的回调函数
|
||
* 2、查询新股的已申购数量
|
||
*/
|
||
function fn_callback_xginfo(xg_list)
|
||
{
|
||
if(g_callbackName != "fn_callback_xginfo") return;
|
||
g_callbackName = "";
|
||
|
||
|
||
g_arrayXgInfo = parse_sglist(xg_list);
|
||
if (g_arrayXgInfo.length > 0) //有新股,则去查询是否已申购
|
||
{
|
||
g_callbackName = "fn_callback_haveCount";
|
||
fn_cxHaveCount(g_callbackName);
|
||
}
|
||
else
|
||
{
|
||
fn_showPage();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、查询已申购数量的回调函数
|
||
* 2、呈现页面
|
||
*/
|
||
function fn_callback_haveCount(cx_xgwt_list)
|
||
{
|
||
if(g_callbackName != "fn_callback_haveCount") return;
|
||
g_callbackName = "";
|
||
var array_xgwtList = parse_ywtsl(cx_xgwt_list);
|
||
// alert(JSON.stringify(array_xgwtList)+'--------------------array_xgwtList')
|
||
for (var i = 0; i < array_xgwtList.length; i++)
|
||
{
|
||
// alert(JSON.stringify(g_arrayXgInfo)+'--------------------g_arrayXgInfo')
|
||
// 找到对应的申购代码设置已申购数量
|
||
for (var j = 0; j < g_arrayXgInfo.length; j++)
|
||
{
|
||
// g_arrayXgInfo[j][1]证券代码
|
||
if (g_arrayXgInfo[j][1] == array_xgwtList[i][0])
|
||
{
|
||
g_arrayXgInfo[j][3] = array_xgwtList[i][1]; // 已申购数量
|
||
break;
|
||
} // if
|
||
} // for
|
||
} // for
|
||
fn_showPage();
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、点击一键申购按钮的执行函数
|
||
*/
|
||
function fn_yijian_sg()
|
||
{
|
||
if (g_yjsgStatus < 1) {
|
||
var html = [];
|
||
for(var i=0;i<g_arrayXgInfo.length;i++){
|
||
if($('#gpxg').attr('checked') && $('#zqxg').attr('checked')){
|
||
if(!(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1')){
|
||
html.push('<div class="popup-xg">'
|
||
+'<div class="popup-xgname">申购新股:</div>'
|
||
+'<div class="popup-xgcode">'+g_arrayXgInfo[i][1]+'</div>'
|
||
+'</div>');
|
||
}else{
|
||
html.push('<div class="popup-xz">'
|
||
+'<div class="popup-xzname">申购新债:</div>'
|
||
+'<div class="popup-xzcode">'+g_arrayXgInfo[i][1]+'</div>'
|
||
+'</div>');
|
||
}
|
||
}else if($('#gpxg').attr('checked')){
|
||
if(!(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1')){
|
||
html.push('<div class="popup-xg">'
|
||
+'<div class="popup-xgname">申购新股:</div>'
|
||
+'<div class="popup-xgcode">'+g_arrayXgInfo[i][1]+'</div>'
|
||
+'</div>');
|
||
}
|
||
}else if($('#zqxg').attr('checked')){
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
html.push('<div class="popup-xz">'
|
||
+'<div class="popup-xzname">申购新债:</div>'
|
||
+'<div class="popup-xzcode">'+g_arrayXgInfo[i][1]+'</div>'
|
||
+'</div>');
|
||
}
|
||
}
|
||
|
||
}
|
||
if(html.length != 0){
|
||
$('.popup-content').html(html.join(' '));
|
||
$('.winShade').show();
|
||
$('.popup-all').show();
|
||
}else{
|
||
alert('请选择一键申购的债券种类!');
|
||
}
|
||
}
|
||
}
|
||
/*确定*/
|
||
$('.popup-all .popup-yes').click(function(){
|
||
$('.popup-all').hide();
|
||
$('.winShade').hide();
|
||
fn_keyBid();
|
||
});
|
||
/*取消*/
|
||
$('.popup-all .popup-no').click(function(){
|
||
$('.popup-all').hide();
|
||
$('.winShade').hide();
|
||
});
|
||
function fn_keyBid(){
|
||
|
||
if (g_yjsgStatus < 1)
|
||
{
|
||
//可申购数量为0
|
||
while(g_arrayXgInfo[g_count][2] == 0 || g_arrayXgInfo[g_count][2] == '')
|
||
{
|
||
//g_arrayXgInfo[g_count][3] = 0; // 如果可申购数量为零,就给已申购数量赋值为零
|
||
g_retMsg[g_count] = 2; // 有错误就给标记赋值为2
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
showResultHtml();
|
||
g_yjsgStatus = 1;
|
||
return;
|
||
}
|
||
if(g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1] == 'G1'){
|
||
zq_count++;
|
||
}else{
|
||
gp_count++;
|
||
}
|
||
g_count++;
|
||
}
|
||
// g_count++;
|
||
for(var i=0;i<g_arrayXgInfo.length;i++){
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqxgNum++;
|
||
}else{
|
||
gpxgNum++;
|
||
}
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
g_callbackName = "fn_callbackXgwt";
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
if($('#gpxg').attr('checked') && $('#zqxg').attr('checked')){
|
||
gpxqChoose = 'all';
|
||
if(xg_genre == 'G1'){
|
||
fn_xzwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}else{
|
||
fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}
|
||
}else if($('#gpxg').attr('checked')){
|
||
// 找到 第一个新股 进行申购
|
||
while(g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1] == 'G1')
|
||
{
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
gpxqChoose = 'xgsg';
|
||
showResultHtml();
|
||
g_yjsgStatus = 1;
|
||
return;
|
||
}
|
||
g_count++;
|
||
zq_count++;
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
if(xg_genre == 'G1'){
|
||
// 没找到 没有新股 返回
|
||
} else {
|
||
gpxqChoose = 'xgsg';
|
||
gp_count++;
|
||
fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}
|
||
}else if($('#zqxg').attr('checked')){
|
||
// 找到第一个新进行申购
|
||
while(!(g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1] == 'G1'))
|
||
{
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
gpxqChoose = 'zqsg';
|
||
showResultHtml();
|
||
g_yjsgStatus = 1;
|
||
return;
|
||
}
|
||
g_count++;
|
||
gp_count++;
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
if(xg_genre == 'G1'){
|
||
gpxqChoose = 'zqsg';
|
||
zq_count++;
|
||
fn_xzwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}else{
|
||
// 没找到新债 直接返回
|
||
}
|
||
}else{
|
||
// alert('请选择一键申购的债券种类!');
|
||
zqxgNum = 0;
|
||
gpxgNum = 0;
|
||
}
|
||
// fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
|
||
}
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、申购回调函数
|
||
*/
|
||
function fn_callbackXgwt(pram)
|
||
{
|
||
if(g_callbackName != "fn_callbackXgwt") return;
|
||
g_callbackName = "";
|
||
var array_yjsgReplyInfo = parse_yijiansg(pram);
|
||
// 存储错误消息
|
||
if(array_yjsgReplyInfo[0] != '0') //ret_code
|
||
{
|
||
g_retMsg[g_count] = array_yjsgReplyInfo[1]; //ret_msg
|
||
}
|
||
else
|
||
{
|
||
g_retMsg[g_count] = 1; // 如果正确让他等于1
|
||
}
|
||
//获取委托数据
|
||
if(g_arrayXgInfo.length > (g_count + 1))
|
||
{
|
||
g_count++;
|
||
if($('#gpxg').attr('checked') && !$('#zqxg').attr('checked')){
|
||
if(gp_count == gpxgNum){
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
}else if(!$('#gpxg').attr('checked') && $('#zqxg').attr('checked')){
|
||
if(zq_count == zqxgNum){
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
}
|
||
|
||
while(g_arrayXgInfo[g_count][2] == 0 ||g_arrayXgInfo[g_count][2] == '')
|
||
{
|
||
g_retMsg[g_count] = 2; // 有错误就给标记赋值为2
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
gpxqChoose = 'xgsg';
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
g_count++;
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
g_callbackName = "fn_callbackXgwt";
|
||
//fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
if($('#gpxg').attr('checked') && $('#zqxg').attr('checked')){
|
||
if(xg_genre == 'G1'){
|
||
fn_xzwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}else{
|
||
fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
}
|
||
}else if($('#gpxg').attr('checked')){
|
||
// 找下一个新股
|
||
while(g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1] == 'G1')
|
||
{
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
g_count++;
|
||
zq_count++;
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
// 最后一个数据判断
|
||
if(xg_genre == 'G1'){
|
||
if(gpxgNum == gp_count){
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
}else{
|
||
fn_xgwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
gp_count++;
|
||
}
|
||
}else if($('#zqxg').attr('checked')){
|
||
// 查找下一个下一个新债
|
||
while(!(g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1] == 'G1'))
|
||
{
|
||
if(g_arrayXgInfo.length <= (g_count + 1)) // 判断新股列表还有没有新股,如果没有新股,就展示页面
|
||
{
|
||
gpxqChoose = 'zqsg';
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
g_count++;
|
||
gp_count++;
|
||
}
|
||
var sgCode = g_arrayXgInfo[g_count][1]; // 申购代码
|
||
var maxSgCount = g_arrayXgInfo[g_count][2]; // 可申购数量
|
||
var marketCode = g_arrayXgInfo[g_count][4]; // 市场代码
|
||
var sgPrice = g_arrayXgInfo[g_count][5]; // 申购价格
|
||
var xg_genre = g_arrayXgInfo[g_count][g_arrayXgInfo[g_count].length-1];
|
||
// 最后一个数据判断
|
||
if(xg_genre == 'G1'){
|
||
fn_xzwt(g_callbackName,sgCode,maxSgCount,marketCode,sgPrice);
|
||
zq_count++;
|
||
}else{
|
||
if(zqxgNum == zq_count){
|
||
showResultHtml();
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
else
|
||
{
|
||
showResultHtml();
|
||
}
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 1、查询中签信息的回调函数
|
||
*/
|
||
function fn_callback_zq(zqParam)
|
||
{
|
||
// alert(zqParam+'-----------------callback_zq')
|
||
g_arrayZqInfo = parse_zqmx(zqParam);
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 关闭页面
|
||
*/
|
||
function close_page()
|
||
{
|
||
fnFunction("close_dlg_ex", '');
|
||
}
|
||
|
||
//增加行
|
||
function createRow(arr,obj)
|
||
{
|
||
for(var i=0; i<arr.length; i++)
|
||
{
|
||
var oList = document.createElement("td");
|
||
oList.innerHTML = arr[i];
|
||
obj.appendChild(oList);
|
||
}
|
||
}
|
||
|
||
//跳转菜单
|
||
function fn_jump2menu(menuid)
|
||
{
|
||
fnFunction("js_run_finished", '1'); // 新版本页面设置正常完成
|
||
fnFunction("hide_dlg","");
|
||
fnFunction("menu_jump",menuid.toString());
|
||
}
|
||
|
||
//展示成功提交或申购失败页面
|
||
function showResultHtml()
|
||
{
|
||
//隐藏中签页面
|
||
var nodeResult = document.getElementById("zqResult");
|
||
nodeResult.className = nodeResult.className.replace("showHtml","hideHtml");
|
||
|
||
//隐藏新股页面
|
||
nodeResult = document.getElementById("newSg");
|
||
nodeResult.className = nodeResult.className.replace("showHtml","hideHtml");
|
||
|
||
//显示结果页面
|
||
nodeResult = document.getElementById("sgResult");
|
||
nodeResult.className = nodeResult.className.replace("hideHtml","showHtml");
|
||
//设置header-title
|
||
//alert((g_arrayXgInfo.length == 1)+'-----------'+(gpxqChoose == 'zqsg' && zqxgNum == 1)+'-----------'+(gpxqChoose == 'xgsg' && gpxgNum == 1))
|
||
if(g_arrayXgInfo.length == 1 || (gpxqChoose == 'zqsg' && zqxgNum == 1) || (gpxqChoose == 'xgsg' && gpxgNum == 1)) // 单只新股
|
||
{
|
||
if(g_retMsg[0] == 1) //返回正确
|
||
{
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-ok");
|
||
$("#sgResult .header-title").text("已成功提交");
|
||
$("#sgResult #noticeResult").append("<span class=\"cr\">注:</span>T+2日后在新股申购的新股中签查询中可查看“中签结果”信息。");
|
||
$("#sgResult .btn").text("申购成功").click(handleSgFail);
|
||
}
|
||
else
|
||
{
|
||
$("#sgResult .header-title").text("对不起,申购失败");
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-mistake");
|
||
$("#sgResult #noticeResult").append("<span class=\"cr\">原因:</span>" +g_retMsg[0]);
|
||
$("#sgResult .btn").click(handleSgFail);
|
||
}
|
||
}
|
||
else // 多只新股
|
||
{
|
||
var count = 0;
|
||
for(var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
if(g_retMsg[i] != 1)
|
||
{
|
||
count++;
|
||
}
|
||
}
|
||
|
||
if(count < g_arrayXgInfo.length && count >= 0)
|
||
{
|
||
if(count == 0) //全部成功
|
||
{
|
||
$("#sgResult .header-title").text("已成功提交");
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-ok");
|
||
}
|
||
else
|
||
{
|
||
$("#sgResult .header-title").text("已部分成功提交");
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-mistake");
|
||
}
|
||
|
||
$("#sgResult .btn").text("确定");
|
||
$("#sgResult #noticeResult").append("<span class=\"cr\">注:</span>T+2日后在新股申购的新股中签查询中可查看“中签结果”信息。");
|
||
$("#sgResult .btn").click(handleSgFail);
|
||
}
|
||
else
|
||
{
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-mistake");
|
||
$("#sgResult .header-title").text("对不起,申购失败");
|
||
$("#sgResult .btn").click(handleSgFail);
|
||
}
|
||
|
||
}
|
||
|
||
var tbody = document.getElementById("sg_tbody");
|
||
var tbody1 = document.getElementById("zhaiquansg_tbody");
|
||
if(g_arrayXgInfo.length == 1 || (gpxqChoose == 'zqsg' && zqxgNum == 1) || (gpxqChoose == 'xgsg' && gpxgNum == 1))
|
||
{
|
||
if (gpxqChoose == 'zqsg'){
|
||
for(var i = 0; i < g_arrayXgInfo.length; i++){
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
if(g_retMsg[0] == 1) // 如果申购成功
|
||
{
|
||
arr[4] = g_arrayXgInfo[i][2];
|
||
}
|
||
else
|
||
{
|
||
arr[4] = 0;
|
||
}
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
$('#ipoXg').hide();
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond2').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
}
|
||
}
|
||
}else if(gpxqChoose == 'xgsg'){
|
||
for(var i = 0; i < g_arrayXgInfo.length; i++){
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
|
||
}else{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
if(g_retMsg[0] == 1) // 如果申购成功
|
||
{
|
||
arr[4] = g_arrayXgInfo[i][2];
|
||
}
|
||
else
|
||
{
|
||
arr[4] = 0;
|
||
}
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond2').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
}
|
||
}
|
||
}else{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[0][g_arrayXgInfo[0].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[0][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[0][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[0][2]; // 可申购数量
|
||
if(g_retMsg[0] == 1) // 如果申购成功
|
||
{
|
||
arr[4] = g_arrayXgInfo[0][2];
|
||
}
|
||
else
|
||
{
|
||
arr[4] = 0;
|
||
}
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[0][g_arrayXgInfo[0].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond2').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
}
|
||
}
|
||
else
|
||
{
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
//arr[3] = g_arrayXgInfo[i][3]; // 已申购数量
|
||
if(g_retMsg[i] == 1) // 如果申购成功
|
||
{
|
||
arr[4] = g_arrayXgInfo[i][2];
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
if(gpxqChoose == 'zqsg' || gpxqChoose == 'all'){
|
||
$('#ipoBond2').show();
|
||
}
|
||
}else{
|
||
if(gpxqChoose == 'zqsg'){
|
||
$('#ipoXg').hide();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
}
|
||
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
}
|
||
else if(g_retMsg[i] == 2) // 可申购数量为零时
|
||
{
|
||
arr[4] = 0;
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
if(gpxqChoose == 'zqsg' || gpxqChoose == 'all'){
|
||
$('#ipoBond2').show();
|
||
}
|
||
}else{
|
||
if(gpxqChoose == 'zqsg'){
|
||
$('#ipoXg').hide();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
}
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
}
|
||
else // 有可申购数量,申购失败时
|
||
{
|
||
arr[4] = '';
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
if(gpxqChoose == 'zqsg' || gpxqChoose == 'all'){
|
||
$('#ipoBond2').show();
|
||
}
|
||
}else{
|
||
if(gpxqChoose == 'zqsg'){
|
||
$('#ipoXg').hide();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
}
|
||
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
$(objtr).append('<a color="red"><font color="#FF0000">申购失败</font></a><img src = "../images/error.png" width = 14px height = 14px>');
|
||
var $v=$(objtr);
|
||
//$v.css("title",function(){return g_retMsg[i];});
|
||
$v.attr("title",g_retMsg[i]); // 提示错误消息
|
||
$v.css("color","red");
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
//取值范围:
|
||
//1 : 抱歉你的可申购额度为0
|
||
//2 : 一键申购
|
||
//3 : 您当日已经成功申购,无需申购
|
||
//4 : 今日没有新股申购
|
||
var g_UserSgStatus = 0;
|
||
|
||
var g_initDlgFlag = 0;
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 展示页面
|
||
*步骤:
|
||
*1.根据之前几步查到的信息,判断该用户的情况,赋值给g_UserSgStatus
|
||
*2.根据g_UserSgStatus的不同展示相应的页面
|
||
*/
|
||
function fn_showPage()
|
||
{
|
||
if (g_initDlgFlag > 0)
|
||
{
|
||
return;
|
||
}
|
||
|
||
//新股新债数量 北交所新股数量
|
||
xgxzNum = 0;
|
||
gzxgNum = 0;
|
||
var gzxgResult = handleGzxgParamsChange();
|
||
|
||
//显示中签信息
|
||
var zqResult = fn_showZqHtml();
|
||
//显示新股信息
|
||
var sgResult = fn_showSgHtml();
|
||
|
||
var initDlg = 1;
|
||
if(zqResult == 0 && (sgResult == 4 || sgResult == 0 ) && gzxgResult == 0 )
|
||
initDlg = 0;
|
||
|
||
if (initDlg)
|
||
{
|
||
fnSetUserData("yjsg_init_finished","1");
|
||
|
||
var today = getDate();
|
||
var notnoticedate =fnGetConfigData("SYSTEM","WT_DATE_YJSG_NOT_NOTICE","");
|
||
if(notnoticedate.toString()== today.toString()) //已勾选当日不再提醒的情况下勾上勾选框
|
||
{
|
||
nodeNew = document.getElementById("sg_chk_not_notice_today");
|
||
nodeNew.checked = true;
|
||
}
|
||
|
||
/*以下情况会弹出对话框
|
||
1、点击运营位
|
||
2、登录时,有可申购新股或者有中签且没有勾选当日不提醒框
|
||
*/
|
||
if(g_openMode.toString() != '1' || (sgResult == 2 || zqResult == 1 || gzxgResult == 1) && notnoticedate.toString() != today.toString())
|
||
{
|
||
fnFunction("show_dlg", '');
|
||
}
|
||
}
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 显示中签页面
|
||
*/
|
||
function fn_showSgHtml()
|
||
{
|
||
//nodeResult.className = nodeResult.className.replace("hideHtml","showHtml");
|
||
//设置header-title
|
||
g_initDlgFlag = 1;
|
||
var maxSgCount = 0; // 可申购数量
|
||
var alreadySgCount = 0;
|
||
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
if(g_arrayXgInfo[i][3] > alreadySgCount)
|
||
alreadySgCount = g_arrayXgInfo[i][3]; // 取最大已申购数量作为已申购数量
|
||
}
|
||
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
if (parseInt(g_arrayXgInfo[i][1]) > 0 && parseInt(g_arrayXgInfo[i][2]) > 0)
|
||
{
|
||
maxSgCount = parseInt(g_arrayXgInfo[i][2]);
|
||
// 找最小已申购数量赋值给alreadySgCount
|
||
if(parseInt(g_arrayXgInfo[i][3]) < alreadySgCount)
|
||
{
|
||
alreadySgCount = g_arrayXgInfo[i][3];
|
||
if(alreadySgCount == 0)
|
||
{
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
// 无新股
|
||
if (g_arrayXgInfo.length < 1) //没有新股的情况
|
||
{
|
||
g_UserSgStatus = 4;
|
||
|
||
} else if (g_arrayXgInfo.length > 0) // 有新股
|
||
{
|
||
|
||
if (maxSgCount == 0) // 有新股,可申购额度为零
|
||
{
|
||
g_UserSgStatus = 1;
|
||
|
||
} else if (maxSgCount > 0 && alreadySgCount == 0) // 有新股, 有可申购额度, 已申购数量为零
|
||
{
|
||
g_UserSgStatus = 2;
|
||
|
||
} else if (maxSgCount > 0 && alreadySgCount > 0) // 有新股,有可申购额度, 已申购数量大于零
|
||
{
|
||
g_UserSgStatus = 3;
|
||
}
|
||
}
|
||
for(var i=0;i<g_arrayXgInfo.length;i++){
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqxgNum++;
|
||
}else{
|
||
gpxgNum++;
|
||
}
|
||
}
|
||
var now_xgnum =0;//已申购的新股数
|
||
var now_xznum =0;//已申购的新债数
|
||
for(var j = 0; j < g_arrayXgInfo.length; j++){
|
||
if(parseInt(g_arrayXgInfo[j][3]) > 0){
|
||
if(g_arrayXgInfo[j][g_arrayXgInfo[j].length-1] == 'G1'){
|
||
now_xznum++
|
||
}else{
|
||
now_xgnum++;
|
||
}
|
||
}
|
||
}
|
||
if (now_xznum>=zqxgNum){//所有新债已申购
|
||
$('#zqxg').attr('checked',false);
|
||
$('#zqxg').attr('disabled','disabled');
|
||
}
|
||
if (now_xgnum>=gpxgNum){//所有新股已申购
|
||
$('#gpxg').attr('checked',false);
|
||
$('#gpxg').attr('disabled','disabled');
|
||
}
|
||
if($('#zqxg').attr('disabled')=='disabled' && $('#gpxg').attr('disabled') =='disabled'){
|
||
g_UserSgStatus = 3;
|
||
}
|
||
zqxgNum = 0;
|
||
gpxgNum = 0;
|
||
|
||
switch (g_UserSgStatus)
|
||
{
|
||
case 1: //g_UserSgStatus = 1 抱歉你的可申购额度为0
|
||
{
|
||
var nodeNew = document.getElementById("newSg");
|
||
var nodeResult = document.getElementById("sgResult");
|
||
nodeNew.className = nodeNew.className.replace("hideHtml","showHtml");
|
||
nodeResult.className = nodeNew.className.replace("showHtml","hideHtml");
|
||
var tbody = document.getElementById("xg_tbody");
|
||
var tbody1 = document.getElementById("zhaiquan_tbody");
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
|
||
//内容修改为红色
|
||
objtr = obj.getElementsByTagName("td")[2];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
}
|
||
if(!tbody.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<4; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody.appendChild(obj);
|
||
$('#gpxg').attr('checked',false);
|
||
}
|
||
if(!tbody1.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<4; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody1.appendChild(obj);
|
||
$('#zqxg').attr('checked',false);
|
||
}
|
||
$(".aside-section").html('<p>1. 您的股票账户新股申购权益不足,暂无法进行新股申购。</p>');
|
||
$("#disSg").addClass("btn btn-ban").text("无法申购");
|
||
}
|
||
break;
|
||
case 2: //g_UserSgStatus = 2 一键申购
|
||
{
|
||
var nodeNew = document.getElementById("newSg");
|
||
nodeNew.className = nodeNew.className.replace("hideHtml","showHtml");
|
||
var tbody = document.getElementById("xg_tbody");
|
||
var tbody1 = document.getElementById("zhaiquan_tbody");
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
}
|
||
if(!tbody.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<4; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody.appendChild(obj);
|
||
$('#gpxg').attr('checked',false);
|
||
}
|
||
if(!tbody1.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<4; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody1.appendChild(obj);
|
||
$('#zqxg').attr('checked',false);
|
||
}
|
||
$("#yjsg").addClass("icon btn-active");
|
||
nodeNew = document.getElementById("sg_not_notice_today");
|
||
nodeNew.style.display = "block";
|
||
nodeNew = document.getElementById("jump2plsg");
|
||
nodeNew.style.display = "block";
|
||
nodeNew = document.getElementById("zq_not_notice_today");
|
||
nodeNew.style.display = "none";
|
||
|
||
}
|
||
break;
|
||
case 3: //g_UserSgStatus = 3 您当日已经成功申购,无需申购
|
||
{
|
||
var nodeResult = document.getElementById("sgResult");
|
||
nodeResult.className = nodeResult.className.replace("hideHtml","showHtml");
|
||
$("#sgResult .icon-title").removeClass().addClass("icon-title title-ok");
|
||
$("#sgResult .header-title").text("已成功提交");
|
||
$("#sgResult #noticeResult").append("<span class=\"cr\">注:</span>T+2日后在新股申购的新股中签查询中可查看“中签结果”信息。");
|
||
$("#sgResult .btn").addClass("btn-ban").text("已申购");
|
||
var tbody = document.getElementById("sg_tbody");
|
||
var tbody1 = document.getElementById("zhaiquansg_tbody");
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++)
|
||
{
|
||
var zqlb = '';
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
var arr = new Array();
|
||
arr[0] = zqlb;//证券类别
|
||
arr[1] = g_arrayXgInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayXgInfo[i][1]; // 申购代码
|
||
arr[3] = g_arrayXgInfo[i][2]; // 可申购数量
|
||
arr[4] = g_arrayXgInfo[i][3]; // 已申购数量
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
if(g_arrayXgInfo[i][g_arrayXgInfo[i].length-1] == 'G1'){
|
||
tbody1.appendChild(obj);
|
||
$('#ipoBond2').show();
|
||
}else{
|
||
tbody.appendChild(obj);
|
||
}
|
||
//设置颜色
|
||
objtr = obj.getElementsByTagName("td")[3];
|
||
var $v=$(objtr);
|
||
$v.css("color","red");
|
||
}
|
||
if(!tbody.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<5; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody.appendChild(obj);
|
||
$('#gpxg').attr('checked',false);
|
||
}
|
||
if(!tbody1.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<5; i++){
|
||
var oList = document.createElement("td");
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody1.appendChild(obj);
|
||
$('#zqxg').attr('checked',false);
|
||
}
|
||
}
|
||
break;
|
||
case 4: //g_UserSgStatus = 4 今日没有新股申购
|
||
default:
|
||
{
|
||
}
|
||
}
|
||
|
||
if(g_arrayXgInfo.length > 0)
|
||
{
|
||
var tip = g_arrayXgInfo[0][0];
|
||
var seperator = ''
|
||
if(g_arrayXgInfo.length > 1)
|
||
seperator = "等";
|
||
tip = tip + seperator + "新股申购";
|
||
fnFunction("set_indicator_text","text="+tip+"\nid=63305\n");
|
||
}
|
||
|
||
return g_UserSgStatus;
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 显示中签页面
|
||
*/
|
||
function fn_showZqHtml()
|
||
{
|
||
//nodeResult.className = nodeResult.className.replace("hideHtml","showHtml");
|
||
//设置header-title
|
||
if(g_arrayZqInfo.length > 0 && !isFromGzxg()) // 中签 且 不是从北交所新股页面过来的
|
||
{
|
||
var nodeResult = document.getElementById("zqResult");
|
||
nodeResult.className = nodeResult.className.replace("hideHtml","showHtml");
|
||
var tbody = document.getElementById("zq_tbody");
|
||
var zjInof = new Array();
|
||
for (var i = 0; i < g_arrayZqInfo.length; i++)
|
||
{
|
||
var arr = new Array();
|
||
var zqlb = '';
|
||
if(g_arrayZqInfo[i][6] == 'G1'){
|
||
zqlb = '债券';
|
||
}else{
|
||
zqlb = '股票';
|
||
}
|
||
arr[0] = zqlb; // 新股新债区分
|
||
arr[1] = g_arrayZqInfo[i][0]; // 证券名称
|
||
arr[2] = g_arrayZqInfo[i][1]; // 中签数量
|
||
// arr[3] = parseFloat(g_arrayZqInfo[i][2]).toFixed(2); // 发行价格(元)
|
||
// arr[4] = isGuZhuan(g_arrayZqInfo[i][5]) ? '-' : parseFloat(g_arrayZqInfo[i][3]).toFixed(2);
|
||
var obj = document.createElement("tr");
|
||
createRow(arr,obj);
|
||
tbody.appendChild(obj);
|
||
if(!isGuZhuan(g_arrayZqInfo[i][5])){
|
||
if (typeof zjInof[g_arrayZqInfo[i][4]] == 'undefined')
|
||
{
|
||
zjInof[g_arrayZqInfo[i][4]] = arr[4];
|
||
}
|
||
else
|
||
{
|
||
zjInof[g_arrayZqInfo[i][4]] = parseFloat(zjInof[g_arrayZqInfo[i][4]]) + parseFloat(arr[4]);
|
||
}
|
||
}
|
||
}
|
||
if(!tbody.hasChildNodes()){
|
||
var obj = document.createElement("tr");
|
||
for(var i=0; i<5; i++){
|
||
var oList = document.createElement("td");
|
||
if(i==0){
|
||
oList.innerHTML = '股票';
|
||
}
|
||
obj.appendChild(oList);
|
||
}
|
||
tbody.appendChild(obj);
|
||
}
|
||
//设置状态栏文字
|
||
var tip = g_arrayZqInfo[0][0];
|
||
var seperator = ''
|
||
if(g_arrayZqInfo.length > 1)
|
||
seperator = "等";
|
||
tip = tip + seperator + "中签提醒";
|
||
|
||
if(!isAllGuZhuan(g_arrayZqInfo)){
|
||
// 这段文字 在只有北交所中签信息时不显示,其他时候正常显示。
|
||
for( var i in zjInof)
|
||
{
|
||
$("#zqResult #zqNoticeResult").append("请在"+ (i == 'undefined' ? '当日' : i) +"16:00前保证账户中有足够的可用资金,如果您已锁定中签资金,请忽略,谢谢!<br/>");
|
||
}
|
||
}
|
||
|
||
|
||
fnFunction("set_indicator_text","text="+tip+"\nid=63305\n");
|
||
|
||
var today = getDate();
|
||
var nodeNew
|
||
var notnoticedate =fnGetConfigData("SYSTEM","WT_DATE_YJSG_NOT_NOTICE","");
|
||
if(notnoticedate.toString()== today.toString()) //已勾选当日不再提醒的情况下勾上勾选框
|
||
{
|
||
var nodeNew = document.getElementById("zq_chk_not_notice_today");
|
||
nodeNew.checked = true;
|
||
}
|
||
return 1;
|
||
}
|
||
return 0;
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 北交所页面需要的参数计算
|
||
*/
|
||
function handleGzxgParamsChange() {
|
||
// 隐藏loading
|
||
$("#loadingResult").hide();
|
||
var xgxzArray = new Array();
|
||
var list = new Array();
|
||
for (var i = 0; i < g_arrayXgInfo.length; i++){
|
||
|
||
//倒数第二个字段是判断是否北交所的
|
||
var isGuZhuanFlag = isGuZhuan(g_arrayXgInfo[i][g_arrayXgInfo[i].length-2]);
|
||
if(isGuZhuanFlag){
|
||
gzxgNum++;
|
||
var arr = new Array();
|
||
arr[0] = g_arrayXgInfo[i][1]; // 发行代码
|
||
arr[1] = g_arrayXgInfo[i][0]; // 发行简称
|
||
arr[2] = g_arrayXgInfo[i][g_arrayXgInfo[i].length-3]; // 证券状态
|
||
list.push(arr.join(","));
|
||
}else {
|
||
xgxzArray.push(g_arrayXgInfo[i]);
|
||
xgxzNum++;
|
||
}
|
||
}
|
||
$.cookie("nums",xgxzNum+'|'+gzxgNum);
|
||
$.cookie("gzxgArray",list.join("|"));
|
||
|
||
|
||
//数量渲染
|
||
$("#xgxzNum").text(xgxzNum);
|
||
$("#gzxgNum").text(gzxgNum);
|
||
$("#xgxzNum2").text(xgxzNum);
|
||
$("#gzxgNum2").text(gzxgNum);
|
||
|
||
//无新股新债有北交所也提示信息
|
||
if(g_arrayXgInfo.length > 0 && xgxzNum == 0)
|
||
{
|
||
var tip = g_arrayXgInfo[0][0];
|
||
var seperator = ''
|
||
if(g_arrayXgInfo.length > 1)
|
||
seperator = "等";
|
||
tip = tip + seperator + "新股申购";
|
||
fnFunction("set_indicator_text","text="+tip+"\nid=63305\n");
|
||
}
|
||
//将北交所新股从新股信息里过滤掉
|
||
g_arrayXgInfo=xgxzArray;
|
||
|
||
// 如果中签了展示中签弹窗
|
||
showZqModelIfZq();
|
||
|
||
return gzxgNum > 0 ? 1 : 0;
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 判断是否是北交所
|
||
*/
|
||
function isGuZhuan(val) {
|
||
return val == '6' || val == '7' || val == ':' ;
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 判断是否是北交所新股页面返回的
|
||
*/
|
||
function isFromGzxg() {
|
||
return location.search.indexOf('from=gzxg') !== -1 ;
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 判断中签是否都是北交所
|
||
*/
|
||
function isAllGuZhuan(zqInfo) {
|
||
var gzNum = 0;
|
||
for (var i = 0; i < zqInfo.length; i++){
|
||
if(isGuZhuan(zqInfo[i][5])){
|
||
gzNum++;
|
||
}
|
||
}
|
||
return gzNum == zqInfo.length ;
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 申购失败按钮点击事件
|
||
*/
|
||
function handleSgFail() {
|
||
if(gzxgNum>0){
|
||
// 如果有北交所新股,应该再最后一步确认后默认跳转到北交所批量申购菜单
|
||
fn_jump2menu(5687);
|
||
}else {
|
||
close_page();
|
||
}
|
||
|
||
}
|
||
/*
|
||
* 函数功能说明:
|
||
* 如果中签了展示中签弹窗
|
||
*/
|
||
function showZqModelIfZq(){
|
||
if(isFromGzxg()){
|
||
//从北交所新股返回 直接处理关闭后的情况
|
||
handleZqModelClosed();
|
||
return;
|
||
}
|
||
|
||
if(g_arrayZqInfo.length>0){
|
||
//中签了 弹窗
|
||
|
||
}else{
|
||
//没中签 直接处理关闭后的情况
|
||
handleZqModelClosed();
|
||
}
|
||
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 处理中签弹窗关闭
|
||
*/
|
||
function handleZqModelClosed(){
|
||
//隐藏中签页面
|
||
var nodeResult = document.getElementById("zqResult");
|
||
nodeResult.className = nodeResult.className.replace("showHtml","hideHtml");
|
||
|
||
if(xgxzNum == 0 && gzxgNum == 0){
|
||
//没有新股新债 和 北交所新股 并关闭页面
|
||
close_page();
|
||
return;
|
||
}
|
||
|
||
if(xgxzNum == 0 && gzxgNum != 0){
|
||
//无新股 且 有北交所 前往北交所新股页面
|
||
window.location.href='gzxg.html';
|
||
}
|
||
|
||
if(xgxzNum != 0 && gzxgNum == 0){
|
||
//有新股 且 无北交所
|
||
$(".title-tab a").eq(1).hide();
|
||
$(".title-tab-sg a").eq(1).hide();
|
||
}
|
||
|
||
}
|
||
|
||
/*
|
||
* 函数功能说明:
|
||
* 当日不再提醒功能
|
||
*/
|
||
function fn_notnotice_today(num)
|
||
{
|
||
var nodeNew;
|
||
if(num == 1)
|
||
nodeNew = document.getElementById("zq_chk_not_notice_today");
|
||
else
|
||
nodeNew = document.getElementById("sg_chk_not_notice_today");
|
||
|
||
if(nodeNew.checked)
|
||
{
|
||
var today = getDate();
|
||
fnSetConfigData("SYSTEM","WT_DATE_YJSG_NOT_NOTICE",today.toString())
|
||
}
|
||
else
|
||
{
|
||
fnSetConfigData("SYSTEM","WT_DATE_YJSG_NOT_NOTICE","");
|
||
}
|
||
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|