967 lines
52 KiB
HTML
967 lines
52 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<base href="/signup/">
|
||
<meta charset="utf-8">
|
||
<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="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||
</head>
|
||
<body>
|
||
<div class="layui-anim layui-anim-fadein">
|
||
<div class="layui-card">
|
||
<div class="layui-card-body" style="padding: 15px;">
|
||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||
<div class="layui-row">
|
||
<div class="layui-col-md12">
|
||
<input type="text" class="layui-input" id="keywords" value="" style="width: 200px;height: 30px;display: inline-block;" placeholder="身份证|手机号">
|
||
<button type="button" id="checkResultBtn" class="layui-btn layui-btn-sm layui-btn-normal" style="display: inline-block;">检索</button>
|
||
<div class="layui-form-item" style="display: inline-block;">
|
||
<label class="layui-form-label">检索结果:</label>
|
||
<div class="layui-input-block layui-form" id="check-result-box"></div>
|
||
<script type="text/html" id="check-result-template">
|
||
<select id="check-result-select" lay-search lay-filter="checkChange">
|
||
{{# if(d.length == 0){ }}
|
||
<option value="">未检索到学员</option>
|
||
{{# }else { }}
|
||
<option value="">检索到{{ d.length }}名学员</option>
|
||
{{# } }}
|
||
{{# for(var i = 0, item; item = d[i++];){ }}
|
||
<option value="{{item.applyId}}">{{item.applyName}}[{{item.applyPhone}}]</option>
|
||
{{# } }}
|
||
</select>
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md2 layui-col-sm2">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">一寸免冠照片</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="applyUserCardPhoto" name="applyUserCardPhoto">
|
||
<div class="layui-btn-container" id="applyUserCardPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="applyUserCardPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'applyUserCardPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="applyUserCardPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="一寸免冠证件照片" data-name="applyUserCardPhoto" lay-filter="applyUserCardPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md2 layui-col-sm2">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">身份证(正)</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="idCardFrontPhoto" name="idCardFrontPhoto">
|
||
<div class="layui-btn-container" id="idCardFrontPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="idCardFrontPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'idCardFrontPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="idCardFrontPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="身份证(正)" data-name="idCardFrontPhoto" lay-filter="idCardFrontPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md2 layui-col-sm2">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">身份证(反)</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="idCardBackPhoto" name="idCardBackPhoto">
|
||
<div class="layui-btn-container" id="idCardBackPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="idCardBackPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'idCardBackPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="idCardBackPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="身份证(反)" data-name="idCardBackPhoto" lay-filter="idCardBackPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md2 layui-col-sm2">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">学历证书</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="educationPhoto" name="educationPhoto">
|
||
<div class="layui-btn-container" id="educationPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="educationPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'educationPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="educationPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="学历证书" data-name="educationPhoto" lay-filter="educationPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md2 layui-col-sm2 fuxun-upload" style="display: none;">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">证书个人信息页</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="applyTakeCardPhoto" name="applyTakeCardPhoto">
|
||
<div class="layui-btn-container" id="applyTakeCardPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="applyTakeCardPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'applyTakeCardPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="applyTakeCardPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="证书个人信息页" data-name="applyTakeCardPhoto" lay-filter="applyTakeCardPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md2 layui-col-sm2 fuxun-upload zaipei-upload" style="display: none;">
|
||
<div class="layui-form-item layui-form-text">
|
||
<label class="layui-form-label">再培训证明</label>
|
||
<div class="layui-input-block">
|
||
<input type="hidden" id="applyRePeiXunPhoto" name="applyRePeiXunPhoto">
|
||
<div class="layui-btn-container" id="applyRePeiXunPhotoFileBox" style="border: 1px solid #e6e6e6;height: 122px;"></div>
|
||
<script id="applyRePeiXunPhotoFileDownload" type="text/html">
|
||
{{# var fileName = 'applyRePeiXunPhoto'; }}
|
||
{{# if(d[fileName].length > 0) { }}
|
||
{{# var files = d[fileName];}}
|
||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||
<div class="upload-image-box">
|
||
<span class="upload-image-span">
|
||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||
</span>
|
||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="applyRePeiXunPhotoRemoveFile">
|
||
<i class="fa fa-trash-o"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
{{# } }}
|
||
{{# if(d[fileName].length < 1) { }}
|
||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||
<a href="javascript:void(0);" lay-form-button data-explain="再培训证明" data-name="applyRePeiXunPhoto" lay-filter="applyRePeiXunPhotoUploadFile">
|
||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||
</a>
|
||
</div>
|
||
{{# } }}
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item" pane>
|
||
<label class="layui-form-label"><span style="color: red">*</span>培训分类</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="applyFenLei" value="1" title="初训" checked lay-filter="applyFenLeiFilter">
|
||
<input type="radio" name="applyFenLei" value="2" title="复训" lay-filter="applyFenLeiFilter">
|
||
<input type="radio" name="applyFenLei" value="3" title="换证" lay-filter="applyFenLeiFilter">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item" pane>
|
||
<label class="layui-form-label"><span style="color: red">*</span>培训类别</label>
|
||
<div class="layui-input-block">
|
||
<input type="radio" name="applyLeiBie" value="企业主要负责人" title="企业主要负责人" checked>
|
||
<input type="radio" name="applyLeiBie" value="安全管理人员" title="安全管理人员">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span style="color: red">*</span>姓名</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyName" name="applyName" class="layui-input" value=""maxlength="50" placeholder="请输入姓名" lay-verify="required" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span style="color: red">*</span>性别</label>
|
||
<div class="layui-input-block layui-form">
|
||
<select id="applySex" name="applySex" lay-verify="required" >
|
||
<option value="">请选择性别</option>
|
||
<option value="46bec29f-2368-44f7-98d0-b33246e5e16d">男</option>
|
||
<option value="4a5f549a-d339-4403-8d26-9058e80499b1">女</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span style="color: red">*</span>联系电话</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyPhone" name="applyPhone" class="layui-input" value="" placeholder="联系电话" lay-verify="phone" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">学历</label>
|
||
<div class="layui-input-block layui-form">
|
||
<select id="applyCultureLevel" name="applyCultureLevel">
|
||
<option value="">请选择学历</option>
|
||
<option value="51b03a8b-413e-4cd8-adbd-7fd2a75f74ab">博士研究生毕业</option>
|
||
<option value="f0edbc2f-8e65-4126-a748-6783e8099512">硕士研究生毕业</option>
|
||
<option value="2c3f1d75-52e3-4ffd-be8e-723bed8b025c">研究生班毕业</option>
|
||
<option value="a19e18eb-e1fe-4980-a006-e0231e50b2ec">大学本科毕业</option>
|
||
<option value="80664312-b898-43ea-b082-5c5245118e87">大学专科毕业</option>
|
||
<option value="b449dcca-4213-46a7-a5bf-41d551abfb71">中等专科毕业</option>
|
||
<option value="079184ba-a527-47bd-aaeb-866b301a8e18">职业高中毕业</option>
|
||
<option value="4a5519ec-3b95-491d-b544-83f726e096f4">技工学校毕业</option>
|
||
<option value="347bdaba-956b-48c6-a406-301788632c8e">普通高中毕业</option>
|
||
<option value="6f5031bd-5cc9-47b5-b82d-bc7e64cfe081">初中毕业</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md12 layui-col-sm12">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label"><span style="color: red">*</span>身份证号</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyCardNumber" name="applyCardNumber" class="layui-input" value="" placeholder="请输入身份证号" maxlength="50" lay-verify="required" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">职称</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyZhiCheng" name="applyZhiCheng" class="layui-input" placeholder="请填写职称">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">毕业院校</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applySchool" name="applySchool" class="layui-input" placeholder="请填写毕业院校">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">所学专业</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applySubject" name="applySubject" class="layui-input" placeholder="请填写专业">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">工作单位</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyUnitName" name="applyUnitName" class="layui-input" value="" placeholder="请输入单位名称" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">单位类型</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyUnitType" name="applyUnitType" class="layui-input" value="" placeholder="请输入单位类型" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md4 layui-col-sm4">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">职务</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="applyUnitWork" name="applyUnitWork" class="layui-input" value="" placeholder="请输入职务" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md12 layui-col-sm12">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="width: 200px">单位所在区域或隶属部门</label>
|
||
<div class="layui-input-block" style="margin-left: 200px;">
|
||
<input type="text" id="applyUnitBelong" name="applyUnitBelong" class="layui-input" value="" placeholder="单位所在区域或隶属部门" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label" style="width: 190px">取得安全资格证时间</label>
|
||
<div class="layui-input-block" style="margin-left: 190px;">
|
||
<input type="text" id="takeCardTime" name="takeCardTime" class="layui-input" value="" placeholder="例:2020-01-01" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">证件有效期</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="cardTimeLimit" name="cardTimeLimit" class="layui-input" value="" placeholder="例:2020-01-01" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-row">
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">资格证号码</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="takeCardNumber" name="takeCardNumber" class="layui-input" value="" placeholder="资格证号码" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-md6 layui-col-sm6">
|
||
<div class="layui-form-item">
|
||
<label class="layui-form-label">再培训时间</label>
|
||
<div class="layui-input-block">
|
||
<input type="text" id="rePeiXunDate" name="rePeiXunDate" class="layui-input" value="" placeholder="例:2020-01-01" maxlength="100" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item layui-layout-admin">
|
||
<div class="layui-input-block">
|
||
<div class="layui-footer" style="left: 0;">
|
||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">添加</button>
|
||
<button type="button" class="layui-btn layui-btn-primary close">返回</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||
<script>
|
||
layui.config({
|
||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||
}).extend({
|
||
index: 'lib/index' //主入口模块
|
||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||
var $ = layui.$;
|
||
var form = layui.form;
|
||
var laytpl = layui.laytpl;
|
||
var laydate = layui.laydate;
|
||
var viewerObj = {};
|
||
var orgId = top.restAjax.params(window.location.href).orgId;
|
||
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
|
||
|
||
$('.layui-card').height($(window).height());
|
||
|
||
// 初始化内容
|
||
function initData() {
|
||
clearCheckResultSelect();
|
||
if(typeof (orgId) === 'undefined' || orgId == ''){
|
||
top.dialog.msg('机构参数缺失');
|
||
closeBox();
|
||
return;
|
||
}
|
||
if(typeof (workerCatalog) === 'undefined' || workerCatalog == ''){
|
||
top.dialog.msg('工种参数缺失');
|
||
closeBox();
|
||
return;
|
||
}
|
||
initApplyUserCardPhotoUploadFile();
|
||
initApplyTakeCardPhotoUploadFile();
|
||
initApplyRePeiXunPhotoUploadFile();
|
||
initIdCardFrontPhotoUploadFile();
|
||
initIdCardBackPhotoUploadFile();
|
||
initEducationPhotoUploadFile();
|
||
}
|
||
initData();
|
||
|
||
$(document).on('click', '#checkResultBtn', function(){
|
||
var keyWords = $('#keywords').val();
|
||
if(keyWords == ""){
|
||
clearCheckResultSelect();
|
||
clearFrom();
|
||
return;
|
||
}
|
||
top.restAjax.get(top.restAjax.path('api/applystudents/list', []), {keywords : keyWords}, null, function(code, data) {
|
||
laytpl(document.getElementById('check-result-template').innerHTML).render(data, function(html) {
|
||
document.getElementById('check-result-box').innerHTML = html;
|
||
form.render();
|
||
});
|
||
}, function(code, data) {
|
||
top.dialog.msg(data.msg);
|
||
});
|
||
});
|
||
|
||
form.on('select(checkChange)', function(data){
|
||
if(typeof (data.value) == 'undefined' || data.value == ''){
|
||
clearFrom();
|
||
return;
|
||
}
|
||
top.restAjax.get(top.restAjax.path('api/applystudents/get/{arg}', [data.value]), {}, null, function(code, data) {
|
||
$('#applyUserCardPhoto').val(data['applyUserCardPhoto']);
|
||
$('#idCardFrontPhoto').val(data['idCardFrontPhoto']);
|
||
$('#idCardBackPhoto').val(data['idCardBackPhoto']);
|
||
$('#educationPhoto').val(data['educationPhoto']);
|
||
$('#applyTakeCardPhoto').val(data['applyTakeCardPhoto']);
|
||
$('#applyRePeiXunPhoto').val(data['applyRePeiXunPhoto']);
|
||
initApplyUserCardPhotoUploadFile();
|
||
initIdCardFrontPhotoUploadFile();
|
||
initIdCardBackPhotoUploadFile();
|
||
initEducationPhotoUploadFile();
|
||
initApplyTakeCardPhotoUploadFile();
|
||
initApplyRePeiXunPhotoUploadFile();
|
||
$('#applyName').val(data['applyName']);
|
||
$('#applySex').val(data['applySex']);
|
||
$('#applyPhone').val(data['applyPhone']);
|
||
$('#applyCultureLevel').val(data['applyCultureLevel']);
|
||
$('#applyCardNumber').val(data['applyCardNumber']);
|
||
$('#applyZhiCheng').val(data['applyZhiCheng']);
|
||
$('#applySchool').val(data['applySchool']);
|
||
$('#applySubject').val(data['applySubject']);
|
||
$('#applyUnitName').val(data['applyUnitName']);
|
||
$('#applyUnitType').val(data['applyUnitType']);
|
||
$('#applyUnitWork').val(data['applyUnitWork']);
|
||
$('#applyUnitBelong').val(data['applyUnitBelong']);
|
||
form.render();
|
||
}, function(code, data) {
|
||
top.dialog.msg(data.msg);
|
||
});
|
||
});
|
||
|
||
function clearCheckResultSelect(){
|
||
laytpl(document.getElementById('check-result-template').innerHTML).render([], function(html) {
|
||
document.getElementById('check-result-box').innerHTML = html;
|
||
form.render();
|
||
});
|
||
}
|
||
|
||
function clearFrom(){
|
||
$('#applyUserCardPhoto').val('');
|
||
$('#idCardFrontPhoto').val('');
|
||
$('#idCardBackPhoto').val('');
|
||
$('#educationPhoto').val('');
|
||
$('#applyTakeCardPhoto').val('');
|
||
$('#applyRePeiXunPhoto').val('');
|
||
initApplyUserCardPhotoUploadFile();
|
||
initIdCardFrontPhotoUploadFile();
|
||
initIdCardBackPhotoUploadFile();
|
||
initEducationPhotoUploadFile();
|
||
initApplyTakeCardPhotoUploadFile();
|
||
initApplyRePeiXunPhotoUploadFile();
|
||
$('#applyName').val('');
|
||
$('#applySex').val('');
|
||
$('#applyPhone').val('');
|
||
$('#applyCultureLevel').val('');
|
||
$('#applyCardNumber').val('');
|
||
$('#applyZhiCheng').val('');
|
||
$('#applySchool').val('');
|
||
$('#applySubject').val('');
|
||
$('#applyUnitName').val('');
|
||
$('#applyUnitType').val('');
|
||
$('#applyUnitWork').val('');
|
||
$('#applyUnitBelong').val('');
|
||
form.render();
|
||
}
|
||
|
||
form.on('radio(applyFenLeiFilter)', function(data){
|
||
var val = data.value;//被点击的radio的value值
|
||
if(val == 1){
|
||
$('.fuxun-upload').hide();
|
||
$('#applyTakeCardPhoto').val('');
|
||
$('#applyRePeiXunPhoto').val('');
|
||
}
|
||
if(val == 2){
|
||
$('.fuxun-upload').show();
|
||
initApplyTakeCardPhotoUploadFile();
|
||
initApplyRePeiXunPhotoUploadFile();
|
||
}
|
||
if(val == 3){
|
||
$('.fuxun-upload').show();
|
||
$('.zaipei-upload').show();
|
||
initApplyTakeCardPhotoUploadFile();
|
||
initApplyRePeiXunPhotoUploadFile();
|
||
}
|
||
});
|
||
|
||
// 初始化头像图片上传
|
||
function initApplyUserCardPhotoUploadFile() {
|
||
var files = $('#applyUserCardPhoto').val();
|
||
initFileList('applyUserCardPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(applyUserCardPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(applyUserCardPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
// 初始化身份证正面
|
||
function initIdCardFrontPhotoUploadFile() {
|
||
var files = $('#idCardFrontPhoto').val();
|
||
initFileList('idCardFrontPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(idCardFrontPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(idCardFrontPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
// 初始化身份证反面
|
||
function initIdCardBackPhotoUploadFile() {
|
||
var files = $('#idCardBackPhoto').val();
|
||
initFileList('idCardBackPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(idCardBackPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(idCardBackPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
// 初始化学历证书
|
||
function initEducationPhotoUploadFile() {
|
||
var files = $('#educationPhoto').val();
|
||
initFileList('educationPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(educationPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(educationPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
// 初始化证书信息页上传
|
||
function initApplyTakeCardPhotoUploadFile() {
|
||
var files = $('#applyTakeCardPhoto').val();
|
||
initFileList('applyTakeCardPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(applyTakeCardPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(applyTakeCardPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
// 初始化再培训证明
|
||
function initApplyRePeiXunPhotoUploadFile() {
|
||
var files = $('#applyRePeiXunPhoto').val();
|
||
initFileList('applyRePeiXunPhoto', files, function(fileName) {
|
||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||
viewerObj[fileName] = viewer;
|
||
});
|
||
|
||
form.on('button(applyRePeiXunPhotoUploadFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var explain = this.dataset.explain;
|
||
top.dialog.file({
|
||
type: 'image',
|
||
title: '上传'+ explain,
|
||
width: '400px',
|
||
height: '420px',
|
||
maxFileCount: '1',
|
||
onClose: function() {
|
||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||
var files = $('#'+ name).val();
|
||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||
if(files.length > 0) {
|
||
files += ',';
|
||
}
|
||
files += file.data;
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
|
||
form.on('button(applyRePeiXunPhotoRemoveFile)', function(obj) {
|
||
var name = this.dataset.name;
|
||
var id = this.dataset.id;
|
||
var files = $('#'+ name).val().replace(id, '');
|
||
files = files.replace(/\,+/g, ',');
|
||
if(files.charAt(0) == ',') {
|
||
files = files.substring(1);
|
||
}
|
||
if(files.charAt(files.length - 1) == ',') {
|
||
files = files.substring(0, files.length - 1);
|
||
}
|
||
initFileList(name, files, function(fileName) {
|
||
viewerObj[fileName].update();
|
||
});
|
||
});
|
||
}
|
||
|
||
function refreshDownloadTemplet(fileName, file) {
|
||
var dataRander = {};
|
||
dataRander[fileName] = file;
|
||
|
||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||
});
|
||
}
|
||
|
||
// 初始化文件列表
|
||
function initFileList(fileName, ids, callback) {
|
||
var dataForm = {};
|
||
dataForm[fileName] = ids;
|
||
form.val('dataForm', dataForm);
|
||
|
||
if(!ids) {
|
||
refreshDownloadTemplet(fileName, []);
|
||
if(callback) {
|
||
callback(fileName, []);
|
||
}
|
||
return;
|
||
}
|
||
|
||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||
ids: ids
|
||
}, null, function(code, data) {
|
||
refreshDownloadTemplet(fileName, data);
|
||
if(callback) {
|
||
callback(fileName, data);
|
||
}
|
||
}, function(code, data) {
|
||
top.dialog.msg(data.msg);
|
||
});
|
||
}
|
||
|
||
function closeBox() {
|
||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||
}
|
||
|
||
// 提交表单
|
||
form.on('submit(submitForm)', function(formData) {
|
||
formData.field.applyWorkTypeId = workerCatalog;
|
||
formData.field.applyInstitutionId = orgId;
|
||
formData.field.workType = false;
|
||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||
top.dialog.close(index);
|
||
var loadLayerIndex;
|
||
top.restAjax.post(top.restAjax.path('api/apply/save-relation', []), formData.field, null, function(code, data) {
|
||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||
time: 0,
|
||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||
shade: 0.3,
|
||
yes: function(index) {
|
||
top.dialog.close(index);
|
||
window.location.reload();
|
||
},
|
||
btn2: function() {
|
||
closeBox();
|
||
}
|
||
});
|
||
}, function(code, data) {
|
||
top.dialog.msg(data.msg);
|
||
}, function() {
|
||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||
}, function() {
|
||
top.dialog.close(loadLayerIndex);
|
||
});
|
||
});
|
||
return false;
|
||
});
|
||
|
||
$('.close').on('click', function() {
|
||
closeBox();
|
||
});
|
||
|
||
// 校验
|
||
form.verify({
|
||
});
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |