|
@@ -0,0 +1,341 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>新增归档</title>
|
|
|
+ <meta name="decorator" content="default"/>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
|
|
|
+ <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
|
|
|
+ <style>
|
|
|
+ #projectDesc-error{
|
|
|
+ left:0;
|
|
|
+ top:82px;
|
|
|
+ }
|
|
|
+ .layui-layer-dialog{
|
|
|
+ background: red;
|
|
|
+ }
|
|
|
+ td input{
|
|
|
+ margin-left:-10px !important;
|
|
|
+ height: 42px !important;
|
|
|
+ }
|
|
|
+ .disables {
|
|
|
+ pointer-events: none;
|
|
|
+ }
|
|
|
+ .notDisables {
|
|
|
+ pointer-events: all;
|
|
|
+ }
|
|
|
+ .forbidden{
|
|
|
+ background-color:#c2c2c2;
|
|
|
+ }
|
|
|
+
|
|
|
+ .notForbidden{
|
|
|
+ background-color:#3ca2e0;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript">
|
|
|
+
|
|
|
+ function hasInArr(id,idArr) {
|
|
|
+ for(var i=0;i<idArr.length;i++){
|
|
|
+ if(id==$(idArr[i]).val()){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ function existLinkman(id,length) {
|
|
|
+ for (var i=0;i<length;i++) {
|
|
|
+ var val = $('#workClientLinkmanList'+i+'_id').val();
|
|
|
+ if(id==val){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ function setClientInfo(obj) {
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
+ var idArr = $("#workConstructionLinkmanList tr:visible .linkmanId");
|
|
|
+ if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
+ addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl,obj[i]);
|
|
|
+ workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function existConstructionLinkman(obj,length) {
|
|
|
+ for (var i=0;i<length;i++) {
|
|
|
+ var val = $('#workConstructionLinkmanList'+i+'_id').val();
|
|
|
+ var cid = $('#workConstructionLinkmanList'+i+'_cid').val();
|
|
|
+ if(obj.id==val&&obj.client.id==cid){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ function insertTitle(tValue){
|
|
|
+ $("#flagFile").val(false);
|
|
|
+ var files = $("#attachment_file")[0].files; for(var i = 0;i<files.length;i++) { var file = files[i];
|
|
|
+ var attachmentId = $("#id").val();
|
|
|
+ var attachmentFlag = "82";
|
|
|
+ /*console.log(file);*/
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
+
|
|
|
+ var storeAs = "projectRecords";
|
|
|
+ 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 addFile() {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ }
|
|
|
+
|
|
|
+ function addRow(list, idx, tpl, row){
|
|
|
+ // var idx1 = $("#workClientLinkmanList tr").length;
|
|
|
+ bornTemplete(list, idx, tpl, row, idx);
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 delEntrustRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ if($("#workClientLinkmanList tr").length==0){
|
|
|
+ //按钮禁用
|
|
|
+ $("#addUserButton").addClass("notDisables");
|
|
|
+ //a标签置灰
|
|
|
+ $("#aButton").addClass("notForbidden");
|
|
|
+
|
|
|
+ $("#linkmanDiv").addClass("notDisables");
|
|
|
+ $("#linkmanButton").addClass("notForbidden");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function delRow(obj, prefix){
|
|
|
+ var id = $(prefix+"_id");
|
|
|
+ var delFlag = $(prefix+"_delFlag");
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }
|
|
|
+ function formatNum(obj) {
|
|
|
+ var val = $(obj).val();
|
|
|
+ if(val==null||val==''|| isNaN(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 openBill2(title,url,width,height,target,formId){
|
|
|
+
|
|
|
+ if($("#workClientLinkmanList tr").length>0){
|
|
|
+ top.layer.msg('仅可添加一名委托方联系人!', {icon: 0});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
+ var urls = url+"&index="+frameIndex;
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width='auto';
|
|
|
+ height='auto';
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function getInstallFee() {
|
|
|
+ var af = $("#estimateTotalFees").val();
|
|
|
+ //安装
|
|
|
+ var inf = $("#installFees").val();
|
|
|
+ if(inf != ''&& af !=''){
|
|
|
+ var hf = parseInt(af)-parseInt(inf);
|
|
|
+ var rate = (Math.round(parseInt(inf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#installPercent").val(rate);
|
|
|
+ $("#buildingFees").val(hf);
|
|
|
+ bf = hf;
|
|
|
+ var bRate = (Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#buildingPercent").val(bRate);
|
|
|
+ }
|
|
|
+ if(inf == ''|| af ==''){
|
|
|
+ $("#installPercent").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function getBuildingFee() {
|
|
|
+ var af = $("#estimateTotalFees").val();
|
|
|
+ //土建
|
|
|
+ var bf = $("#buildingFees").val();
|
|
|
+ if(bf != ''&& af !=''){
|
|
|
+ var hf = parseInt(af)-parseInt(bf);
|
|
|
+ var rate = (Math.round(parseInt(bf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#buildingPercent").val(rate);
|
|
|
+ $("#installFees").val(hf);
|
|
|
+ inf = hf;
|
|
|
+ var inRate = (Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100).toFixed(2);
|
|
|
+ $("#installPercent").val(inRate);
|
|
|
+ }
|
|
|
+ if(bf == ''|| af ==''){
|
|
|
+ $("#buildingPercent").val("");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<div class="tapfixed">
|
|
|
+ <div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
|
|
|
+ <ul class="list-tabs" >
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/list?parentProId=${projectRecords.id}&projectType=${projectRecords.projectType}">子项目列表</a></li>
|
|
|
+ <li ><a href="${ctx}/ruralProject/ruralProjectView/workContractView?id=${projectRecords.workContractInfo.id}&projectId=${projectRecords.id}">客户合同详情</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/planView?id=${projectRecords.id}">项目计划信息</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${reportedId}">上报信息</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/modify?projectId=${projectRecords.id}">质量复核信息</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/reportIssue?projectId=${projectRecords.id}">报告签发信息</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/getAccessoryView?id=${projectRecords.id}">档案信息</a></li>
|
|
|
+ <li><a href="${ctx}/ruralProject/ruralProjectView/formRecordModify?id=${projectRecords.id}">线上归档信息</a></li>
|
|
|
+ <li class="active"><a href="${ctx}/ruralProject/ruralProjectView/paperView?projectId=${projectRecords.id}&submitMoney=${projectRecords.submitMoney}">纸质归档信息</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<div class="single-form">
|
|
|
+ <div class="container">
|
|
|
+ <sys:message content="${message}"/>
|
|
|
+ <form:form id="inputForm" modelAttribute="projectFilingBatch" action="${ctx}/ruralProject/ruralProjectRecords/save" method="post" class="form-horizontal">
|
|
|
+ <form:hidden path="id"/>
|
|
|
+ <form:hidden path="projectId"/>
|
|
|
+
|
|
|
+ <div class="form-group layui-row">
|
|
|
+ <div class="form-group-label" style="overflow:hidden;"><h2 style="float: left">归档项目信息</h2></div>
|
|
|
+ <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
|
|
|
+ </div>
|
|
|
+ </form:form>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
|
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
|
|
|
+<script>
|
|
|
+ /*使用模块加载的方式 加载文件*/
|
|
|
+ layui.config({
|
|
|
+ base: '${ctx}/resoueces/css/layui/module/'
|
|
|
+ }).extend({
|
|
|
+ treetable: 'treetable-lay/treetable'
|
|
|
+ }).use(['layer', 'table', 'treetable'], function () {
|
|
|
+ var $ = layui.jquery;
|
|
|
+ var table = layui.table;
|
|
|
+ var layer = layui.layer;
|
|
|
+ var treetable = layui.treetable;
|
|
|
+ var id =$("#id").val();
|
|
|
+ var projectId =$("#projectId").val();
|
|
|
+ // 渲染表格
|
|
|
+ var renderTable = function () {
|
|
|
+ layer.load(2);
|
|
|
+ treetable.render({
|
|
|
+ treeColIndex: 0,//树形图标显示在第几列
|
|
|
+ treeSpid: 0,//最上级的父级id
|
|
|
+ treeIdName: 'permissionId',//id字段的名称
|
|
|
+ treePidName: 'pid',//pid字段的名称
|
|
|
+ treeDefaultClose: false,//是否默认折叠
|
|
|
+ treeLinkage: true,//父级展开时是否自动展开所有子级
|
|
|
+ elem: '#permissionTable',
|
|
|
+ url: '${ctx}/projectFilingBatch/projectFilingBatchInfo/getFilingBatchByProjectId?projectId='+projectId,
|
|
|
+ page: false,
|
|
|
+ cols: [[
|
|
|
+ {field: 'projectNum', title: '项目编号/审定单',templet:function(d){
|
|
|
+ if(0 == d.pid){
|
|
|
+ return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectNum+"</font>";
|
|
|
+ }else{
|
|
|
+ return "<font>"+d.projectNum+"</font>";
|
|
|
+ }
|
|
|
+ }},
|
|
|
+ {field: 'number', align:'center', title: '报告号/文件描述',templet:function(d){
|
|
|
+ if(0 == d.pid){
|
|
|
+ return "<font style = 'font-size:14px;font-weight:500;'>"+d.number+"</font>";
|
|
|
+ }else{
|
|
|
+ return "<font>"+d.number+"</font>";
|
|
|
+ }
|
|
|
+ }},
|
|
|
+ {field: 'filingName', align:'center', title: '项目名称',templet:function(d){
|
|
|
+ if(0 == d.pid){
|
|
|
+ return "<font style = 'font-size:14px;font-weight:500;'>"+d.filingName+"</font>";
|
|
|
+ }else{
|
|
|
+ return "<font>"+d.filingName+"</font>";
|
|
|
+ }
|
|
|
+ }},
|
|
|
+ {field: 'boxNum', align:'center', title: '案卷号',templet: function(d){
|
|
|
+ if(0 == d.pid){
|
|
|
+ return "<font style = 'font-size:14px;font-weight:500;'>"+d.boxNum+"</font>";
|
|
|
+ }else{
|
|
|
+ return "<font>"+d.boxNum+"</font>";
|
|
|
+ }
|
|
|
+ }},
|
|
|
+ {field: 'statusStr', align:'center', title: '状态',width:120,templet: function(d){
|
|
|
+ if(0 == d.pid){
|
|
|
+ return "<font style = 'font-size:14px;font-weight:500;'>"+d.statusStr+"</font>";
|
|
|
+ }else{
|
|
|
+ return "<font></font>"
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ ]],
|
|
|
+ done: function () {
|
|
|
+ layer.closeAll('loading');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
+ renderTable();
|
|
|
+
|
|
|
+ //触发三个button按钮
|
|
|
+ $('#btn-expand').click(function () {
|
|
|
+ treetable.expandAll('#permissionTable');
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#btn-fold').click(function () {
|
|
|
+ treetable.foldAll('#permissionTable');
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#btn-refresh').click(function () {
|
|
|
+ renderTable();
|
|
|
+ });
|
|
|
+
|
|
|
+ //监听工具条
|
|
|
+ table.on('tool(permissionTable)', function (obj) {
|
|
|
+ var data = obj.data;
|
|
|
+ var layEvent = obj.event;
|
|
|
+ if(data.permissionName!=null){
|
|
|
+ if (layEvent === 'del') {
|
|
|
+ layer.msg('删除' + data.id);
|
|
|
+ } else if (layEvent === 'edit') {
|
|
|
+ layer.msg('修改' + data.id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|