You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/BookingJieFeng/pub/Views/User/Identification.cshtml

142 lines
6.4 KiB
Plaintext

3 years ago
@{
bool onlyRead = ViewBag.Indentified | ViewBag.Indentifing;
}
@section styles
{
<link type="text/css" rel="stylesheet" href="~/Content/css/identification.css" />
}
<div class="wrapper wrapper-content animated fadeIn gray-bg-right">
@if (ViewBag.Reject)
{
<div class="row">
<div class="col-sm-12">
<h5 style="text-align:center;color:red;">您提交的认证审核已被驳回,请重新提交审核</h5>
</div>
</div>
}
<form class="form-horizontal clearfix" id="indentForm" method="post">
<div class="row">
<div class="col-lg-5 col-md-5 col-sm-5 col-sm-offset-3 account-b">
<div class="ibox float-e-margins">
<div class="ibox-title"><h5>账号认证</h5></div>
<div class="ibox-content">
@if (!ViewBag.Indentifing && !ViewBag.Indentified)
{
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">社会信用代码</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="companyCode">
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">办公地址</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="address">
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">营业执照扫描件</label>
<div class="col-lg-8 col-md-6">
<input name="file" type="file" class="form-control">
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-5 col-sm-offset-5 clearfix">
<a class="btn btn-info btn-block" id="btnSubmit">提交认证</a>
</div>
}
else
{
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">社会信用代码</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="companyCode" value="@ViewBag.CompanyCode" readonly disabled>
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">办公地址</label>
<div class="col-lg-8 col-md-6">
<input type="text" class="form-control" name="address" value="@ViewBag.Address" readonly disabled>
</div>
</div>
<div class="form-group clearfix">
<label class="col-lg-3 col-md-5 control-label">营业执照扫描件</label>
<div class="col-lg-8 col-md-6">
<img class="picture" src="@Url.Action("ViewIdentifyImg")" title="点击查看" id="imgPic">
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-5 col-sm-offset-5 clearfix">
@if (ViewBag.Indentifing)
{
<a class="btn btn-info btn-block">认证中</a>
}
else if (ViewBag.Indentified)
{
<a class="btn btn-info btn-block btn-disable">已认证</a>
}
</div>
}
</div>
</div>
</div>
</div>
</form>
</div>
@section scripts
{
<script src="~/Content/hplus/js/plugins/validate/jquery.validate.min.js"></script>
<script src="~/Content/js/jquery.form.js"></script>
<script src="~/Content/js/validatorConfig.js"></script>
<script>
$(function () {
$("#indentForm").validate({
rules: {
companyCode: "required",
address: "required",
file: "required"
},
messages: {
companyCode: errIcon + "请输入社会信用代码",
address: errIcon + "请输入办公地址",
file: errIcon + "请选择营业执照扫描件"
}
});
$("#btnSubmit").click(function () {
if ($("#indentForm").valid()) {
$("#indentForm").ajaxSubmit({
method: 'POST',
url: '@Url.Action("IdentiSubmit")',
success: function (data) {
layer.open({
title: '提交认证成功,请等待管理员审核',
content: data.Message,
yes: function (index) {
location.reload();
layer.close(index);
}
});
}
});
}
});
$("#imgPic").click(function () {
var width = document.getElementById('imgPic').naturalWidth;
var height = document.getElementById('imgPic').naturalHeight;
layer.open({
type: 1,
title:false,
area: ['900px', '600px'],
content: '<img class="picture" src="@Url.Action("ViewIdentifyImg")" style="width:' + width + 'px;height:' + height + 'px;">'
});
})
})
</script>
}