人员入场
This commit is contained in:
parent
f9c69dbe79
commit
10f4b5b029
|
|
@ -138,4 +138,22 @@ public interface PersonComprehensiveDao {
|
|||
String selectTeamIsExistForeman(String teamId);
|
||||
|
||||
List<String> getHolidaysList(String nation);
|
||||
|
||||
/**
|
||||
* 新增体检pdf
|
||||
* @param o
|
||||
*/
|
||||
void insertCheckupFilePath(PersonComprehensiveBean o);
|
||||
|
||||
/**
|
||||
* 删除体检pdf
|
||||
* @param o
|
||||
*/
|
||||
int deleteCheckupFilePath(PersonComprehensiveBean o);
|
||||
|
||||
/**
|
||||
* 删除体检pdf文件
|
||||
* @param o
|
||||
*/
|
||||
void deleteCheckupFile(PersonComprehensiveBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -397,4 +397,7 @@ public class PersonComprehensiveBean {
|
|||
private String companyExamFilePath;
|
||||
private String deptExamFilePath;
|
||||
private String teamExamFilePath;
|
||||
private String checkupFilePath;
|
||||
private String checkupState;
|
||||
private String checkupDate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,12 +226,16 @@ public class PersonComprehensiveServiceImp implements PersonComprehensiveService
|
|||
dao.updateSysUser(o);
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotEmpty(o.getFacePhoto())){
|
||||
if(StringUtils.isNotEmpty(o.getFaceFeature())){
|
||||
o.setFaceFeatureByte(Base64.getDecoder().decode(o.getFaceFeature()));
|
||||
}
|
||||
dao.insertPersonFacePhoto(o);
|
||||
// if(StringUtils.isNotEmpty(o.getFacePhoto())){
|
||||
// if(StringUtils.isNotEmpty(o.getFaceFeature())){
|
||||
// o.setFaceFeatureByte(Base64.getDecoder().decode(o.getFaceFeature()));
|
||||
// }
|
||||
// dao.insertPersonFacePhoto(o);
|
||||
// }
|
||||
if(StringUtils.isNotEmpty(o.getCheckupFilePath())){
|
||||
dao.insertCheckupFilePath(o);
|
||||
}
|
||||
|
||||
if(o.getStatus().equals("0")){
|
||||
if(StringUtils.isNotEmpty(o.getAttendanceMachineArr()) &&
|
||||
o.getAttendanceMachineArr().size() > 0){
|
||||
|
|
@ -495,11 +499,23 @@ public class PersonComprehensiveServiceImp implements PersonComprehensiveService
|
|||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(o.getFacePhoto())){
|
||||
/*if(StringUtils.isNotEmpty(o.getFacePhoto())){
|
||||
if(StringUtils.isNotEmpty(o.getFaceFeature())){
|
||||
o.setFaceFeatureByte(Base64.getDecoder().decode(o.getFaceFeature()));
|
||||
}
|
||||
dao.insertPersonFacePhoto(o);
|
||||
}*/
|
||||
|
||||
|
||||
if(StringUtils.isNotEmpty(o.getCheckupFilePath())){
|
||||
//先删除之前体检报告
|
||||
int jk = dao.deleteCheckupFilePath(o);
|
||||
if(jk > 0){
|
||||
dao.insertCheckupFilePath(o);
|
||||
}
|
||||
}else{
|
||||
//直接删除体检报告
|
||||
dao.deleteCheckupFile(o);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(o.getAttendanceMachineArr()) &&
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
`sign_date`, `expiry_date`, `phone`,`cultrue`, `political_outlook`, `address_phone`,
|
||||
`post_id`, `person_type`, `worker_skill`,`important_person`, `urgent_person`, `urgent_person_phone`,
|
||||
social_security_number,social_security_unit, employment_type,
|
||||
worker_type, light_status, is_own_person, ein_status)
|
||||
worker_type, light_status, is_own_person, ein_status,checkup_date)
|
||||
values
|
||||
<foreach item="params" collection="list" separator=",">
|
||||
(#{params.idNumber},#{params.name},#{params.sex},#{params.ethnic},
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#{params.postId}, #{params.personType},#{params.workerSkill},#{params.importantPerson},
|
||||
#{params.urgentPerson},#{params.urgentPersonPhone},
|
||||
#{params.socialSecurityNumber},#{params.socialSecurityUnit}, #{params.employmentTypes},
|
||||
#{params.employmentType}, #{params.lightStatus}, #{params.isOwnPerson}, '1')
|
||||
#{params.employmentType}, #{params.lightStatus}, #{params.isOwnPerson}, '1', #{params.checkupDate})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
|
@ -146,6 +146,21 @@
|
|||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertCheckupFilePath">
|
||||
INSERT INTO `bm_worker_checkup`(`ID_NUMBER`, `PHOTO_PATH`, `upload_id`)
|
||||
VALUES (#{idNumber}, #{checkupFilePath}, #{userId})
|
||||
</insert>
|
||||
|
||||
<update id="deleteCheckupFilePath">
|
||||
UPDATE `bm_worker_checkup` SET `IS_ACTIVE` = '0'
|
||||
WHERE `ID_NUMBER` = #{idNumber} and `PHOTO_PATH` != #{checkupFilePath} and `IS_ACTIVE` = '1'
|
||||
</update>
|
||||
|
||||
<update id="deleteCheckupFile">
|
||||
UPDATE `bm_worker_checkup` SET `IS_ACTIVE` = '0'
|
||||
WHERE `ID_NUMBER` = #{idNumber} and `IS_ACTIVE` = '1'
|
||||
</update>
|
||||
|
||||
<update id="updatePerson">
|
||||
update bm_worker set
|
||||
`name` = #{name}, `sex` = #{sex}, `ethnic` = #{ethnic}, ein_status = 1,
|
||||
|
|
@ -157,7 +172,7 @@
|
|||
`urgent_person_phone` = #{urgentPersonPhone},id_number = #{idNumber},
|
||||
social_security_number = #{socialSecurityNumber},social_security_unit = #{socialSecurityUnit},
|
||||
worker_type = #{employmentType}, light_status = #{lightStatus}, is_own_person = #{isOwnPerson},
|
||||
id_number = #{idNumber}, employment_type = #{employmentTypes}
|
||||
id_number = #{idNumber}, employment_type = #{employmentTypes} , checkup_date = #{checkupDate}
|
||||
where id_number = #{id} and is_active = '1'
|
||||
</update>
|
||||
|
||||
|
|
@ -297,12 +312,20 @@
|
|||
sr.`name` AS workerRoleName,
|
||||
bw.ein_status as einStatus,
|
||||
bw.worker_type as employmentType,
|
||||
bw.light_status
|
||||
bw.light_status,
|
||||
bw.checkup_date as checkupDate,
|
||||
checkup.PHOTO_PATH as checkupFilePath,
|
||||
CASE
|
||||
WHEN STR_TO_DATE(bw.checkup_date, '%Y-%m-%d') < DATE_SUB(CURDATE(), INTERVAL 1 YEAR) THEN '过期'
|
||||
ELSE '有效'
|
||||
END AS checkupState
|
||||
FROM
|
||||
bm_worker bw
|
||||
LEFT JOIN bm_worker_photo face ON face.ID_NUMBER = bw.id_number
|
||||
AND face.PHOTO_TYPE = 3
|
||||
AND face.IS_ACTIVE = 1
|
||||
LEFT JOIN bm_worker_checkup checkup ON checkup.ID_NUMBER = bw.id_number
|
||||
AND checkup.IS_ACTIVE = 1
|
||||
LEFT JOIN bm_worker_photo aoto ON aoto.ID_NUMBER = bw.id_number
|
||||
AND aoto.PHOTO_TYPE = 5
|
||||
AND aoto.IS_ACTIVE = 1
|
||||
|
|
@ -433,7 +456,9 @@
|
|||
face.FACE_FEATURES AS faceFeatureByte,
|
||||
bw.is_furlough_person,
|
||||
if(bwc.contractType = '电子合同', IFNULL(bwc.sub_contract_url,
|
||||
bwc.person_contract_url), null) as contractUrl
|
||||
bwc.person_contract_url), null) as contractUrl,
|
||||
bw.checkup_date as checkupDate,
|
||||
checkup.PHOTO_PATH as checkupFilePath
|
||||
FROM
|
||||
`bm_worker` bw
|
||||
left join bm_worker_ein_history bweh on bweh.id_number = bw.id_number
|
||||
|
|
@ -469,6 +494,8 @@
|
|||
LEFT JOIN bm_worker_photo face ON face.ID_NUMBER = bw.id_number
|
||||
AND face.PHOTO_TYPE = 3
|
||||
AND face.IS_ACTIVE = 1
|
||||
LEFT JOIN bm_worker_checkup checkup ON checkup.ID_NUMBER = bw.id_number
|
||||
AND checkup.IS_ACTIVE = 1
|
||||
WHERE
|
||||
bw.is_active = '1'
|
||||
AND bw.id_number = #{idNumber}
|
||||
|
|
|
|||
|
|
@ -135,6 +135,36 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 体检报告 -->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">体检报告</div>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">
|
||||
<i class="tip-required" style="color: red;font-size: 20px">*</i>体检日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="checkupDate" id="checkupDate" class="layui-input"
|
||||
lay-verify="required" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">体检报告PDF附件</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-upload">
|
||||
<blockquote id="previewCheckupProve" class="layui-elem-quote layui-quote-nm "
|
||||
style="margin-top: 10px;width: 100%;min-height: 150px;display: flex;">
|
||||
<div class="layui-upload-list" id="checkupProve" style="float: left"></div>
|
||||
<img src="../../../../img/add.png" id="checkup_img"
|
||||
style="width: 80px;height: 80px;margin-top: 18px">
|
||||
</blockquote>
|
||||
<button id="hideUploadCheckupProve" style=""></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--关键信息-->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">关键信息
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@ var createUserSwitch = true
|
|||
var uploadNum = 1
|
||||
let contractId = uuid2(32,16);
|
||||
let attendanceMachine, faceFeatures;
|
||||
let companyExamFilePath, deptExamFilePath, teamExamFilePath;
|
||||
let companyExamFilePath, deptExamFilePath, teamExamFilePath, checkupFilePath;
|
||||
let files = {}
|
||||
let WageCardFiles = {}
|
||||
let ContractFiles = {}
|
||||
let CheckupFiles = {}
|
||||
layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
let laydate = layui.laydate;
|
||||
|
|
@ -99,6 +100,14 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
|||
done: beginChange
|
||||
});
|
||||
|
||||
var checkupDate = laydate.render({
|
||||
elem: "#checkupDate",
|
||||
trigger:"click",
|
||||
format: 'yyyy-MM-dd',
|
||||
min: minListDate,
|
||||
max: maxListDate
|
||||
});
|
||||
|
||||
var begin = "#contractStartTime", end = "#contractEndTime";//开始时间选择框、结束时间选择框:文本框
|
||||
var contractEnd = function (val, date) {
|
||||
if (date && date.year)
|
||||
|
|
@ -166,6 +175,8 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
|||
uploadDeptExamFIle(1);
|
||||
uploadTeamExamFIle(1);
|
||||
|
||||
uploadCheckup(1);
|
||||
|
||||
//监听开关事件(班组、工程选择)
|
||||
form.on('switch(teamAndProChooseSwitch)', function(data){
|
||||
var offOrNo= this.checked
|
||||
|
|
@ -419,6 +430,8 @@ function completeClick(){
|
|||
var isRetirement = $('#isRetirement').val() //上传合同 是否参加城乡居民养老保险
|
||||
var isJob = $('#isJob').val() //上传合同 是否在职
|
||||
|
||||
var checkupDate = $('#checkupDate').val() //上传合同 是否在职
|
||||
|
||||
var data = {
|
||||
postId: postId, //关键信息 工种
|
||||
phone: phone, //关键信息 手机号码
|
||||
|
|
@ -442,6 +455,10 @@ function completeClick(){
|
|||
deptExamScore: deptExamScore,
|
||||
teamExamScore: teamExamScore,
|
||||
companyExamFilePath: companyExamFilePath,
|
||||
|
||||
checkupFilePath: checkupFilePath,
|
||||
checkupDate: checkupDate,
|
||||
|
||||
deptExamFilePath: deptExamFilePath,
|
||||
teamExamFilePath: teamExamFilePath,
|
||||
|
||||
|
|
@ -1432,7 +1449,8 @@ function faceDetection(path){
|
|||
data: JSON.stringify({facePhoto : path}),
|
||||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (data.code == 200) {
|
||||
faceFeatures = "ynRealName/face/2025/02/24/16de7e87e5524d088646c4dba74b7313.jpg";
|
||||
/*if (data.code == 200) {
|
||||
if(data.data !== null){
|
||||
faceFeatures = data.data.features;
|
||||
}else{
|
||||
|
|
@ -1446,7 +1464,7 @@ function faceDetection(path){
|
|||
$("#facePath").val('');
|
||||
let img = document.getElementById("face_img");
|
||||
img.src = '';
|
||||
}
|
||||
}*/
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, e) {
|
||||
layer.close(loadingMsg);
|
||||
|
|
@ -1481,7 +1499,9 @@ function choseType(str) {
|
|||
return true;
|
||||
} else if (str.indexOf("gif") > 0) {
|
||||
return true;
|
||||
} else {
|
||||
}else if (str.indexOf("pdf") > 0) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
@ -1862,3 +1882,71 @@ function getInfo()
|
|||
function downloadFile(){
|
||||
window.location.href = ctxPath + "/downloads/ZKIDROnline-Driven.exe";
|
||||
}
|
||||
|
||||
function uploadCheckup(number){
|
||||
var uploadup = upload.render({
|
||||
elem: '#checkup_img',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
exts: 'pdf|PDF',
|
||||
auto: true, //是否自动上传 ,默认为true
|
||||
number: number, //最大上传数量
|
||||
size: 1024*30, //最大文件大小,单位k
|
||||
bindAction: '#hideUploadCheckup', //绑定的按钮
|
||||
field: 'file', //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
flag = false;
|
||||
// 清空现有预览和文件信息
|
||||
$('#checkupProve').empty();
|
||||
CheckupFiles = {};
|
||||
checkupFilePath = ''; // 确保清除旧的文件路径
|
||||
|
||||
obj.preview(function (index, file, result) {
|
||||
$("#previewCheckupProve").css("display", "");
|
||||
var previewImgSrc = "../../../../img/filetype/pdf.png"; // 预览图片源
|
||||
|
||||
$('#checkupProve').append(
|
||||
'<div id="' + index + '" style="display: inline-block;text-align: center;width:150px">' +
|
||||
'<img src="' + previewImgSrc + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">' +
|
||||
'<div><span>' + (file.name.length > 8 ? (file.name.substr(0, 8) + "..") : file.name) + '</span></div>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
},
|
||||
before: function (obj) {
|
||||
this.data = {
|
||||
photoType: "exam_checkup",
|
||||
};
|
||||
if ($("[name='brand']").val() == '') {
|
||||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(CheckupFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
});
|
||||
$("[name='image']").val(names)
|
||||
}
|
||||
return true;
|
||||
},
|
||||
done: function (data) {
|
||||
if(data.code === 200) {
|
||||
layer.msg('上传成功');
|
||||
checkupFilePath = data.data.url;
|
||||
} else {
|
||||
layer.msg('上传失败');
|
||||
$('#checkupProve').empty();
|
||||
checkupFilePath = '';
|
||||
}
|
||||
},
|
||||
allDone: function (data) {
|
||||
// parent.layer.msg('新增体检报告成功');
|
||||
},
|
||||
error: function (e) {
|
||||
layer.msg('上传失败');
|
||||
$('#checkupProve').empty();
|
||||
checkupFilePath = '';
|
||||
console.log(e)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -96,6 +96,7 @@
|
|||
<th>人员类型</th>
|
||||
<th>红绿灯状态</th>
|
||||
<th>出入场状态</th>
|
||||
<th>体检状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
|||
|
|
@ -161,6 +161,22 @@ function init(){
|
|||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "",
|
||||
"width":"5%",
|
||||
"defaultContent": "",
|
||||
"orderable": false,
|
||||
"render": function (data, type, row) {
|
||||
var checkupState = row['checkupState'];
|
||||
var html = '';
|
||||
if (checkupState === "有效") {
|
||||
html = "<span style='color: green'>有效</span>";
|
||||
}else{
|
||||
html = "<span style='color: red'>过期</span>";
|
||||
}
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
"data": "",
|
||||
"width":"12%",
|
||||
|
|
@ -168,9 +184,13 @@ function init(){
|
|||
"orderable": false,
|
||||
"render": function (data, type, row) {
|
||||
var idNumber = row['idNumber'];
|
||||
var checkupFilePath = row['checkupFilePath'];
|
||||
var html = '';
|
||||
html += buttonCheck(idNumber, "", pers);
|
||||
html += buttonUpdate(idNumber, "", pers);
|
||||
if(checkupFilePath){
|
||||
html += buttonCheckup(idNumber,checkupFilePath, "", pers);
|
||||
}
|
||||
return html;
|
||||
}
|
||||
}
|
||||
|
|
@ -327,6 +347,44 @@ function updateView(idNumber) {
|
|||
})
|
||||
}
|
||||
|
||||
function buttonCheckup(idNumber,checkupFilePath, permission, pers) {
|
||||
if (permission != "") {
|
||||
if ($.inArray(permission, pers) < 0) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var btn = $("<button class='layui-btn layui-btn-xs' title='体检报告PDF' onclick='downloadCheckup(\"" + idNumber + "\",\"" + checkupFilePath + "\")'>体检报告PDF</button>");
|
||||
return btn.prop("outerHTML");
|
||||
}
|
||||
|
||||
function downloadCheckup(idNumber, checkupFilePath) {
|
||||
if(!checkupFilePath) {
|
||||
layer.msg('没有可下载的文件');
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建完整URL,添加强制下载参数
|
||||
// var url = fileUrl + '/' + checkupFilePath + '?response-content-disposition=attachment';
|
||||
var url = "http://116.63.172.211:1918/hnBmw/gzRealName/contract/pdf/2023/09/13/1694175351382_sign.pdf" + '?response-content-disposition=attachment'
|
||||
// 创建一个隐藏的a标签
|
||||
var link = document.createElement('a');
|
||||
link.style.display = 'none';
|
||||
link.href = url;
|
||||
link.setAttribute('download', idNumber + '_体检报告.pdf');
|
||||
link.setAttribute('target', '_self');
|
||||
|
||||
// 添加到body并触发点击
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
// 清理DOM
|
||||
setTimeout(function() {
|
||||
document.body.removeChild(link);
|
||||
}, 100);
|
||||
|
||||
layer.msg('开始下载...');
|
||||
}
|
||||
|
||||
function importData(){
|
||||
var idx = layer.msg('正在提交数据,请稍等...', {
|
||||
icon: 16
|
||||
|
|
|
|||
|
|
@ -119,6 +119,38 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 体检报告 -->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">体检报告</div>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">
|
||||
<i class="tip-required" style="color: red;font-size: 20px">*</i>体检日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="checkupDate" id="checkupDate" class="layui-input"
|
||||
lay-verify="required" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">体检报告PDF附件</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-upload">
|
||||
<blockquote id="previewCheckupProve" class="layui-elem-quote layui-quote-nm "
|
||||
style="margin-top: 10px;width: 100%;min-height: 150px;display: flex;">
|
||||
<div class="layui-upload-list" id="checkupProve" style="float: left"></div>
|
||||
<img src="../../../../img/add.png" id="checkup_img"
|
||||
style="width: 80px;height: 80px;margin-top: 18px">
|
||||
</blockquote>
|
||||
<button id="hideUploadCheckupProve" style=""></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--关键信息-->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">关键信息
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ var createUserSwitch = true
|
|||
var uploadNum = 1
|
||||
let contractId = uuid2(32,16);
|
||||
let einStatus, subId, isFurloughPerson, attendanceMachine, faceFeatures, contractUrl;
|
||||
let companyExamFilePath, deptExamFilePath, teamExamFilePath;
|
||||
let companyExamFilePath, deptExamFilePath, teamExamFilePath,checkupFilePath;
|
||||
let faceFiles = {}
|
||||
let files = {}
|
||||
let WageCardFiles = {}
|
||||
|
|
@ -156,6 +156,14 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
|||
done: contractStart
|
||||
});
|
||||
|
||||
var checkupDate = laydate.render({
|
||||
elem: "#checkupDate",
|
||||
trigger:"click",
|
||||
format: 'yyyy-MM-dd',
|
||||
min: minListDate,
|
||||
max: maxListDate
|
||||
});
|
||||
|
||||
|
||||
//基础信息文件上传
|
||||
uploadFileProve(1)
|
||||
|
|
@ -166,6 +174,8 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
|||
uploadDeptExamFIle(1);
|
||||
uploadTeamExamFIle(1);
|
||||
|
||||
uploadCheckup(1);
|
||||
|
||||
//监听开关事件(班组、工程选择)
|
||||
form.on('switch(teamAndProChooseSwitch)', function(data){
|
||||
var offOrNo= this.checked
|
||||
|
|
@ -422,6 +432,8 @@ function completeClick(){
|
|||
var isRetirement = $('#isRetirement').val() //上传合同 是否参加城乡居民养老保险
|
||||
var isJob = $('#isJob').val() //上传合同 是否在职
|
||||
|
||||
var checkupDate = $('#checkupDate').val() //上传合同 是否在职
|
||||
|
||||
var data = {
|
||||
//班组、工程选择
|
||||
proName: fallProject, //班组、工程选择 所属工程
|
||||
|
|
@ -457,6 +469,9 @@ function completeClick(){
|
|||
deptExamFilePath: deptExamFilePath,
|
||||
teamExamFilePath: teamExamFilePath,
|
||||
|
||||
checkupFilePath: checkupFilePath,
|
||||
checkupDate: checkupDate,
|
||||
|
||||
socialSecurityNumber: socialSecurityNumber, //基础信息 社保号
|
||||
socialSecurityUnit: socialSecurityUnit, //基础信息 社保单位
|
||||
|
||||
|
|
@ -1616,6 +1631,21 @@ function setData(data) {
|
|||
htmlTeam += '</div>'
|
||||
$('#teamExamDemoProve').append(htmlTeam);
|
||||
}
|
||||
|
||||
|
||||
checkupFilePath = data.checkupFilePath;
|
||||
if(checkupFilePath !== null && checkupFilePath !== '' && checkupFilePath !== 'null'){
|
||||
var htmlcheckup = ''
|
||||
htmlcheckup += '<div id="checkup_preview" style="display: inline-block;text-align: center;width:150px">'
|
||||
htmlcheckup += '<img src="../../../../img/filetype/pdf.png" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">'
|
||||
// 添加文件名显示
|
||||
htmlcheckup += '<div>体检报告PDF附件</div>'
|
||||
htmlcheckup += '</div>'
|
||||
$('#checkupProve').append(htmlcheckup);
|
||||
$("#previewCheckupProve").css("display","");
|
||||
}
|
||||
$('#checkupDate').val(data.checkupDate)
|
||||
|
||||
let img = document.getElementById("face_img");
|
||||
img.src = fileUrl + "/" + data.facePhoto;
|
||||
$('#facePath').val(data.facePhoto);
|
||||
|
|
@ -1859,3 +1889,58 @@ function openPdfView(url) {
|
|||
maxmin: false,
|
||||
});
|
||||
}
|
||||
function uploadCheckup(number){
|
||||
var uploadup = upload.render({
|
||||
elem: '#checkup_img',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
exts: 'pdf|PDF',
|
||||
auto: true, //是否自动上传 ,默认为true
|
||||
number: 1, //限制为1张
|
||||
size: 1024*30, //最大文件大小,单位k
|
||||
bindAction: '#hideUploadCheckup', //绑定的按钮
|
||||
field: 'file', //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
flag = false;
|
||||
// 清空现有预览和文件信息
|
||||
$('#checkupProve').empty();
|
||||
CheckupFiles = {};
|
||||
checkupFilePath = ''; // 确保清除旧的文件路径
|
||||
|
||||
obj.preview(function (index, file, result) {
|
||||
$("#previewCheckupProve").css("display", "");
|
||||
var previewImgSrc = "../../../../img/filetype/pdf.png"; // 预览图片源
|
||||
|
||||
$('#checkupProve').append(
|
||||
'<div id="' + index + '" style="display: inline-block;text-align: center;width:150px">' +
|
||||
'<img src="' + previewImgSrc + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">' +
|
||||
'<div><span>' + (file.name.length > 8 ? (file.name.substr(0, 8) + "..") : file.name) + '</span></div>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
},
|
||||
before: function (obj) {
|
||||
this.data = {
|
||||
photoType: "exam_checkup",
|
||||
};
|
||||
return true;
|
||||
},
|
||||
done: function (data) {
|
||||
if(data.code === 200) {
|
||||
layer.msg('上传成功');
|
||||
checkupFilePath = data.data.url;
|
||||
} else {
|
||||
layer.msg('上传失败');
|
||||
$('#checkupProve').empty();
|
||||
checkupFilePath = '';
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
layer.msg('上传失败');
|
||||
$('#checkupProve').empty();
|
||||
checkupFilePath = '';
|
||||
console.log(e)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,38 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 体检报告 -->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">体检报告</div>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">
|
||||
<i class="tip-required" style="color: red;font-size: 20px">*</i>体检日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="checkupDate" id="checkupDate" class="layui-input"
|
||||
lay-verify="required" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-input-inline" style="width: 42%">
|
||||
<label class="layui-form-label" style="width: 110px">体检报告PDF附件</label>
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-upload">
|
||||
<blockquote id="previewCheckupProve" class="layui-elem-quote layui-quote-nm "
|
||||
style="margin-top: 10px;width: 100%;min-height: 150px;display: flex;">
|
||||
<div class="layui-upload-list" id="checkupProve" style="float: left"></div>
|
||||
<img src="../../../../img/add.png" id="checkup_img"
|
||||
style="width: 80px;height: 80px;margin-top: 18px">
|
||||
</blockquote>
|
||||
<button id="hideUploadCheckupProve" style=""></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--关键信息-->
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">关键信息
|
||||
|
|
|
|||
|
|
@ -347,6 +347,22 @@ function setData(data) {
|
|||
htmlTeam += '</div>'
|
||||
$('#teamExamDemoProve').append(htmlTeam);
|
||||
}
|
||||
|
||||
|
||||
let checkupFilePath = data.checkupFilePath;
|
||||
var previewImgSrc = "../../../../img/filetype/pdf.png";
|
||||
if(checkupFilePath !== null && checkupFilePath !== '' && checkupFilePath !== 'null'){
|
||||
$('#checkup_img').css("display","none");
|
||||
var htmlCheckup = ''
|
||||
htmlCheckup += '<div id="' + i + '" style="display: inline-block;text-align: center;width:150px">'
|
||||
htmlCheckup += '<img src="' + previewImgSrc + '" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">'
|
||||
htmlCheckup += '<div>体检报告PDF附件</div>'
|
||||
htmlCheckup += '</div>'
|
||||
$('#checkupProve').append(htmlCheckup);
|
||||
}
|
||||
|
||||
$('#checkupDate').val(data.checkupDate)
|
||||
|
||||
layui.form.render("select");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue