|
@@ -4,6 +4,9 @@
|
|
|
<head>
|
|
|
<title>合同归档管理</title>
|
|
|
<meta name="decorator" content="default"/>
|
|
|
+ <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
|
|
|
+ <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
|
|
|
+ <script src="${ctxStatic}/common/html/js/script.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
var validateForm;
|
|
|
function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
@@ -11,6 +14,13 @@
|
|
|
if(obj == 2){
|
|
|
$("#flag").val("no");
|
|
|
}else{
|
|
|
+ $("#contractPrice").val($("#contractPrice").val().replace(/\,/g, ""));
|
|
|
+ //$("#investmentAmount").val($("#investmentAmount").val().replace(/\,/g, ""));
|
|
|
+ // 回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
+ if($("#contractTypeDoc").val() == ""){
|
|
|
+ parent.layer.msg("请选择合同类型!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$("#flag").val("yes");
|
|
|
}
|
|
|
$("#inputForm").submit();
|
|
@@ -36,55 +46,76 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- $("#attachment_btn").click(function () {
|
|
|
- $("#attachment_file").click();
|
|
|
- });
|
|
|
+ $("#attachment_btn").click(function () {
|
|
|
+ $("#attachment_file").click();
|
|
|
+ });
|
|
|
+ if("${workContractRecord.workContractInfo.contractInformation}" == "1"){
|
|
|
+ $("#contractPrice").parent().parent().hide();
|
|
|
+ $("#contractPrice").removeClass("judgment")
|
|
|
+ $("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
|
|
|
+ $("#otherDetails").attr("class","form-control layui-input judgment")
|
|
|
+ }else{
|
|
|
+ $("#contractPrice").parent().parent().show();
|
|
|
+ $("#contractPrice").attr("class","form-control judgment number layui-input")
|
|
|
+ $("#chargeCriterionList").find("label").eq(0).html("收费标准:")
|
|
|
+ $("#otherDetails").attr("class","form-control layui-input")
|
|
|
+ }
|
|
|
+ $("#contractFee").change(function(){
|
|
|
+ //状态为其他的时候 添加required样式
|
|
|
+ if($(this).val() == "4"){
|
|
|
+ $("#contractFeeDoc").attr("class","form-control judgment");
|
|
|
+ }else{
|
|
|
+ $("#contractFeeDoc").attr("class","form-control");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $("#contractType").attr("class","form-control judgment");
|
|
|
|
|
|
- // laydate.render({
|
|
|
- // elem: '#createDate',
|
|
|
- // event: 'focus',
|
|
|
- // type : 'date'
|
|
|
- //, trigger: 'click'
|
|
|
- // });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#contractDate',
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#effectiveDate',
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#closingDate',
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem: '#createDate',
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date'
|
|
|
+ , trigger: 'click'
|
|
|
+ });
|
|
|
});
|
|
|
function insertTitle(tValue){
|
|
|
var list = "${workContractRecord.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 = "85";
|
|
|
+ var attachmentFlag = "44";
|
|
|
console.log(file);
|
|
|
var timestamp=new Date().getTime();
|
|
|
|
|
|
- var storeAs = "workContractRd";
|
|
|
+ var storeAs = "workContractInfo";
|
|
|
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 setValue(obj){
|
|
|
- $.ajax({
|
|
|
- type:'post',
|
|
|
- url:'${ctx}/workcontractrecord/workContractRecord/getPNumberr',
|
|
|
- data:{
|
|
|
- "obj":obj
|
|
|
- },
|
|
|
- success:function(data){
|
|
|
- var d = JSON.parse(data);
|
|
|
- $("#recordNum").val(d.recordNum);
|
|
|
- $("#contractNum").val(d.contractNum);
|
|
|
- $("#cName").val(d.cName);
|
|
|
- $("#contractType").val(d.contractType);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body >
|
|
|
<div class="single-form">
|
|
|
<div class="container">
|
|
|
- <form:form id="inputForm" modelAttribute="workContractRecord" action="${ctx}/workcontractrecord/workContractRecord/saveAudit" method="post" class="form-horizontal">
|
|
|
+ <form:form id="inputForm" modelAttribute="workContractRecord" action="${ctx}/workcontractrecord/workContractRecord/saveAudit" method="post" class="form-horizontal layui-form">
|
|
|
<form:hidden path="id"/>
|
|
|
<form:hidden path="workContractInfo.id"/>
|
|
|
<form:hidden path="home"/>
|
|
@@ -94,75 +125,120 @@
|
|
|
<form:hidden path="act.procInsId"/>
|
|
|
<form:hidden path="act.procDefId"/>
|
|
|
<form:hidden id="flag" path="act.flag"/>
|
|
|
+ <input type="hidden" id="ext" name="ext" value="1">
|
|
|
+ <input type="hidden" id="chargeCriterionH" value="${workContractRecord.workContractInfo.chargeCriterion}">
|
|
|
<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">客户名称:</label>
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>客户名称:</label>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <sys:gridselectclien1 url="${ctx}/workcontractinfo/workContractInfo/selectclientAhref" id="client" name="workContractInfo.client.id" value="${workContractRecord.workContractInfo.client.id}" title="选择客户" labelName="workContractInfo.client.name"
|
|
|
+ cssStyle="background-color:#fff" labelValue="${workContractRecord.workContractInfo.client.name}" cssClass="form-control layui-input judgment" fieldLabels="客户名称" fieldKeys="name" searchLabel="客户名称" searchKey="name" searchLabel1="联系人" searchKey1="workLinkName"></sys:gridselectclien1>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input id="cName" path="workContractInfo.client.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <form:input path="workContractInfo.name" htmlEscape="false" placeholder="请输入合同名称" class="form-control judgment layui-input"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">合同名称:</label>
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>签订日期:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input id="workContractInfoName" path="workContractInfo.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <input placeholder="请选择签订日期" style="background-color: #fff" class="laydate-icondate layui-input form-control layer-date laydate-icon judgment" readonly="readonly" id="contractDate" name="workContractInfo.contractDate" value="<fmt:formatDate value="${workContractRecord.workContractInfo.contractDate}" pattern="yyyy-MM-dd"/>">
|
|
|
</div>
|
|
|
</div>
|
|
|
- <%--<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">归档申请编号:</label>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">合同生效日期:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <div class="input-group">
|
|
|
- <form:input id="recordNum" path="recordNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
- <span class="input-group-btn">
|
|
|
- <label class="form-status"><c:choose><c:when test="${ empty workContractRecord.status}">新添</c:when><c:otherwise>${fns:getDictLabel(workContractRecord.status, 'audit_state','')}</c:otherwise> </c:choose></label>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
+ <input placeholder="请选择合同生效日期" style="background-color: #fff" class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="readonly" id="effectiveDate" name="workContractInfo.effectiveDate" value="<fmt:formatDate value="${workContractRecord.workContractInfo.effectiveDate}" pattern="yyyy-MM-dd"/>">
|
|
|
</div>
|
|
|
- </div>--%>
|
|
|
+ </div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">合同编号:</label>
|
|
|
+ <label class="layui-form-label">合同终止日期:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input id="contractNum" path="workContractInfo.contractNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <input placeholder="请输入合同终止日期" style="background-color: #fff" class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="readonly" id="closingDate" name="workContractInfo.closingDate" value="<fmt:formatDate value="${workContractRecord.workContractInfo.closingDate}" pattern="yyyy-MM-dd"/>">
|
|
|
</div>
|
|
|
</div>
|
|
|
- <%--<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">工程分类:</label>
|
|
|
+ <div class="layui-item layui-col-sm6 ">
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>合同类型:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <%–<form:select id="contractType" path="workContractInfo.contractType" disabled="true" class="form-control simple-select required">
|
|
|
+ <form:select path="workContractInfo.contractTypeDoc" id="contractTypeDoc" cssClass="form-control judgment simple-select">
|
|
|
<form:option value="" label=""/>
|
|
|
- <form:options items="${fns:getMainDictList('contract_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
- </form:select>–%>
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(workContractRecord.workContractInfo.contractType, 'contract_type', '')}"/>
|
|
|
+ <form:options items="${fns:getMainDictList('contract_info_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
+ </form:select>
|
|
|
</div>
|
|
|
- </div>--%>
|
|
|
+ </div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">归档人:</label>
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>合同金额类别:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <input type="radio" title="金额合同" lay-filter="jine" name="workContractInfo.contractInformation" checked id="jine" value="0" <c:if test="${workContractRecord.workContractInfo.contractInformation=='0'}">checked</c:if>>
|
|
|
+ <input type="radio" title="框架合同" lay-filter="jine" name="workContractInfo.contractInformation" id="jine1" value="1" <c:if test="${workContractRecord.workContractInfo.contractInformation=='1'}">checked</c:if>>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">归档日期:</label>
|
|
|
+ <label class="layui-form-label double-line"><span class="require-item">*</span>合同金额 (元)<br/>预计金额:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <input id="createDate" name="createDate" htmlEscape="false" readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${workContractRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
|
|
|
- <%--<input class="laydate-icondate form-control layui-input layer-date laydate-icon" id="createDate" name="createDate" value="<fmt:formatDate value="${workContractRecord.createDate}" pattern="yyyy-MM-dd"/>">--%>
|
|
|
+ <form:input path="workContractInfo.contractPrice" id="contractPrice" htmlEscape="false" placeholder="请输入合同金额/预计金额" pattern="#.00" class="form-control judgment number layui-input"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <%--<div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">案卷号:</label>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">对方合同编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input path="workContractInfo.anotherContractNum" placeholder="请输入对方合同编号" htmlEscape="false" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12" id="chargeCriterionList" >
|
|
|
+ <label class="layui-form-label">收费标准:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="fileNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ <form:checkboxes path="workContractInfo.chargeCriterionList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="label" htmlEscape="true" items="${fns:getMainDictList('charge_criterion')}" />
|
|
|
</div>
|
|
|
- </div>--%>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="layui-item layui-col-sm12">
|
|
|
+ <label class="layui-form-label "><!--其他详情:--></label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input placeholder="请选择收费标准" path="workContractInfo.otherDetails" id="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12 with-textarea">
|
|
|
+ <label class="layui-form-label ">合同特别条款:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:textarea placeholder="请输入合同特别条款" path="workContractInfo.contractSpecial" htmlEscape="false" rows="4" maxlength="1000" class="form-control "/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm12 with-textarea">
|
|
|
+ <label class="layui-form-label ">合同备注:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:textarea path="workContractInfo.remarks" placeholder="请输入备注" id="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">合同编号:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input id="contractNum" path="workContractInfo.contractNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item layui-col-sm6">
|
|
|
+ <label class="layui-form-label">归档人:</label>
|
|
|
+ <div class="layui-input-block">
|
|
|
+ <form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="layui-item layui-col-sm12 with-textarea">
|
|
|
<label class="layui-form-label">说明:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:textarea placeholder="请输入说明:" path="instruction" htmlEscape="false" rows="4" class="form-control "/>
|
|
|
+ <form:textarea placeholder="请输入说明" path="instruction" htmlEscape="false" rows="4" class="form-control "/>
|
|
|
</div>
|
|
|
</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 nav-btns">
|
|
|
<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
</div>
|
|
@@ -284,5 +360,39 @@
|
|
|
</form:form>
|
|
|
</div>
|
|
|
</div>
|
|
|
+<script>
|
|
|
+ layui.use('form', function () {
|
|
|
+ var form = layui.form;
|
|
|
+ form.render();
|
|
|
+ var zhi=$("#otherDetails").val();
|
|
|
+ //复选框监听器
|
|
|
+ form.on('checkbox(chargeCriterionList)', function(data){
|
|
|
+ var ids = [];
|
|
|
+
|
|
|
+ $("input[name='chargeCriterionList']:checked").each(function(i){
|
|
|
+ ids.push($(this).val());
|
|
|
+ })
|
|
|
+ if ($(this).prop("checked")==true){
|
|
|
+ zhi+=$(this).val()+";"
|
|
|
+ }
|
|
|
+ $("#otherDetails").val(zhi);
|
|
|
+ });
|
|
|
+ layui.form.on('radio(jine)', function(data){
|
|
|
+ var span=data.value;
|
|
|
+ if(span==1){
|
|
|
+ $("#contractPrice").parent().parent().hide();
|
|
|
+ $("#contractPrice").removeClass("judgment")
|
|
|
+ $("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
|
|
|
+ $("#otherDetails").attr("class","form-control layui-input judgment")
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $("#contractPrice").parent().parent().show();
|
|
|
+ $("#contractPrice").attr("class","form-control judgment number layui-input")
|
|
|
+ $("#chargeCriterionList").find("label").eq(0).html("收费标准:")
|
|
|
+ $("#otherDetails").attr("class","form-control layui-input")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+</script>
|
|
|
</body>
|
|
|
-</html>
|
|
|
+</html>
|