Browse Source

行程重复添加0:17

maoyunfeng 5 years ago
parent
commit
934d37facf
1 changed files with 19 additions and 2 deletions
  1. 19 2
      whepi-ui/templates/home/ribao.js

+ 19 - 2
whepi-ui/templates/home/ribao.js

@@ -448,7 +448,24 @@ function insertlingyun() {
   var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
   var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
   var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
-    var jrszq = $('#js_input_jrszq').val();
+    var cxfsq = $('#js_input_cxfsq').val();
+    var cfdq = $('#js_input_cfdq').val();
+    var mddq = $('#js_input_mddq').val();
+    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){
+
+              $.alert("此行程已添加");
+              return;
+
+      }
+    }
+
+
+
+
+
+
+   /* var jrszq = $('#js_input_jrszq').val();
     var cfdq = $('#js_input_cfdq').val();
   if(cfd != jrszd){
       $.alert("出发地与今日所在地不是同一地点");
@@ -457,7 +474,7 @@ function insertlingyun() {
   if(jrszq != cfdq){
       $.alert("出发地与今日所在地不是同一地点");
       return;
-  }
+  }*/
   if (cxfs != 4 && cxfs != 0) {
     var val = $('#js_input_cxfsq').val();
     if (val == "") {