2025-06-11 14:49:36 +08:00

194 lines
6.1 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>知识测评页面</title>
<script type="text/javascript" src="../comm/jquery.js"></script>
<script type="text/javascript" src="../comm/hxcomm.js"></script>
<script type="text/javascript" src="../comm/fund_level.js"></script>
<link rel='stylesheet' type='text/css' href='../css/style.css' ></link>
<style>
.p_ans_no {padding-left:60px;}
p {padding-left:30px;font-weight:bold;}
th {valign:top;text-align:center;}
td {valign:top;text-align:center;}
</style>
<script type="text/javascript">
var req_cnt = 0;
var ans_cnt = 0;
var flag = false;
var right_cnt = 0;
function new_fxpc()
{
fnCallFunctionWithParams('init', 'ND=1.0\ncmd=ajax_pkg\n');
}
function init()
{
fnCallFunctionWithParams('show_user_fxdj', 'ND=1.0\ncmd=query_fxpcxx\n');
}
function show_user_fxdj(strVal)
{
var retcode = getFieldValue(strVal, 'retcode');
if (retcode == '1'){
$('#level_current').html(getFieldValue(strVal, 'gp_fxcxnl_mc'));
query_question();
}
else{
fnShowMsgBox(getFieldValue(strVal, 'retmsg'));
}
}
function query_question()
{
$('#result').hide();
$('#question').show();
fnCallFunctionWithParams('after_query_question', 'ND=1.0\ncmd=get_zspc_questions\n');
}
function after_query_question(strVal){
var retcode = getFieldValue(strVal, 'retcode');
if (retcode == '1')
{
//$("#output")[0].innerHTML = getFieldValue(strVal, 'risk_questions_data');
var json = eval('('+ getFieldValue(strVal, 'risk_questions_data') + ')');
display_question(render_question, json, 'hiddenModalContent', 'question_div');
//fnShowMsgBox('根据人民银行《金融机构客户身份识别和客户身份资料及交易记录保存管理办法》和交易所《会员客户证券交易行为管理实施细则》等文件的相关要求,证券公司应当了解客户的资产状况、交易习惯、证券投资经验、风险承受能力以及风险偏好等信息,敬请您如实填写,我公司承诺对您的个人资料保密。谢谢您的配合!');
}
else{
document.getElementById('Q_form').style.display="none";
fnShowMsgBox(getFieldValue(strVal, 'retmsg'));
}
}
function do_get_ans(){
var data = get_answer_data(create_answer, "hiddenModalContent", "question_div");
if (data.tip_idx != -1){
fnShowMsgBox("您的第" + data.tip_idx + "题没有回答");
return null;
}
if (data.ansdata == null){
fnShowMsgBox('取答案失败');
return null;
}
return data.ansdata;
}
function do_ans_question(){
var ansdata = do_get_ans();
if (ansdata){
var len = ansdata.length;
var i = 0;
var j = 0;
var q = null;
var req = {};
req['ND'] = '1.0';
req['cmd'] = 'submit_zspc_answer';
req['scdm'] = fnFunction("get_setcode");
req['gdzh'] = fnFunction("get_account");
req['a_cell'] = '';
//alert(len);
for (i = 0; i < len; ++i){
q = ansdata[i];
req['q_no']= q.q_real_no;
req['q_type'] = q.q_type;
var a_cell = '';
if (q.q_type == 'radio'){
a_cell= q.answer[0].a_no;
}
else if (q.q_type == 'checkbox'){
var clen = q.answer.length;
a_cell= q.answer[0].a_no;
for(j = 1; j < clen; ++ j){
a_cell = a_cell + ',' + q.answer[j].a_no;
}
}
//alert('q_no:'+req['q_no']);
//alert('a_cell:'+a_cell);
req['a_cell'] = req['a_cell'] + req['q_no'] + '|' + a_cell + ';';
//alert(req['a_cell']);
}
var param = packdata(req, '=', '\n');
req_cnt ++;
fnCallFunctionWithParams('after_ans_question', param);
}
}
function after_ans_question(strVal){
document.getElementById('Q_form').style.display = "none";
document.getElementById('current_fxjb').style.display = "none";
ans_cnt ++;
var retcode = getFieldValue(strVal, 'retcode');
if (retcode == '1')
{
//~ right_cnt ++ ;
$('#score').html(getFieldValue(strVal, 'score'));
$('#level_name').html(getFieldValue(strVal, 'level_name'));
$('#invest_advice').html(getFieldValue(strVal, 'invest_advice'));
$('#result').show();
}
else
{
fnShowMsgBox(getFieldValue(strVal, 'retmsg'));
}
//~ if (req_cnt == ans_cnt){
//~ if (right_cnt != req_cnt){
//~ alert('风险测试答题失败');
//~ }
//~ req_cnt = 0;
//~ ans_cnt = 0;
//~ right_cnt = 0;
//~ fnCallFunctionWithParams('after_query_level', "ND=1.0\ncmd=ajax_query_new\n");
//~ }
}
function after_query_level(strVal){
var retcode = getFieldValue(strVal, 'retcode');
if (retcode == '1'){
$('#score').html(getFieldValue(strVal, 'score'));
$('#level_name').html(getFieldValue(strVal, 'level_name'));
//$('#date').html(getFieldValue(strVal, 'date'));
$('#result').show();
}
else{
fnShowMsgBox(getFieldValue(strVal, 'retmsg'));
}
}
</script>
</head>
<body onload="query_question();">
<div id='question' style='display:none'>
<div align="center" id='current_fxjb' style='display:none'>
<p style='font-weight:bold;'>  您当前的投资人风险「一般」承受度大致是[<font color="red"><span id="level_current"></span></font>]型。</p>
</div>
<form id = 'Q_form' onsubmit="return false;">
<div id='hiddenModalContent' style='display:;'>
</div>
<br>
<div align="center">
<input type="button" value="提 交" onclick="do_ans_question();"/>    
<input type="reset" value="重 填" />
</div>
</form>
</div>
<div id='result' style='display:none;'>
<table border="2" cellspacing="0" width="900" style="margin:auto;">
<tbody>
<tr valign="center">
<td bgcolor="#e6e6e6" colspan="6" height="40px" width="100%">
<p align="center">
<font face="宋体"><strong>投资者知识测评分值</strong></font></p>
</td>
</tr>
<tr valign="center">
<td colspan="6" height="28" width="100%">
<p>您的得分:<font color="red"><span id="score"></span></font><span id="invest_advice"></span> </p></td>
</tr>
</tbody>
</table>
<br>
<div align="center">
<input type="button" value="重新测评" onclick="new_fxpc();"/>
</div>
</div>
<span id="output"></span>
</body>
</html>