|
@@ -192,6 +192,54 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(projectType == 10){
|
|
|
+ var HeTongJia = $("#HeTongJia").val();
|
|
|
+ var total = parseFloat(HeTongJia);
|
|
|
+ // 检查解析后的值是否为0
|
|
|
+ if (isNaN(total)) {
|
|
|
+ parent.layer.msg("合同价输入的值不是有效的数字!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ } else if (total === 0) {
|
|
|
+ parent.layer.msg("合同价不可为0!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var ShenDingJia = $("#ShenDingJia").val();
|
|
|
+ var ShenDingJiaTotal = parseFloat(ShenDingJia);
|
|
|
+ // 检查解析后的值是否为0
|
|
|
+ if (isNaN(ShenDingJiaTotal)) {
|
|
|
+ parent.layer.msg("审定价输入的值不是有效的数字!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ } else if (ShenDingJiaTotal === 0) {
|
|
|
+ parent.layer.msg("审定价不可为0!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(parseFloat(HeTongJia) == parseFloat(ShenDingJia)){
|
|
|
+ parent.layer.msg("合同价与审定价不可相同!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var SongShenJia = $("#SongShenJia").val();
|
|
|
+ var SongShenJiaTotal = parseFloat(SongShenJia);
|
|
|
+ // 检查解析后的值是否为0
|
|
|
+ if (isNaN(SongShenJiaTotal)) {
|
|
|
+ parent.layer.msg("送审价输入的值不是有效的数字!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ } else if (SongShenJiaTotal === 0) {
|
|
|
+ parent.layer.msg("送审价不可为0!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var ziXunBDE = parseFloat($("#ZiXunBDE").val());
|
|
|
+ var ShenDingJia = parseFloat($("#ShenDingJia").val());
|
|
|
+ if(ziXunBDE.toFixed(4) !== ShenDingJia.toFixed(4)){
|
|
|
+ parent.layer.msg("咨询标的额和审定价不同,请调整!", {icon: 5});
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+
|
|
|
var projectRecordId = $("#projectRecordId").val();
|
|
|
if("0" != projectRecordId && projectRecordId.length != 16){
|
|
|
parent.layer.msg("项目编号填写错误!", {icon: 5});
|
|
@@ -1118,6 +1166,43 @@
|
|
|
obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
|
|
|
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
|
|
|
}
|
|
|
+
|
|
|
+ function numFor4(obj){
|
|
|
+ obj.value = obj.value.replace(/[^\d.]/g, ""); // 清除"数字"和"."以外的字符
|
|
|
+ obj.value = obj.value.replace(/^\./g, ""); // 验证第一个字符是数字,防止以"."开头
|
|
|
+ obj.value = obj.value.replace(/\.{2,}/g, "."); // 只保留第一个".",清除多余的
|
|
|
+ obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); // 确保只存在一个小数点
|
|
|
+ obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d{4}).*$/, '$1$2.$3'); // 只能输入小数点后 4 位
|
|
|
+ var projectType = $("#ProjectType").val();
|
|
|
+ if(projectType == 10) {
|
|
|
+ if (obj.id === "HeTongJia") {
|
|
|
+ console.log(obj.value)
|
|
|
+ console.log($("#ShenDingJia").val())
|
|
|
+ var heTongJia = obj.value;
|
|
|
+ var shenDingJia = $("#ShenDingJia").val();
|
|
|
+
|
|
|
+ if (heTongJia || shenDingJia) {
|
|
|
+ if (parseFloat(heTongJia) == parseFloat(shenDingJia)) {
|
|
|
+ parent.layer.msg("合同价不可和审定价相同!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (obj.id === "ShenDingJia") {
|
|
|
+ console.log($("#HeTongJia").val())
|
|
|
+ console.log(obj.value)
|
|
|
+ var heTongJia = $("#HeTongJia").val();
|
|
|
+ var shenDingJia = obj.value;
|
|
|
+
|
|
|
+ if (heTongJia || shenDingJia) {
|
|
|
+ if (parseFloat(heTongJia) == parseFloat(shenDingJia)) {
|
|
|
+ parent.layer.msg("合同价不可和审定价相同!", {icon: 5});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
function numGCGN(obj){
|
|
|
var GCGMValue = $("#GCGMValue").val();
|
|
|
if(50 != GCGMValue){
|
|
@@ -1469,7 +1554,7 @@
|
|
|
<div class="layui-item layui-col-sm6 lw6">
|
|
|
<label class="layui-form-label double-line" title="注:指咨询项目编审后的最终造价, 其中工程结算项目填审定价,标底编制填招标控制价, 工程造价全过程管理填工程投资总额或审定价。"><span class="require-item">*咨询标的额(万元):</span></label>
|
|
|
<div class="layui-input-block">
|
|
|
- <form:input path="ZiXunBDE" placeholder="请输入咨询表的额" htmlEscape="false" onkeyup="num(this)" class="form-control required layui-input number" onchange="ZiXunBDEChange()"/>
|
|
|
+ <form:input path="ZiXunBDE" placeholder="请输入咨询表的额" htmlEscape="false" onkeyup="numFor4(this)" class="form-control required layui-input number" onchange="ZiXunBDEChange()"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw6">
|
|
@@ -1479,14 +1564,14 @@
|
|
|
<div class="layui-item layui-col-sm6 lw6" id="heTongJiaDiv">
|
|
|
<label class="layui-form-label double-line">合同价(万元):</label>
|
|
|
<div class="layui-input-block with-icon">
|
|
|
- <form:input path="HeTongJia" placeholder="请输入合同价" htmlEscape="false" onkeyup="num(this)" class="form-control layui-input number"/>
|
|
|
+ <form:input path="HeTongJia" placeholder="请输入合同价" htmlEscape="false" onkeyup="numFor4(this)" class="form-control layui-input number"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw6" id="songShenJiaDiv">
|
|
|
<label class="layui-form-label double-line">送审价(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
<div class="input-group">
|
|
|
- <form:input path="SongShenJia" placeholder="请输入送审价" htmlEscape="false" onkeyup="num(this)" class="form-control layui-input number" onchange="JingHeJianValue()"/>
|
|
|
+ <form:input path="SongShenJia" placeholder="请输入送审价" htmlEscape="false" onkeyup="numFor4(this)" class="form-control layui-input number" onchange="JingHeJianValue()"/>
|
|
|
<span class="input-group-btn songShenJiaSpanDiv">
|
|
|
<a href="javascript:void(0)" style="height: 40px;line-height: 40px;" class="form-status" type="button" onclick="synchronizationSSJ()">同步</a>
|
|
|
</span>
|
|
@@ -1498,7 +1583,7 @@
|
|
|
<label class="layui-form-label double-line">审定价(万元):</label>
|
|
|
<div class="layui-input-block">
|
|
|
<div class="input-group">
|
|
|
- <form:input path="ShenDingJia" placeholder="请输入审定价" htmlEscape="false" onkeyup="num(this)" class="form-control layui-input number" onchange="JingHeJianValue()"/>
|
|
|
+ <form:input path="ShenDingJia" placeholder="请输入审定价" htmlEscape="false" onkeyup="numFor4(this)" class="form-control layui-input number" onchange="JingHeJianValue()"/>
|
|
|
<span class="input-group-btn shenDingJiaSpanDiv">
|
|
|
<a href="javascript:void(0)" style="height: 40px;line-height: 40px;" class="form-status" type="button" onclick="synchronizationSDJ()">同步</a>
|
|
|
</span>
|