xuzhiheng 5 năm trước cách đây
mục cha
commit
905d127595
22 tập tin đã thay đổi với 226 bổ sung535 xóa
  1. 11 27
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/additionWord.js
  2. 10 28
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/keyWord.js
  3. 2 2
      src/jfw/modules/app/src/web/templates/dataExport/dataExport.html
  4. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_appended.html
  5. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_appendedInput.html
  6. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerInput.html
  7. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_exclude.html
  8. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_excludeInput.html
  9. 11 31
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWordInput.html
  10. 11 27
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerEdit.html
  11. 11 11
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerInput.html
  12. 11 11
      src/web/staticres/wx_dataExport/js/additionWord.js
  13. 11 40
      src/web/staticres/wx_dataExport/js/keyWord.js
  14. 4 4
      src/web/templates/weixin/dataExport/dataExport.html
  15. 11 27
      src/web/templates/weixin/dataExport/dataExport_appended.html
  16. 11 27
      src/web/templates/weixin/dataExport/dataExport_appendedInput.html
  17. 11 27
      src/web/templates/weixin/dataExport/dataExport_buyerInput.html
  18. 11 27
      src/web/templates/weixin/dataExport/dataExport_exclude.html
  19. 11 27
      src/web/templates/weixin/dataExport/dataExport_excludeInput.html
  20. 12 30
      src/web/templates/weixin/dataExport/dataExport_keyWordInput.html
  21. 11 27
      src/web/templates/weixin/dataExport/dataExport_winnerEdit.html
  22. 11 27
      src/web/templates/weixin/dataExport/dataExport_winnerInput.html

+ 11 - 27
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/additionWord.js

@@ -28,17 +28,6 @@ $(function(){
 
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
-        if ($(this).val().length >= 50) {
-            var s = $(this).val().slice(0,49);
-            $(this).val(s);
-
-            weui.toast('采购单位不能超过50字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){ console.log('close') }
-            });
-            return
-        }
 
         var buttonDOM = $(this).siblings().find('button')[0]
         if ($(this).val().length >= 1) {
@@ -53,6 +42,17 @@ $(function(){
     // 添加 按钮的点击事件
     $('.addkeyWord .btn .save-btn').on('click', function(){
         var keyWord = $('.addkeyWord input.enterOne').val()
+        if (keyWord.length >= 50) {
+            var s = keyWord.slice(0,49);
+            $('.addkeyWord input.enterOne').val(s);
+
+            weui.toast('采购单位不能超过50字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){}
+            });
+            return
+        }
         buyerArr.push(keyWord);
         localStorage.setItem("buyer", buyerArr);
         var html = `<li>
@@ -143,22 +143,6 @@ $(function(){
         return this.replace(/(^\s*)|(\s*$)/g, ' ');
     }
 
-    //附加词个数
-    $('.modify span').keydown(function(){
-        var olength = $(this).text().replace(/\s+/g,'').length;
-        // console.log(olength)
-        if(olength >= 50){
-            $('.fontLength').show();
-            var s = $(this).text().slice(0,49)
-            $(this).text(s)
-            weui.toast('采购单位不能超过50字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){ console.log('close') }
-            });
-        }
-    });
-
     $(".close").on("click", function () {
         history.back();
     })

+ 10 - 28
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/keyWord.js

@@ -33,16 +33,6 @@ $(function(){
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
         var buttonDOM = $(this).siblings()[1].children[0];
-        if ($(this).val().length >= 20) {
-            var s = $(this).val().slice(0,19);
-            $(this).val(s)
-
-            weui.toast('关键词不能超过20字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){ console.log('close') }
-            });
-        }
 
         if ($(this).val().length >= 1) {
             buttonDOM.style.opacity = 1;
@@ -73,6 +63,16 @@ $(function(){
     // 添加 按钮的点击事件
     $('.addkeyWord .btn .save').on('click', function(){
         var keyWord = $('.addkeyWord input.enterOne').val();
+        if (keyWord.length >= 20) {
+            var s = keyWord.slice(0,19);
+            $('.addkeyWord input.enterOne').val(s)
+
+            weui.toast('关键词不能超过20字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){}
+            });
+        }
         var keyWordHtml = "";
         var html = `
                     <li>
@@ -337,24 +337,6 @@ $(function(){
         return this.replace(/(^\s*)|(\s*$)/g, ' ');
     }
 
-    //关键词个数
-    $('.modify span').keydown(function(){
-        var olength = $(this).text().replace(/\s+/g,'').length;
-        // console.log(olength)
-        if(olength >= 20){
-            $('.fontLength').show();
-            var s = $(this).text().slice(0,19)
-            $(this).text(s)
-            weui.toast('关键词不能超过20字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){
-
-                }
-            });
-        }
-    })
-
     function keepLastIndex(obj) {
         if (window.getSelection) {//ie11 10 9 ff safari
             obj.focus(); //解决ff不获取焦点无法定位问题

+ 2 - 2
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -738,10 +738,10 @@
             } else {
                 localStorage.index = -1;
                 if($("#starttime").attr("value")!=undefined){
-               		start = new Date($("#starttime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 00:00:00").getTime() / 1000;
+               		start = new Date(Date.parse($("#starttime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 00:00:00")).getTime() / 1000;
                 }
                 if($("#endtime").attr("value")!=undefined){
-               		 end = new Date($("#endtime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 23:59:59").getTime() / 1000;
+               		 end = new Date(Date.parse($("#endtime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 23:59:59")).getTime() / 1000;
                 }
             }
             if(!start){

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_appended.html

@@ -236,17 +236,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -264,6 +253,17 @@
                 if(appendedArr===undefined){
                     appendedArr = [];
                 }
+                if (appended.length >= 20) {
+                    var s = appended.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('附加词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 appendedArr.push(appended);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === tokens){
@@ -392,22 +392,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_appendedInput.html

@@ -142,17 +142,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -170,6 +159,17 @@
                 if(appendedArr===undefined){
                     appendedArr = [];
                 }
+                if (appended.length >= 20) {
+                    var s = appended.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('附加词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 for (var a in appendedArr){
                     if (appended === appendedArr[a]){
                         weui.toast('附加词重复了', {
@@ -218,22 +218,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerInput.html

@@ -97,17 +97,6 @@
         });
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function() {
-            if ($(this).val().length >= 50) {
-                var s = $(this).val().slice(0,49);
-                $(this).val(s);
-
-                weui.toast('采购单位不能超过50字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){ console.log('close') }
-                });
-                return
-            }
 
             var buttonDOM = $(this).siblings().find('button')[0];
             if ($(this).val().length >= 1) {
@@ -122,6 +111,17 @@
         // 添加 按钮的点击事件
         $('.addkeyWord .btn .save-btn').on('click', function(){
             var keyWord = $('.addkeyWord input.enterOne').val();
+            if (keyWord.length >= 50) {
+                var s = keyWord.slice(0,49);
+                $('.addkeyWord input.enterOne').val(s);
+
+                weui.toast('采购单位不能超过50字', {
+                    duration: 2000,
+                    className: 'text-overflow100',
+                    callback: function(){}
+                });
+                return
+            }
             for (var a in buyerArr){
                 if (keyWord === buyerArr[a]){
                     weui.toast('采购单位重复了', {
@@ -142,22 +142,6 @@
             return this.replace(/(^\s*)|(\s*$)/g, ' ');
         };
 
-        //附加词个数
-        $('.modify span').keydown(function(){
-            var olength = $(this).text().replace(/\s+/g,'').length;
-            // console.log(olength)
-            if(olength >= 50){
-                $('.fontLength').show();
-                var s = $(this).text().slice(0,49);
-                $(this).text(s);
-                weui.toast('采购单位不能超过50字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){ console.log('close') }
-                });
-            }
-        });
-
         $(".close").on("click", function () {
             history.back();
         });

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_exclude.html

@@ -236,17 +236,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -264,6 +253,17 @@
                 if(excludeArr===undefined){
                     excludeArr = [];
                 }
+                if (exclude.length >= 20) {
+                    var s = exclude.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('排除词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 excludeArr.push(exclude);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === tokens){
@@ -390,22 +390,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_excludeInput.html

@@ -154,17 +154,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -182,6 +171,17 @@
                 if(excludeArr===undefined){
                     excludeArr = [];
                 }
+                if (exclude.length >= 20) {
+                    var s = exclude.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('排除词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 for (var a in excludeArr){
                     if (exclude === excludeArr[a]){
                         weui.toast('排除词重复了', {
@@ -226,22 +226,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 31
src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWordInput.html

@@ -120,19 +120,6 @@
         });
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function () {
-            if ($(this).val().length >= 20) {
-                var s = $(this).val().slice(0, 19)
-                $(this).val(s)
-
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function () {
-                        console.log('close')
-                    }
-                });
-                return
-            }
 
             var buttonDOM = $(this).siblings()[1].children[0];
             if ($(this).val().length >= 1) {
@@ -155,6 +142,17 @@
             var keyWord = $('.addkeyWord input.enterOne').val();
             var Obj = {"keyWord": keyWord};
             //
+            if (keyWord.length >= 20) {
+                var s = keyWord.slice(0,19);
+                $('.addkeyWord input.enterOne').val(s);
+
+                weui.toast('关键词不能超过20字', {
+                    duration: 2000,
+                    className: 'text-overflow100',
+                    callback: function(){}
+                });
+                return
+            }
             if(sessionStorage.keyWord!==""&&sessionStorage.keyWord!==undefined) {
                 var keys = JSON.parse(sessionStorage.keyWord);
                 for (var i in keys) {
@@ -200,24 +198,6 @@
         String.prototype.trim = function(){
             return this.replace(/(^\s*)|(\s*$)/g, ' ');
         }
-
-        //关键词个数
-        $('.modify span').keydown(function(){
-            var olength = $(this).text().replace(/\s+/g,'').length;
-            // console.log(olength)
-            if(olength >= 20){
-                $('.fontLength').show();
-                var s = $(this).text().slice(0,19)
-                $(this).text(s)
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){
-
-                    }
-                });
-            }
-        })
     });
 
     if(sessionStorage.keyWord!==""&&sessionStorage.keyWord!==undefined){

+ 11 - 27
src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerEdit.html

@@ -146,17 +146,6 @@
 
 			// 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
 			$('.addkeyWord input.enterOne').on('input', function() {
-				if ($(this).val().length >= 50) {
-					var s = $(this).val().slice(0,49);
-					$(this).val(s);
-
-					weui.toast('中标单位不能超过50字', {
-						duration: 2000,
-						className: 'text-overflow100',
-						callback: function(){ console.log('close') }
-					});
-					return
-				}
 
 				var buttonDOM = $(this).siblings().find('button')[0];
 				if ($(this).val().length >= 1) {
@@ -171,6 +160,17 @@
 			// 添加 按钮的点击事件
 			$('.addkeyWord .btn .save-btn').on('click', function(){
 				var keyWord = $('.addkeyWord input.enterOne').val();
+				if (keyWord.length >= 50) {
+					var s = keyWord.slice(0,49);
+					$('.addkeyWord input.enterOne').val(s);
+
+					weui.toast('中标单位不能超过50字', {
+						duration: 2000,
+						className: 'text-overflow100',
+						callback: function(){}
+					});
+					return
+				}
 				winnerArr.push(keyWord);
 				localStorage.setItem("winner", winnerArr);
 				var html = `<li>
@@ -262,22 +262,6 @@
 				return this.replace(/(^\s*)|(\s*$)/g, ' ');
 			};
 
-			//附加词个数
-			$('.modify span').keydown(function(){
-				var olength = $(this).text().replace(/\s+/g,'').length;
-				// console.log(olength)
-				if(olength >= 50){
-					$('.fontLength').show();
-					var s = $(this).text().slice(0,49);
-					$(this).text(s);
-					weui.toast('中标单位不能超过50字', {
-						duration: 2000,
-						className: 'text-overflow100',
-						callback: function(){ console.log('close') }
-					});
-				}
-			});
-
 			$(".close").on('click', function () {
 				history.back();
 			});

+ 11 - 11
src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerInput.html

@@ -99,17 +99,6 @@
 
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function() {
-            if ($(this).val().length >= 50) {
-                var s = $(this).val().slice(0,49);
-                $(this).val(s);
-
-                weui.toast('中标单位不能超过50字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){ console.log('close') }
-                });
-                return
-            }
 
             var buttonDOM = $(this).siblings().find('button')[0];
             if ($(this).val().length >= 1) {
@@ -124,6 +113,17 @@
         // 添加 按钮的点击事件
         $('.addkeyWord .btn .save-btn').on('click', function(){
             var keyWord = $('.addkeyWord input.enterOne').val();
+            if (keyWord.length >= 50) {
+                var s = keyWord.slice(0,49);
+                $('.addkeyWord input.enterOne').val(s);
+
+                weui.toast('中标单位不能超过50字', {
+                    duration: 2000,
+                    className: 'text-overflow100',
+                    callback: function(){}
+                });
+                return
+            }
             for (var a in winnerArr){
                 if (keyWord === winnerArr[a]){
                     weui.toast('中标单位重复了', {

+ 11 - 11
src/web/staticres/wx_dataExport/js/additionWord.js

@@ -28,17 +28,6 @@ $(function(){
 
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
-        if ($(this).val().length >= 50) {
-            var s = $(this).val().slice(0,49);
-            $(this).val(s);
-
-            weui.toast('采购单位不能超过50字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){ console.log('close') }
-            });
-            return
-        }
 
         var buttonDOM = $(this).siblings().find('button')[0]
         if ($(this).val().length >= 1) {
@@ -53,6 +42,17 @@ $(function(){
     // 添加 按钮的点击事件
     $('.addkeyWord .btn .save-btn').on('click', function(){
         var keyWord = $('.addkeyWord input.enterOne').val()
+        if (keyWord.length >= 50) {
+            var s = keyWord.slice(0,49);
+            $('.addkeyWord input.enterOne').val(s);
+
+            weui.toast('采购单位不能超过50字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){}
+            });
+            return
+        }
         buyerArr.push(keyWord);
         localStorage.setItem("buyer", buyerArr);
         var html = `<li>

+ 11 - 40
src/web/staticres/wx_dataExport/js/keyWord.js

@@ -33,16 +33,6 @@ $(function(){
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
         var buttonDOM = $(this).siblings()[1].children[0];
-        if ($(this).val().length >= 20) {
-            var s = $(this).val().slice(0,19);
-            $(this).val(s)
-
-            weui.toast('关键词不能超过20字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){ console.log('close') }
-            });
-        }
 
         if ($(this).val().length >= 1) {
             buttonDOM.style.opacity = 1;
@@ -59,20 +49,19 @@ $(function(){
         }
     });
     
-    // $('.exclusion input.enterOne').on('input', function() {
-    //     var buttonDOM = $(this).siblings().find('button')[0]
-    //     if ($(this).val().length >= 1) {
-    //         buttonDOM.style.opacity = 1
-    //         buttonDOM.removeAttribute("disabled")
-    //     } else {
-    //         buttonDOM.style.opacity = .5
-    //         buttonDOM.setAttribute("disabled", true)
-    //     }
-    // })
-    
     // 添加 按钮的点击事件
     $('.addkeyWord .btn .save').on('click', function(){
         var keyWord = $('.addkeyWord input.enterOne').val();
+        if (keyWord.length >= 20) {
+            var s = keyWord.slice(0,19);
+            $('.addkeyWord input.enterOne').val(s);
+
+            weui.toast('关键词不能超过20字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){ console.log('close') }
+            });
+        }
         var keyWordHtml = "";
         var html = `
                     <li>
@@ -335,25 +324,7 @@ $(function(){
     //去空格方法
     String.prototype.trim = function(){
         return this.replace(/(^\s*)|(\s*$)/g, ' ');
-     }
-
-    //关键词个数
-    $('.modify span').keydown(function(){
-        var olength = $(this).text().replace(/\s+/g,'').length;
-        // console.log(olength)
-        if(olength >= 20){
-            $('.fontLength').show();
-            var s = $(this).text().slice(0,19)
-            $(this).text(s)
-            weui.toast('关键词不能超过20字', {
-                duration: 2000,
-                className: 'text-overflow100',
-                callback: function(){
-
-                }
-            });
-        }
-    })
+    }
 
     function keepLastIndex(obj) {
         if (window.getSelection) {//ie11 10 9 ff safari

+ 4 - 4
src/web/templates/weixin/dataExport/dataExport.html

@@ -690,11 +690,11 @@
                 }
             } else {
                 localStorage.index = -1;
-                if($("#starttime").attr("value")!=undefined){
-               		start = new Date($("#starttime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 00:00:00").getTime() / 1000;
+                if($("#starttime").attr("value")!==undefined){
+               		start = new Date(Date.parse($("#starttime").attr("value").replace("年","/").replace("月","/").replace("日","") + " 00:00:00")).getTime() / 1000;
                 }
-                if($("#endtime").attr("value")!=undefined){
-               		 end = new Date($("#endtime").attr("value").replace("年","-").replace("月","-").replace("日","") + " 23:59:59").getTime() / 1000;
+                if($("#endtime").attr("value")!==undefined){
+               		 end = new Date(Date.parse($("#endtime").attr("value").replace("年","/").replace("月","/").replace("日","") + " 23:59:59")).getTime() / 1000;
                 }
             }
             if(!start){

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_appended.html

@@ -209,17 +209,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -237,6 +226,17 @@
                 if(appendedArr===undefined){
                     appendedArr = [];
                 }
+                if (appended.length >= 20) {
+                    var s = appended.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('附加词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 appendedArr.push(appended);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === tokens){
@@ -365,22 +365,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_appendedInput.html

@@ -112,17 +112,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -140,6 +129,17 @@
                 if(appendedArr===undefined){
                     appendedArr = [];
                 }
+                if (appended.length >= 20) {
+                    var s = appended.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('附加词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 for (var a in appendedArr){
                     if (appended === appendedArr[a]){
                         weui.toast('附加词重复了', {
@@ -188,22 +188,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('附加词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_buyerInput.html

@@ -70,17 +70,6 @@
         });
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function() {
-            if ($(this).val().length >= 50) {
-                var s = $(this).val().slice(0,49);
-                $(this).val(s);
-
-                weui.toast('采购单位不能超过50字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){ console.log('close') }
-                });
-                return
-            }
 
             var buttonDOM = $(this).siblings().find('button')[0];
             if ($(this).val().length >= 1) {
@@ -95,6 +84,17 @@
         // 添加 按钮的点击事件
         $('.addkeyWord .btn .save-btn').on('click', function(){
             var keyWord = $('.addkeyWord input.enterOne').val();
+            if (keyWord.length >= 50) {
+                var s = keyWord.slice(0,49);
+                $('.addkeyWord input.enterOne').val(s);
+
+                weui.toast('采购单位不能超过50字', {
+                    duration: 2000,
+                    className: 'text-overflow100',
+                    callback: function(){}
+                });
+                return
+            }
             for (var a in buyerArr){
                 if (keyWord === buyerArr[a]){
                     weui.toast('采购单位重复了', {
@@ -115,22 +115,6 @@
             return this.replace(/(^\s*)|(\s*$)/g, ' ');
         };
 
-        //附加词个数
-        $('.modify span').keydown(function(){
-            var olength = $(this).text().replace(/\s+/g,'').length;
-            // console.log(olength)
-            if(olength >= 50){
-                $('.fontLength').show();
-                var s = $(this).text().slice(0,49);
-                $(this).text(s);
-                weui.toast('采购单位不能超过50字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){ console.log('close') }
-                });
-            }
-        });
-
         $(".close").on("click", function () {
             history.back();
         })

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_exclude.html

@@ -209,17 +209,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -237,6 +226,17 @@
                 if(excludeArr===undefined){
                     excludeArr = [];
                 }
+                if (exclude.length >= 20) {
+                    var s = exclude.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('排除词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 excludeArr.push(exclude);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === tokens){
@@ -363,22 +363,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_excludeInput.html

@@ -123,17 +123,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 20) {
-                    var s = $(this).val().slice(0,19);
-                    $(this).val(s);
-
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -151,6 +140,17 @@
                 if(excludeArr===undefined){
                     excludeArr = [];
                 }
+                if (exclude.length >= 20) {
+                    var s = exclude.slice(0,19);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('排除词不能超过20字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){ console.log('close') }
+                    });
+                    return
+                }
                 for (var a in excludeArr){
                     if (exclude === excludeArr[a]){
                         weui.toast('排除词重复了', {
@@ -195,22 +195,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 20){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,19);
-                    $(this).text(s);
-                    weui.toast('排除词不能超过20字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $('.addkeyWord .btn .close').on('click', function () {
                 window.history.back();
             });

+ 12 - 30
src/web/templates/weixin/dataExport/dataExport_keyWordInput.html

@@ -94,19 +94,6 @@
         });
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function () {
-            if ($(this).val().length >= 20) {
-                var s = $(this).val().slice(0, 19)
-                $(this).val(s)
-
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function () {
-                        console.log('close')
-                    }
-                });
-                return
-            }
 
             var buttonDOM = $(this).siblings()[1].children[0];
             if ($(this).val().length >= 1) {
@@ -128,6 +115,18 @@
         $('.addkeyWord .btn .save').on('click', function () {
             var keyWord = $('.addkeyWord input.enterOne').val();
             var Obj = {"keyWord": keyWord};
+            if (keyWord.length >= 20) {
+                var s = keyWord.slice(0, 19);
+                $('.addkeyWord input.enterOne').val(s);
+
+                weui.toast('关键词不能超过20字', {
+                    duration: 2000,
+                    className: 'text-overflow100',
+                    callback: function () {
+                    }
+                });
+                return
+            }
             //
             if(sessionStorage.keyWord!==""&&sessionStorage.keyWord!==undefined) {
                 var keys = JSON.parse(sessionStorage.keyWord);
@@ -175,23 +174,6 @@
             return this.replace(/(^\s*)|(\s*$)/g, ' ');
         }
 
-        //关键词个数
-        $('.modify span').keydown(function(){
-            var olength = $(this).text().replace(/\s+/g,'').length;
-            // console.log(olength)
-            if(olength >= 20){
-                $('.fontLength').show();
-                var s = $(this).text().slice(0,19)
-                $(this).text(s)
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'text-overflow100',
-                    callback: function(){
-
-                    }
-                });
-            }
-        })
     });
 
     if(sessionStorage.keyWord!==""&&sessionStorage.keyWord!==undefined){

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_winnerEdit.html

@@ -119,17 +119,6 @@
 
 			// 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
 			$('.addkeyWord input.enterOne').on('input', function() {
-				if ($(this).val().length >= 50) {
-					var s = $(this).val().slice(0,49);
-					$(this).val(s);
-
-					weui.toast('中标单位不能超过50字', {
-						duration: 2000,
-						className: 'text-overflow100',
-						callback: function(){ console.log('close') }
-					});
-					return
-				}
 
 				var buttonDOM = $(this).siblings().find('button')[0];
 				if ($(this).val().length >= 1) {
@@ -144,6 +133,17 @@
 			// 添加 按钮的点击事件
 			$('.addkeyWord .btn .save-btn').on('click', function(){
 				var keyWord = $('.addkeyWord input.enterOne').val();
+				if (keyWord.length >= 50) {
+					var s = keyWord.slice(0,49);
+					$('.addkeyWord input.enterOne').val(s);
+
+					weui.toast('中标单位不能超过50字', {
+						duration: 2000,
+						className: 'text-overflow100',
+						callback: function(){}
+					});
+					return
+				}
 				winnerArr.push(keyWord);
 				localStorage.setItem("winner", winnerArr);
 				var html = `<li>
@@ -237,22 +237,6 @@
 				return this.replace(/(^\s*)|(\s*$)/g, ' ');
 			};
 
-			//附加词个数
-			$('.modify span').keydown(function(){
-				var olength = $(this).text().replace(/\s+/g,'').length;
-				// console.log(olength)
-				if(olength >= 50){
-					$('.fontLength').show();
-					var s = $(this).text().slice(0,49);
-					$(this).text(s);
-					weui.toast('中标单位不能超过50字', {
-						duration: 2000,
-						className: 'text-overflow100',
-						callback: function(){ console.log('close') }
-					});
-				}
-			});
-
 			$(".close").on('click', function () {
 				history.back();
 			});

+ 11 - 27
src/web/templates/weixin/dataExport/dataExport_winnerInput.html

@@ -72,17 +72,6 @@
 
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
-                if ($(this).val().length >= 50) {
-                    var s = $(this).val().slice(0,49);
-                    $(this).val(s);
-
-                    weui.toast('中标单位不能超过50字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                    return
-                }
 
                 var buttonDOM = $(this).siblings().find('button')[0];
                 if ($(this).val().length >= 1) {
@@ -97,6 +86,17 @@
             // 添加 按钮的点击事件
             $('.addkeyWord .btn .save-btn').on('click', function(){
                 var keyWord = $('.addkeyWord input.enterOne').val();
+                if (keyWord.length >= 50) {
+                    var s = keyWord.slice(0,49);
+                    $('.addkeyWord input.enterOne').val(s);
+
+                    weui.toast('中标单位不能超过50字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
                 for (var a in winnerArr){
                     if (keyWord === winnerArr[a]){
                         weui.toast('中标单位重复了', {
@@ -117,22 +117,6 @@
                 return this.replace(/(^\s*)|(\s*$)/g, ' ');
             };
 
-            //附加词个数
-            $('.modify span').keydown(function(){
-                var olength = $(this).text().replace(/\s+/g,'').length;
-                // console.log(olength)
-                if(olength >= 50){
-                    $('.fontLength').show();
-                    var s = $(this).text().slice(0,49);
-                    $(this).text(s);
-                    weui.toast('中标单位不能超过50字', {
-                        duration: 2000,
-                        className: 'text-overflow100',
-                        callback: function(){ console.log('close') }
-                    });
-                }
-            });
-
             $(".close").on('click', function () {
                 history.back();
             });