|
@@ -32,6 +32,8 @@
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
+ var radioVal ;
|
|
|
|
+
|
|
validateForm = $("#inputForm").validate({
|
|
validateForm = $("#inputForm").validate({
|
|
submitHandler: function(form){
|
|
submitHandler: function(form){
|
|
loading('正在提交,请稍等...');
|
|
loading('正在提交,请稍等...');
|
|
@@ -56,6 +58,35 @@
|
|
effects: 'slide'
|
|
effects: 'slide'
|
|
});
|
|
});
|
|
$('#scaleUnit').val("${projectRecordsAlter.scaleUnit}")
|
|
$('#scaleUnit').val("${projectRecordsAlter.scaleUnit}")
|
|
|
|
+
|
|
|
|
+ var contractName = $("#contractName").val();
|
|
|
|
+ if (contractName == null || contractName === "") {
|
|
|
|
+ $("#div1").hide();
|
|
|
|
+ $("#div3").hide();
|
|
|
|
+ $("#ext1").iCheck("check");
|
|
|
|
+ } else {
|
|
|
|
+ $("#ext").iCheck("check");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $("input[name='ext']").on('ifChecked',function(event){
|
|
|
|
+ radioVal = $(this).val();
|
|
|
|
+ if(radioVal == 0){
|
|
|
|
+ //有合同状态
|
|
|
|
+ $("#div2 input").val("");
|
|
|
|
+ // $("#workClientLinkmanList tr").remove();
|
|
|
|
+ $("#div1").show();
|
|
|
|
+ $("#div3").show();
|
|
|
|
+ }else{
|
|
|
|
+ $("#div1 input").val('');
|
|
|
|
+ $("#div2 input").val("");
|
|
|
|
+ $("#div3 input").val("");
|
|
|
|
+ // $("#workClientLinkmanList tr").remove();
|
|
|
|
+ $("#div1").hide();
|
|
|
|
+ $("#div3").hide();
|
|
|
|
+ $("#linkmanId").val("");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
function setContractValue(obj){
|
|
function setContractValue(obj){
|
|
@@ -74,12 +105,39 @@
|
|
$("#contractClientId").val(data.client.id);
|
|
$("#contractClientId").val(data.client.id);
|
|
$("#constructionProjectType").val(data.constructionProjectTypeStr);
|
|
$("#constructionProjectType").val(data.constructionProjectTypeStr);
|
|
$("#linkmanId").val(data.workClinetInfoIds);
|
|
$("#linkmanId").val(data.workClinetInfoIds);
|
|
|
|
+
|
|
|
|
+ var newClientId = data.client.id;
|
|
|
|
+ if (clientId != newClientId){
|
|
|
|
+ $("#workClientLinkmanList tr").remove();
|
|
|
|
+ setLinkMan(newClientId);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- var newClientId =$("#contractClientId").val();
|
|
|
|
- if (clientId != newClientId){
|
|
|
|
- $("#workClientLinkmanList tr").remove();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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+"_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");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
function setValuee(obj){
|
|
function setValuee(obj){
|
|
@@ -204,36 +262,72 @@
|
|
<form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
|
|
<form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
|
|
|
|
|
|
<div class="form-group layui-row first">
|
|
<div class="form-group layui-row first">
|
|
- <div class="form-group-label"><h2>项目合同信息</h2></div>
|
|
|
|
- <div class="layui-item layui-col-sm12 lw7">
|
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
|
|
|
|
- <div class="layui-input-block with-icon">
|
|
|
|
- <sys:gridselectContract url="${ctx}/workengineeringproject/workEngineeringProject/selectcontractId" type="" isTotal="1" id="contractId" name="workContractInfo.id" value="${projectRecordsAlter.workContractInfo.id}" title="选择合同" labelName="workContractInfo.name"
|
|
|
|
- labelValue="${projectRecordsAlter.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
- <label class="layui-form-label">合同名称:</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <input htmlEscape="false" readonly="true" id="contractName" class="form-control layui-input" value="${projectRecordsAlter.workContractInfo.name}"/>
|
|
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <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">
|
|
|
|
+ <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
|
|
|
|
+ <label for="ext">有合同</label>
|
|
|
|
+ <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
|
|
|
|
+ <label for="ext1">无合同</label>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
- <label class="layui-form-label double-line">合同金额(元):</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <input path="projectMasterName" htmlEscape="false" readonly="true" id="contractPrice" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecordsAlter.workContractInfo.contractPrice}" pattern="#,##0.00#"/>" onchange="formatNum(this);"/>
|
|
|
|
|
|
+
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div id="div1">
|
|
|
|
+ <div class="layui-item layui-col-sm12 lw7">
|
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
|
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
|
+ <sys:gridselectContract
|
|
|
|
+ url="${ctx}/workengineeringproject/workEngineeringProject/selectcontractId"
|
|
|
|
+ type="" isTotal="1" id="contractId" name="workContractInfo.id"
|
|
|
|
+ value="${projectRecordsAlter.workContractInfo.id}" title="选择合同"
|
|
|
|
+ labelName="workContractInfo.name"
|
|
|
|
+ labelValue="${projectRecordsAlter.workContractInfo.name}"
|
|
|
|
+ cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name"
|
|
|
|
+ searchLabel="合同名称" searchKey="name"></sys:gridselectContract>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
+ <label class="layui-form-label">合同名称:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input htmlEscape="false" readonly="true" id="contractName"
|
|
|
|
+ class="form-control layui-input"
|
|
|
|
+ value="${projectRecordsAlter.workContractInfo.name}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
+ <label class="layui-form-label double-line">合同金额(元):</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input path="projectMasterName" htmlEscape="false" readonly="true" id="contractPrice"
|
|
|
|
+ class="form-control layui-input"
|
|
|
|
+ value="<fmt:formatNumber value="${projectRecordsAlter.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"
|
|
|
|
+ onchange="formatNum(this);"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
- <label class="layui-form-label">主委托方:</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <input path="projectMasterName" htmlEscape="false" readonly="true" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${projectRecordsAlter.workContractInfo.client.name}"/>
|
|
|
|
|
|
+ <div id="div2">
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
+ <label class="layui-form-label">主委托方:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input path="projectMasterName" htmlEscape="false" readonly="true"
|
|
|
|
+ id="contractClientName" name="workContractInfo.client.name"
|
|
|
|
+ class="form-control layui-input"
|
|
|
|
+ value="${projectRecordsAlter.workContractInfo.client.name}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
- <label class="layui-form-label">工程分类:</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <input path="projectMasterName" htmlEscape="false" readonly="true" id="constructionProjectType" class="form-control layui-input" value="${projectRecordsAlter.workContractInfo.constructionProjectTypeStr}"/>
|
|
|
|
|
|
+ <div id="div3">
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
+ <label class="layui-form-label">工程分类:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <input path="projectMasterName" htmlEscape="false" readonly="true"
|
|
|
|
+ id="constructionProjectType" class="form-control layui-input"
|
|
|
|
+ value="${projectRecordsAlter.workContractInfo.constructionProjectTypeStr}"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -355,30 +449,30 @@
|
|
<tbody id="workClientLinkmanList">
|
|
<tbody id="workClientLinkmanList">
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
-
|
|
|
|
<script type="text/template" id="workClientLinkmanTpl">//<!--
|
|
<script type="text/template" id="workClientLinkmanTpl">//<!--
|
|
- <tr id="workClientLinkmanList{{idx}}">
|
|
|
|
- <td class="hide">
|
|
|
|
- <input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
|
|
|
|
- <input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- <input id="workClientLinkmanList{{idx}}_cid" name = "workClientLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
|
|
|
|
- {{row.clientId.name}}
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- {{row.name}}
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- {{row.linkPhone}}
|
|
|
|
- </td>
|
|
|
|
- <td>
|
|
|
|
- {{row.linkMobile}}
|
|
|
|
- </td>
|
|
|
|
- <td class="op-td">
|
|
|
|
- {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i> 删除</span>{{/delBtn}}
|
|
|
|
- </td>
|
|
|
|
- </tr>//-->
|
|
|
|
|
|
+ <tr id="workClientLinkmanList{{idx}}">
|
|
|
|
+ <td class="hide">
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_clientId_id" name="workClientLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_clientName" name="workClientLinkmanList[{{idx}}].clientId.name" type="text" value="{{row.clientId.name}}" readonly="true" class="form-control required"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_name" name="workClientLinkmanList[{{idx}}].name" type="text" value="{{row.name}}" readonly="true" class="form-control required"/>
|
|
|
|
+ </td>
|
|
|
|
+
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_linkPhone" name="workClientLinkmanList[{{idx}}].linkPhone" type="text" value="{{row.linkPhone}}" readonly="true" class="form-control isTel"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td>
|
|
|
|
+ <input id="workClientLinkmanList{{idx}}_linkMobile" name="workClientLinkmanList[{{idx}}].linkMobile" type="text" value="{{row.linkMobile}}" readonly="true" class="form-control isPhone"/>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-center op-td" >
|
|
|
|
+ {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>{{/delBtn}}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>//-->
|
|
</script>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|