|
@@ -41,75 +41,85 @@
|
|
|
var clientCount = 0;
|
|
|
function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
if(validateForm.form()){
|
|
|
- //咨询标的额
|
|
|
- var ZiXunBDE = $("#ZiXunBDE").val();
|
|
|
- if(ZiXunBDE!= undefined && ZiXunBDE!= '' && ZiXunBDE>=500){
|
|
|
- //人工工日用量
|
|
|
- var RGGRYL = $("#RGGRYL").val();
|
|
|
- var GCGMValue = $("#GCGMValue").val();
|
|
|
- if(RGGRYL== undefined || RGGRYL== null || RGGRYL == '' || RGGRYL == 0){
|
|
|
- parent.layer.msg("咨询标的额大于500万,请填写人工工日用量!", {icon: 5});
|
|
|
+
|
|
|
+ if(obj == 1){
|
|
|
+ $('#flag').val('yes');
|
|
|
+
|
|
|
+ //咨询标的额
|
|
|
+ var ZiXunBDE = $("#ZiXunBDE").val();
|
|
|
+ if(ZiXunBDE!= undefined && ZiXunBDE!= '' && ZiXunBDE>=500){
|
|
|
+ //人工工日用量
|
|
|
+ var RGGRYL = $("#RGGRYL").val();
|
|
|
+ var GCGMValue = $("#GCGMValue").val();
|
|
|
+ if(RGGRYL== undefined || RGGRYL== null || RGGRYL == '' || RGGRYL == 0){
|
|
|
+ parent.layer.msg("咨询标的额大于500万,请填写人工工日用量!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(GCGMValue== undefined || GCGMValue== null || GCGMValue == '' || GCGMValue == 0){
|
|
|
+ parent.layer.msg("咨询标的额大于500万,建筑面积回魔必须大于0!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //咨询营业收入
|
|
|
+ var ZiXunShouRu = $("#ZiXunShouRu").val();
|
|
|
+ //审定价
|
|
|
+ var ShenDingJia = $("#ShenDingJia").val();
|
|
|
+ if(parseFloat(ZiXunShouRu) >= parseFloat(ShenDingJia)){
|
|
|
+ parent.layer.msg("咨询营业收入金额应小于审定价!", {icon: 5});
|
|
|
return false;
|
|
|
}
|
|
|
- if(GCGMValue== undefined || GCGMValue== null || GCGMValue == '' || GCGMValue == 0){
|
|
|
- parent.layer.msg("咨询标的额大于500万,建筑面积回魔必须大于0!", {icon: 5});
|
|
|
+ var list = [];
|
|
|
+ var size = $("#reportedConsultantList tr").length;
|
|
|
+ if(size>20){
|
|
|
+ parent.layer.msg("咨询员数量不得超过20人!", {icon: 5});
|
|
|
return false;
|
|
|
}
|
|
|
- }
|
|
|
- //咨询营业收入
|
|
|
- var ZiXunShouRu = $("#ZiXunShouRu").val();
|
|
|
- //审定价
|
|
|
- var ShenDingJia = $("#ShenDingJia").val();
|
|
|
- if(parseFloat(ZiXunShouRu) >= parseFloat(ShenDingJia)){
|
|
|
- parent.layer.msg("咨询营业收入金额应小于审定价!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
- var list = [];
|
|
|
- var size = $("#reportedConsultantList tr").length;
|
|
|
- if(size>20){
|
|
|
- parent.layer.msg("咨询员数量不得超过20人!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
- if(size>0){
|
|
|
- for (var i = 1;i<=50;i++){
|
|
|
- var zixunyuan = $("#reportedConsultantList"+i+"_zixunyuanId").val();
|
|
|
- if(zixunyuan!=undefined && zixunyuan != null && zixunyuan !=''){
|
|
|
- list.push(zixunyuan);
|
|
|
+ if(size>0){
|
|
|
+ for (var i = 1;i<=50;i++){
|
|
|
+ var zixunyuan = $("#reportedConsultantList"+i+"_zixunyuanId").val();
|
|
|
+ if(zixunyuan!=undefined && zixunyuan != null && zixunyuan !=''){
|
|
|
+ list.push(zixunyuan);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- var nary = list.sort();
|
|
|
- for(var i = 0; i < nary.length - 1; i++) {
|
|
|
- if(nary[i] == nary[i + 1]) {
|
|
|
- parent.layer.msg("咨询员重复,请重新选择!", {icon: 5});
|
|
|
- return false;
|
|
|
+ var nary = list.sort();
|
|
|
+ for(var i = 0; i < nary.length - 1; i++) {
|
|
|
+ if(nary[i] == nary[i + 1]) {
|
|
|
+ parent.layer.msg("咨询员重复,请重新选择!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- var team = $("#team").val()
|
|
|
- var city = $("#city").val()
|
|
|
- var county = $("#county").val()
|
|
|
- if(team ==undefined || team == null || team == ''){
|
|
|
- parent.layer.msg("请选择工程所在省份!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
- if(city ==undefined || city == null || city == ''){
|
|
|
- parent.layer.msg("请选择工程所在地级市!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
- if(county ==undefined || county == null || county == ''){
|
|
|
- parent.layer.msg("请选择工程所在区县!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
- var checkedCount = $('input[type=checkbox]:checked').length;
|
|
|
- if(checkedCount == 0){
|
|
|
- parent.layer.msg("请选择咨询项目造价包含内容说明!", {icon: 5});
|
|
|
- return false;
|
|
|
- }
|
|
|
+ var team = $("#team").val()
|
|
|
+ var city = $("#city").val()
|
|
|
+ var county = $("#county").val()
|
|
|
+ if(team ==undefined || team == null || team == ''){
|
|
|
+ parent.layer.msg("请选择工程所在省份!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(city ==undefined || city == null || city == ''){
|
|
|
+ parent.layer.msg("请选择工程所在地级市!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(county ==undefined || county == null || county == ''){
|
|
|
+ parent.layer.msg("请选择工程所在区县!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- if(obj == 1){
|
|
|
- $('#flag').val('yes');
|
|
|
+ var checkedCount = $('input[type=checkbox]:checked').length;
|
|
|
+ if(checkedCount == 0){
|
|
|
+ parent.layer.msg("请选择咨询项目造价包含内容说明!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var BaoGaoShuQianFaDate = $("#BaoGaoShuQianFaDate").val();
|
|
|
+ var s = BaoGaoShuQianFaDate.replace(/-/g,"/");
|
|
|
+ var baogaoDate = new Date(s );
|
|
|
+ var nowDate = new Date();
|
|
|
+ var a = nowDate - baogaoDate;
|
|
|
+ var days = Math.floor(a / (24 * 3600 * 1000));
|
|
|
+ if(days >37){
|
|
|
+ parent.layer.msg("出具报告日期超期,请重新选择!", {icon: 5});
|
|
|
+ }
|
|
|
}else{
|
|
|
$('#flag').val('no');
|
|
|
}
|
|
@@ -197,7 +207,8 @@
|
|
|
event: 'focus', //响应事件。如果没有传入event,则按照默认的click
|
|
|
type : 'date'
|
|
|
, trigger: 'click'
|
|
|
- ,max: 38 //38天后
|
|
|
+ ,min: -40 //40天之前
|
|
|
+ ,max: 0
|
|
|
});
|
|
|
|
|
|
|
|
@@ -480,6 +491,20 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ function setContractValue(obj){
|
|
|
+ var clientId = $("#contractClientId").val();
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'${ctx}/ruralProject/ruralProjectRecords/getContractInfo',
|
|
|
+ data:{
|
|
|
+ "id":obj
|
|
|
+ },
|
|
|
+ success:function(data){
|
|
|
+ $("#WeiTuoDW").val(data.client.name);
|
|
|
+ $("#LianXiDH").val(data.client.telephone);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -551,10 +576,11 @@
|
|
|
</form:select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="layui-item layui-col-sm6 lw6">
|
|
|
+ <div class="layui-item layui-col-sm6 lw6" id="d1">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>合同编号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <form:input path="ZiXunHTBH" htmlEscape="false" class="form-control layui-input required"/>
|
|
|
+ <div class="layui-input-block with-icon">
|
|
|
+ <sys:gridselectContract url="${ctx}/ruralProject/ruralProjectRecords/selectcontract" type="" isTotal="" id="contractId" name="ZiXunHTBH" value="${ruralProjectRecordsReported.ziXunHTBH}" title="选择合同" labelName="workContractInfo.name"
|
|
|
+ labelValue="${ruralProjectRecordsReported.workContractInfo.contractNum}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw6">
|