why.xingtongworld.com项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

104 lines
4.4 KiB

{layout name="pagelayout" /}
<p class="tip" style="color:#999;font-size:14px;"><span style="color:red;">* </span> 搜索必填信息</p>
<div id="subform" class="dbody" style="display:block">
<form method="post" id="subForm" action="{:url('verify',array('cid'=>$menu_id))}">
{:token('__checkcode__')}
{if condition="$menu_id eq 1"}
<div class="formrow">
<label>证书编号 :<span style="color:red;">* </span></label>
<div class="input">
<input type="text" id="idno" name="idno" /><div class="error"></div>
</div>
</div>
{/if}
{if condition="$menu_id eq 2"}
<div class="formrow">
<label>手机号码 :<span style="color:red;">* </span></label>
<div class="input">
<input type="text" id="mobile" name="mobile" /><div class="error"></div>
</div>
</div>
{/if}
{if condition="$menu_id eq 3"}
<div class="formrow">
<label>权属人 :<span style="color:red;">* </span></label>
<div class="input">
<input type="text" id="ower" name="ower" /><div class="error"></div>
</div>
</div>
{/if}
<div class="formrow">
<label>客户名称:</label>
<div class="input">
<input type="text" id="name" name="name" /><div class="error"></div>
</div>
</div>
<div class="formrow">
<label>&nbsp;&nbsp;</label>
<div class="input">
<button type="button" id="submit" name="submit" class="redbtn" style="width:80px;">提交</button>&nbsp;&nbsp;
<button type="button" name="reset" style="border:none;width:80px;line-height: 2.8em;cursor:pointer;">重置</button>
</div>
</div>
</form>
</div>
<h3 class="center" id="idnotxt" style="color:red;"></h3>
<br/>
<div class="center" id="poster"></div>
<script>
$("#submit").click(function(event){
var idno=$("#idno").val();
var mobile=$("#mobile").val();
var ower=$("#ower").val();
var name=$("#name").val();
$(".formrow .error").html('');
{if condition="$menu_id eq 1"}
if(typeof idno=='undefined'||idno==''){
$(".formrow .error").eq(0).html('请输入证书编号');
return false;
}
{/if}
{if condition="$menu_id eq 2"}
if(typeof mobile=='undefined'||mobile==''){
$(".formrow .error").eq(0).html('请输入手机号码');
return false;
}
if(mobile.length!=11||!/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/.test(mobile)){
$(".formrow .error").eq(0).html('请输入正确手机号码');
return false;
}
{/if}
{if condition="$menu_id eq 3"}
if(typeof ower=='undefined'||ower==''){
$(".formrow .error").eq(0).html('请输入权属人');
return false;
}
{/if}
layer.msg("查询中",{icon:16,time:-1});
$("#idnotxt,#poster").html('');
var url="{:url('verify',array('cid'=>$menu_id))}";
var postData=$("#subForm").serialize();
$.post(url,postData,function(data){
var code=data.code;
var url=data.url;
var msg=data.msg;
layer.msg(msg);
var ret=data.data;
if(typeof ret.token!='undefined'){
$("input[name='__checkcode__']").val(ret.token);
}
console.log(ret);
if(code==1){
if(typeof ret.idno!='undefined'&&ret.idno){
$("#idnotxt").html(ret.idno);
}
if(typeof ret.poster!='undefined'&&ret.poster){
var path="{:SITE_PATH}";
$("#poster").html('<img src="'+path+ret.poster+'" width="100%"/>');
}
}
});
});
</script>