parent
f2f327c3b4
commit
08f88842d5
|
|
@ -566,7 +566,7 @@ public class ExcelUtil<T>
|
|||
}else{
|
||||
boolean b = changeDataType(isRegex, val.toString().trim());
|
||||
if(!b) {
|
||||
throw new IllegalArgumentException(attr.name()+" 单元格必需填写正确的格式!");
|
||||
throw new IllegalArgumentException(attr.name() +" 单元格必需填写正确的格式!" + "在Excel表格数据是“ " + val.toString().trim() +"”" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class IpAndPathConfig {
|
|||
* 人脸检测后端相关
|
||||
*/
|
||||
public static String faceDevUrl = "http://127.0.0.1:1909/file/";
|
||||
public static String faceTestUrl = "http://192.168.0.14:1909/file/";
|
||||
public static String faceTestUrl = "http://192.168.0.14:18017/file/";
|
||||
public static String faceProdUrl = "http://112.29.103.165:14413/file/";
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -95,4 +95,6 @@ public interface InOutDao {
|
|||
List<OutPersonTimeoutBean> getOneYearNotInPlace();
|
||||
|
||||
int exitRoute(BasePersonBean bean);
|
||||
|
||||
void updateNoSignalTeamPerson(String idNumber);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,4 +80,10 @@ public interface RedListDao {
|
|||
* @param list 需要转的人的idNumber
|
||||
*/
|
||||
void updateToFixedPerson(@Param("list") List<RedLightHisBean> list);
|
||||
|
||||
/**
|
||||
* 转成黄灯
|
||||
* @param idNumber
|
||||
*/
|
||||
void updateWorkerLightYellow(String idNumber);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@ public class BasePersonBean {
|
|||
// @Excel(name = "*身份证失效日期",required = true)
|
||||
// private String expiryDate;
|
||||
|
||||
@Excel(name = "*身份证生效日期", isRegex = "^\\d{4}/\\d{1,2}/\\d{1,2}$")
|
||||
@Excel(name = "*身份证生效日期", isRegex = "^\\d{4}[-/]\\d{1,2}[-/]\\d{1,2}$")
|
||||
private String signDate;
|
||||
|
||||
@Excel(name = "*身份证失效日期", isRegex = "^\\d{4}/\\d{1,2}/\\d{1,2}$")
|
||||
@Excel(name = "*身份证失效日期", isRegex = "^\\d{4}[-/]\\d{1,2}[-/]\\d{1,2}$")
|
||||
private String expiryDate;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,22 +45,22 @@ public class ContractServiceImpl implements ContractService {
|
|||
public int addContractInfo(ContractBean bean) {
|
||||
//现在合同可以重复上传,在上传之前将以前合同设置为无效
|
||||
int i = 0;
|
||||
if("-1".equals(bean.getDelId())){
|
||||
if ("-1".equals(bean.getDelId())) {
|
||||
i = 1;
|
||||
}else{
|
||||
} else {
|
||||
i = delContract(bean);
|
||||
}
|
||||
if(i>0){
|
||||
if (i > 0) {
|
||||
String proId = bean.getProId();
|
||||
if (!StringUtils.isEmpty(proId) && !"null".equalsIgnoreCase(proId)){
|
||||
if (!StringUtils.isEmpty(proId) && !"null".equalsIgnoreCase(proId)) {
|
||||
String proName = personComprehensiveDao.getProNme(proId);
|
||||
String abbreviation = getInitialsUpperCaseWithPinyin(proName);
|
||||
int contractNum =personComprehensiveDao.getContractNum();
|
||||
int contractNum = personComprehensiveDao.getContractNum();
|
||||
String dateStr = DateUtil.format(DateUtil.date(), "yyyyMMdd"); // 使用 Hutool 的 DateUtil
|
||||
String contractCode = abbreviation + dateStr + contractNum;
|
||||
bean.setContractCode(contractCode);
|
||||
i = dao.addContractInfo(bean);
|
||||
}else{
|
||||
} else {
|
||||
i = -1;
|
||||
return i;
|
||||
}
|
||||
|
|
@ -69,15 +69,15 @@ public class ContractServiceImpl implements ContractService {
|
|||
//将合同id存入 出入场表
|
||||
//1.0先查 最新出入场记录
|
||||
String date = dao.getWorkerEinRecord(bean.getIdNumber());
|
||||
if(StringUtils.isNotEmpty(date)){
|
||||
dao.updateWorkerEinRecord(bean.getId(),bean.getIdNumber(),date);
|
||||
if (StringUtils.isNotEmpty(date)) {
|
||||
dao.updateWorkerEinRecord(bean.getId(), bean.getIdNumber(), date);
|
||||
}
|
||||
|
||||
//添加照片
|
||||
List<ContractBean> list= new ArrayList<>();
|
||||
List<ContractBean> list = new ArrayList<>();
|
||||
for (int j = 0; j < bean.getFilePath().length; j++) {
|
||||
list.add(new ContractBean(bean.getId(),bean.getIdNumber(),
|
||||
"",DateUtils.getDate(),DateUtils.getTime(),bean.getFilePath()[j]));
|
||||
list.add(new ContractBean(bean.getId(), bean.getIdNumber(),
|
||||
"", DateUtils.getDate(), DateUtils.getTime(), bean.getFilePath()[j]));
|
||||
}
|
||||
int j = addContractPhoto(list);
|
||||
//判断是否绿灯,修改数据
|
||||
|
|
@ -88,29 +88,37 @@ public class ContractServiceImpl implements ContractService {
|
|||
|
||||
/**
|
||||
* 判断是否需要修改红绿灯
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public void updateRedLightStatus(List<RedLightHisBean> list){
|
||||
public void updateRedLightStatus(List<RedLightHisBean> list) {
|
||||
LightStatusBean bean = new LightStatusBean();
|
||||
for (RedLightHisBean redLightHisBean : list) {
|
||||
bean.setIdNumber(redLightHisBean.getIdNumber());
|
||||
LightStatusBean lightStatus = integratedQueryService.getLightStatus(bean);
|
||||
//在分包班组插入数据时,有事务,所以直接判断是不是插入成功即可
|
||||
if(list.size()==1 && "-1".equals(list.get(0).getSubId())){
|
||||
if (list.size() == 1 && "-1".equals(list.get(0).getSubId())) {
|
||||
lightStatus.setSubTeam("-1");
|
||||
}
|
||||
if(lightStatus != null){
|
||||
if(StringUtils.isNotEmpty(lightStatus.getCompanyExamScore()) &&
|
||||
if (lightStatus != null) {
|
||||
if (StringUtils.isNotEmpty(lightStatus.getCompanyExamScore()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getDeptExamScore()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getTeamExamScore())) {
|
||||
if (Integer.parseInt(lightStatus.getCompanyExamScore()) >= 80 &&
|
||||
Integer.parseInt(lightStatus.getDeptExamScore()) >= 80 &&
|
||||
Integer.parseInt(lightStatus.getTeamExamScore()) >= 80 &&
|
||||
StringUtils.isNotEmpty(lightStatus.getSubTeam()) && StringUtils.isNotEmpty(lightStatus.getWageCard()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getWageCard())) {
|
||||
redListDao.updateWorkerLight(redLightHisBean.getIdNumber());
|
||||
}
|
||||
StringUtils.isNotEmpty(lightStatus.getSubTeam()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getWageCard()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getCompanyExamFilePath()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getDeptExamFilePath()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getTeamExamFilePath()) &&
|
||||
StringUtils.isNotEmpty(lightStatus.getContract())
|
||||
) {
|
||||
redListDao.updateWorkerLight(redLightHisBean.getIdNumber());
|
||||
} else {
|
||||
redListDao.updateWorkerLightYellow(redLightHisBean.getIdNumber());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -126,34 +134,34 @@ public class ContractServiceImpl implements ContractService {
|
|||
List<ContractBean> contractManageList = dao.getContractManageList(params, offset, limit);
|
||||
List<ContractBean> beanList = new ArrayList<>();
|
||||
for (ContractBean contractBean : contractManageList) {
|
||||
if("纸质合同".equals(contractBean.getContractType())){
|
||||
if ("纸质合同".equals(contractBean.getContractType())) {
|
||||
contractBean.setStauts("已签订");
|
||||
}else if("0".equals(contractBean.getIsAudit())){
|
||||
} else if ("0".equals(contractBean.getIsAudit())) {
|
||||
contractBean.setStauts("待签订");
|
||||
}else if("2".equals(contractBean.getIsAudit())){
|
||||
} else if ("2".equals(contractBean.getIsAudit())) {
|
||||
contractBean.setStauts("审核不通过");
|
||||
}else if("1".equals(contractBean.getIsAudit())
|
||||
&& !"0".equals(contractBean.getIsSign()) && !"1".equals(contractBean.getIsSign())){
|
||||
} else if ("1".equals(contractBean.getIsAudit())
|
||||
&& !"0".equals(contractBean.getIsSign()) && !"1".equals(contractBean.getIsSign())) {
|
||||
contractBean.setStauts("待签署");
|
||||
}else if("1".equals(contractBean.getIsAudit()) && "0".equals(contractBean.getIsSign())){
|
||||
} else if ("1".equals(contractBean.getIsAudit()) && "0".equals(contractBean.getIsSign())) {
|
||||
contractBean.setStauts("未签署");
|
||||
}else if("1".equals(contractBean.getIsAudit()) && "1".equals(contractBean.getIsSign())){
|
||||
} else if ("1".equals(contractBean.getIsAudit()) && "1".equals(contractBean.getIsSign())) {
|
||||
contractBean.setStauts("已签署");
|
||||
}else if("1".equals(contractBean.getIsAudit())){
|
||||
} else if ("1".equals(contractBean.getIsAudit())) {
|
||||
contractBean.setStauts("未签署");
|
||||
}else{
|
||||
} else {
|
||||
contractBean.setStauts("未签订");
|
||||
}
|
||||
}
|
||||
|
||||
String contractStatus = params.get("contractStatus").toString();
|
||||
if(!"".equals(contractStatus)){
|
||||
if (!"".equals(contractStatus)) {
|
||||
for (ContractBean contractBean : contractManageList) {
|
||||
if(contractStatus.equals(contractBean.getStauts())){
|
||||
if (contractStatus.equals(contractBean.getStauts())) {
|
||||
beanList.add(contractBean);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
beanList = contractManageList;
|
||||
}
|
||||
return beanList;
|
||||
|
|
@ -172,12 +180,12 @@ public class ContractServiceImpl implements ContractService {
|
|||
@Override
|
||||
public int delContract(ContractBean entity) {
|
||||
ContractBean bean = dao.getLightStatus(entity);
|
||||
if("2".equals(bean.getLightStatus())){ //判断是否为绿灯,是的话修改为黄灯
|
||||
if ("2".equals(bean.getLightStatus())) { //判断是否为绿灯,是的话修改为黄灯
|
||||
dao.updLightStatus(entity);
|
||||
}
|
||||
int i = dao.delContract(entity);
|
||||
if(i>0){
|
||||
int j = dao.delContractPhoto(entity);
|
||||
if (i > 0) {
|
||||
int j = dao.delContractPhoto(entity);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
|
@ -189,7 +197,7 @@ public class ContractServiceImpl implements ContractService {
|
|||
|
||||
@Override
|
||||
public List<ContractBean> getContractSingletonList(Map<String, Object> params, Integer offset, Integer limit) {
|
||||
return dao.getContractSingletonList(params,offset,limit);
|
||||
return dao.getContractSingletonList(params, offset, limit);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -211,6 +211,9 @@ public class InOutServiceImpl implements InOutService {
|
|||
RedLightHisBean redLight = new RedLightHisBean();
|
||||
redLight.setIdNumber(idNumber);
|
||||
dealWithRedLight(redLight);
|
||||
|
||||
//先查询无信号班组,如果有就删除掉。
|
||||
dao.updateNoSignalTeamPerson(idNumber);
|
||||
}
|
||||
return x >= BasePersonBeans.size() ? R.ok("出场审核成功") : R.fail("出场审核失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,6 +142,9 @@
|
|||
where id_number = #{idNumber} and ein_time = #{einTime}
|
||||
</update>
|
||||
|
||||
<update id="updateNoSignalTeamPerson">
|
||||
UPDATE `bm_no_signal_team_person` SET `IS_ACTIVE` = '0' WHERE `id_number` = #{idNumber} and `is_active` = '1'
|
||||
</update>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(1) from (
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@
|
|||
bwc.miurInsurance,
|
||||
bwc.whetherOnJob,
|
||||
bwc.endowmentInsurance,
|
||||
GROUP_CONCAT(bwcw.witness_path) as contractPath,
|
||||
GROUP_CONCAT(DISTINCT bwcw.witness_path) as contractPath,
|
||||
su.id as userId,
|
||||
su.org_id,
|
||||
su.pro_id as userProId,
|
||||
|
|
@ -682,7 +682,7 @@
|
|||
bwc.miurInsurance,
|
||||
bwc.whetherOnJob,
|
||||
bwc.endowmentInsurance,
|
||||
GROUP_CONCAT(bwcw.witness_path) AS contractPath
|
||||
GROUP_CONCAT( DISTINCT bwcw.witness_path) AS contractPath
|
||||
FROM `bm_worker` bw
|
||||
LEFT JOIN bm_worker_contract bwc ON bwc.idCard = bw.id_number
|
||||
AND bwc.is_active = '1'
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@
|
|||
|
||||
</update>
|
||||
|
||||
<update id="updateWorkerLightYellow">
|
||||
update bm_worker set light_status = '1' where id_number = #{idNumber}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
update bm_redlist_worker set is_active = 0 where id_number = #{id}
|
||||
</delete>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
let IP_URL="http://127.0.0.1:39100/lpRealName"
|
||||
//测试环境
|
||||
// let IP_URL="http://127.0.0.1:39100/lpRealName"
|
||||
// let ctxPath = IP_URL+"/bmw";
|
||||
|
||||
//正式环境
|
||||
let IP_URL="http://112.29.103.165:39100/lpRealName"
|
||||
let ctxPath = IP_URL+"/bmw";
|
||||
|
||||
let currentHostname = window.location.hostname;
|
||||
|
||||
|
||||
//测试
|
||||
//测试,正式全部都用这个
|
||||
let loginPath =IP_URL+"/auth"//auth
|
||||
let systemPath = IP_URL+"/system";//system
|
||||
let fileUrl = IP_URL+"/file"; // ":31909/file";
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ let files = {}
|
|||
let WageCardFiles = {}
|
||||
let ContractFiles = {}
|
||||
let CheckupFiles = {}
|
||||
|
||||
let companyExamFiles = {}
|
||||
let deptExamFiles = {}
|
||||
let teamExamFiles = {}
|
||||
|
||||
|
||||
layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
let laydate = layui.laydate;
|
||||
|
|
@ -27,7 +33,8 @@ layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
|||
}
|
||||
);
|
||||
$(document).ready(function() {
|
||||
getProjectSelect(); // 初始化时加载分包下拉列表
|
||||
// getProjectSelect(); // 初始化时加载工程下拉列表
|
||||
getProByOrgId("","","");// 初始化时加载工程下拉列表
|
||||
});
|
||||
//顶部样式
|
||||
titleStyle()
|
||||
|
|
@ -954,7 +961,7 @@ function uploadCompanyExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#companyExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -973,10 +980,15 @@ function uploadCompanyExamFIle(number){
|
|||
"cross-domain": "", // IE 下跨域的提示
|
||||
},
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(companyExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
companyExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -994,7 +1006,7 @@ function uploadCompanyExamFIle(number){
|
|||
);
|
||||
$('#companyExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete companyExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -1014,7 +1026,7 @@ function uploadCompanyExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(companyExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -1038,7 +1050,7 @@ function uploadDeptExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#deptExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -1057,10 +1069,15 @@ function uploadDeptExamFIle(number){
|
|||
"cross-domain": "", // IE 下跨域的提示
|
||||
},
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(deptExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
deptExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -1078,7 +1095,7 @@ function uploadDeptExamFIle(number){
|
|||
);
|
||||
$('#deptExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete deptExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -1098,7 +1115,7 @@ function uploadDeptExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(deptExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -1122,7 +1139,7 @@ function uploadTeamExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#teamExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -1141,10 +1158,15 @@ function uploadTeamExamFIle(number){
|
|||
"cross-domain": "", // IE 下跨域的提示
|
||||
},
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(teamExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
teamExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -1162,7 +1184,7 @@ function uploadTeamExamFIle(number){
|
|||
);
|
||||
$('#teamExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete teamExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -1182,7 +1204,7 @@ function uploadTeamExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(teamExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -1480,7 +1502,7 @@ function uploadFileFace(num){
|
|||
url: fileUrl + "/file/upload", //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
exts: 'jpg',
|
||||
exts: 'jpg|png|jpeg|gif|bmp|webp',
|
||||
auto: true, //是否自动上传 ,默认为true
|
||||
number: num, //最大上传数量
|
||||
size: 1024*5, //最大文件大小,单位k
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ let faceFiles = {}
|
|||
let files = {}
|
||||
let WageCardFiles = {}
|
||||
let ContractFiles = {}
|
||||
|
||||
let companyExamFiles = {}
|
||||
let deptExamFiles = {}
|
||||
let teamExamFiles = {}
|
||||
layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
let laydate = layui.laydate;
|
||||
|
|
@ -1102,7 +1106,7 @@ function uploadCompanyExamFIle(number) {
|
|||
var uploadcom = upload.render({
|
||||
elem: "#companyExamTestProve",
|
||||
url: fileUrl + "/file/upload", //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: "jpg|png|jpeg|rar|zip|docx|doc|pdf",
|
||||
|
|
@ -1113,10 +1117,15 @@ function uploadCompanyExamFIle(number) {
|
|||
bindAction: "#companyExamHideUploadProve", //绑定的按钮
|
||||
field: "file", //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(companyExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ""; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = "";
|
||||
files = obj.pushFile();
|
||||
companyExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -1145,7 +1154,7 @@ function uploadCompanyExamFIle(number) {
|
|||
$("#companyExamTestProve").attr("disabled", true);
|
||||
$("#" + index).bind("dblclick", function () {
|
||||
//双击删除指定预上传图片
|
||||
delete files[index]; //删除指定图片
|
||||
delete companyExamFiles[index]; //删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if (photoNum === 0) {
|
||||
|
|
@ -1164,7 +1173,7 @@ function uploadCompanyExamFIle(number) {
|
|||
return false;
|
||||
} else {
|
||||
var names = "";
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(companyExamFiles, function (index, file) {
|
||||
names += file.name + ",";
|
||||
});
|
||||
$("[name='image']").val(names);
|
||||
|
|
@ -1186,7 +1195,7 @@ function uploadDeptExamFIle(number) {
|
|||
var uploadcom = upload.render({
|
||||
elem: "#deptExamTestProve",
|
||||
url: fileUrl + "/file/upload", //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: "jpg|png|jpeg|rar|zip|docx|doc|pdf",
|
||||
|
|
@ -1197,10 +1206,15 @@ function uploadDeptExamFIle(number) {
|
|||
bindAction: "#deptExamHideUploadProve", //绑定的按钮
|
||||
field: "file", //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(deptExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ""; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = "";
|
||||
files = obj.pushFile();
|
||||
deptExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -1229,7 +1243,7 @@ function uploadDeptExamFIle(number) {
|
|||
$("#deptExamTestProve").attr("disabled", true);
|
||||
$("#" + index).bind("dblclick", function () {
|
||||
//双击删除指定预上传图片
|
||||
delete files[index]; //删除指定图片
|
||||
delete deptExamFiles[index]; //删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if (photoNum === 0) {
|
||||
|
|
@ -1248,7 +1262,7 @@ function uploadDeptExamFIle(number) {
|
|||
return false;
|
||||
} else {
|
||||
var names = "";
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(deptExamFiles, function (index, file) {
|
||||
names += file.name + ",";
|
||||
});
|
||||
$("[name='image']").val(names);
|
||||
|
|
@ -1270,7 +1284,7 @@ function uploadTeamExamFIle(number) {
|
|||
var uploadcom = upload.render({
|
||||
elem: "#teamExamTestProve",
|
||||
url: fileUrl + "/file/upload", //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: "jpg|png|jpeg|rar|zip|docx|doc|pdf",
|
||||
|
|
@ -1281,10 +1295,15 @@ function uploadTeamExamFIle(number) {
|
|||
bindAction: "#teamxamHideUploadProve", //绑定的按钮
|
||||
field: "file", //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(teamExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ""; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = "";
|
||||
files = obj.pushFile();
|
||||
teamExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -1313,7 +1332,7 @@ function uploadTeamExamFIle(number) {
|
|||
$("#teamExamTestProve").attr("disabled", true);
|
||||
$("#" + index).bind("dblclick", function () {
|
||||
//双击删除指定预上传图片
|
||||
delete files[index]; //删除指定图片
|
||||
delete teamExamFiles[index]; //删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if (photoNum === 0) {
|
||||
|
|
@ -1332,7 +1351,7 @@ function uploadTeamExamFIle(number) {
|
|||
return false;
|
||||
} else {
|
||||
var names = "";
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(teamExamFiles, function (index, file) {
|
||||
names += file.name + ",";
|
||||
});
|
||||
$("[name='image']").val(names);
|
||||
|
|
@ -1450,7 +1469,7 @@ function uploadFileFace(num) {
|
|||
url: fileUrl + "/file/upload", //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
exts: "jpg",
|
||||
exts: 'jpg|png|jpeg|gif|bmp|webp',
|
||||
auto: true, //是否自动上传 ,默认为true
|
||||
size: 1024 * 2, //最大文件大小,单位k
|
||||
bindAction: "#hideUploadFaceProve", //绑定的按钮
|
||||
|
|
@ -1695,13 +1714,26 @@ function setData(data) {
|
|||
}
|
||||
var htmlCardPath = "";
|
||||
for (var i = 0; i < wageCardPath.length; i++) {
|
||||
|
||||
var file = wageCardPath[i];
|
||||
var fileSrc = file;
|
||||
var lowerFile = file.toLowerCase();
|
||||
|
||||
// 判断是不是图片
|
||||
if (lowerFile.endsWith(".jpg") || lowerFile.endsWith(".jpeg") || lowerFile.endsWith(".png")) {
|
||||
fileSrc = fileUrl + "/" + file; // 图片直接显示
|
||||
} else {
|
||||
// 不是图片,使用文件类型图标
|
||||
fileSrc = getTypeImgConsPerson(file);
|
||||
}
|
||||
|
||||
htmlCardPath +=
|
||||
'<div id="' +
|
||||
i +
|
||||
'" style="display: inline-block;text-align: center;width:150px">';
|
||||
htmlCardPath +=
|
||||
'<img src="' +
|
||||
(fileUrl + "/" + wageCardPath[i]) +
|
||||
fileSrc +
|
||||
'" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">';
|
||||
// htmlCardPath += '<div><span>' + (socialSecurityUnit[i].length > 8 ? (socialSecurityUnit[i].substr(0, 8) + "..") : socialSecurityUnit[i]) + '</span></div>'
|
||||
htmlCardPath += "</div>";
|
||||
|
|
|
|||
|
|
@ -263,13 +263,26 @@ function setData(data) {
|
|||
}
|
||||
var htmlCardPath = "";
|
||||
for (var i = 0; i < wageCardPath.length; i++) {
|
||||
|
||||
var file = wageCardPath[i];
|
||||
var fileSrc = file;
|
||||
var lowerFile = file.toLowerCase();
|
||||
|
||||
// 判断是不是图片
|
||||
if (lowerFile.endsWith(".jpg") || lowerFile.endsWith(".jpeg") || lowerFile.endsWith(".png")) {
|
||||
fileSrc = fileUrl + "/" + file; // 图片直接显示
|
||||
} else {
|
||||
// 不是图片,使用文件类型图标
|
||||
fileSrc = getTypeImgConsPerson(file);
|
||||
}
|
||||
|
||||
htmlCardPath +=
|
||||
'<div id="' +
|
||||
i +
|
||||
'" style="display: inline-block;text-align: center;width:150px">';
|
||||
htmlCardPath +=
|
||||
'<img src="' +
|
||||
(fileUrl + "/" + wageCardPath[i]) +
|
||||
fileSrc +
|
||||
'" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">';
|
||||
// htmlCardPath += '<div><span>' + (socialSecurityUnit[i].length > 8 ? (socialSecurityUnit[i].substr(0, 8) + "..") : socialSecurityUnit[i]) + '</span></div>'
|
||||
htmlCardPath += "</div>";
|
||||
|
|
@ -534,3 +547,19 @@ function openPdfView(url) {
|
|||
maxmin: false,
|
||||
});
|
||||
}
|
||||
|
||||
function getTypeImgConsPerson(str) {
|
||||
if (str.indexOf("xlsx") > 0 || str.indexOf("xls") > 0) {
|
||||
return "../../../../img/filetype/excel.png";
|
||||
} else if (str.indexOf("pdf") > 0) {
|
||||
return "../../../../img/filetype/pdf.png";
|
||||
} else if (str.indexOf("ppt") > 0) {
|
||||
return "../../../../img/filetype/ppt.png";
|
||||
} else if (str.indexOf("txt") > 0) {
|
||||
return "../../../../img/filetype/txt.png";
|
||||
} else if (str.indexOf("vsdx") > 0) {
|
||||
return "../../../../img/filetype/visio.png";
|
||||
} else if (str.indexOf("doc") > 0 || str.indexOf("docx") > 0) {
|
||||
return "../../../../img/filetype/word.png";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
let proId, teamId, wageBankCard, contractCode;
|
||||
let companyExamFilePath, deptExamFilePath, teamExamFilePath;
|
||||
let upload;
|
||||
|
||||
let companyExamFiles = {}
|
||||
let deptExamFiles = {}
|
||||
let teamExamFiles = {}
|
||||
layui.use(['form', 'laydate', 'upload', 'element'], function () {
|
||||
let form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||
upload = layui.upload;
|
||||
|
|
@ -27,6 +31,75 @@ function setData(data) {
|
|||
$('#theoryScore').val(data.theoryScore);
|
||||
$('#militarize').val(data.militarize === null ? 0 : data.militarize);
|
||||
$('#militarizeScore').val(data.militarizeScore);
|
||||
|
||||
|
||||
companyExamFilePath = data.companyExamFile;
|
||||
deptExamFilePath = data.deptExamFile;
|
||||
teamExamFilePath = data.teamExamFile;
|
||||
$("#companyExamScore").val(data.companyExamScore);
|
||||
$("#deptExamScore").val(data.deptExamScore);
|
||||
$("#teamExamScore").val(data.teamExamScore);
|
||||
var i = 0;
|
||||
if (
|
||||
companyExamFilePath !== null &&
|
||||
companyExamFilePath !== "" &&
|
||||
companyExamFilePath !== "null" &&
|
||||
companyExamFilePath !== "undefined"
|
||||
) {
|
||||
$("#companyExamTestProve").css("display", "none");
|
||||
var htmlCompany = "";
|
||||
htmlCompany +=
|
||||
'<div id="' +
|
||||
i +
|
||||
'" style="display: inline-block;text-align: center;width:150px">';
|
||||
htmlCompany +=
|
||||
'<img src="' +
|
||||
(fileUrl + "/" + data.companyExamFilePath) +
|
||||
'" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">';
|
||||
htmlCompany += "</div>";
|
||||
$("#companyExamDemoProve").append(htmlCompany);
|
||||
}
|
||||
|
||||
if (
|
||||
deptExamFilePath !== null &&
|
||||
deptExamFilePath !== "" &&
|
||||
deptExamFilePath !== "null" &&
|
||||
deptExamFilePath !== "undefined"
|
||||
) {
|
||||
$("#deptExamTestProve").css("display", "none");
|
||||
var htmlDept = "";
|
||||
htmlDept +=
|
||||
'<div id="' +
|
||||
i +
|
||||
'" style="display: inline-block;text-align: center;width:150px">';
|
||||
htmlDept +=
|
||||
'<img src="' +
|
||||
(fileUrl + "/" + data.deptExamFilePath) +
|
||||
'" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">';
|
||||
htmlDept += "</div>";
|
||||
$("#deptExamDemoProve").append(htmlDept);
|
||||
}
|
||||
|
||||
if (
|
||||
teamExamFilePath !== null &&
|
||||
teamExamFilePath !== "" &&
|
||||
teamExamFilePath !== "null" &&
|
||||
teamExamFilePath !== "undefined"
|
||||
) {
|
||||
$("#teamExamTestProve").css("display", "none");
|
||||
var htmlTeam = "";
|
||||
htmlTeam +=
|
||||
'<div id="' +
|
||||
i +
|
||||
'" style="display: inline-block;text-align: center;width:150px">';
|
||||
htmlTeam +=
|
||||
'<img src="' +
|
||||
(fileUrl + "/" + data.teamExamFilePath) +
|
||||
'" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">';
|
||||
htmlTeam += "</div>";
|
||||
$("#teamExamDemoProve").append(htmlTeam);
|
||||
}
|
||||
|
||||
layui.form.render("select");
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +114,7 @@ function uploadCompanyExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#companyExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -52,10 +125,15 @@ function uploadCompanyExamFIle(number){
|
|||
bindAction: '#companyExamHideUploadProve', //绑定的按钮
|
||||
field: 'file', //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(companyExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
companyExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -73,7 +151,7 @@ function uploadCompanyExamFIle(number){
|
|||
);
|
||||
$('#companyExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete companyExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -93,7 +171,7 @@ function uploadCompanyExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(companyExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -116,7 +194,7 @@ function uploadDeptExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#deptExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -127,10 +205,15 @@ function uploadDeptExamFIle(number){
|
|||
bindAction: '#deptExamHideUploadProve', //绑定的按钮
|
||||
field: 'file', //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(deptExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
deptExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -148,7 +231,7 @@ function uploadDeptExamFIle(number){
|
|||
);
|
||||
$('#deptExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete deptExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -168,7 +251,7 @@ function uploadDeptExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(deptExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -191,7 +274,7 @@ function uploadTeamExamFIle(number){
|
|||
var uploadcom = upload.render({
|
||||
elem: '#teamExamTestProve',
|
||||
url: fileUrl + '/file/upload', //改成您自己的上传接口
|
||||
multiple: true, //是否允许多文件上传,默认未false
|
||||
multiple: false, //是否允许多文件上传,默认未false
|
||||
dataType: "json",
|
||||
// data: {"pickId": id},
|
||||
exts: 'jpg|png|jpeg|rar|zip|docx|doc|pdf',
|
||||
|
|
@ -202,10 +285,15 @@ function uploadTeamExamFIle(number){
|
|||
bindAction: '#teamxamHideUploadProve', //绑定的按钮
|
||||
field: 'file', //传到后台的字段名,默认file
|
||||
choose: function (obj) {
|
||||
// 如果已有文件数量大于等于 number
|
||||
if (Object.keys(teamExamFiles).length >= number) {
|
||||
layer.msg("最多只能上传 " + number + " 张文件");
|
||||
return false;
|
||||
}
|
||||
flag = false;
|
||||
var suffixType = ''; //后缀类型
|
||||
uploadcom.config.elem.next()[0].value = '';
|
||||
files = obj.pushFile();
|
||||
teamExamFiles = obj.pushFile();
|
||||
obj.preview(function (index, file, result) {
|
||||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
|
|
@ -223,7 +311,7 @@ function uploadTeamExamFIle(number){
|
|||
);
|
||||
$('#teamExamTestProve').attr("disabled",true);
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
delete teamExamFiles[index];//删除指定图片
|
||||
$(this).remove();
|
||||
var photoNum = $("#demo1").children().length;
|
||||
if(photoNum === 0){
|
||||
|
|
@ -243,7 +331,7 @@ function uploadTeamExamFIle(number){
|
|||
return false;
|
||||
} else {
|
||||
var names = '';
|
||||
layui.each(files, function (index, file) {
|
||||
layui.each(teamExamFiles, function (index, file) {
|
||||
names += file.name + ',';
|
||||
|
||||
});
|
||||
|
|
@ -353,6 +441,23 @@ function addPerson(data) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getTypeImgConsPerson(str) {
|
||||
if (str.indexOf("xlsx") > 0 || str.indexOf("xls") > 0) {
|
||||
return "../../../../img/filetype/excel.png";
|
||||
} else if (str.indexOf("pdf") > 0) {
|
||||
return "../../../../img/filetype/pdf.png";
|
||||
} else if (str.indexOf("ppt") > 0) {
|
||||
return "../../../../img/filetype/ppt.png";
|
||||
} else if (str.indexOf("txt") > 0) {
|
||||
return "../../../../img/filetype/txt.png";
|
||||
} else if (str.indexOf("vsdx") > 0) {
|
||||
return "../../../../img/filetype/visio.png";
|
||||
} else if (str.indexOf("doc") > 0 || str.indexOf("docx") > 0) {
|
||||
return "../../../../img/filetype/word.png";
|
||||
}
|
||||
}
|
||||
|
||||
function choseType(str) {
|
||||
if (str.indexOf("jpg") > 0) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue