@using MySystem.CashModels;
@{UserIdentity editData = ViewBag.data as UserIdentity;}
@{
    string RightInfo = ViewBag.RightInfo as string;
    string right = ViewBag.right as string;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>创客信息(修改)</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <script src="/admin/js/jquery-1.10.1.min.js"></script>
    <script src="/admin/js/LAreaData2.js"></script>
</head>
<body>

    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
        <input type="hidden" name="Id" value="@editData.Id" />
        
        <div class="layui-card">
          <div class="layui-card-body">
            <div class="layui-tab" lay-filter="mytabbar">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="1">基本信息</li>
                </ul>
                <div class="layui-tab-content mt20">
                    <div class="layui-tab-item layui-show">
<div class="layui-form-item">
<label class="layui-form-label">创客编号</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="BuddyNo" name="BuddyNo" value="@editData.BuddyNo" maxlength="16" lay-verify="" autocomplete="off" placeholder="请输入创客编号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">创客名称</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="BuddyName" name="BuddyName" value="@editData.BuddyName" maxlength="16" lay-verify="" autocomplete="off" placeholder="请输入创客名称">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">身份证号</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="IdCardNo" name="IdCardNo" value="@editData.IdCardNo" maxlength="18" lay-verify="" autocomplete="off" placeholder="请输入身份证号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">手机号</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="UserMobile" name="UserMobile" value="@editData.UserMobile" maxlength="11" lay-verify="" autocomplete="off" placeholder="请输入手机号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">银行卡号</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="BankCardNo" name="BankCardNo" value="@editData.BankCardNo" maxlength="32" lay-verify="" autocomplete="off" placeholder="请输入银行卡号">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">身份证正面照</label>
<div class="layui-input-block">
<div class="layui-upload">
<input type="hidden" id="CertFrontImage" name="CertFrontImage" value="@editData.CertFrontImage">
<button class="layui-btn" type="button" id="CertFrontImageBtn">选择图片</button>
<div class="layui-inline layui-word-aux">@(new MySystem.PublicFunction().GetUploadHint("UserIdentityCertFrontImage"))</div>
</div>
<div style="margin-top:10px;" id="CertFrontImageImage">
@if (!string.IsNullOrEmpty(editData.CertFrontImage))
{
<img src="@(MySystem.OssHelper.Instance.SourceHost)@editData.CertFrontImage" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic('@(MySystem.OssHelper.Instance.SourceHost)@editData.CertFrontImage')">
}
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">身份证反面照</label>
<div class="layui-input-block">
<div class="layui-upload">
<input type="hidden" id="CertReverseImage" name="CertReverseImage" value="@editData.CertReverseImage">
<button class="layui-btn" type="button" id="CertReverseImageBtn">选择图片</button>
<div class="layui-inline layui-word-aux">@(new MySystem.PublicFunction().GetUploadHint("UserIdentityCertReverseImage"))</div>
</div>
<div style="margin-top:10px;" id="CertReverseImageImage">
@if (!string.IsNullOrEmpty(editData.CertReverseImage))
{
<img src="@(MySystem.OssHelper.Instance.SourceHost)@editData.CertReverseImage" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic('@(MySystem.OssHelper.Instance.SourceHost)@editData.CertReverseImage')">
}
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">活体得分</label>
<div class="layui-input-inline">
<input class="layui-input" type="text" id="LivingScore" name="LivingScore" value="@editData.LivingScore" maxlength="20" lay-verify="" autocomplete="off" placeholder="请输入活体得分">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">活体视频</label>
<div class="layui-input-block">
<div class="layui-upload">
<input type="hidden" id="FaceVideo" name="FaceVideo" value="@editData.FaceVideo">
<button class="layui-btn" type="button" id="FaceVideoBtn">选择文件</button>
<div class="layui-inline layui-word-aux">@(new MySystem.PublicFunction().GetUploadHint("UserIdentityFaceVideo"))</div>
</div>
<div style="margin-top:10px;" id="FaceVideoFile">
@if (!string.IsNullOrEmpty(editData.FaceVideo))
{
@editData.FaceVideo<a style="margin-left:20px;text-decoration:underline;color:cornflowerblue;" href="@(MySystem.OssHelper.Instance.SourceHost)@editData.FaceVideo" target="_blank">点击查看附件</a>
}
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">活体照</label>
<div class="layui-input-block">
<div class="layui-upload">
<input type="hidden" id="LivingImage" name="LivingImage" value="@editData.LivingImage">
<button class="layui-btn" type="button" id="LivingImageBtn">选择图片</button>
<div class="layui-inline layui-word-aux">@(new MySystem.PublicFunction().GetUploadHint("UserIdentityLivingImage"))</div>
</div>
<div style="margin-top:10px;" id="LivingImageImage">
@if (!string.IsNullOrEmpty(editData.LivingImage))
{
<img src="@(MySystem.OssHelper.Instance.SourceHost)@editData.LivingImage" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic('@(MySystem.OssHelper.Instance.SourceHost)@editData.LivingImage')">
}
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">签名照片地址</label>
<div class="layui-input-block">
<div class="layui-upload">
<input type="hidden" id="SignImageUrl" name="SignImageUrl" value="@editData.SignImageUrl">
<button class="layui-btn" type="button" id="SignImageUrlBtn">选择图片</button>
<div class="layui-inline layui-word-aux">@(new MySystem.PublicFunction().GetUploadHint("UserIdentitySignImageUrl"))</div>
</div>
<div style="margin-top:10px;" id="SignImageUrlImage">
@if (!string.IsNullOrEmpty(editData.SignImageUrl))
{
<img src="@(MySystem.OssHelper.Instance.SourceHost)@editData.SignImageUrl" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic('@(MySystem.OssHelper.Instance.SourceHost)@editData.SignImageUrl')">
}
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">验证和同步账户</label>
<div class="layui-input-inline">
<select id="CheckStatus" name="CheckStatus" lay-search="">
<option value="">请选择</option>
<option value="1">进件成功</option>
<option value="2">签约成功</option>
<option value="3">进件失败</option>
</select>
<script>$("#CheckStatus").val("@editData.CheckStatus");</script>
</div>
</div>

</div>

                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
            </div>
          </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
    <script src="/other/mybjq/kindeditor-min.js"></script>
    <script src="/other/mybjq/lang/zh_CN.js"></script>
    <script>
        
        
        //编辑器
        KindEditor.ready(function (K) {
            
        });

        var ids = "";
        function getChildren(obj) {
            $.each(obj, function (index, value) {
                var id = obj[index].id;
                ids += id + ",";
                var children = obj[index].children;
                if (children) {
                    getChildren(children);
                }
            });
        }

        function AreasProvinceInit(tagId, areasVal, form) {
            for (var i = 0; i < provs_data.length; i++) {
                var sel = "";
                if (areasVal.indexOf(provs_data[i].text) > -1) {
                    sel = " selected=selected";
                }
                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
            }
            form.render();
        }

        function AreasProvinceSelected(tagId, areasVal, form, value) {
            $("#" + tagId + "City").html('<option value="">市</option>');
            var list = citys_data[value];
            for (var i = 0; i < list.length; i++) {
                var sel = "";
                if (areasVal.indexOf(list[i].text) > -1) {
                    sel = " selected=selected";
                }
                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
            }
            $("#" + tagId + "Area").html('<option value="">县/区</option>');
            form.render();
            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
        }

        function AreasCitySelected(tagId, areasVal, form, value) {
            $("#" + tagId + "Area").html('<option value="">县/区</option>');
            var list = dists_data[value];
            for (var i = 0; i < list.length; i++) {
                var sel = "";
                if (areasVal.indexOf(list[i].text) > -1) {
                    sel = " selected=selected";
                }
                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
            }
            form.render();
            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
        }

        function AreasAreaSelected(tagId, form) {
            form.render();
            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
        }
        function movePrev(obj, tagId) {
            $(obj).parent().prev().insertAfter($(obj).parent());
            checkPics(tagId);
        }
        function moveNext(obj, tagId) {
            $(obj).parent().next().insertBefore($(obj).parent());
            checkPics(tagId);
        }
        function deletePic(obj, tagId) {
            $(obj).parent().remove();
            checkPics(tagId);
        }
        function checkPics(tagId) {
            var pics = "";
            var texts = "";
            $("#" + tagId + "Image div img").each(function (i) {
                pics += $(this).attr("src").replace(osshost, '') + "|";
            });
            $("#" + tagId + "Image div input").each(function (i) {
                texts += $(this).val() + "|";
            });
            if (pics == "") {
                $("#" + tagId).val("");
            } else {
                pics = pics.substring(0, pics.length - 1);
                texts = texts.substring(0, pics.length - 1);
                $("#" + tagId).val(pics + "#cut#" + texts);
            }
        }
        function checkBox(tagId) {
            var text = "";
            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
                text += $(this).val() + ",";
            });
            $("#" + tagId).val(text);
        }
        function showBigPic(picpath) {
            parent.layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                shadeClose: true,
                area: ['auto', 'auto'],
                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
            });
        }

        var tree;
        var element;
        var upload;
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
            var $ = layui.$
                , form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate
                , croppers = layui.croppers
                , transfer = layui.transfer
                , util = layui.util;
            tree = layui.tree;
            element = layui.element;
            upload = layui.upload;
        
            //Hash地址的定位
            var layid = location.hash.replace(/^#test=/, '');
            element.tabChange('test', layid);
            element.on('tab(test)', function (elem) {
                location.hash = 'test=' + $(this).attr('lay-id');
            });
    
            //日期
            

            //上传文件
            WebUploadJs('CertFrontImageBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("UserIdentityCertFrontImage"))), function (filename) {
$('#CertFrontImageImage').html('<img src="' + osshost + filename + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(\'' + osshost + filename + '\')">')
$('#CertFrontImage').val(filename);
});
WebUploadJs('CertReverseImageBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("UserIdentityCertReverseImage"))), function (filename) {
$('#CertReverseImageImage').html('<img src="' + osshost + filename + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(\'' + osshost + filename + '\')">')
$('#CertReverseImage').val(filename);
});
WebUploadJs('FaceVideoBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("UserIdentityFaceVideo"))), function (filename) {
$('#FaceVideoFile').html(filename+'<a style="margin-left:20px;text-decoration:underline;color:cornflowerblue;" href="' + osshost + filename + '" target="_blank">点击查看附件</a>');
$('#FaceVideo').val(filename);
setTimeout(function () {
$("#FaceVideoProgressBar").css("display", "none");
}, 1000);
},function(file){
$("#FaceVideoProgressBar").css("display", "block");
element.progress('FaceVideoProgress', file.percent+'%');
});
WebUploadJs('LivingImageBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("UserIdentityLivingImage"))), function (filename) {
$('#LivingImageImage').html('<img src="' + osshost + filename + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(\'' + osshost + filename + '\')">')
$('#LivingImage').val(filename);
});
WebUploadJs('SignImageUrlBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload', @(Html.Raw(new MySystem.PublicFunction().GetUploadParam("UserIdentitySignImageUrl"))), function (filename) {
$('#SignImageUrlImage').html('<img src="' + osshost + filename + '" class="layui-upload-img" style="max-width:85px; max-height:85px;" onclick="showBigPic(\'' + osshost + filename + '\')">')
$('#SignImageUrl').val(filename);
});


            //穿梭框
            

            //TreeView，比如权限管理
            

            //省市区
            
        })

    </script>
</body>
</html>