|
@@ -14,6 +14,12 @@
|
|
|
left:0;
|
|
|
top:40px;
|
|
|
}
|
|
|
+ .delete-icon {
|
|
|
+ font-size: 16px;
|
|
|
+ background: white;
|
|
|
+ border-radius: 50%;
|
|
|
+ line-height: 1;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
// var officeId;
|
|
@@ -469,6 +475,85 @@
|
|
|
var imgStr = '<img src="'+url+'" width="24" height="24" onclick="openDialogView(\'预览\',\'${ctx}/sys/picturepreview/picturePreview?url='+url+'\',\'90%\',\'90%\')" alt="'+file.name+'">';
|
|
|
$('#'+spanId).html(imgStr);
|
|
|
}
|
|
|
+
|
|
|
+ function changeIdCardFileName(obj, index) {
|
|
|
+ var file = obj.files[0];
|
|
|
+ if (!file) return;
|
|
|
+
|
|
|
+ var url = URL.createObjectURL(file);
|
|
|
+
|
|
|
+ var fileType = file.type;
|
|
|
+ if(file.size > 1000*1024 || !(fileType.indexOf("png")>=0 || fileType.indexOf("bmp")>=0 || fileType.indexOf("jpg")>=0 || fileType.indexOf("jpeg")>=0)){
|
|
|
+ layer.msg("请上传1000KB内图片!", {icon: 2});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ var spanId = $(obj).attr("id") + 'Name' + index;
|
|
|
+
|
|
|
+ // 读取 base64 用于下载
|
|
|
+ var reader = new FileReader();
|
|
|
+ reader.onload = function(e) {
|
|
|
+ var base64Data = e.target.result;
|
|
|
+
|
|
|
+ var imgStr = '<div style="position:relative; display:inline-block;">' +
|
|
|
+ '<img src="'+url+'" width="50" height="50" style="cursor:pointer;" ' +
|
|
|
+ 'onclick="openLayerPreview(\'' + url + '\')" alt="'+file.name+'">' +
|
|
|
+
|
|
|
+ // 删除按钮
|
|
|
+ '<i class="fa fa-times-circle" style="position:absolute; top:-8px; right:-8px; color:red; cursor:pointer;" ' +
|
|
|
+ 'onclick="deleteImage(\'' + spanId + '\', \'' + obj.id + '\')"></i>' +
|
|
|
+ '</div>' +
|
|
|
+
|
|
|
+ // 下载按钮,使用 base64 下载
|
|
|
+ '<a href="'+base64Data+'" download="'+file.name+'" title="下载 '+file.name+'" ' +
|
|
|
+ 'style="color: #28a745; margin-left: 5px; text-decoration: none;">' +
|
|
|
+ '<i class="fa fa-download"></i></a>';
|
|
|
+
|
|
|
+ $('#' + spanId).html(imgStr);
|
|
|
+ };
|
|
|
+
|
|
|
+ reader.readAsDataURL(file); // 开始读取文件(转为 base64)
|
|
|
+ }
|
|
|
+
|
|
|
+ function openLayerPreview(imgUrl) {
|
|
|
+ layui.use('layer', function(){
|
|
|
+ var layer = layui.layer;
|
|
|
+ layer.open({
|
|
|
+ type: 1,
|
|
|
+ title: '图片预览',
|
|
|
+ shadeClose: true,
|
|
|
+ shade: 0.2,
|
|
|
+ area: ['600px', '400px'],
|
|
|
+ content: '<img src="'+imgUrl+'" style="width:100%;height:100%;">'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteImage(spanId, inputId) {
|
|
|
+ // 1. 清空图片展示区域
|
|
|
+ $('#' + spanId).html('');
|
|
|
+
|
|
|
+ // 2. 清除上传的文件 input 值
|
|
|
+ $('#' + inputId).val('');
|
|
|
+ document.getElementById(inputId).value = ''; // 双保险
|
|
|
+ console.log($('#' + inputId + 'Path').val())
|
|
|
+ // 3. 清除隐藏的路径字段(用于提交给后台)
|
|
|
+ $('#' + inputId + 'Path').val('');
|
|
|
+ console.log($('#' + inputId + 'Path').val())
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 下载函数,利用a标签模拟点击下载blob图片
|
|
|
+ function downloadFile(blobUrl, fileName) {
|
|
|
+ var a = document.createElement('a');
|
|
|
+ a.href = blobUrl;
|
|
|
+ a.download = fileName || 'download.png';
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.click();
|
|
|
+ document.body.removeChild(a);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
function shortenFileName(name, maxLength) {
|
|
|
if (name.length <= maxLength) {
|
|
|
return name;
|
|
@@ -487,8 +572,8 @@
|
|
|
url = window.webkitURL.createObjectURL(file);
|
|
|
}
|
|
|
|
|
|
- if (file.size > 10 * 1024 * 1024) {
|
|
|
- layer.msg("请上传10M以内文件!", { icon: 2 });
|
|
|
+ if (file.size > 100 * 1024 * 1024) {
|
|
|
+ layer.msg("请上传100M以内文件!", { icon: 2 });
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -505,7 +590,7 @@
|
|
|
+ ' alt="图片预览" title="点击预览图片"/>';
|
|
|
} else {
|
|
|
// 显示带文件名的链接(文件名过长会截断)
|
|
|
- var shortName = shortenFileName(file.name, 7);
|
|
|
+ var shortName = shortenFileName(file.name, 20);
|
|
|
fileStr = '<span style="display:inline-block;width:24px;height:24px;margin-right:5px;"></span>'
|
|
|
+ '<a href="javascript:void(0);" onclick="openDialogView(\'预览\',\'' + url + '\',\'90%\',\'90%\')" '
|
|
|
+ 'title="' + file.name + '" style="text-decoration:none;color:#007bff;">'
|
|
@@ -813,6 +898,53 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>身份证人像面:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('idCardPortrait')"><i class="fa fa-plus"></i> 上传</a>
|
|
|
+ <!-- 图片展示区域 -->
|
|
|
+ <span id="idCardPortraitName1">
|
|
|
+ <c:if test="${not empty workStaffBasicInfo.idCardPortraitPathStr}">
|
|
|
+ <div style="position:relative; display:inline-block;">
|
|
|
+ <img src="${workStaffBasicInfo.idCardPortraitPathStr}" width="50" height="50" style="cursor:pointer;" onclick="openLayerPreview('${workStaffBasicInfo.idCardPortraitPathStr}')" alt="身份证照片">
|
|
|
+ <!-- 删除按钮 -->
|
|
|
+ <i class="fa fa-times-circle" style="position:absolute; top:-8px; right:-8px; color:red; cursor:pointer;" onclick="deleteImage('idCardPortraitName1', 'idCardPortrait')"></i>
|
|
|
+ </div>
|
|
|
+ <!-- 下载按钮(重点)-->
|
|
|
+ <a href="javascript:void(0);" title="下载 ${workStaffBasicInfo.idCardPortraitName}" style="color: #28a745; margin-left: 5px; text-decoration: none;" onclick="downloadFile('${ctx}', '${workStaffBasicInfo.idCardPortraitPath}', '${workStaffBasicInfo.idCardPortraitName}')"><i class="fa fa-download"></i></a>
|
|
|
+ </c:if>
|
|
|
+ </span>
|
|
|
+ <!-- 文件上传控件 -->
|
|
|
+ <input id="idCardPortrait" name="idCardPortrait" style="display:none" type="file" onchange="changeIdCardFileName(this,1)" />
|
|
|
+ <!-- ✅ 后端路径字段(用于提交) -->
|
|
|
+ <input type="hidden" id="idCardPortraitPath" name="idCardPortraitPath" value="${workStaffBasicInfo.idCardPortraitPath}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>身份证国徽面:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('idCardNationalEmblem')"><i class="fa fa-plus"></i> 上传</a>
|
|
|
+ <!-- 图片展示区域 -->
|
|
|
+ <span id="idCardNationalEmblemName1">
|
|
|
+ <c:if test="${not empty workStaffBasicInfo.idCardNationalEmblemPathStr}">
|
|
|
+ <div style="position:relative; display:inline-block;">
|
|
|
+ <img src="${workStaffBasicInfo.idCardNationalEmblemPathStr}" width="50" height="50" style="cursor:pointer;" onclick="openLayerPreview('${workStaffBasicInfo.idCardNationalEmblemPathStr}')" alt="身份证照片">
|
|
|
+ <!-- 删除按钮 -->
|
|
|
+ <i class="fa fa-times-circle" style="position:absolute; top:-8px; right:-8px; color:red; cursor:pointer;" onclick="deleteImage('idCardNationalEmblemName1', 'idCardNationalEmblem')"></i>
|
|
|
+ </div>
|
|
|
+ <!-- 下载按钮 -->
|
|
|
+ <a href="javascript:void(0);" title="下载 ${workStaffBasicInfo.idCardNationalEmblemName}" style="color: #28a745; margin-left: 5px; text-decoration: none;" onclick="downloadFile('${ctx}', '${workStaffBasicInfo.idCardNationalEmblemPath}', '${workStaffBasicInfo.idCardNationalEmblemName}')"><i class="fa fa-download"></i></a>
|
|
|
+
|
|
|
+ </c:if>
|
|
|
+ </span>
|
|
|
+ <!-- 文件上传控件 -->
|
|
|
+ <input id="idCardNationalEmblem" name="idCardNationalEmblem" style="display:none" type="file" onchange="changeIdCardFileName(this,1)" />
|
|
|
+ <!-- ✅ 后端路径字段(用于提交) -->
|
|
|
+ <input type="hidden" id="idCardNationalEmblemPath" name="idCardNationalEmblemPath" value="${workStaffBasicInfo.idCardNationalEmblemPath}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
|
|
|
<%--<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>最高学历:</label>
|
|
@@ -1485,7 +1617,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group layui-row">
|
|
|
- <div class="form-group-label"><h2>职称</h2></div>
|
|
|
+ <div class="form-group-label"><h2>职称证书</h2></div>
|
|
|
<div class="layui-item nav-btns">
|
|
|
<a href=javascript:void(0); onclick="addRowTitle('#titleList',titleIdx,titleTpl)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
|
|
|
</div>
|
|
@@ -2142,12 +2274,12 @@
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th width="10%"><span class="require-item">*</span>合同类型</th>
|
|
|
- <th width="10%">合同编号</th>
|
|
|
+ <%--<th width="10%">合同编号</th>--%>
|
|
|
<th width="10%"><span class="require-item">*</span>合同期限</th>
|
|
|
<th width="11%">合同起始日期</th>
|
|
|
<th width="11%">合同终止日期</th>
|
|
|
<th width="11%">试用期结束日期</th>
|
|
|
- <th width="11%">办理日期</th>
|
|
|
+ <%--<th width="11%">办理日期</th>--%>
|
|
|
<th >文件</th>
|
|
|
<th width="10%">操作</th>
|
|
|
</tr>
|
|
@@ -2168,9 +2300,9 @@
|
|
|
</c:forEach>
|
|
|
</select>
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <%--<td>
|
|
|
<input id="laborContractList${varStatus.index}_contractNum" name="laborContractList[${varStatus.index}].contractNum" type="text" value="${buyDetails.contractNum}"/>
|
|
|
- </td>
|
|
|
+ </td>--%>
|
|
|
<td>
|
|
|
<select name="laborContractList[${varStatus.index}].contractLimit" id="laborContractList${varStatus.index}_contractLimit" class="form-control required">
|
|
|
<c:forEach items="${fns:getMainDictList('contract_limit')}" var="var">
|
|
@@ -2190,10 +2322,10 @@
|
|
|
<input id="laborContractList${varStatus.index}_tryEndTime" name="laborContractList[${varStatus.index}].tryEndTime" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
|
|
|
value="<fmt:formatDate value="${buyDetails.tryEndTime}" pattern="yyyy-MM-dd"/>" readOnly="true" />
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <%--<td>
|
|
|
<input id="laborContractList${varStatus.index}_transactTime" name="laborContractList[${varStatus.index}].transactTime" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
|
|
|
value="<fmt:formatDate value="${buyDetails.transactTime}" pattern="yyyy-MM-dd"/>" readOnly="true" />
|
|
|
- </td>
|
|
|
+ </td>--%>
|
|
|
|
|
|
<td class="text-left op-td">
|
|
|
<!-- 上传按钮 -->
|
|
@@ -2248,15 +2380,17 @@
|
|
|
</span>
|
|
|
|
|
|
<!-- 下载按钮 -->
|
|
|
- <a href="javascript:void(0);"
|
|
|
- title="下载 ${buyDetails.fileName}"
|
|
|
- style="color: #28a745; margin-left: 5px; text-decoration: none;"
|
|
|
- onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
|
|
|
- <i class="fa fa-download"></i>
|
|
|
- </a>
|
|
|
+ <c:if test="${not empty buyDetails.filePathStr}">
|
|
|
+ <a href="javascript:void(0);"
|
|
|
+ title="下载 ${buyDetails.fileName}"
|
|
|
+ style="color: #28a745; margin-left: 5px; text-decoration: none;"
|
|
|
+ onclick="downloadFile('${ctx}', '${buyDetails.filePath}', '${buyDetails.fileName}')">
|
|
|
+ <i class="fa fa-download"></i>
|
|
|
+ </a>
|
|
|
+ </c:if>
|
|
|
<!-- 隐藏的上传输入框 -->
|
|
|
<input id="laborContractList${varStatus.index}_file"
|
|
|
- name="trainingList[${varStatus.index}].file"
|
|
|
+ name="laborContractList[${varStatus.index}].file"
|
|
|
style="display:none"
|
|
|
type="file"
|
|
|
onchange="changelaborContractFileName(this,1)" />
|
|
@@ -2287,9 +2421,9 @@
|
|
|
</select>
|
|
|
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <%--<td>
|
|
|
<input placeholder="请输入合同编号" id="laborContractList{{idx}}_contractNum" name="laborContractList[{{idx}}].contractNum" class="form-control" value="{{row.contractNum}}"/>
|
|
|
- </td>
|
|
|
+ </td>--%>
|
|
|
|
|
|
<td style="text-align:center;">
|
|
|
<select name="laborContractList[{{idx}}].contractLimit" id="laborContractList{{idx}}_contractLimit" class="form-control required">
|
|
@@ -2312,12 +2446,12 @@
|
|
|
<input id="laborContractList{{idx}}_tryEndTime" name="laborContractList[{{idx}}].tryEndTime" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
|
|
|
style="background-color:#fff " placeholder="试用期结束日期" value="<fmt:formatDate value="${row.tryEndTime}" pattern="yyyy-MM-dd"/>" readOnly="true" />
|
|
|
</td>
|
|
|
- <td>
|
|
|
+ <%--<td>
|
|
|
<input id="laborContractList{{idx}}_transactTime" name="laborContractList[{{idx}}].transactTime" type="text" maxlength="20" class="laydate-icon form-control layer-date laydate-icondate"
|
|
|
style="background-color:#fff " placeholder="办理日期" value="<fmt:formatDate value="${row.transactTime}" pattern="yyyy-MM-dd"/>" readOnly="true" />
|
|
|
- </td>
|
|
|
+ </td>--%>
|
|
|
|
|
|
- <td class="text-center op-td">
|
|
|
+ <td class="op-td">
|
|
|
<a class="op-btn op-btn-add" title="上传" onclick="this_upload_file_button('laborContractList{{idx}}_file')"><i class="fa fa-plus"></i> 上传</a><span id="laborContractList{{idx}}_fileName1"></span>
|
|
|
<input id="laborContractList{{idx}}_file" name="laborContractList[{{idx}}].file" style="display:none" type="file" onchange="changelaborContractFileName(this,1)"/>
|
|
|
</td>
|