Ver código fonte

Merge remote-tracking branch 'origin/master'

yuliang 5 anos atrás
pai
commit
2f34b2c69f
2 arquivos alterados com 35 adições e 7 exclusões
  1. 2 3
      whepi-ui/templates/home/ribao.ftl
  2. 33 4
      whepi-ui/templates/home/ribao.js

+ 2 - 3
whepi-ui/templates/home/ribao.ftl

@@ -44,12 +44,11 @@
                     </span></div>
                     <div class="weui-btn-area" style="text-align: center">
                         <span style="color: red;font-size:x-large" id="txt_shangbao">
-                         今日未上报
+                            今日未上报
                        </span><br/> <span style="color: red;font-size:x-large" id="txt_shangbaotime">
-                         上报时间
                        </span>
                         <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips"
-                           style=""
+                           style="background-color: #D9D9D9"
                            onclick="addReport()">上报</a>
                     </div>
                 </div>

+ 33 - 4
whepi-ui/templates/home/ribao.js

@@ -440,6 +440,7 @@ function selectinput6(obj) {
 function insertlingyun() {
   var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
   if (sf == 0 || sf == 3) {
+    cantijiao = true;
     $.alert("请选择是否出行");
     return;
   }
@@ -452,20 +453,24 @@ function insertlingyun() {
   var mddq = $('#js_input_mddq').val();
   var cfdq = $('#js_input_cfdq').val();
   if (mdd != jrszd) {
+    cantijiao = true;
     $.alert("目的地与今晚住地不一致");
     return;
   }
   if (jrszq != mddq) {
+    cantijiao = true;
     $.alert("目的地与今晚住地不一致");
     return;
   }
   if (cfd == 4 && mdd == 4) {
     if (mddq == cfdq) {
+      cantijiao = true;
       $.alert("出发地与目的地不能一致");
       return;
     }
   } else if (cfd != 4 || mdd != 4) {
     if (cfd == mdd) {
+      cantijiao = true;
       $.alert("出发地与目的地不能一致");
       return;
     }
@@ -475,7 +480,7 @@ function insertlingyun() {
 
   for (var i = 0; i < listcx.length; i++) {
     if (listcx[i].tripTypeDesp == cxfsq && listcx[i].tripType == cxfs && listcx[i].startLocal == cfd && listcx[i].startLocalOther == cfdq && listcx[i].endLocal == mdd && listcx[i].endLocalOther == mddq) {
-
+      cantijiao = true;
       $.alert("此行程已添加");
       return;
 
@@ -485,6 +490,7 @@ function insertlingyun() {
   if (cxfs != 4 && cxfs != 0) {
     var val = $('#js_input_cxfsq').val();
     if (val == "") {
+      cantijiao = true;
       $.alert("请填写车次/航班/车牌");
       return;
     }
@@ -501,11 +507,13 @@ function insertlingyun() {
       person.tripTypeStr = "飞机";
     }
   } else if (cxfs == 0) {
+    cantijiao = true;
     $.alert("请选择出行方式");
     return;
   } else if (cxfs == 4) {
     var val6 = $('#js_input_cxfsq').val();
     if (val6 == "") {
+      cantijiao = true;
       $.alert("请填写车次/航班/车牌");
       return;
     }
@@ -516,6 +524,7 @@ function insertlingyun() {
   if (cfd == 4 && cfd != 0) {
     var val2 = $('#js_input_cfdq').val();
     if (val2 == "") {
+      cantijiao = true;
       $.alert("请填写出发地");
       return;
     }
@@ -538,12 +547,14 @@ function insertlingyun() {
     }
 
   } else if (cfd == 0) {
+    cantijiao = true;
     $.alert("请选择出发地");
     return;
   }
   if (mdd == 4 && mdd != 0) {
     var val3 = $('#js_input_mddq').val();
     if (val3 == "") {
+      cantijiao = true;
       $.alert("请填写目的地");
       return;
     }
@@ -565,6 +576,7 @@ function insertlingyun() {
       person.endLocalOther = $('#js_input_mddq').val() == undefined ? "" : $('#js_input_mddq').val();
     }
   } else if (mdd == 0) {
+    cantijiao = true;
     $.alert("请选择目的地");
     return;
   }
@@ -1012,6 +1024,7 @@ function ribaoCommit() {
   cantijiao = false
   var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
   if (listcx.length == 0 && sf == 1) {
+    cantijiao = true;
     $.alert("请添加出行");
     return;
   }
@@ -1022,11 +1035,13 @@ function ribaoCommit() {
   var age = $("#js_input_user_age").val();
   //不能同时选择服用和未服用
   if ($("input[name='checkbox1']:checked").val() == "on" && $("input[name='checkbox2']:checked").val() == "on") {
+    cantijiao = true;
     $.alert("心脑血管不能同时选择服用和未服用");
     return;
   }
   //男性不能选择妊娠期
   if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
+    cantijiao = true;
     $.alert("男性不能选择妊娠期");
     return;
   }
@@ -1064,6 +1079,7 @@ function ribaoCommit() {
 
   var medical = $("input[name='radio']:checked").val();
   if (medical == undefined) {
+    cantijiao = true;
     $.alert("请选择新冠肺炎");
     return;
   }
@@ -1088,27 +1104,33 @@ function ribaoCommit() {
   var score = $("#js_input_score").val() == undefined ? "" : $("#js_input_score").val();
 
   if (userName == undefined || userName == '') {
+    cantijiao = true;
     $.alert("请填写姓名");
     return;
   }
   if (grender == 0) {
+    cantijiao = true;
     $.alert("请填写性别");
     return;
   }
   if (age == undefined || age == '') {
+    cantijiao = true;
     $.alert("请填写年龄");
     return;
   }
   if (age > 150 || age < 0) {
+    cantijiao = true;
     $.alert("请填写正确的年龄");
     return;
   }
 
   if (temperature <= 0) {
+    cantijiao = true;
     $.alert("请填写体温");
     return;
   }
   if (temperature > 50 || temperature < 30) {
+    cantijiao = true;
     $.alert("请填写正确的体温");
     return;
   }
@@ -1123,9 +1145,11 @@ function ribaoCommit() {
     var workLocal = "";
     var workLocalOther = "";
     if (gzzd == 0) {
+      cantijiao = true;
       $.alert("请选择工作驻地");
       return;
     } else if (gzzd == 4 && qtdd == "") {
+      cantijiao = true;
       $.alert("请填写工作驻地");
       return;
     } else if (gzzd != 0 && gzzd != 4) {
@@ -1148,9 +1172,11 @@ function ribaoCommit() {
     var todyLocal = "";
     var todyLocalOther = "";
     if (jrszd == 0) {
+      cantijiao = true;
       $.alert("请选择今晚住地");
       return;
     } else if (jrszd == 4 && jrszq == "") {
+      cantijiao = true;
       $.alert("请填写今晚住地");
       return;
     } else if (jrszd != 0 && jrszd != 4) {
@@ -1168,6 +1194,7 @@ function ribaoCommit() {
     var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
     var isTrip = "";
     if (sf == 3) {
+      cantijiao = true;
       $.alert("请选择是否出行");
       return;
     } else {
@@ -1218,6 +1245,7 @@ function ribaoCommit() {
     data: JSON.stringify(data),
     success: function (data) {
       if (data.msgReport == "2") {
+        cantijiao = true;
         $.toast("家人姓名不能重复,如果重复,可以带上称呼");
         return;
       }
@@ -1231,11 +1259,10 @@ function ribaoCommit() {
       cantijiao = true
       $('#ribao_jinrijujian').empty();
       $('#ribao_jinrijujian').append(data.safetyNum);
-      ribao_refrash();
 
-      clearShow();
+      ribao_refrash();
       //修改
-      if(suspectedId>0){
+      if (suspectedId > 0) {
         var date = new Date();
         var year = date.getFullYear();
         var month = date.getMonth() + 1;
@@ -1261,6 +1288,8 @@ function ribaoCommit() {
         $('#txt_shangbao').append("今日未上报");
         $('#txt_shangbaotime').empty();
       }
+
+      clearShow();
     },
   });
 }