|
@@ -385,6 +385,44 @@
|
|
|
});
|
|
|
|
|
|
}
|
|
|
+ function openDialogreplay(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,
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
+ skin: 'two-btns',
|
|
|
+ content: url ,
|
|
|
+ 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中展示
|
|
|
+
|
|
|
+ if(iframeWin.contentWindow.doSubmit() ){
|
|
|
+ top.layer.close(index);//关闭对话框。
|
|
|
+ //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
<style>
|
|
|
body{
|
|
@@ -400,7 +438,7 @@
|
|
|
<div class="wrapper wrapper-content">
|
|
|
<sys:message content="${message}"/>
|
|
|
<div class="layui-row">
|
|
|
- <div class="full-width fl">
|
|
|
+ <%--<div class="full-width fl">
|
|
|
<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
|
|
|
<ul class="list-tabs" >
|
|
|
<li class="active"><a href="${ctx}/workcontractinfo/workContractInfo/list">合同管理</a></li>
|
|
@@ -410,7 +448,7 @@
|
|
|
<li><a href="${ctx}/workcontractrecord/workContractRecord/list">合同归档</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>--%>
|
|
|
<div class="full-width fl">
|
|
|
<div class="layui-row contentShadow shadowLR" id="queryDiv">
|
|
|
<form:form id="searchForm" modelAttribute="workContractInfo" action="${ctx}/workcontractinfo/workContractInfo/list" method="post" class="form-inline">
|
|
@@ -527,6 +565,9 @@
|
|
|
,{field:'contractName',align:'center', title: '合同名称',minWidth:200,templet:function(d){
|
|
|
return "<a class=\"attention-info\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同管理', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.id + "','95%', '95%')\">" + d.contractName + "</a>";
|
|
|
}}
|
|
|
+ ,{field:'recordNum',align:'center', title: '归档编号',minWidth:200,templet:function(d){
|
|
|
+ return "<a class=\"attention-info\" title=\""+d.recordNum+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同归档信息', '${ctx}/workcontractrecord/workContractRecord/form?id=" + d.contrractRecordId + "&tabId=1','95%', '95%')\">" + d.recordNum + "</a>";
|
|
|
+ }}
|
|
|
,{field:'clientName',align:'center', title: '客户名称',minWidth:160,templet:function(d){
|
|
|
return "<a class=\"attention-info\" title=\""+d.clientName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看客户管理', '${ctx}/workclientinfo/workClientInfo/detail?id=" + d.clientId +"','95%', '95%')\">" + d.clientName + "</a>";
|
|
|
}}
|
|
@@ -551,57 +592,89 @@
|
|
|
var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
|
|
|
return xml;
|
|
|
}}
|
|
|
+ ,{align:'center', title: '归档状态', width:70,templet:function(d){
|
|
|
+ var st = getRuralProjectArchiveState(d.contrractRecordStatus);
|
|
|
+ if(st.action)
|
|
|
+ var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.contrractRecordId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
|
|
|
+ else
|
|
|
+ var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
|
|
|
+ return xml;
|
|
|
+ }}
|
|
|
+ ,{align:'center', title: '借用状态', width:70,templet:function(d){
|
|
|
+ var st = getBorrowState(d.status);
|
|
|
+ if(st.action)
|
|
|
+ var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractinfo/workContractInfo/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
|
|
|
+ else
|
|
|
+ var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
|
|
|
+ return xml;
|
|
|
+ }}
|
|
|
,{align:'center',title:"操作",minWidth:180,templet:function(d){
|
|
|
////对操作进行初始化
|
|
|
var xml="";
|
|
|
- if(d.signature != undefined && d.signature =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('签章申请', '${ctx}/workcontractsignature/workContractSignature/form?id="+ d.id +"&tbal=1','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 签章</a>";
|
|
|
- }
|
|
|
- if(d.back != undefined && d.back =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('归档申请', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.id +"&tabId=4','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 归档</a>";
|
|
|
- }
|
|
|
- if(d.canalter != undefined && d.canalter =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更合同管理', '${ctx}/workcontractinfo/workContractInfo/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
|
|
|
+
|
|
|
+ if(d.status != 5){
|
|
|
+ /*if(d.signature != undefined && d.signature =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('签章申请', '${ctx}/workcontractsignature/workContractSignature/form?id="+ d.id +"&tbal=1','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 签章</a>";
|
|
|
+ }*/
|
|
|
+
|
|
|
+ /*if(d.canalter != undefined && d.canalter =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更合同管理', '${ctx}/workcontractinfo/workContractInfo/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
|
|
|
}
|
|
|
if(d.caninvalid != undefined && d.caninvalid =="1")
|
|
|
{
|
|
|
xml += "<a href=\"javascript:void(0)\" onclick=\"contractInvalidateForm('合同作废送审', '${ctx}/workcontractinfo/workContractInfo/contractInvalidateForm?id=" + d.id + "&dialog=invalidateReasonForm','95%','95%')\" class=\"op-btn op-btn-invalid\"><i class=\"fa fa-trash-o\"></i> 作废</a>";
|
|
|
- }
|
|
|
- if(d.canedit != undefined && d.canedit =="1")
|
|
|
- {
|
|
|
- xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
- }
|
|
|
- if(d.canedits != undefined && d.canedits =="1")
|
|
|
- {
|
|
|
- xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
- }
|
|
|
- if(d.candelete != undefined && d.candelete =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同记录吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
|
|
|
- }
|
|
|
- if(d.cancancel != undefined && d.cancancel =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revoke?id="+ d.id +"&processInstanceId="+ d.processInstanceId +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ if(d.canedit != undefined && d.canedit =="1")
|
|
|
+ {
|
|
|
+ xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
+ }
|
|
|
+ if(d.canedits != undefined && d.canedits =="1")
|
|
|
+ {
|
|
|
+ xml +="<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('修改合同管理', '${ctx}/workcontractinfo/workContractInfo/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
+ }
|
|
|
+ if(d.candelete != undefined && d.candelete =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同记录吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
|
|
|
+ }
|
|
|
+ if(d.cancancel != undefined && d.cancancel =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revoke?id="+ d.id +"&processInstanceId="+ d.processInstanceId +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
|
|
|
+ }
|
|
|
|
|
|
- if(d.canalterCom != undefined && d.canalterCom =="1")
|
|
|
- {
|
|
|
- <shiro:hasPermission name="workcontractinfo:workContractInfo:contractPrice">
|
|
|
+ if(d.canalterCom != undefined && d.canalterCom =="1")
|
|
|
+ {
|
|
|
+ <shiro:hasPermission name="workcontractinfo:workContractInfo:contractPrice">
|
|
|
xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\" class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";
|
|
|
- </shiro:hasPermission>
|
|
|
- }
|
|
|
- if(d.canalterComRevoke != undefined && d.canalterComRevoke =="1")
|
|
|
- {
|
|
|
- xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revokeCompletion?id="+ d.id +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
|
|
|
- }
|
|
|
- if(d.canalterComDel != undefined && d.canalterComDel =="1")
|
|
|
- {
|
|
|
- <%--/* xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\" class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";*/--%>
|
|
|
- xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/deleteCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同完成吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
|
|
|
- }
|
|
|
+ </shiro:hasPermission>
|
|
|
+ }
|
|
|
+ if(d.canalterComRevoke != undefined && d.canalterComRevoke =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/revokeCompletion?id="+ d.id +"\" onclick=\"return confirmx('确认要撤回该合同管理吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
|
|
|
+ }
|
|
|
+ if(d.canalterComDel != undefined && d.canalterComDel =="1")
|
|
|
+ {
|
|
|
+ <%--/* xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/saveCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要发起合同完成吗?', this.href)\" class=\"op-btn op-btn-revert\"><i class=\"fa fa-edit\"></i> 完成</a>";*/--%>
|
|
|
+ xml += "<a href=\"${ctx}/workcontractinfo/workContractInfo/deleteCompletion?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该合同完成吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
|
|
|
+ }
|
|
|
+ } else if(d.contrractRecordStatus !="5"){
|
|
|
+ if(d.back != undefined && d.back =="1")
|
|
|
+ {
|
|
|
+ xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogres('归档申请', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.id +"&tabId=4','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 归档</a>";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(d.cancancelRecord != undefined && d.cancancelRecord == "1")
|
|
|
+ xml += "<a href=\"${ctx}/workcontractrecord/workContractRecord/cancelInvalidate?id=" + d.contrractRecordId + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\" class=\"op-btn op-btn-cancel\"><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
|
|
|
+ if(d.caneditRecord1 != undefined && d.caneditRecord1 == "1")
|
|
|
+ xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改归档信息', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.contrractRecordId + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
+ if(d.caneditRecord2 != undefined && d.caneditRecord2 == "1")
|
|
|
+ xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('修改归档信息', '${ctx}/workcontractrecord/workContractRecord/form?id="+ d.contrractRecordId + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
+ if(d.caneditRecord3 != undefined && d.caneditRecord3 == "1")
|
|
|
+ xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请归档', '${ctx}/workcontractrecord/workContractRecord/form?id=" + d.contrractRecordId + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
|
|
|
+ if(d.candeleteRecord != undefined && d.candeleteRecord == "1")
|
|
|
+ xml +="<a href=\"${ctx}/workcontractrecord/workContractRecord/delete?id=" + d.contrractRecordId + "\" onclick=\"return confirmx('确认要删除该合同归档申请吗?', this.href)\" class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
|
|
|
+ }
|
|
|
|
|
|
return xml;
|
|
|
|
|
@@ -624,10 +697,14 @@
|
|
|
,"signDate":"<fmt:formatDate value="${workContractInfo.contractDate}" pattern="yyyy-MM-dd"/>"
|
|
|
,"createBy":"${workContractInfo.createName}"
|
|
|
,"status":"${workContractInfo.contractState}"
|
|
|
- <c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id && workContractInfo.signatureStatus == 1 }">,"signature":"1"</c:if>/*签章*/
|
|
|
- <c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"canalter":"1"</c:if>/*变更*/
|
|
|
- <c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"caninvalid":"1"</c:if>/*作废*/
|
|
|
- <c:if test="${(workContractInfo.contractState == 5 ||workContractInfo.contractState == 7)&& workContractInfo.recordState != 3 && workContractInfo.signatureStatus == 2 && fns:getUser().id == workContractInfo.createBy.id}">,"back":"1"</c:if>
|
|
|
+ ,"contrractRecordStatus":"${workContractInfo.contrractRecordStatus}"
|
|
|
+ ,"contrractRecordId":"${workContractInfo.contrractRecordId}"
|
|
|
+ ,"recordNum":"${workContractInfo.recordNum}"
|
|
|
+ <%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id && workContractInfo.signatureStatus == 1 }">,"signature":"1"</c:if>/*签章*/--%>
|
|
|
+ <%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"canalter":"1"</c:if>/*变更*/--%>
|
|
|
+ <%--<c:if test="${workContractInfo.contractState == 5 && fns:getUser().id == workContractInfo.createBy.id}">,"caninvalid":"1"</c:if>/*作废*/--%>
|
|
|
+ <%--<c:if test="${(workContractInfo.contractState == 5 ||workContractInfo.contractState == 7)&& workContractInfo.recordState != 3 && workContractInfo.signatureStatus == 2 && fns:getUser().id == workContractInfo.createBy.id}">,"back":"1"</c:if>--%>
|
|
|
+ <c:if test="${workContractInfo.contractState == 5 && workContractInfo.contrractRecordStatus == 0 && fns:getUser().id == workContractInfo.createBy.id}">,"back":"1"</c:if>
|
|
|
<c:if test="${(workContractInfo.contractState == 1) && fns:getUser().id == workContractInfo.createBy.id}">,"canedit":"1"</c:if>
|
|
|
<c:if test="${(workContractInfo.contractState == 3 or workContractInfo.contractState == 4) && fns:getUser().id == workContractInfo.createBy.id}">,"canedits":"1"</c:if>
|
|
|
<c:if test="${(workContractInfo.contractState == 3 or workContractInfo.contractState == 1 or workContractInfo.contractState == 4)&& ( workContractInfo.createBy.id == fns:getUser().id or flag == true )}">,"candelete":"1"</c:if>
|
|
@@ -636,6 +713,21 @@
|
|
|
<c:if test="${workContractInfo.contractState == 9 && fns:getUser().id eq workContractInfo.createBy.id && workContractInfo.completionStatus == 2 }">,"canalterComRevoke":"1"</c:if>
|
|
|
<c:if test="${workContractInfo.contractState == 9 && fns:getUser().id eq workContractInfo.createBy.id && (workContractInfo.completionStatus == 3 ||workContractInfo.completionStatus == 4) }">,"canalterComDel":"1"</c:if>
|
|
|
|
|
|
+ <c:if test="${fns:getUser().id == workContractInfo.createBy.id}">
|
|
|
+ <c:if test="${workContractInfo.contrractRecordStatus == '2' }">,"cancancelRecord":"1"</c:if>
|
|
|
+ <shiro:hasPermission name="workcontractrecord:workContractRecord:edit">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${workContractInfo.contrractRecordStatus == '1' }">,"caneditRecord1":"1"</c:when>
|
|
|
+ <c:when test="${workContractInfo.contrractRecordStatus == '4'}">,"caneditRecord2":"1"</c:when>
|
|
|
+ <c:when test="${workContractInfo.contrractRecordStatus == '3'}">,"caneditRecord3":"1"</c:when>
|
|
|
+ </c:choose>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ <shiro:hasPermission name="workcontractrecord:workContractRecord:del">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${(workContractInfo.contrractRecordStatus == '1' or workContractInfo.contrractRecordStatus == '3' or workContractInfo.contrractRecordStatus == '4')}">,"candeleteRecord":"1"</c:when>
|
|
|
+ </c:choose>
|
|
|
+ </shiro:hasPermission>
|
|
|
+ </c:if>
|
|
|
}
|
|
|
</c:forEach>
|
|
|
</c:if>
|