bug修改
This commit is contained in:
parent
b59743af9d
commit
70a5df3c37
|
|
@ -191,7 +191,7 @@
|
|||
<div class="layui-input-inline" style="width: 820px">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i> 人员类型:</label>
|
||||
<div class="layui-input-block btnOption1 bmscTrain">
|
||||
<div data-value="1" class="pass">正式人员</div>
|
||||
<div data-value="1" class="pass">长期人员</div>
|
||||
<div data-value="2">临时人员</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@
|
|||
<div class="layui-input-inline" style="width: 820px">
|
||||
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i> 人员类型:</label>
|
||||
<div class="layui-input-block btnOption1 bmscTrain">
|
||||
<div data-value="0" class="pass">正式人员</div>
|
||||
<div data-value="0" class="pass">长期人员</div>
|
||||
<div data-value="1">临时人员</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<div style="color: #333333;font-size: 16px;margin-top: 2%;">填写导入数据信息</div>
|
||||
<div style="color: #999999;margin-top: 0.6%;">请按照数据模板的格式准备导入数据,模板中的表头名称不可更改,表头行不能删除。</div>
|
||||
<div style="margin-top: 1%;">
|
||||
<a id="tempId" href="../../../templateDown/ryxx.xlsx" download="人员信息.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
<a id="tempId" href="../../../templateDown/人员信息.xlsx" download="人员信息.xlsx" style="color: #409EFF;">下载模板</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-upload" style="margin-top: 1.5%;">
|
||||
|
|
|
|||
|
|
@ -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('<img src="../../../image/fileIcon/pdf.png" id="' + data.id + '" onclick="electronicContractView(\''+data.filePath+'\')" title="'+data.fileName+'" alt="' + data.fileName + '" style="height: 40px;width: 40px;margin-right: 10px" class="layui-upload-img ">');
|
||||
}else{
|
||||
$('#demo1').append('<img src="../../../image/fileIcon/pdf.png" id="' + data.id + '" onclick="electronicContractView(\''+data.filePath+'\')" title="'+data.fileName+'" alt="' + data.fileName + '" style="height: 40px;width: 40px;margin-right: 10px" class="layui-upload-img ">');
|
||||
if(data.filePath != null){
|
||||
if(data.filePath.indexOf(".pdf") !== -1||data.filePath.indexOf(".PDF") !== -1){
|
||||
$('#demo1').append('<img src="../../../image/fileIcon/pdf.png" id="' + data.id + '" onclick="electronicContractView(\''+data.filePath+'\')" title="'+data.fileName+'" alt="' + data.fileName + '" style="height: 40px;width: 40px;margin-right: 10px" class="layui-upload-img ">');
|
||||
}else{
|
||||
$('#demo1').append('<img src="../../../image/fileIcon/pdf.png" id="' + data.id + '" onclick="electronicContractView(\''+data.filePath+'\')" title="'+data.fileName+'" alt="' + data.fileName + '" style="height: 40px;width: 40px;margin-right: 10px" class="layui-upload-img ">');
|
||||
}
|
||||
}
|
||||
// getTaskSource("taskSourceId",data[0].taskSourceId);
|
||||
// $("#taskSourceId").val(data[0].taskSourceId);
|
||||
|
|
|
|||
|
|
@ -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); //再执行关闭
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue