|  | @@ -0,0 +1,838 @@
 | 
	
		
			
				|  |  | +<%@ page contentType="text/html;charset=UTF-8" %>
 | 
	
		
			
				|  |  | +<%@ include file="/webpage/include/taglib.jsp"%>
 | 
	
		
			
				|  |  | +<html>
 | 
	
		
			
				|  |  | +<head>
 | 
	
		
			
				|  |  | +	<title>工作内容详情管理</title>
 | 
	
		
			
				|  |  | +	<meta name="decorator" content="default"/>
 | 
	
		
			
				|  |  | +    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
 | 
	
		
			
				|  |  | +    <style>
 | 
	
		
			
				|  |  | +        #projectContentDataType-error{
 | 
	
		
			
				|  |  | +            left:0;
 | 
	
		
			
				|  |  | +            top:40px;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    </style>
 | 
	
		
			
				|  |  | +	<script type="text/javascript">
 | 
	
		
			
				|  |  | +        $.fn.serializeJson=function(){
 | 
	
		
			
				|  |  | +            var serializeObj={};
 | 
	
		
			
				|  |  | +            var array=this.serializeArray();
 | 
	
		
			
				|  |  | +            var str=this.serialize();
 | 
	
		
			
				|  |  | +            $(array).each(function(){
 | 
	
		
			
				|  |  | +                if(serializeObj[this.name]){
 | 
	
		
			
				|  |  | +                    if($.isArray(serializeObj[this.name])){
 | 
	
		
			
				|  |  | +                        serializeObj[this.name].push(this.value);
 | 
	
		
			
				|  |  | +                    }else{
 | 
	
		
			
				|  |  | +                        serializeObj[this.name]=[serializeObj[this.name],this.value];
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }else{
 | 
	
		
			
				|  |  | +                    serializeObj[this.name]=this.value;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            return serializeObj;
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        var validateForm;
 | 
	
		
			
				|  |  | +        var detailFlag =0;
 | 
	
		
			
				|  |  | +        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 | 
	
		
			
				|  |  | +            if(validateForm.form()){
 | 
	
		
			
				|  |  | +                beforeSubmit();
 | 
	
		
			
				|  |  | +                $("#inputForm").submit();
 | 
	
		
			
				|  |  | +                return true;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function beforeSubmit() {
 | 
	
		
			
				|  |  | +            var contentDetaStr = '';
 | 
	
		
			
				|  |  | +            if(null !=encodeURIComponent(genDetailStr()) && '' != encodeURIComponent(genDetailStr())){
 | 
	
		
			
				|  |  | +                contentDetaStr += encodeURIComponent(genDetailStr());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if(null !=encodeURIComponent(genSecondDetailStr()) && '' != encodeURIComponent(genSecondDetailStr())){
 | 
	
		
			
				|  |  | +                contentDetaStr += encodeURIComponent(genSecondDetailStr());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if(detailFlag==1){
 | 
	
		
			
				|  |  | +                $("#contentDeta").val(contentDetaStr);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            $(document.getElementById("projectContentDataType")).removeAttr("disabled");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $(function() {
 | 
	
		
			
				|  |  | +            var editVal = '${concealProjectInfo.edit}';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if($("#createDate").val()==null || $("#createDate").val()==''){
 | 
	
		
			
				|  |  | +                $("#createDate").val(getNowFormatDate());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            validateForm = $("#inputForm").validate({
 | 
	
		
			
				|  |  | +                submitHandler: function(form){
 | 
	
		
			
				|  |  | +                    loading('正在提交,请稍等...');
 | 
	
		
			
				|  |  | +                    form.submit();
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                errorContainer: "#messageBox",
 | 
	
		
			
				|  |  | +                errorPlacement: function(error, element) {
 | 
	
		
			
				|  |  | +                    $("#messageBox").text("输入有误,请先更正。");
 | 
	
		
			
				|  |  | +                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
 | 
	
		
			
				|  |  | +                        error.appendTo(element.parent().parent());
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        error.insertAfter(element);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            changeContentDetail(document.getElementById("projectContentDataType"));
 | 
	
		
			
				|  |  | +            var tp = "${concealProjectInfo.dictType}";
 | 
	
		
			
				|  |  | +            var tp2 = "${concealProjectInfo.projectContentData.id}"
 | 
	
		
			
				|  |  | +            if((tp!=null && tp!='')||(tp2!=null && tp2!='')){
 | 
	
		
			
				|  |  | +                $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            initControlData("1");
 | 
	
		
			
				|  |  | +            $("#attachment_btn").click(function () {
 | 
	
		
			
				|  |  | +                $("#attachment_file").click();
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function openDialogre(title,url,width,height,formId){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
 | 
	
		
			
				|  |  | +                width='auto';
 | 
	
		
			
				|  |  | +                height='auto';
 | 
	
		
			
				|  |  | +            }else{//如果是PC端,根据用户设置的width和height显示。
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            top.layer.open({
 | 
	
		
			
				|  |  | +                type: 2,
 | 
	
		
			
				|  |  | +                area: [width, height],
 | 
	
		
			
				|  |  | +                title: title,
 | 
	
		
			
				|  |  | +                skin: 'three-btns',
 | 
	
		
			
				|  |  | +                maxmin: true, //开启最大化最小化按钮
 | 
	
		
			
				|  |  | +                content: url ,
 | 
	
		
			
				|  |  | +                btn: ['提交','关闭'],
 | 
	
		
			
				|  |  | +                btn1: function(index, layero){
 | 
	
		
			
				|  |  | +                    var body = top.layer.getChildFrame('body', index);
 | 
	
		
			
				|  |  | +                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
 | 
	
		
			
				|  |  | +                    var inputForm = body.find('#inputForm');
 | 
	
		
			
				|  |  | +                    var top_iframe;
 | 
	
		
			
				|  |  | +                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
 | 
	
		
			
				|  |  | +                    var $document = iframeWin.contentWindow.document;
 | 
	
		
			
				|  |  | +                    formSubmitAjax($document,formId,index);
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                btn2: function(index){
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function formSubmitAjax($document,inputForm,index){
 | 
	
		
			
				|  |  | +            var validateForm = $($document.getElementById(inputForm)).validate({
 | 
	
		
			
				|  |  | +                submitHandler: function(form){
 | 
	
		
			
				|  |  | +                    loading('正在提交,请稍等...');
 | 
	
		
			
				|  |  | +                    form.submit();
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                errorContainer: "#messageBox",
 | 
	
		
			
				|  |  | +                errorPlacement: function(error, element) {
 | 
	
		
			
				|  |  | +                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
 | 
	
		
			
				|  |  | +                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
 | 
	
		
			
				|  |  | +                        error.appendTo(element.parent().parent());
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        error.insertAfter(element);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            if(validateForm.form()){
 | 
	
		
			
				|  |  | +                $($document.getElementById(inputForm)).ajaxSubmit({
 | 
	
		
			
				|  |  | +                    success:function(data) {
 | 
	
		
			
				|  |  | +                        if(!data.success){
 | 
	
		
			
				|  |  | +                            top.layer.msg("保存依据资料信息异常!",{icon:2});
 | 
	
		
			
				|  |  | +                            return false;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        var idx = $("#workBaseDataList tr").length;
 | 
	
		
			
				|  |  | +                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
 | 
	
		
			
				|  |  | +                        parent.layer.msg(data.msg,{icon:1});
 | 
	
		
			
				|  |  | +                        top.layer.close(index)
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function getNowFormatDate() {
 | 
	
		
			
				|  |  | +            var date = new Date();
 | 
	
		
			
				|  |  | +            var seperator1 = "-";
 | 
	
		
			
				|  |  | +            var month = date.getMonth() + 1;
 | 
	
		
			
				|  |  | +            var strDate = date.getDate();
 | 
	
		
			
				|  |  | +            month = (month < 10)?"0"+month:month;
 | 
	
		
			
				|  |  | +            strDate = (strDate < 10)?"0"+strDate:strDate;
 | 
	
		
			
				|  |  | +            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
 | 
	
		
			
				|  |  | +            return currentdate;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        function changeContentDetail(obj) {
 | 
	
		
			
				|  |  | +            $("#contentDetail").empty();
 | 
	
		
			
				|  |  | +            var val = "410";
 | 
	
		
			
				|  |  | +            contentDetailTypeShow(val);
 | 
	
		
			
				|  |  | +            $("#contentDetailTypeDiv").show();
 | 
	
		
			
				|  |  | +            $("#projectContentDataSign").val(val);
 | 
	
		
			
				|  |  | +            var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}"};
 | 
	
		
			
				|  |  | +            detailFlag=1;
 | 
	
		
			
				|  |  | +            $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function addFile() {
 | 
	
		
			
				|  |  | +            $("#attachment_file").click();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function insertTitle(tValue){
 | 
	
		
			
				|  |  | +            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
 | 
	
		
			
				|  |  | +            var attachmentId = "";
 | 
	
		
			
				|  |  | +            var attachmentFlag = "94";
 | 
	
		
			
				|  |  | +            var timestamp=new Date().getTime();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
 | 
	
		
			
				|  |  | +            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
 | 
	
		
			
				|  |  | +            var divId = "_attachment";
 | 
	
		
			
				|  |  | +            $("#addFile"+divId).show();
 | 
	
		
			
				|  |  | +            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function openDialogreControl(title,url,width,height,target){
 | 
	
		
			
				|  |  | +            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
 | 
	
		
			
				|  |  | +                width='auto';
 | 
	
		
			
				|  |  | +                height='auto';
 | 
	
		
			
				|  |  | +            }else{//如果是PC端,根据用户设置的width和height显示。
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            top.layer.open({
 | 
	
		
			
				|  |  | +                type: 2,
 | 
	
		
			
				|  |  | +                area: [width, height],
 | 
	
		
			
				|  |  | +                title: title,
 | 
	
		
			
				|  |  | +                skin: 'three-btns',
 | 
	
		
			
				|  |  | +                maxmin: true, //开启最大化最小化按钮
 | 
	
		
			
				|  |  | +                content: url ,
 | 
	
		
			
				|  |  | +                btn: ['提交','关闭'],
 | 
	
		
			
				|  |  | +                btn1: function(index, layero){
 | 
	
		
			
				|  |  | +                    var body = top.layer.getChildFrame('body', index);
 | 
	
		
			
				|  |  | +                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
 | 
	
		
			
				|  |  | +                    var inputForm = body.find('#inputForm');
 | 
	
		
			
				|  |  | +                    var top_iframe;
 | 
	
		
			
				|  |  | +                    if(target){
 | 
	
		
			
				|  |  | +                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
 | 
	
		
			
				|  |  | +                    }else{
 | 
	
		
			
				|  |  | +                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
 | 
	
		
			
				|  |  | +                    var $document = iframeWin.contentWindow.document;
 | 
	
		
			
				|  |  | +                    var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
 | 
	
		
			
				|  |  | +                    formSubmit($document,"inputForm",index,index1);
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                btn2: function(index){
 | 
	
		
			
				|  |  | +                    parent.layer.close(index)
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                end:function(index){
 | 
	
		
			
				|  |  | +                    parent.layer.close(index)
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        function formSubmit($document,inputForm,index,index1){
 | 
	
		
			
				|  |  | +            var validateForm = $($document.getElementById(inputForm)).validate({
 | 
	
		
			
				|  |  | +                submitHandler: function(form){
 | 
	
		
			
				|  |  | +                    loading('正在提交,请稍等...');
 | 
	
		
			
				|  |  | +                    form.submit();
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                errorContainer: "#messageBox",
 | 
	
		
			
				|  |  | +                errorPlacement: function(error, element) {
 | 
	
		
			
				|  |  | +                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
 | 
	
		
			
				|  |  | +                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
 | 
	
		
			
				|  |  | +                        error.appendTo(element.parent().parent());
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        error.insertAfter(element);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            if(validateForm.form()){
 | 
	
		
			
				|  |  | +                $($document.getElementById(inputForm)).ajaxSubmit({
 | 
	
		
			
				|  |  | +                    success:function(data) {
 | 
	
		
			
				|  |  | +                        parent.parent.layer.msg("操作成功",{icon:1})
 | 
	
		
			
				|  |  | +                        parent.parent.layer.close(index1)
 | 
	
		
			
				|  |  | +                        parent.layer.close(index1)
 | 
	
		
			
				|  |  | +                        parent.parent.layer.close(index)
 | 
	
		
			
				|  |  | +                        parent.layer.close(index)
 | 
	
		
			
				|  |  | +                        initGetControlData();
 | 
	
		
			
				|  |  | +                    },error:function(){
 | 
	
		
			
				|  |  | +                        parent.parent.layer.msg("操作失败",{icon:2})
 | 
	
		
			
				|  |  | +                        parent.parent.layer.close(index1)
 | 
	
		
			
				|  |  | +                        parent.layer.close(index1)
 | 
	
		
			
				|  |  | +                        parent.parent.layer.close(index)
 | 
	
		
			
				|  |  | +                        parent.layer.close(index)
 | 
	
		
			
				|  |  | +                        initControlData("1");
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  | +            }else {
 | 
	
		
			
				|  |  | +                parent.parent.layer.msg("信息未填写完整!", {icon: 2});
 | 
	
		
			
				|  |  | +                parent.layer.close(index1)
 | 
	
		
			
				|  |  | +                parent.parent.layer.close(index1)
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        /**
 | 
	
		
			
				|  |  | +         * 删除临时数据
 | 
	
		
			
				|  |  | +         */
 | 
	
		
			
				|  |  | +        function initControlData(obj,othis,del,tableId){
 | 
	
		
			
				|  |  | +            if(del == "del"){
 | 
	
		
			
				|  |  | +                proId = tableId;
 | 
	
		
			
				|  |  | +			}else{
 | 
	
		
			
				|  |  | +                proId = "";
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +            $.ajax({
 | 
	
		
			
				|  |  | +                type:'post',
 | 
	
		
			
				|  |  | +                url:'${ctx}/projectcontroltable/projectControlTable/delControlData',
 | 
	
		
			
				|  |  | +                data:{
 | 
	
		
			
				|  |  | +                    "projectId":"${concealProjectInfo.project.id}",
 | 
	
		
			
				|  |  | +					"projectContentId":proId,
 | 
	
		
			
				|  |  | +					"flag":del
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                success:function(data){
 | 
	
		
			
				|  |  | +                    if(obj != "1"){
 | 
	
		
			
				|  |  | +                        if(data.flag){
 | 
	
		
			
				|  |  | +                            //$(othis).parent().parent().parent().remove();
 | 
	
		
			
				|  |  | +                            parent.layer.msg("数据删除成功",{icon:1})
 | 
	
		
			
				|  |  | +                            $(othis).remove()
 | 
	
		
			
				|  |  | +                        }else{
 | 
	
		
			
				|  |  | +                            parent.layer.msg("数据删除失败",{icon:2})
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function getMatchDate(str){
 | 
	
		
			
				|  |  | +//            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/;
 | 
	
		
			
				|  |  | +            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1]))/
 | 
	
		
			
				|  |  | +            var date = (""+str).match(reDateTime);
 | 
	
		
			
				|  |  | +            if(date){
 | 
	
		
			
				|  |  | +                return date[0]
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                return "";
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        /**
 | 
	
		
			
				|  |  | +         * 获取临时数据
 | 
	
		
			
				|  |  | +         * @param obj
 | 
	
		
			
				|  |  | +         * @param othis
 | 
	
		
			
				|  |  | +         */
 | 
	
		
			
				|  |  | +        function initGetControlData(){
 | 
	
		
			
				|  |  | +            $.ajax({
 | 
	
		
			
				|  |  | +                type:'post',
 | 
	
		
			
				|  |  | +                url:'${ctx}/projectcontroltable/projectControlTable/getControlData',
 | 
	
		
			
				|  |  | +                data:{
 | 
	
		
			
				|  |  | +                    "projectId":"${concealProjectInfo.project.id}",
 | 
	
		
			
				|  |  | +                    "proId":"${concealProjectInfo.projectContentData.id}"
 | 
	
		
			
				|  |  | +                },
 | 
	
		
			
				|  |  | +                success:function(data){
 | 
	
		
			
				|  |  | +                    if(data){
 | 
	
		
			
				|  |  | +                        var htmlStr = '';
 | 
	
		
			
				|  |  | +                        data = data.list.projectControlTableList;
 | 
	
		
			
				|  |  | +                        for(var i=0;i<data.length;i++){
 | 
	
		
			
				|  |  | +                            htmlStr += "<tr id='tr"+i+"'>"+
 | 
	
		
			
				|  |  | +                                "   <td style='text-align:center;'>"+
 | 
	
		
			
				|  |  | +                                "	   "+data[i].tName+
 | 
	
		
			
				|  |  | +                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].id' value='"+data[i].id+"'>"+
 | 
	
		
			
				|  |  | +                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tName' value='"+data[i].tName+"'>"+
 | 
	
		
			
				|  |  | +                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].processName' value='"+data[i].processName+"'>"+
 | 
	
		
			
				|  |  | +                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].pfId' value='"+data[i].pfId+"'>"+
 | 
	
		
			
				|  |  | +                                "   </td>"+
 | 
	
		
			
				|  |  | +                                "   <td style='text-align:center;'>" +
 | 
	
		
			
				|  |  | +                                "  			"+data[i].processName+
 | 
	
		
			
				|  |  | +                                "	   		<input type='hidden' name='projectContentData.projectControlTableList["+i+"].tType' value='"+data[i].tType+"'>"+
 | 
	
		
			
				|  |  | +                                "	</td>"+
 | 
	
		
			
				|  |  | +                                "   <td style='text-align:center;'>"+
 | 
	
		
			
				|  |  | +                                "  		"+data[i].tUser.name+
 | 
	
		
			
				|  |  | +                                "   </td>"+
 | 
	
		
			
				|  |  | +                                "   <td style='text-align:center;'>"+
 | 
	
		
			
				|  |  | +                                "  "+ getMatchDate(data[i].createDate)+
 | 
	
		
			
				|  |  | +                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createDate' value='"+data[i].createDate+"'>"+
 | 
	
		
			
				|  |  | +                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].updateDate' value='"+data[i].updateDate+"'>"+
 | 
	
		
			
				|  |  | +                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].delFlag' value='"+data[i].delFlag+"'>"+
 | 
	
		
			
				|  |  | +                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createBy.id' value='"+data[i].createBy.id+"'>"+
 | 
	
		
			
				|  |  | +                                "   </td>"+
 | 
	
		
			
				|  |  | +                                "   <td style='text-align:center;'>"+
 | 
	
		
			
				|  |  | +                                "   	<a href='javascript:void(0)' onclick=\"openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?view=view&id="+data[i].id+"','90%', '90%')\" class='btn btn-info btn-xs' ><i class='fa fa-search-plus'></i> 查看</a>"+
 | 
	
		
			
				|  |  | +                                "  		<a href=\"javascript:initControlData('0','#tr"+i+"','del','"+data[i].id+"')\" onclick=\"return confirmx('确认要删除该过程控制数据吗?', this.href)\"   class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> 删除</a>"+
 | 
	
		
			
				|  |  | +                                "  </td>"+
 | 
	
		
			
				|  |  | +                                "</tr>";
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        if(htmlStr){
 | 
	
		
			
				|  |  | +                            $("#projectControlTables").html(htmlStr);
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function formatNum(obj) {
 | 
	
		
			
				|  |  | +            var val = $(obj).val();
 | 
	
		
			
				|  |  | +            console.log("-----------val"+val);
 | 
	
		
			
				|  |  | +            if(!isNumber(val))return;
 | 
	
		
			
				|  |  | +            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
 | 
	
		
			
				|  |  | +            var l = money.split(".")[0].split("").reverse(),
 | 
	
		
			
				|  |  | +                r = money.split(".")[1];
 | 
	
		
			
				|  |  | +            t = "";
 | 
	
		
			
				|  |  | +            for(i = 0; i < l.length; i ++ )
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            $(obj).val(t.split("").reverse().join("") + "." + r);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        function isNumber(val){
 | 
	
		
			
				|  |  | +            if(val === "" || val ==null){
 | 
	
		
			
				|  |  | +                return false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
 | 
	
		
			
				|  |  | +            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
 | 
	
		
			
				|  |  | +            if(regPos.test(val) || regNeg.test(val)){
 | 
	
		
			
				|  |  | +                return true;
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                return false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    </script>
 | 
	
		
			
				|  |  | +</head>
 | 
	
		
			
				|  |  | +<body>
 | 
	
		
			
				|  |  | +<div class="single-form">
 | 
	
		
			
				|  |  | +    <div class="container${container}">
 | 
	
		
			
				|  |  | +        <form:form id="inputForm" modelAttribute="concealProjectInfo" action="${ctx}/project/concealProject/save" method="post" class="form-horizontal">
 | 
	
		
			
				|  |  | +            <form:hidden path="id"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="edit"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="parentIds"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="condition"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="project.id"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="contract.id"/>
 | 
	
		
			
				|  |  | +            <form:hidden path="projectContentData.id"/>
 | 
	
		
			
				|  |  | +            <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">
 | 
	
		
			
				|  |  | +            <input type="hidden" id="dataBodyList" name="dataBodyList" value="">
 | 
	
		
			
				|  |  | +            <input type="hidden" id="projectContentDataSign" name="projectContentDataSign" value="">
 | 
	
		
			
				|  |  | +            <sys:message content="${message}"/>
 | 
	
		
			
				|  |  | +            <div class="form-group layui-row first lw12">
 | 
	
		
			
				|  |  | +                <div class="form-group-label"><h2>基本信息</h2></div>
 | 
	
		
			
				|  |  | +                <%--<div class="layui-item layui-col-sm6">
 | 
	
		
			
				|  |  | +                    <label class="layui-form-label">隐蔽工程量编号:</label>
 | 
	
		
			
				|  |  | +                    <div class="layui-input-block">
 | 
	
		
			
				|  |  | +                        <form:input path="projectContentData.number" htmlEscape="false" readonly="true" class="form-control layui-input"/>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>--%>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-sm6">
 | 
	
		
			
				|  |  | +                    <label class="layui-form-label"><span class="require-item">*</span>隐蔽工程量名称:</label>
 | 
	
		
			
				|  |  | +                    <div class="layui-input-block">
 | 
	
		
			
				|  |  | +                        <form:input path="projectContentData.name" value="${concealProjectInfo.contract.contractName}" htmlEscape="false" class="form-control required layui-input"/>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-sm6">
 | 
	
		
			
				|  |  | +                    <label class="layui-form-label"><span class="require-item">*</span>负责人:</label>
 | 
	
		
			
				|  |  | +                    <div class="layui-input-block">
 | 
	
		
			
				|  |  | +                        <form:input path="projectContentData.master.name" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
 | 
	
		
			
				|  |  | +                        <form:hidden path="projectContentData.master.id" htmlEscape="false"  readonly="true"  class="form-control layui-input required"/>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-sm6">
 | 
	
		
			
				|  |  | +                    <label class="layui-form-label"><span class="require-item">*</span>创建日期:</label>
 | 
	
		
			
				|  |  | +                    <div class="layui-input-block">
 | 
	
		
			
				|  |  | +                        <input id="createDate" name="projectContentData.createDate" type="text" readonly="true" maxlength="20" class="form-control layui-input required"
 | 
	
		
			
				|  |  | +                               value="<fmt:formatDate value="${concealProjectInfo.projectContentData.createDate}" pattern="yyyy-MM-dd"/>"/>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-sm6" id="contentDetailTypeDiv" style="display: none">
 | 
	
		
			
				|  |  | +                    <label class="layui-form-label">选择类型:</label>
 | 
	
		
			
				|  |  | +                    <div class="layui-input-block">
 | 
	
		
			
				|  |  | +                        <div class="input-group">
 | 
	
		
			
				|  |  | +                            <div >
 | 
	
		
			
				|  |  | +                                <div id="contentDetailType" class="xm-select-demo" tabindex="0" contenteditable="true"></div>
 | 
	
		
			
				|  |  | +                            </div>
 | 
	
		
			
				|  |  | +                            <span class="input-group-btn" onclick="getDetailsNum()">
 | 
	
		
			
				|  |  | +								<label class="form-status">生成表格</label>
 | 
	
		
			
				|  |  | +							 </span>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +            <div class="form-group layui-row">
 | 
	
		
			
				|  |  | +                <div class="form-group-label"><h2>内容详情</h2></div>
 | 
	
		
			
				|  |  | +                <div style="padding: 0 15px;">
 | 
	
		
			
				|  |  | +                    <div id="contentDetail"></div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +            <div class="form-group layui-row">
 | 
	
		
			
				|  |  | +                <div class="form-group-label"><h2>依据性资料明细</h2></div>
 | 
	
		
			
				|  |  | +                <div class="layui-item nav-btns">
 | 
	
		
			
				|  |  | +                    <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${concealProjectInfo.dictType}&id=${concealProjectInfo.id}&parentIds=${concealProjectInfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
 | 
	
		
			
				|  |  | +                                            cssClass="form-control" projectId="${concealProjectInfo.project.id}" fieldLabels="" fieldKeys=""  searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-xs12 form-table-container">
 | 
	
		
			
				|  |  | +                    <table id="contentTableBase" class="table table-bordered table-condensed details">
 | 
	
		
			
				|  |  | +                <thead>
 | 
	
		
			
				|  |  | +                <tr>
 | 
	
		
			
				|  |  | +                    <th class="hide"></th>
 | 
	
		
			
				|  |  | +                    <th >资料编号</th>
 | 
	
		
			
				|  |  | +                    <th >资料名称</th>
 | 
	
		
			
				|  |  | +                    <th >资料类别</th>
 | 
	
		
			
				|  |  | +                    <th >上传人</th>
 | 
	
		
			
				|  |  | +                    <th >上传日期</th>
 | 
	
		
			
				|  |  | +                    <th>操作</th>
 | 
	
		
			
				|  |  | +                </tr>
 | 
	
		
			
				|  |  | +                </thead>
 | 
	
		
			
				|  |  | +                <tbody id="workBaseDataList">
 | 
	
		
			
				|  |  | +                <c:forEach items="${concealProjectInfo.projectContentData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
 | 
	
		
			
				|  |  | +                    <tr>
 | 
	
		
			
				|  |  | +                        <td class="hide">
 | 
	
		
			
				|  |  | +                            <input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}" class="clientId">
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                        <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                                ${projectBasedData.number}
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                        <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                                ${projectBasedData.name}
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                        <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                                ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                        <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                                ${projectBasedData.uploadUser.name}
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                        <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                            <fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                        <td class="text-center op-td">
 | 
	
		
			
				|  |  | +                            <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
 | 
	
		
			
				|  |  | +                        </td>
 | 
	
		
			
				|  |  | +                    </tr>
 | 
	
		
			
				|  |  | +                </c:forEach>
 | 
	
		
			
				|  |  | +                </tbody>
 | 
	
		
			
				|  |  | +            </table>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +            <script type="text/template" id="workBaseDataTpl">//<!--
 | 
	
		
			
				|  |  | +                <tr id="budgetList{{idx}}">
 | 
	
		
			
				|  |  | +                    <td class="hide">
 | 
	
		
			
				|  |  | +                        <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
 | 
	
		
			
				|  |  | +                        <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
 | 
	
		
			
				|  |  | +                        <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
 | 
	
		
			
				|  |  | +                        <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                        {{row.number}}
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                        {{row.name}}
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                        {{row.typeLabel}}
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                        {{row.uploadUser.name}}
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td style="text-align:center;">
 | 
	
		
			
				|  |  | +                        {{row.uploadDate}}
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                    <td class="text-center op-td">
 | 
	
		
			
				|  |  | +                        <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 取消</a>
 | 
	
		
			
				|  |  | +                    </td>
 | 
	
		
			
				|  |  | +                </tr>//-->
 | 
	
		
			
				|  |  | +            </script>
 | 
	
		
			
				|  |  | +            <script type="text/javascript">
 | 
	
		
			
				|  |  | +                var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 | 
	
		
			
				|  |  | +                var workBaseDataRowIdx = ${fn:length(concealProjectInfo.projectReportData.projectBasedDataList)};
 | 
	
		
			
				|  |  | +                function setValuee(obj){
 | 
	
		
			
				|  |  | +                    for(var i=0;i<obj.length;i++){
 | 
	
		
			
				|  |  | +                        var idArr = $("#workBaseDataList tr:visible .clientId");
 | 
	
		
			
				|  |  | +                        if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
 | 
	
		
			
				|  |  | +                            addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
 | 
	
		
			
				|  |  | +                            workBaseDataRowIdx=workBaseDataRowIdx+1;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                function hasInArr(id,idArr) {
 | 
	
		
			
				|  |  | +                    for(var i=0;i<idArr.length;i++){
 | 
	
		
			
				|  |  | +                        if(id==$(idArr[i]).val()){
 | 
	
		
			
				|  |  | +                            return true;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    return false;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                function existBaseData(id,length) {
 | 
	
		
			
				|  |  | +                    for (var i=0;i<length;i++) {
 | 
	
		
			
				|  |  | +                        var val = $('#workBaseDataList'+i+'_id').val();
 | 
	
		
			
				|  |  | +                        if(id==val){
 | 
	
		
			
				|  |  | +                            return true;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    return false;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                function addRowBaseData(list, idx, tpl, row){
 | 
	
		
			
				|  |  | +                    bornTemplete(list, idx, tpl, row, idx);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                function bornTemplete(list, idx, tpl, row, idx1){
 | 
	
		
			
				|  |  | +                    var idx1 = $("#workBaseDataList tr").length +1;
 | 
	
		
			
				|  |  | +                    $(list).append(Mustache.render(tpl, {
 | 
	
		
			
				|  |  | +                        idx: idx, delBtn: true, row: row,
 | 
	
		
			
				|  |  | +                        order:idx1 + 1, idx1:idx1
 | 
	
		
			
				|  |  | +                    }));
 | 
	
		
			
				|  |  | +                    $(list+idx).find("select").each(function(){
 | 
	
		
			
				|  |  | +                        $(this).val($(this).attr("data-value"));
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                    $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
 | 
	
		
			
				|  |  | +                        var ss = $(this).attr("data-value").split(',');
 | 
	
		
			
				|  |  | +                        for (var i=0; i<ss.length; i++){
 | 
	
		
			
				|  |  | +                            if($(this).val() == ss[i]){
 | 
	
		
			
				|  |  | +                                $(this).attr("checked","checked");
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                function delRowBaseData(obj, prefix,userId){
 | 
	
		
			
				|  |  | +                    var id = $(prefix+"_id").val();
 | 
	
		
			
				|  |  | +                   /* var createBy = $(prefix+"_userId").val();*/
 | 
	
		
			
				|  |  | +                    var currentUser = '${fns:getUser().id}';
 | 
	
		
			
				|  |  | +                    var contentId = '${concealProjectInfo.projectContentData.id}';
 | 
	
		
			
				|  |  | +                    console.log(contentId);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    $.ajax({
 | 
	
		
			
				|  |  | +                        type:"post",
 | 
	
		
			
				|  |  | +                        url:'${ctx}/project/concealProject/ajaxdelete',
 | 
	
		
			
				|  |  | +                        data:{"contentId":contentId,"basedId":id},
 | 
	
		
			
				|  |  | +                        dataType:"json",
 | 
	
		
			
				|  |  | +                        success:function(data){
 | 
	
		
			
				|  |  | +                            if(data.success) {
 | 
	
		
			
				|  |  | +                                $(obj).parent().parent().remove();
 | 
	
		
			
				|  |  | +                                if(data.body.inuse){
 | 
	
		
			
				|  |  | +                                    return;
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                                if (currentUser == userId) {
 | 
	
		
			
				|  |  | +                                    confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${concealProjectInfo.id}&type=1');
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }else {
 | 
	
		
			
				|  |  | +                                top.layer.msg("删除依据资料失败!", {icon: 0});
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    })
 | 
	
		
			
				|  |  | +                    return;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                function confirmDelete(mess, href){
 | 
	
		
			
				|  |  | +                    top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
 | 
	
		
			
				|  |  | +                        //do something
 | 
	
		
			
				|  |  | +                        if (typeof href == 'function') {
 | 
	
		
			
				|  |  | +                            href();
 | 
	
		
			
				|  |  | +                        }else{
 | 
	
		
			
				|  |  | +                            $.ajax({
 | 
	
		
			
				|  |  | +                                url:href,
 | 
	
		
			
				|  |  | +                                type:"post",
 | 
	
		
			
				|  |  | +                                success:function(data){
 | 
	
		
			
				|  |  | +                                    if(data.success){
 | 
	
		
			
				|  |  | +                                        top.layer.msg("删除依据资料成功!", {icon: 0});
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            });
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        top.layer.close(index);
 | 
	
		
			
				|  |  | +                    });
 | 
	
		
			
				|  |  | +                    return false;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            </script>
 | 
	
		
			
				|  |  | +            <div class="form-group layui-row">
 | 
	
		
			
				|  |  | +                <div class="form-group-label"><h2>附件信息</h2></div>
 | 
	
		
			
				|  |  | +                <div class="layui-item nav-btns">
 | 
	
		
			
				|  |  | +                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <div id="addFile_attachment" style="display: none" class="upload-progress">
 | 
	
		
			
				|  |  | +                    <span id="fileName_attachment" ></span>
 | 
	
		
			
				|  |  | +                    <b><span id="baifenbi_attachment" ></span></b>
 | 
	
		
			
				|  |  | +                    <div class="progress">
 | 
	
		
			
				|  |  | +                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
 | 
	
		
			
				|  |  | +                <span id="attachment_title"></span>
 | 
	
		
			
				|  |  | +                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
 | 
	
		
			
				|  |  | +                    <table id="upTable" class="table table-bordered table-condensed details">
 | 
	
		
			
				|  |  | +                        <thead>
 | 
	
		
			
				|  |  | +                            <tr>
 | 
	
		
			
				|  |  | +                            <th>文件名称</th>
 | 
	
		
			
				|  |  | +                            <th>上传人</th>
 | 
	
		
			
				|  |  | +                            <th>上传时间</th>
 | 
	
		
			
				|  |  | +                            <th width="150px">操作</th>
 | 
	
		
			
				|  |  | +                        </tr>
 | 
	
		
			
				|  |  | +                        </thead>
 | 
	
		
			
				|  |  | +                        <tbody id="file_attachment">
 | 
	
		
			
				|  |  | +                        <c:forEach items="${concealProjectInfo.projectContentData.workAttachments}" var = "workAttachment" varStatus="status">
 | 
	
		
			
				|  |  | +                            <tr>
 | 
	
		
			
				|  |  | +                                <c:choose>
 | 
	
		
			
				|  |  | +                                    <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
 | 
	
		
			
				|  |  | +                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
 | 
	
		
			
				|  |  | +                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
 | 
	
		
			
				|  |  | +                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
 | 
	
		
			
				|  |  | +                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
 | 
	
		
			
				|  |  | +                                        <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
 | 
	
		
			
				|  |  | +                                    </c:when>
 | 
	
		
			
				|  |  | +                                    <c:otherwise>
 | 
	
		
			
				|  |  | +                                        <c:choose>
 | 
	
		
			
				|  |  | +                                            <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
 | 
	
		
			
				|  |  | +                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
 | 
	
		
			
				|  |  | +                                            </c:when>
 | 
	
		
			
				|  |  | +                                            <c:otherwise>
 | 
	
		
			
				|  |  | +                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
 | 
	
		
			
				|  |  | +                                            </c:otherwise>
 | 
	
		
			
				|  |  | +                                        </c:choose>
 | 
	
		
			
				|  |  | +                                    </c:otherwise>
 | 
	
		
			
				|  |  | +                                </c:choose>
 | 
	
		
			
				|  |  | +                                <td>${workAttachment.createBy.name}</td>
 | 
	
		
			
				|  |  | +                                <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
 | 
	
		
			
				|  |  | +                                <td class="op-td">
 | 
	
		
			
				|  |  | +                                    <div class="op-btn-box" >
 | 
	
		
			
				|  |  | +                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                                        <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">
 | 
	
		
			
				|  |  | +                                            <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workAttachment.url}&id=${workAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
 | 
	
		
			
				|  |  | +                                        </c:if>
 | 
	
		
			
				|  |  | +                                    </div>
 | 
	
		
			
				|  |  | +                                </td>
 | 
	
		
			
				|  |  | +                            </tr>
 | 
	
		
			
				|  |  | +                        </c:forEach>
 | 
	
		
			
				|  |  | +                </tbody>
 | 
	
		
			
				|  |  | +                    </table>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +            <c:if test="${concealProjectInfo.infoId !=null and concealProjectInfo.edit  == 'edit'}">
 | 
	
		
			
				|  |  | +                <div class="pull-right">
 | 
	
		
			
				|  |  | +                    <button id="btnSubmit" class="nav-btn nav-btn-add" type="submit" onclick="$('#edit').val('edit');beforeSubmit();"><i class="fa fa-chevron-up"></i> 提 交</button>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +            </c:if>
 | 
	
		
			
				|  |  | +            <div class="form-group layui-row page-end">
 | 
	
		
			
				|  |  | +            <br>
 | 
	
		
			
				|  |  | +            <br>
 | 
	
		
			
				|  |  | +            <br>
 | 
	
		
			
				|  |  | +            </div>
 | 
	
		
			
				|  |  | +        </form:form>
 | 
	
		
			
				|  |  | +    </div>
 | 
	
		
			
				|  |  | +</div>
 | 
	
		
			
				|  |  | +<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +    function contentDetailTypeShow(obj) {
 | 
	
		
			
				|  |  | +        var projectContentDataId = '${concealProjectInfo.projectContentData.id}';
 | 
	
		
			
				|  |  | +        $.ajax({
 | 
	
		
			
				|  |  | +            type:'post',
 | 
	
		
			
				|  |  | +            url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList2',
 | 
	
		
			
				|  |  | +            data:{
 | 
	
		
			
				|  |  | +                "achievementParentId":obj,
 | 
	
		
			
				|  |  | +                "type":2
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            success:function(data){
 | 
	
		
			
				|  |  | +                if(data.success) {
 | 
	
		
			
				|  |  | +                    if (null != obj && "" != obj) {
 | 
	
		
			
				|  |  | +                        if(null !=projectContentDataId && ""!= projectContentDataId) {
 | 
	
		
			
				|  |  | +                            $.ajax({
 | 
	
		
			
				|  |  | +                                type: 'post',
 | 
	
		
			
				|  |  | +                                url: getExistingDataOnPath(obj),
 | 
	
		
			
				|  |  | +                                data: {
 | 
	
		
			
				|  |  | +                                    "contentId": "${concealProjectInfo.projectContentData.id}"
 | 
	
		
			
				|  |  | +                                },
 | 
	
		
			
				|  |  | +                                success: function (tableTypeList) {
 | 
	
		
			
				|  |  | +                                    var dataList = data.body.list;
 | 
	
		
			
				|  |  | +                                    var newDataList = [];
 | 
	
		
			
				|  |  | +                                    var holdDataList = data.body.list;
 | 
	
		
			
				|  |  | +                                    if (0 != dataList.length) {
 | 
	
		
			
				|  |  | +                                        for (i in holdDataList) {
 | 
	
		
			
				|  |  | +                                            newDataList.push(holdDataList[i])
 | 
	
		
			
				|  |  | +                                        }
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  | +                                    if (0 != newDataList.length && 0 !=tableTypeList.length){
 | 
	
		
			
				|  |  | +                                        for (i in newDataList) {
 | 
	
		
			
				|  |  | +                                            for (j in tableTypeList) {
 | 
	
		
			
				|  |  | +                                                if (newDataList[i].value == tableTypeList[j]) {
 | 
	
		
			
				|  |  | +                                                    var newData = {
 | 
	
		
			
				|  |  | +                                                        "name": newDataList[i].name,
 | 
	
		
			
				|  |  | +                                                        "value": newDataList[i].value,
 | 
	
		
			
				|  |  | +                                                        "selected": true
 | 
	
		
			
				|  |  | +                                                    }
 | 
	
		
			
				|  |  | +                                                    holdDataList.splice(i,1,newData);
 | 
	
		
			
				|  |  | +                                                }
 | 
	
		
			
				|  |  | +                                                modifyGetDetailsNum(tableTypeList);
 | 
	
		
			
				|  |  | +                                            }
 | 
	
		
			
				|  |  | +                                        }
 | 
	
		
			
				|  |  | +                                        xmSelect.render({
 | 
	
		
			
				|  |  | +                                            el: '#contentDetailType',
 | 
	
		
			
				|  |  | +                                            language: 'zn',
 | 
	
		
			
				|  |  | +                                            data: holdDataList
 | 
	
		
			
				|  |  | +                                        })
 | 
	
		
			
				|  |  | +                                        $("#dataBodyList").val(holdDataList);
 | 
	
		
			
				|  |  | +                                    }else{
 | 
	
		
			
				|  |  | +                                        xmSelect.render({
 | 
	
		
			
				|  |  | +                                            el: '#contentDetailType',
 | 
	
		
			
				|  |  | +                                            language: 'zn',
 | 
	
		
			
				|  |  | +                                            data: dataList
 | 
	
		
			
				|  |  | +                                        })
 | 
	
		
			
				|  |  | +                                        $("#dataBodyList").val(holdDataList);
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            })
 | 
	
		
			
				|  |  | +                        }else{
 | 
	
		
			
				|  |  | +                            xmSelect.render({
 | 
	
		
			
				|  |  | +                                el: '#contentDetailType',
 | 
	
		
			
				|  |  | +                                language: 'zn',
 | 
	
		
			
				|  |  | +                                data: data.body.list
 | 
	
		
			
				|  |  | +                            })
 | 
	
		
			
				|  |  | +                            $("#dataBodyList").val(data.body.list);
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }else {
 | 
	
		
			
				|  |  | +                        xmSelect.render({
 | 
	
		
			
				|  |  | +                            el: '#contentDetailType',
 | 
	
		
			
				|  |  | +                            language: 'zn',
 | 
	
		
			
				|  |  | +                            data: data.body.list
 | 
	
		
			
				|  |  | +                        })
 | 
	
		
			
				|  |  | +                        $("#dataBodyList").val(data.body.list);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    var contentDetailType = xmSelect.render({
 | 
	
		
			
				|  |  | +        el: '#contentDetailType',
 | 
	
		
			
				|  |  | +        language: 'zn',
 | 
	
		
			
				|  |  | +        data: [
 | 
	
		
			
				|  |  | +        ]
 | 
	
		
			
				|  |  | +    })
 | 
	
		
			
				|  |  | +    
 | 
	
		
			
				|  |  | +    function getExistingDataOnPath(val) {
 | 
	
		
			
				|  |  | +        return "${ctx}/workConcealProject/workConcealProject/getTableType";
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    function getDetailsNum(){
 | 
	
		
			
				|  |  | +        var list = [];
 | 
	
		
			
				|  |  | +        //获取当前多选选中的值
 | 
	
		
			
				|  |  | +        var selectArr = contentDetailType.getValue();
 | 
	
		
			
				|  |  | +        for (var i in selectArr){
 | 
	
		
			
				|  |  | +            list.push(selectArr[i].value);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $("#contentDetail").val("");
 | 
	
		
			
				|  |  | +        console.log(list);
 | 
	
		
			
				|  |  | +        var val = $("#projectContentDataSign").val();
 | 
	
		
			
				|  |  | +        var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",'sign':list.toString(),'achievementParentId':val};
 | 
	
		
			
				|  |  | +        detailFlag=1;
 | 
	
		
			
				|  |  | +        $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    function modifyGetDetailsNum(list){
 | 
	
		
			
				|  |  | +        $("#contentDetailType").empty();
 | 
	
		
			
				|  |  | +        console.log(list);
 | 
	
		
			
				|  |  | +        var val = $("#projectContentDataSign").val();
 | 
	
		
			
				|  |  | +        var param2 = {'contentId':"${concealProjectInfo.projectContentData.id}",'projectId':"${concealProjectInfo.project.id}",'sign':list.toString(),'achievementParentId':val};
 | 
	
		
			
				|  |  | +        detailFlag=1;
 | 
	
		
			
				|  |  | +        $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +</body>
 | 
	
		
			
				|  |  | +</html>
 |