diff --git a/hxy-web/html/wireManager/project/projectAddUser.html b/hxy-web/html/wireManager/project/projectAddUser.html index a2280e9..b5e75da 100644 --- a/hxy-web/html/wireManager/project/projectAddUser.html +++ b/hxy-web/html/wireManager/project/projectAddUser.html @@ -191,7 +191,7 @@
-
正式人员
+
长期人员
临时人员
diff --git a/hxy-web/html/wireManager/staff/staffAdd.html b/hxy-web/html/wireManager/staff/staffAdd.html index 6ab7c7f..adff7c8 100644 --- a/hxy-web/html/wireManager/staff/staffAdd.html +++ b/hxy-web/html/wireManager/staff/staffAdd.html @@ -217,7 +217,7 @@
-
正式人员
+
长期人员
临时人员
diff --git a/hxy-web/html/wireManager/staff/staffImport.html b/hxy-web/html/wireManager/staff/staffImport.html index b3142f9..7616ce7 100644 --- a/hxy-web/html/wireManager/staff/staffImport.html +++ b/hxy-web/html/wireManager/staff/staffImport.html @@ -29,7 +29,7 @@
填写导入数据信息
请按照数据模板的格式准备导入数据,模板中的表头名称不可更改,表头行不能删除。
- 下载模板 + 下载模板
diff --git a/hxy-web/js/wireManager/staff/staffAdd.js b/hxy-web/js/wireManager/staff/staffAdd.js index 9758fd9..1437b63 100644 --- a/hxy-web/js/wireManager/staff/staffAdd.js +++ b/hxy-web/js/wireManager/staff/staffAdd.js @@ -113,21 +113,6 @@ layui.use(['element','layer','transfer', 'form', 'upload','laydate','tree'], fun $("#pdfPath").val(res.data.url); }, allDone: function (data) { - var userType=$("#userType").val(); - if(userType==1){ - var proid=""; - var dd=formSelects.value('proName', 'all'); - console.log(dd,"formSelects"); - if(dd.length>0){ - $.each(dd,function(index,value){ - proid=proid+value.value+","; - }); - filedata.field.proId=proid; - }else{ - layer.msg("请选择工程") - return; - } - } if($("#id").val()==''){ addData(filedata); // 新增 }else{ @@ -290,19 +275,37 @@ layui.use(['element','layer','transfer', 'form', 'upload','laydate','tree'], fun // 验证成功后才会执行下面的操作 form.on('submit(formDemo)', function (data) { filedata=data; + var userType=$("#userType").val(); + console.log("校验1:"+userType); + if(userType==0){ + console.log("校验2:"+userType); + var gtid=$("#gtId").val(); + if(gtid==null||gtid==""){ + layer.msg("请选择范围、基数!") + return; + } + }else if(userType==1){ + console.log("校验3:"+userType); + var proid=""; + var dd=formSelects.value('proName', 'all'); + console.log(dd,"formSelects"); + if(dd.length>0){ + $.each(dd,function(index,value){ + proid=proid+value.value+","; + }); + filedata.field.proId=proid; + }else{ + layer.msg("请选择工程") + return; + } + } + if($("#id").val()==''){ if($.isEmptyObject(startWorkFiles)){ layer.msg("请上传附件!") return; } - var usertype=$("#userType").val(); - if(usertype==0){ - var gtid=$("#gtId").val(); - if(gtid==null||gtid==""){ - layer.msg("请选择范围、基数!") - return; - } - } + $("#hideUpload1").trigger("click"); }else{ updateData(data); // 修改 @@ -666,10 +669,12 @@ function setData2(data) { $("#filePath").val(data.filePath); $("#pdfPath").val(data.pdfPath); $('#demo1').empty(); - if(data.filePath.indexOf(".pdf") !== -1||data.filePath.indexOf(".PDF") !== -1){ - $('#demo1').append('' + data.fileName + ''); - }else{ - $('#demo1').append('' + data.fileName + ''); + if(data.filePath != null){ + if(data.filePath.indexOf(".pdf") !== -1||data.filePath.indexOf(".PDF") !== -1){ + $('#demo1').append('' + data.fileName + ''); + }else{ + $('#demo1').append('' + data.fileName + ''); + } } // getTaskSource("taskSourceId",data[0].taskSourceId); // $("#taskSourceId").val(data[0].taskSourceId); diff --git a/hxy-web/js/wireManager/staff/staffList.js b/hxy-web/js/wireManager/staff/staffList.js index b13b5b3..1082064 100644 --- a/hxy-web/js/wireManager/staff/staffList.js +++ b/hxy-web/js/wireManager/staff/staffList.js @@ -121,7 +121,7 @@ function init(){ {field:'userType', title: '人员类型',align: 'center',templet: function(d){ var userType=d.userType; if(userType==0){ - return "正式"; + return "长期"; }else{ return "临时"; } @@ -319,12 +319,14 @@ function exportData() { + "&contractState=" + contractState + "&yjId=" + yjId } + + + function excelUpload() { if($("#projecct").val() == ""){ layer.msg("请选择工程", { icon: 0 }); return } - loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']}); //④创建一个formData对象 var fileData = new FormData(); fileData.append('file', $('#file')[0].files[0]); @@ -340,7 +342,6 @@ function excelUpload() { layer.close(loadingMsg); if (result.code == 200) { parent.document.getElementById('powerNum').innerText = result.data.powerNum; - parent.layer.alert(result.msg,{icon:1}); var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引 parent.layer.close(index); //再执行关闭 diff --git a/hxy-web/templateDown/人员信息.xlsx b/hxy-web/templateDown/人员信息.xlsx index c42d122..a2d4c21 100644 Binary files a/hxy-web/templateDown/人员信息.xlsx and b/hxy-web/templateDown/人员信息.xlsx differ