特种持证
This commit is contained in:
parent
a02fcb513f
commit
d90bdd4ac8
|
|
@ -6,11 +6,20 @@ public class Dict extends BaseEntity<Long> {
|
||||||
private String type;
|
private String type;
|
||||||
private String k;
|
private String k;
|
||||||
private String val;
|
private String val;
|
||||||
|
private String isSpecial;
|
||||||
|
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getIsSpecial() {
|
||||||
|
return isSpecial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsSpecial(String isSpecial) {
|
||||||
|
this.isSpecial = isSpecial;
|
||||||
|
}
|
||||||
|
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -24,21 +24,29 @@ function showDictSelect(id, type, all) {
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
function showDictSelectToLayui(id, type, all, key) {
|
function showDictSelectToLayui(id, type, all, key) {
|
||||||
var data = getDict(type);
|
|
||||||
var select = $("#" + id);
|
var select = $("#" + id);
|
||||||
select.empty();
|
select.empty();
|
||||||
if (all != undefined && all) {
|
$.ajax({
|
||||||
select.append("<option value='-1'>请选择</option>");
|
type : 'post',
|
||||||
}
|
url : systemPath + '/dicts',
|
||||||
$.each(data, function (k, v) {
|
data : {
|
||||||
if (k == key) {
|
"type" : type
|
||||||
select.append("<option selected value ='" + k + "'>" + v + "</option>");
|
},
|
||||||
} else {
|
async : false,
|
||||||
select.append("<option value ='" + k + "'>" + v + "</option>");
|
success : function(data) {
|
||||||
}
|
if (all != undefined && all) {
|
||||||
});
|
select.append("<option value='-1'>请选择</option>");
|
||||||
layui.form.render();
|
}
|
||||||
return data;
|
$.each(data, function (index, item) {
|
||||||
|
if (item.k == key) {
|
||||||
|
select.append("<option selected value ='" + item.k + "' data-is-special='" + item.isSpecial + "'>" + item.val + "</option>");
|
||||||
|
} else {
|
||||||
|
select.append("<option value ='" + item.k + "' data-is-special='" + item.isSpecial + "'>" + item.val + "</option>");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
layui.form.render();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDict(type) {
|
function getDict(type) {
|
||||||
|
|
@ -64,4 +72,4 @@ function changTime(rowData){
|
||||||
var d = new Date(rowData)
|
var d = new Date(rowData)
|
||||||
var a= d.getFullYear() + '-' + (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) + '-' + (d.getDate()<10 ? "0" +d.getDate():d.getDate())
|
var a= d.getFullYear() + '-' + (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) + '-' + (d.getDate()<10 ? "0" +d.getDate():d.getDate())
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-input-inline" style="width: 42%">
|
<div class="layui-input-inline" style="width: 35%">
|
||||||
<label class="layui-form-label" style="width: 110px">体检报告PDF附件</label>
|
<label class="layui-form-label" style="width: 110px">体检报告PDF附件</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-upload">
|
<div class="layui-upload">
|
||||||
|
|
@ -188,6 +188,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-input-inline" id="targetDiv" style="width: 60%;display: none">
|
||||||
|
<label class="layui-form-label" style="width: 110px">特种持证PDF附件</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-upload">
|
||||||
|
<blockquote id="previewSpecialProve" class="layui-elem-quote layui-quote-nm "
|
||||||
|
style="margin-top: 10px;width: 100%;min-height: 150px;display: flex;">
|
||||||
|
<div class="layui-upload-list" id="specialProve" style="float: left"></div>
|
||||||
|
<img src="../../../../img/add.png" id="special_img"
|
||||||
|
style="width: 80px;height: 80px;margin-top: 18px">
|
||||||
|
</blockquote>
|
||||||
|
<button id="hidePreviewSpecialProve" style=""></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="layui-input-inline" style="width: 42%">
|
<div class="layui-input-inline" style="width: 42%">
|
||||||
<label class="layui-form-label" style="width: 110px"><i class="tip-required"
|
<label class="layui-form-label" style="width: 110px"><i class="tip-required"
|
||||||
style="color: red;font-size: 20px">*</i>工程</label>
|
style="color: red;font-size: 20px">*</i>工程</label>
|
||||||
|
|
@ -717,4 +732,4 @@
|
||||||
<script type="text/javascript" src="../../../../js/select.js"></script>
|
<script type="text/javascript" src="../../../../js/select.js"></script>
|
||||||
<script type="text/javascript" src="xm-select.js"></script>
|
<script type="text/javascript" src="xm-select.js"></script>
|
||||||
<script type="text/javascript" src="personEntryFrom.js"
|
<script type="text/javascript" src="personEntryFrom.js"
|
||||||
defer="defer"></script>
|
defer="defer"></script>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||||
);
|
);
|
||||||
//顶部样式
|
//顶部样式
|
||||||
titleStyle()
|
titleStyle()
|
||||||
getProByTeamId('', '');
|
|
||||||
|
getSub('')
|
||||||
form.on('select(subId)', function(data){
|
form.on('select(subId)', function(data){
|
||||||
getTeamBySubId(data.value,'')
|
getTeamBySubId(data.value,'')
|
||||||
$("#fallPro").val("");
|
$("#fallPro").val("");
|
||||||
|
|
@ -41,6 +42,17 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||||
getTeamBySubIdToData($("#subId").val(),data.value)
|
getTeamBySubIdToData($("#subId").val(),data.value)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
form.on('select(postId)', function(data){
|
||||||
|
var selectedOption = $(data.elem).find('option:selected');
|
||||||
|
var isSpecial = selectedOption.attr('data-is-special')
|
||||||
|
if(isSpecial === '1') {
|
||||||
|
$('#targetDiv').show();
|
||||||
|
} else {
|
||||||
|
$('#targetDiv').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var minListDate = '1990-01-01';//最小可选时间,例:1990-02-01
|
var minListDate = '1990-01-01';//最小可选时间,例:1990-02-01
|
||||||
var maxListDate = '2200-12-31';//最大可选时间,例:2200-12-31
|
var maxListDate = '2200-12-31';//最大可选时间,例:2200-12-31
|
||||||
var begin = "#signDate", end = "#expiryDate";//开始时间选择框、结束时间选择框:文本框
|
var begin = "#signDate", end = "#expiryDate";//开始时间选择框、结束时间选择框:文本框
|
||||||
|
|
@ -176,6 +188,7 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||||
uploadTeamExamFIle(1);
|
uploadTeamExamFIle(1);
|
||||||
|
|
||||||
uploadCheckup(1);
|
uploadCheckup(1);
|
||||||
|
uploadSpecial(5);
|
||||||
|
|
||||||
//监听开关事件(班组、工程选择)
|
//监听开关事件(班组、工程选择)
|
||||||
form.on('switch(teamAndProChooseSwitch)', function(data){
|
form.on('switch(teamAndProChooseSwitch)', function(data){
|
||||||
|
|
@ -1948,4 +1961,73 @@ function uploadCheckup(number){
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uploadSpecial(number){
|
||||||
|
var uploadup = upload.render({
|
||||||
|
elem: '#special_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;
|
||||||
|
// 清空现有预览和文件信息
|
||||||
|
$('#specialProve').empty();
|
||||||
|
CheckupFiles = {};
|
||||||
|
checkupFilePath = ''; // 确保清除旧的文件路径
|
||||||
|
|
||||||
|
obj.preview(function (index, file, result) {
|
||||||
|
$("#previewSpecialProve").css("display", "");
|
||||||
|
var previewImgSrc = "../../../../img/filetype/pdf.png"; // 预览图片源
|
||||||
|
|
||||||
|
$('#specialProve').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('上传失败');
|
||||||
|
$('#specialProve').empty();
|
||||||
|
checkupFilePath = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
allDone: function (data) {
|
||||||
|
// parent.layer.msg('新增体检报告成功');
|
||||||
|
},
|
||||||
|
error: function (e) {
|
||||||
|
layer.msg('上传失败');
|
||||||
|
$('#specialProve').empty();
|
||||||
|
checkupFilePath = '';
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,13 +69,17 @@
|
||||||
onclick="importData()">导入</button>
|
onclick="importData()">导入</button>
|
||||||
</div>
|
</div>
|
||||||
<a class="layui-btn layui-btn-sm"
|
<a class="layui-btn layui-btn-sm"
|
||||||
href="../../../../downloads/人员库_导入模板.xlsx" download="人员库_导入模板.xlsx">
|
href="../../../../downloads/人员库_导入模板.xlsx" download="人员库_导入模板.xlsx" style="margin-top:0.5%">
|
||||||
<i class="layui-icon"></i> 模板下载
|
<i class="layui-icon"></i> 模板下载
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button class="layui-btn layui-btn-sm"
|
<button class="layui-btn layui-btn-sm"
|
||||||
onclick="checkup()" style="">批量导出体检报告
|
onclick="checkup()" style="margin-top:0.5%">批量导出体检报告
|
||||||
</button>
|
</button>
|
||||||
|
<a class="layui-btn layui-btn-sm"
|
||||||
|
href="../../../../downloads/农民工实名制导入模版.xlsx" download="农民工实名制导入模板.xlsx" style="margin-top:0.5%">
|
||||||
|
<i class="layui-icon"></i> 农民工实名制模板下载
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -123,4 +127,4 @@
|
||||||
<script type="text/javascript" src="../../../../js/publicJs.js"></script>
|
<script type="text/javascript" src="../../../../js/publicJs.js"></script>
|
||||||
<script type="text/javascript" src="../../../../js/dict.js"></script>
|
<script type="text/javascript" src="../../../../js/dict.js"></script>
|
||||||
<script type="text/javascript" src="../../../../js/FileSaver.min.js"></script>
|
<script type="text/javascript" src="../../../../js/FileSaver.min.js"></script>
|
||||||
<script type="text/javascript" src="personEntryList.js"></script>
|
<script type="text/javascript" src="personEntryList.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DictDao {
|
public interface DictDao {
|
||||||
|
|
||||||
@Select("select t.value as val,type,id as k from t_dict t where t.type = #{type} and t.is_active = '1'")
|
@Select("select t.value as val,t.is_special as isSpecial,type,id as k from t_dict t where t.type = #{type} and t.is_active = '1'")
|
||||||
List<Dict> listByType(String type);
|
List<Dict> listByType(String type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue