|
@@ -115,110 +115,6 @@
|
|
|
})
|
|
|
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- function setContractValue(obj){
|
|
|
- var clientId = $("#contractClientId").val();
|
|
|
- $.ajax({
|
|
|
- type:'post',
|
|
|
- url:'${ctx}/project/projectRecords/getContractInfo',
|
|
|
- data:{
|
|
|
- "id":obj
|
|
|
- },
|
|
|
- success:function(data){
|
|
|
- $("#contractName").val(data.name);
|
|
|
- $("#contractPrice").val(data.contractPrice);
|
|
|
- formatNum($("#contractPrice"));
|
|
|
- $("#contractClientName").val(data.client.name);
|
|
|
- $("#contractClientId").val(data.client.id);
|
|
|
- $("#constructionProjectType").val(data.constructionProjectTypeStr);
|
|
|
- $("#linkmanId").val(data.workClinetInfoIds);
|
|
|
- //清理之前的联系人
|
|
|
- var newClientId = data.client.id;
|
|
|
- if(clientId != newClientId){
|
|
|
- $("#workClientLinkmanList tr").remove();
|
|
|
- if(isMasterClient){
|
|
|
- clientCount++;
|
|
|
- setLinkMan(newClientId);
|
|
|
- isMasterClient = false;
|
|
|
- }
|
|
|
- }
|
|
|
- // console.log("clientId------newClientId");
|
|
|
- // console.log(clientId+"------"+newClientId);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- function getFee() {
|
|
|
- $("#unitFees").val('');
|
|
|
- var totalFee = $("#totalFees").val();
|
|
|
- var count = $("#buildingScale").val();
|
|
|
- if(count != '' && totalFee != '') {
|
|
|
- var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
|
|
|
- $("#unitFees").val(cFee);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- function getBudlingFees() {
|
|
|
- $("#buildingPercent").val('');
|
|
|
- $("#buildingUnitFees").val('');
|
|
|
- var totalFee = $("#totalFees").val();
|
|
|
- var budFee = $("#buildingFees").val();
|
|
|
- var count = $("#buildingScale").val();
|
|
|
- if(totalFee != '') {
|
|
|
- var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
|
|
|
- }
|
|
|
- if(count != '') {
|
|
|
- var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
|
|
|
- }
|
|
|
- $("#buildingPercent").val(p);
|
|
|
- $("#buildingUnitFees").val(pp);
|
|
|
- }
|
|
|
-
|
|
|
- function getInstallFees() {
|
|
|
- $("#installPercent").val('');
|
|
|
- $("#installUnitFees").val('');
|
|
|
- var totalFee = $("#totalFees").val();
|
|
|
- var budFee = $("#installFees").val();
|
|
|
- var count = $("#buildingScale").val();
|
|
|
- if(totalFee != '') {
|
|
|
- var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
|
|
|
- }
|
|
|
- if(count != '') {
|
|
|
- var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
|
|
|
- }
|
|
|
- $("#installPercent").val(p);
|
|
|
- $("#installUnitFees").val(pp);
|
|
|
- }
|
|
|
-
|
|
|
- function setLinkMan(newClientId) {
|
|
|
- $.ajax({
|
|
|
- url:"${ctx}/project/projectRecords/getLinkManByClientId",
|
|
|
- data:{"clientId":newClientId},
|
|
|
- type:"post",
|
|
|
- dataType:"json",
|
|
|
- success:function (d) {
|
|
|
- // console.log(d);
|
|
|
- addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
|
|
|
- var row = workClientLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
- $("#workClientLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#workClientLinkmanList"+row+"_clientId_id").val(d.clientId);
|
|
|
- $("#workClientLinkmanList"+row+"_clientName").val(d.clientName);
|
|
|
- $("#workClientLinkmanList"+row+"_uscCode").val(d.uscCode);
|
|
|
- $("#workClientLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#workClientLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#workClientLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- $("#workClientLinkmanList"+row+"_clientName").prop("readonly","readonly");
|
|
|
- $("#workClientLinkmanList"+row+"_name").prop("readonly","readonly");
|
|
|
- $("#workClientLinkmanList"+row+"_linkMobile").prop("readonly","readonly");
|
|
|
- $("#workClientLinkmanList"+row+"_linkPhone").prop("readonly","readonly");
|
|
|
- $("#workClientLinkmanList"+row+"_uscCode").prop("readonly","readonly");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
function setValuee(obj){
|
|
|
var successRows = 0;
|
|
|
ss = $("#workClientLinkmanList tr").length;
|
|
@@ -272,94 +168,10 @@
|
|
|
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 setClientBuild(obj) {
|
|
|
- for(var i=0;i<obj.length;i++){
|
|
|
- var idArr = $("#workBuildLinkmanList tr:visible .linkmanId");
|
|
|
- if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
- addRow("#workBuildLinkmanList",workBuildLinkmanRowIdx,workBuildLinkmanTpl,obj[i]);
|
|
|
- workBuildLinkmanRowIdx=workBuildLinkmanRowIdx+1;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*监理单位*/
|
|
|
- function setClientSuper(obj) {
|
|
|
- for(var i=0;i<obj.length;i++){
|
|
|
- var idArr = $("#workSuperLinkmanList tr:visible .linkmanId");
|
|
|
- if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
- addRow("#workSuperLinkmanList",workSuperLinkmanRowIdx,workSuperLinkmanTpl,obj[i]);
|
|
|
- workSuperLinkmanRowIdx=workSuperLinkmanRowIdx+1;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- /*设计单位*/
|
|
|
- function setClientDesign(obj) {
|
|
|
- for(var i=0;i<obj.length;i++){
|
|
|
- var idArr = $("#workDesignLinkmanList tr:visible .linkmanId");
|
|
|
- if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
- addRow("#workDesignLinkmanList",workDesignLinkmanRowIdx,workDesignLinkmanTpl,obj[i]);
|
|
|
- workDesignLinkmanRowIdx=workDesignLinkmanRowIdx+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 existBuildLinkman(obj,length) {
|
|
|
- for (var i=0;i<length;i++) {
|
|
|
- var val = $('#workBuildLinkmanList'+i+'_id').val();
|
|
|
- var cid = $('#workBuildLinkmanList'+i+'_cid').val();
|
|
|
- if(obj.id==val&&obj.client.id==cid){
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- function existSuperLinkman(obj,length) {
|
|
|
- for (var i=0;i<length;i++) {
|
|
|
- var val = $('#workSuperLinkmanList'+i+'_id').val();
|
|
|
- var cid = $('#workSuperLinkmanList'+i+'_cid').val();
|
|
|
- if(obj.id==val&&obj.client.id==cid){
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
- function existDesignLinkman(obj,length) {
|
|
|
- for (var i=0;i<length;i++) {
|
|
|
- var val = $('#workDesignLinkmanList'+i+'_id').val();
|
|
|
- var cid = $('#workDesignLinkmanList'+i+'_cid').val();
|
|
|
- if(obj.id==val&&obj.client.id==cid){
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
function insertTitle(tValue){
|
|
|
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";
|
|
|
+ var attachmentFlag = "134";
|
|
|
/*console.log(file);*/
|
|
|
var timestamp=new Date().getTime();
|
|
|
|
|
@@ -376,7 +188,6 @@
|
|
|
}
|
|
|
|
|
|
function addRow(list, idx, tpl, row){
|
|
|
- // var idx1 = $("#workClientLinkmanList tr").length;
|
|
|
bornTemplete(list, idx, tpl, row, idx);
|
|
|
}
|
|
|
|
|
@@ -397,20 +208,6 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- function delRow(obj, prefix){
|
|
|
- /*var id = $(prefix+"_id");
|
|
|
- var delFlag = $(prefix+"_delFlag");
|
|
|
- $(obj).parent().parent().remove();*/
|
|
|
- var id = $(prefix+"_id");
|
|
|
- var delFlag = $(prefix+"_delFlag");
|
|
|
- const clientId = $("#contractClientId").val();
|
|
|
- if(id.val() === clientId){
|
|
|
- parent.layer.msg('主委托方不允许删除',{icon:5});
|
|
|
- return;
|
|
|
- }
|
|
|
- $(obj).parent().parent().remove();
|
|
|
- }
|
|
|
function formatNum(obj) {
|
|
|
var val = $(obj).val();
|
|
|
if(val==null||val==''|| isNaN(val))return;
|
|
@@ -424,610 +221,6 @@
|
|
|
}
|
|
|
$(obj).val(t.split("").reverse().join("") + "." + r);
|
|
|
}
|
|
|
- function openBill2(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formSubmit2($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- function formSubmit2($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) {
|
|
|
- var d = data;
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);
|
|
|
- workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
|
|
|
- var row = workClientLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
- $("#"+"workClientLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_clientId_id").val(d.clientId);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_clientName").val(d.clientName);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_uscCode").val(d.uscCode);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- /*委托类型*/
|
|
|
- function openClient(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- /*inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");*///表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/workclientinfo/workClientInfo/saveType")
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formClient($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- function formClient($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) {
|
|
|
- var d = data;
|
|
|
- //获取已有数据行数 以便于查找已有行数据id
|
|
|
- var length = document.getElementById("workClientLinkmanList");
|
|
|
- var rows = length.rows.length;
|
|
|
- var idList = [];
|
|
|
- for (var i=0;i<rows;i++){
|
|
|
- idList.push($("#workClientLinkmanList"+i+"_id").val())
|
|
|
- }
|
|
|
- for (var j=0;j<idList.length;j++){
|
|
|
- if(idList[j] == d.id){
|
|
|
- top.layer.close(index)
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);
|
|
|
- workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
|
|
|
- var row = workClientLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
- $("#"+"workClientLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_clientId_id").val(d.clientId);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_clientName").val(d.clientName);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_uscCode").val(d.uscCode);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workClientLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- /*if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }*/
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*建设类型*/
|
|
|
- function openBuild(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- /*inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");*///表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/workclientinfo/workClientInfo/saveType")
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formBuild($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- function formBuild($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) {
|
|
|
- var d = data;
|
|
|
- //获取已有数据行数 以便于查找已有行数据id
|
|
|
- var length = document.getElementById("workBuildLinkmanList");
|
|
|
- var rows = length.rows.length;
|
|
|
- var idList = [];
|
|
|
- for (var i=0;i<rows;i++){
|
|
|
- idList.push($("#workBuildLinkmanList"+i+"_id").val())
|
|
|
- }
|
|
|
- for (var j=0;j<idList.length;j++){
|
|
|
- if(idList[j] == d.id){
|
|
|
- top.layer.close(index)
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workBuildLinkmanList', workBuildLinkmanRowIdx, workBuildLinkmanTpl);
|
|
|
- workBuildLinkmanRowIdx = workBuildLinkmanRowIdx + 1;
|
|
|
- var row = workBuildLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_cid").val(d.clientId);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_cname").val(d.clientName);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_cuscCode").val(d.uscCode);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workBuildLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- /*if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }*/
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*施工类型*/
|
|
|
- function openConstruction(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- /*inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");*///表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/workclientinfo/workClientInfo/saveType");
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formConstruction($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
- function formConstruction($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) {
|
|
|
- var d = data;
|
|
|
- //获取已有数据行数 以便于查找已有行数据id
|
|
|
- var length = document.getElementById("workConstructionLinkmanList");
|
|
|
- var rows = length.rows.length;
|
|
|
- var idList = [];
|
|
|
- for (var i=0;i<rows;i++){
|
|
|
- idList.push($("#workConstructionLinkmanList"+i+"_id").val())
|
|
|
- }
|
|
|
- for (var j=0;j<idList.length;j++){
|
|
|
- if(idList[j] == d.id){
|
|
|
- top.layer.close(index)
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl);
|
|
|
- workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
|
|
|
- var row = workConstructionLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_cid").val(d.clientId);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_cname").val(d.clientName);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_cuscCode").val(d.uscCode);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workConstructionLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- /*if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }*/
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*监理类型*/
|
|
|
- function openSuper(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- /*inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");*///表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/workclientinfo/workClientInfo/saveType")
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formSuper($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- function formSuper($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) {
|
|
|
- var d = data;
|
|
|
- //获取已有数据行数 以便于查找已有行数据id
|
|
|
- var length = document.getElementById("workSuperLinkmanList");
|
|
|
- var rows = length.rows.length;
|
|
|
- var idList = [];
|
|
|
- for (var i=0;i<rows;i++){
|
|
|
- idList.push($("#workSuperLinkmanList"+i+"_id").val())
|
|
|
- }
|
|
|
- for (var j=0;j<idList.length;j++){
|
|
|
- if(idList[j] == d.id){
|
|
|
- top.layer.close(index)
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workSuperLinkmanList', workSuperLinkmanRowIdx, workSuperLinkmanTpl);
|
|
|
- workSuperLinkmanRowIdx = workSuperLinkmanRowIdx + 1;
|
|
|
- var row = workSuperLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_cid").val(d.clientId);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_cname").val(d.clientName);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_cuscCode").val(d.uscCode);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workSuperLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- /*if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }*/
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*设计类型*/
|
|
|
- function openDesign(title,url,width,height,target,formId){
|
|
|
- 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显示。
|
|
|
-
|
|
|
- }
|
|
|
- top.layer.open({
|
|
|
- type: 2,
|
|
|
- area: [width, height],
|
|
|
- title: title,
|
|
|
- skin:"two-btns",
|
|
|
- maxmin: false, //开启最大化最小化按钮
|
|
|
- content: urls ,
|
|
|
- btn: ['确定','关闭'],
|
|
|
- yes: 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中展示
|
|
|
- /*inputForm.attr("action","${ctx}/project/projectRecords/linkManSave");*///表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
- inputForm.attr("action","${ctx}/workclientinfo/workClientInfo/saveType")
|
|
|
- var $document = iframeWin.contentWindow.document;
|
|
|
-
|
|
|
- formDesign($document,formId,index);
|
|
|
-
|
|
|
- },
|
|
|
- cancel: function(index){
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- function formDesign($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) {
|
|
|
- var d = data;
|
|
|
- //获取已有数据行数 以便于查找已有行数据id
|
|
|
- var length = document.getElementById("workDesignLinkmanList");
|
|
|
- var rows = length.rows.length;
|
|
|
- var idList = [];
|
|
|
- for (var i=0;i<rows;i++){
|
|
|
- idList.push($("#workDesignLinkmanList"+i+"_id").val())
|
|
|
- }
|
|
|
- for (var j=0;j<idList.length;j++){
|
|
|
- if(idList[j] == d.id){
|
|
|
- top.layer.close(index)
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- if(d.msg == "false"){
|
|
|
- parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- addRow('#workDesignLinkmanList', workDesignLinkmanRowIdx, workDesignLinkmanTpl);
|
|
|
- workDesignLinkmanRowIdx = workDesignLinkmanRowIdx + 1;
|
|
|
- var row = workDesignLinkmanRowIdx - 1 ;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_id").val(d.id);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_cid").val(d.clientId);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_cname").val(d.clientName);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_cuscCode").val(d.uscCode);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_name").val(d.linkName);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
- $("#"+"workDesignLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
- /*if(isMasterClient){
|
|
|
- $("#contractClientName").val(d.clientName);
|
|
|
- isMasterClient = false;
|
|
|
- }*/
|
|
|
- /*parent.layer.msg(d.str,{icon:1});*/
|
|
|
- top.layer.close(index)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -1193,6 +386,69 @@
|
|
|
</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="添加附件" onclick="addFile()"><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 form-table-container">
|
|
|
+ <table id="listAttachment" class="table table-bordered table-condensed details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
+ <th width="25%">文件</th>
|
|
|
+ <th width="25%">上传人</th>
|
|
|
+ <th width="25%">上传时间</th>
|
|
|
+ <th width="150px">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="file_attachment">
|
|
|
+ <c:forEach items="${constructionContract.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
+ <tr class="trIdAdds">
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <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}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
+ </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" >
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ <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> 删除</a>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</form:form>
|
|
|
|
|
|
<%--<form id="termForm" action="#" onsubmit="return false;" method="post" class="form-horizontal">
|
|
@@ -1237,69 +493,7 @@
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
</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="添加附件" onclick="addFile()"><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 form-table-container">
|
|
|
- <table id="listAttachment" class="table table-bordered table-condensed details">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <%-- <th>序号</th>--%>
|
|
|
- <th width="25%">文件</th>
|
|
|
- <th width="25%">上传人</th>
|
|
|
- <th width="25%">上传时间</th>
|
|
|
- <th width="150px">操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="file_attachment">
|
|
|
- <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
- <tr class="trIdAdds">
|
|
|
- <%-- <td>${status.index + 1}</td>--%>
|
|
|
- <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}">
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </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" >
|
|
|
- <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- <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> 删除</a>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|