Przeglądaj źródła

刘芸审核纸质归档需上传档案备考表文件功能处理

user5 1 rok temu
rodzic
commit
c0b1692932

+ 32 - 44
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/ProjectPaperFilingService.java

@@ -399,6 +399,38 @@ public class ProjectPaperFilingService extends CrudService<ProjectPaperFilingDao
                     if ("yes".equals(flag)) {
                         notifyRole = "审批通过";
                         workActivityProcess.setIsApproval("1");
+
+                        //将备考表保存到附件中
+                        if (CollectionUtils.isNotEmpty(paperFiling.getWorkAttachments())){
+                            for (WorkClientAttachment workAttachment : paperFiling.getWorkAttachments()) {
+                                //查询其他资料对应附件结构信息
+                                ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
+
+                                //将备考表添加到附件中
+                                Workattachment workattachment = new Workattachment();
+                                workattachment.setAttachmentId(templateInfo.getId());
+                                workattachment.setProjectId(paperFiling.getProjectId());
+                                workattachment.setUrl(workAttachment.getUrl());
+                                workattachment.setType(workAttachment.getType());
+                                workattachment.setAttachmentFlag(workAttachment.getAttachmentFlag());
+                                workattachment.setAttachmentName(workAttachment.getAttachmentName());
+                                workattachment.setAttachmentUser(UserUtils.getUser().getId());
+                                workattachmentService.insertOnWorkAttachment(workattachment);
+
+                                //将备考表添加到对应纸质归档审核附件中
+                                Workattachment workattachmentPaperFiling = new Workattachment();
+                                workattachmentPaperFiling.setAttachmentId(paperFiling.getId());
+                                workattachmentPaperFiling.setUrl(workAttachment.getUrl());
+                                workattachmentPaperFiling.setType(workAttachment.getType());
+                                workattachmentPaperFiling.setAttachmentFlag(workAttachment.getAttachmentFlag());
+                                workattachmentPaperFiling.setAttachmentName(workAttachment.getAttachmentName());
+                                workattachmentPaperFiling.setAttachmentUser(UserUtils.getUser().getId());
+                                workattachmentService.insertOnWorkAttachment(workattachmentPaperFiling);
+
+                            }
+                        }
+
+
                     } else {
                         notifyRole = "调整报告";
                         workActivityProcess.setIsApproval("2");
@@ -617,50 +649,6 @@ public class ProjectPaperFilingService extends CrudService<ProjectPaperFilingDao
             }
         }
         int i=dao.update(paperFiling);
-
-        //将备考表保存到附件中
-        if (CollectionUtils.isNotEmpty(paperFiling.getWorkAttachments())){
-            for (WorkClientAttachment workAttachment : paperFiling.getWorkAttachments()) {
-                //查询其他资料对应附件结构信息
-                ProjectTemplateInfo templateInfo = projectTemplateDao.getProjectTemplateInfoByName("其他资料");
-                //获取当前时间戳
-                long time = new Date().getTime();
-                File file1 = new File(workAttachment.getAttachmentName());
-                FileOutputStream fileOutputStream = new FileOutputStream(file1);
-                File docFile = new File(file1,workAttachment.getAttachmentName());
-                String filePath = ResponseUtil.returnViewResponse(workAttachment.getAttachmentName(), docFile);
-                //本地备考表信息生成file文件
-                File file = new File(filePath);
-                //File转MultipartFile文件
-                SftpClientUtil sftpClientUtil = new SftpClientUtil();
-                MultipartFile mFile = sftpClientUtil.transformFile(docFile);
-                try {
-                    //获取上传阿里云盘文件地址
-                    String uploadPath = ResponseUtil.uploadOss(mFile, "referenceContent");
-                    if(StringUtils.isNotBlank(uploadPath)){
-                        //将备考表添加到附件中
-                        Workattachment workattachment = new Workattachment();
-                        workattachment.setAttachmentId(templateInfo.getId());
-                        workattachment.setProjectId(paperFiling.getId());
-                        workattachment.setUrl(workAttachment.getUrl());
-                        workattachment.setType(workAttachment.getType());
-                        workattachment.setAttachmentFlag(workAttachment.getAttachmentFlag());
-                        workattachment.setAttachmentName(workAttachment.getAttachmentName());
-                        workattachment.setAttachmentUser(UserUtils.getUser().getId());
-                        workattachmentService.insertOnWorkAttachment(workattachment);
-                    }
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }finally {
-                    //删除本地文件
-                    if (!file.isDirectory()) {
-                        file.delete();
-                    }
-                }
-
-            }
-        }
-
         return "保存审核意见成功!";
     }
 

+ 1 - 1
src/main/webapp/webpage/modules/projectPaperFiling/projectPaperFilingAdmingModify.jsp

@@ -322,7 +322,7 @@
 				</div>
 			</div>
 			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>提交说明</h2></div>
+				<div class="form-group-label"><h2>案卷信息</h2></div>
 				<div class="layui-item layui-col-sm6 lw7">
 					<label class="layui-form-label"><span class="require-item">*</span>案卷号:</label>
 					<div class="layui-input-block">

+ 1 - 1
src/main/webapp/webpage/modules/projectPaperFiling/projectPaperFilingAudit.jsp

@@ -1772,7 +1772,7 @@
 				<div class="form-group-label"><h2>备考表文件上传   <a style="color: red;font-size: 12px;">此处上传文件为档案备考表</a></h2></div>
 				<div class="layui-item nav-btns">
 					<a id="reference_btn" class="nav-btn nav-btn-add" title="添加备考表"><i class="fa fa-plus"></i>&nbsp;文件上传</a>
-					<a class="nav-btn nav-btn-export" title="下载备考表模板"  onclick="window.location.href='${ctx}/workprojectnotify/workProjectNotify/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
+					<a class="nav-btn nav-btn-export" title="下载备考表模板"  onclick="window.location.href='${ctx}/ruralProject/ruralProjectDownMessage/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
 				</div>
 				<div id="addFile_reference" style="display: none" class="upload-progress">
 					<span id="fileName_reference" ></span>

+ 1 - 1
src/main/webapp/webpage/modules/projectPaperFiling/projectPaperFilingView.jsp

@@ -163,7 +163,7 @@
 		<input type="hidden" id="opinion" name="act.comment" value="" maxlength="250">
 		<c:set var="status" value="${projectRecords.act.status}" />
 			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>提交说明</h2></div>
+				<div class="form-group-label"><h2>案卷信息</h2></div>
 				<div class="layui-item layui-col-sm6 lw7">
 					<label class="layui-form-label">案卷号:</label>
 					<div class="layui-input-block">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp

@@ -490,7 +490,7 @@
 			</div>
 
 			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>提交说明</h2></div>
+				<div class="form-group-label"><h2>案卷信息</h2></div>
 				<div class="layui-item layui-col-sm6 lw7">
 					<label class="layui-form-label"><span class="require-item">*</span>案卷号:</label>
 					<div class="layui-input-block">

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPaperFilingView.jsp

@@ -324,7 +324,7 @@
 					</div>
 				</div>
 				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>提交说明</h2></div>
+					<div class="form-group-label"><h2>案卷信息</h2></div>
 					<div class="layui-item layui-col-sm6 lw7">
 						<label class="layui-form-label">案卷号:</label>
 						<div class="layui-input-block">

+ 637 - 0
src/main/webapp/webpage/modules/workinvoice/workInvoiceUploadElectronicInvoiceForm.jsp

@@ -0,0 +1,637 @@
+<%@ 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/laydate/laydate.js"></script>--%>
+	<style>
+		#contractTypeDoc-error{
+			top:80px;
+			left:0;
+		}
+		#workInvoiceProjectRelationList tr td{
+			padding-left: 0px;
+			padding-right: 0px;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            //debugger
+            if(validateForm.form()){
+                $("#inputForm").submit();
+                return true;
+            }else {
+				parent.layer.msg("信息未填写完整!", {icon: 5});
+			}
+            return false;
+        }
+        $(document).ready(function() {
+            /*$('#money').keyup(function(){
+                var c=$(this);
+                if(/[^\d]/.test(c.val())){//替换非数字字符
+                    var temp_amount=c.val().replace(/[^\d]/g,'');
+                    $(this).val(temp_amount);
+                }
+            })*/
+            jQuery.validator.addMethod("isUscCode", function(value, element) {
+                if (this.optional(element)){
+                    return true;
+                }
+                var uscCode = /^((\w{15})|(\w{18})|(\w{20}))$/;
+                return uscCode.test(value);
+            }, "请填写正确的纳税人识别号");
+
+            /* $("input[name='ext']").on('ifChecked', function(event){
+                 var radioVal = $(this).val();
+                 if(radioVal == 0){
+                     $("#td1").removeClass("hide");
+                     $("#td2").addClass("hide");
+                     $("#tr1").show()
+                 }else{
+                     $("#td1").addClass("hide");
+                     $("#td2").removeClass("hide");
+                     $("#tr1").hide()
+                 }
+             });*/
+            if("${workInvoice.ext}" == "1"){
+                $("#ext1").iCheck('check')
+            }else{
+                $("#ext").iCheck('check')
+            }
+            if("${workInvoice.invoiceType}" == "1"){
+                $("#invoiceType1").iCheck('check');
+                $(".invoicetype").show();
+            }else{
+                $("#invoiceType").iCheck('check');
+                $(".invoicetype").hide();
+            }
+            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);
+                    }
+                }
+            });
+
+            $("input[name='invoiceType']").on('ifChecked', function(event){
+                var radioVal = $(this).val();
+                //专票必填
+                if(radioVal == 1){
+                    $(".invoicetype").show();
+                    $("#bank").attr("class","form-control required layui-input");
+                    $("#bankNumber").attr("class","form-control number required layui-input");
+                    $("#orUnicode").attr("class","form-control isUscCode required layui-input");
+                    $("#address").attr("class","form-control required layui-input");
+                    $("#telephone").attr("class","form-control isTel required layui-input");
+                }else if(radioVal == 2){
+                    $(".invoicetype").hide();
+                    $("#bank").attr("class","form-control layui-input");
+                    $("#bankNumber").attr("class","form-control number layui-input");
+                    $("#orUnicode").attr("class","form-control isUscCode layui-input");
+                    $("#address").attr("class","form-control layui-input");
+                    $("#telephone").attr("class","form-control isTel layui-input");
+                }
+            });
+            /*--------------*/
+
+			/*--------------*/
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+        });
+
+
+		function insertTitle(tValue){
+			var list = "${workInvoice.workAttachments}";
+			var size = (list.split('url')).length-1;
+			var files = $("#attachment_file")[0].files;
+			for(var i = 0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "115";
+				console.log(file);
+				var timestamp = new Date().getTime();
+
+				var storeAs = "workInvoice";
+				var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+				/*将这段字符串存到数据库即可*/
+				var divId = "_attachment";
+				$("#addFile" + divId).show();
+				multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
+			}
+		}
+
+        function setValuee(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoiceTwo/workinvoiceTwo/getWorkClientInfo',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    // $("#bank").val(d.bank);
+					if(!'${workInvoice.orUnicode}'){
+						$("#orUnicode").val(d.orUnicode);
+					}
+					if(!'${workInvoice.telephone}'){
+						$("#telephone").val(d.telephone);
+					}
+					if(!'${workInvoice.address}'){
+						$("#address").val(d.registerAddress);
+					}
+                    $("#ids").val(d.ids);
+                }
+            })
+        }
+        function setDp(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoiceTwo/workinvoiceTwo/getUserDp',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#dp").val(d.dp);
+                }
+            })
+        }
+        function setPNumber(obj){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/workinvoiceTwo/workinvoiceTwo/getPNumber',
+                data:{
+                    "obj":obj
+                },
+                success:function(data){
+                    var d = JSON.parse(data);
+                    $("#pNumber").val(d.pNumber);
+                    $("#cInfoName").val(d.cInfoName);
+                    $("#cName").val(d.cName);
+                    $("#officeName").val(d.officeName);
+                    $("#officeId").val(d.officeId);
+                }
+            })
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#workAccountList tr").length;
+            if(list == '#workAccountList' && idx1 < 100){
+                bornTemplete(list, idx, tpl, row, idx1);
+            }
+        }
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(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 setVs(obj){
+            var a = $(obj).attr("id");
+            var b = a.replace('allPrice','proportion');
+            var value = obj.value;
+            var p = $("#price").val() || 0;
+            if(!p || p == 0){
+                parent.layer.msg("请先填写造价指标,且不能为零",{icon:5});
+                return;
+            }
+            var num = value/p ;
+            if(!/^\d+(\.\d{1,2})?$/.test( value )){
+                parent.layer.msg("合价必须输入数字",{icon:5});
+            }else{
+                $("#" +  b ).val(parseFloat(num.toFixed(2)));
+            }
+        }
+        function setTaxMoney(obj){
+            var a = $(obj).attr("id");
+            var b = a.replace('tax','taxMoney');
+            var t = a.replace('tax','totalMoney');
+            var tr = a.replace('tax','taxRate');
+            var value = obj.value || 0;
+            console.log("-value----"+value);
+            var tax = 1 + value/100;
+            console.log("-tax----"+tax);
+            var p = $("#" +  t ).val() || 0;//获取价税合计
+            console.log("-----"+p);
+            if(!p || p == 0){
+                parent.layer.msg("请先填写价税合计,且不能为零",{icon:5});
+                return;
+            }
+            var num = p/tax || 0;
+            console.log("-----"+num);
+            if(!/^\d+(\.\d{1,2})?$/.test( tax )){
+                parent.layer.msg("税率必须输入数字",{icon:5});
+            }else{
+                $("#" +  b ).val(parseFloat(num.toFixed(2)));
+                var taxRate = p - num;
+                $("#" +  tr ).val(parseFloat(taxRate.toFixed(2)));
+            }
+        }
+        function setV(obj){
+            var a =  $(obj).attr("id");
+            var c = "京";
+            var date=new Date;
+            var year=date.getFullYear();
+            var month=date.getMonth()+1;
+            month =(month<10 ? "0"+month:month);
+            var mydate = (year.toString()+month.toString());
+            var timestamp="["+mydate+"]";//获取固定格式年月
+            var number = c+timestamp;
+            $("#" +  a ).val(number);
+        }
+		function addRow1(list, idx, tpl, row){
+			var idx1 = $("#workInvoiceProjectRelationList tr").length;
+			if(list == '#workInvoiceProjectRelationList'){
+				bornTemplete1(list, idx, tpl, row, idx1);
+			}
+		}
+		function bornTemplete1(list, idx, tpl, row, idx1){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row,
+				order:idx1 + 1
+			}));
+			$(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");
+					}
+				}
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="workInvoice" action="${ctx}/workinvoiceTwo/workinvoiceTwo/electronicInvoiceSave" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="invoiceDate"/>
+			<form:hidden path="province" id="province"/>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-table-body layui-item layui-col-xs12 form-table-container"  style="padding:0px">
+					<table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="200px"><font color="red">*</font>项目名称</th>
+							<th width="200px">合同名称</th>
+							<th width="200px">项目编号</th>
+							<th width="200px">委托方</th>
+							<th width="200px">报告号</th>
+						</tr>
+						</thead>
+						<tbody id="workInvoiceProjectRelationList">
+						</tbody>
+					</table>
+					<script type="text/template" id="workInvoiceProjectRelationListTpl">//<!--
+                    <tr id="workInvoiceProjectRelationList{{idx}}">
+                        <td class="hide">
+                            <input id="workInvoiceProjectRelationList{{idx}}_invoiceId" name="workInvoiceProjectRelationList[{{idx}}].invoiceId" type="hidden" value="{{row.invoiceId}}"/>
+							<input id="workInvoiceProjectRelationList{{idx}}_projectId" name="workInvoiceProjectRelationList[{{idx}}].projectId" type="hidden" value="{{row.projectId}}"/>
+							<input id="workInvoiceProjectRelationList{{idx}}_delFlag" name="workInvoiceProjectRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
+                        </td>
+                        <td>
+							<input id="workInvoiceProjectRelationList{{idx}}_projectName"   type="text" value="{{row.projectName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="workInvoiceProjectRelationList{{idx}}_workContractName"   type="text" value="{{row.workContractName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td style="text-align:center;">
+							<input id="workInvoiceProjectRelationList{{idx}}_projectNum"  type="text" value="{{row.projectNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="workInvoiceProjectRelationList{{idx}}_clientName"  type="text" value="{{row.clientName}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                        <td>
+							<input id="workInvoiceProjectRelationList{{idx}}_reportDataNum"  type="text" value="{{row.reportDataNum}}" readonly="readonly"  class="form-control"/>
+                        </td>
+                    </tr>//-->
+					</script>
+					<script type="text/javascript">
+						var workInvoiceProjectRelationListRowIdx = 0, workInvoiceProjectRelationListTpl = $("#workInvoiceProjectRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+						/*if($("#id").val()){
+                            workInvoiceProjectRelationListRowIdx = ${fn:length(workInvoice.workInvoiceProjectRelationList)};
+						}*/
+						$(document).ready(function() {
+							var data = ${fns:toJson(workInvoice.workInvoiceProjectRelationList)};
+							for (var i=0; i<data.length; i++){
+								addRow1('#workInvoiceProjectRelationList', workInvoiceProjectRelationListRowIdx, workInvoiceProjectRelationListTpl, data[i])
+								workInvoiceProjectRelationListRowIdx = workInvoiceProjectRelationListRowIdx + 1;
+							}
+						});
+					</script>
+				</div>
+			</div>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>发票详情</h2></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 htmlEscape="false" readonly="true"   class="form-control layui-input" value="<c:choose><c:when test="${workInvoice.ext eq '0'}">本公司开票	</c:when><c:when test="${workInvoice.ext eq '1'}">上级公司开票</c:when></c:choose>"/>
+					</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 htmlEscape="false" readonly="true"   class="form-control layui-input" value="<c:choose><c:when test="${workInvoice.invoiceType eq '1'}">专票</c:when><c:when test="${workInvoice.invoiceType eq '2'}">普票</c:when></c:choose>"/>
+					</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 htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.client.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">纳税人识别号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.orUnicode}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">注册地址:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.address}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">电话:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.telephone}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开户银行:</label>
+					<div class="layui-input-block  ">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.bank}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">银行账号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.bankNumber}"/>
+					</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 htmlEscape="false" readonly="true"   class="form-control layui-input" value="<fmt:formatNumber value="${workInvoice.money}" pattern="#,#00.00"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开票内容要求:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.content}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开票人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" readonly="true"   class="form-control layui-input" value="${workInvoice.drawerName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">开票时间:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12">
+					<label class="layui-form-label">领票时间:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${workInvoice.takeDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+			</div>
+			<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>&nbsp;添加附件</a>
+					<sys:collectSelect  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+										name="linkman.id"  title="选择资料库"
+										cssClass="form-control judgment" fieldLabels="资料库" fieldKeys="name"
+										searchLabel="资料库" searchKey="fileName"></sys:collectSelect>
+				</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>上传时间</th>
+							<th width="200px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${workInvoice.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${workInvoice.uploadMode == 2}">
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+												<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+												<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+															</c:when>
+															<c:otherwise>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+											<%--附件下载删除--%>
+										<c:choose>
+											<c:when test="${workInvoice.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+														<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:when>
+													<c:otherwise>
+														<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+											</c:otherwise>
+										</c:choose>
+										<c:if test="${workClientAttachment.collectFlag != 1}">
+											<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
+										</c:if>
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>发票明细</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container">
+					<table id="contentTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th><span class="require-item">*</span>发票代码</th>
+							<th><span class="require-item">*</span>发票号</th>
+							<th><span class="require-item">*</span>价税合计</th>
+							<th><span class="require-item">*</span>税率</th>
+							<th><span class="require-item">*</span>金额</th>
+							<th><span class="require-item">*</span>税额</th>
+							<%--<th><span class="require-item">*</span>累计登记金额</th>--%>
+							<th><span class="require-item">*</span>发票状态</th><%--正常--%>
+							<th><span class="require-item">*</span>被退标记</th>
+								<%--<th><span class="require-item">*</span>被退票号</th>
+                                <th><span class="require-item">*</span>开票日期</th>--%>
+						</tr>
+						</thead>
+						<tbody id="workAccountList">
+						<c:if test="${not empty workInvoice.workAccountList}">
+							<c:forEach items="${workInvoice.workAccountList}" var="workAccount" varStatus="index">
+								<tr id="workAccountList${index.index}">
+									<td title="${workAccount.code}">
+											${workAccount.code}
+									</td>
+									<td title="${workAccount.number}">
+											${workAccount.number}
+									</td>
+
+									<td title="<fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>">
+										<fmt:formatNumber value="${workAccount.totalMoney}" pattern="#,#00.00"/>
+									</td>
+									<td title="${workAccount.tax}">
+											${workAccount.tax}
+									</td>
+									<td title="<fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>">
+										<fmt:formatNumber value="${workAccount.taxMoney}" pattern="#,#00.00"/>
+									</td>
+									<td title="<fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>">
+										<fmt:formatNumber value="${workAccount.taxRate}" pattern="#,#00.00"/>
+									</td>
+									<%--<td title="<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>">
+										<fmt:formatNumber value="${workAccount.incomeMoney}" pattern="#,#00.00"/>
+									</td>--%>
+									<td title="${workAccount.state}">
+											${workAccount.state}
+									</td>
+									<td title="${workAccount.backSign}">
+											${workAccount.backSign}
+									</td>
+										<%--<td title="${workAccount.backNumber}">
+                                                ${workAccount.backNumber}
+                                        </td>
+                                        <td title="<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>">
+                                            <fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>
+                                        </td>--%>
+								</tr>
+							</c:forEach>
+						</c:if>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+
+</body>
+</html>