Browse Source

Merge branch 'dev2.8' of http://192.168.3.207:10080/qmx/jy into dev2.8

xuzhiheng 5 years ago
parent
commit
d3b49ff62d

+ 1 - 1
src/jfw/modules/app/src/app/front/swordfish.go

@@ -469,7 +469,7 @@ func (m *Front) WxsearchlistPaging() {
 					listSize = len(*list)
 				}
 				if len([]rune(s_word)) > 3 && listSize < wx_pageSize && pageNum == 1 {
-					secondKWS = jy.HttpEs(searchvalue, "ik_smart", config.Sysconfig["elasticsearch"].(string))
+					secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 					secondLimit := 2*wx_pageSize - listSize

+ 3 - 0
src/jfw/modules/app/src/main.go

@@ -37,6 +37,9 @@ func main() {
 		if strings.HasSuffix(r.URL.String(), ".apk") {
 			w.Header().Set("Content-Type", "application/vnd.android.package-archive")
 		}
+		if strings.HasSuffix(r.URL.String(), ".xlsx") {
+			w.Header().Set("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
+		}
 		http.StripPrefix("/jyapp/res/", http.FileServer(http.Dir("web/staticres/jyapp/res"))).ServeHTTP(w, r)
 	})
 	xweb.RunBase(":"+Sysconfig["webport"].(string), mux1)

+ 3 - 3
src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js

@@ -952,10 +952,10 @@ var SuperSearch = {
 					}else{
 						$("#supersearchPage #hasNoData_tiptext>font:eq(0)").show();
 					}
-					if($("#search_all").hasClass("on")){
-						$("#supersearchPage #allSearchModel").hide();
-					}else{
+					if($(".newdialog .tab-box .sub-search-title").find("li.active").attr('dataVal')=="searchtitle"){
 						$("#supersearchPage #allSearchModel").show();
+					}else{
+						$("#supersearchPage #allSearchModel").hide();
 					}
 					$("#supersearchPage #list").text("");
 					SuperSearch.hasNoData();

+ 24 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_applyInvoice.html

@@ -19,18 +19,22 @@
     </head>
     <body>
     	<style>
+	    	.flex_applyInvoice{
+    		    width: 100%;
+			    height: 100%;
+			    display: flex;
+			    flex-direction: column;
+			    justify-content: space-between;
+			    overflow: hidden;
+	    	}
 			.app-layout-header{
 				line-height: 44px;
 			    background-color: #FFFFFF;
 			    text-align: center;
 			    border-bottom: 1px solid #E6E6E6;
 			    font-size: 17px;
-			    position: absolute;
 			    padding-top: 20px;
 			    z-index: 99999;
-			    left: 0;
-			    right: 0;
-			    top: 0;
 				color: #444444;
 			}
 			.app-layout-header>.app-back{
@@ -90,7 +94,9 @@
 			    padding: 0 0.4rem;
 			}
 			#invoice{
-				padding-top:64px;
+				/*padding-top:64px;*/
+				flex: 1;
+   				overflow-y: scroll;
 			}
 			.weui-actionsheet_cancel{
 				color:#2DB7CA;
@@ -113,7 +119,12 @@
 			#unit-info{
 				margin-bottom: 200px;
 			}
-    	</style>		
+			input{
+				-webkit-appearance: none;
+			}
+
+    	</style>
+    	<div class="flex_applyInvoice">
 		<div class="app-layout-header">
 			<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
 			开发票
@@ -161,6 +172,7 @@
 	        <i class="iconfont  icon-warning"></i>
 	        <span>系统异常,请稍后重试</span>
 	    </div>
+	    </div>
         <script src="/jyapp/js/myorder/fastclick.js"></script>
         <script>
             // 解决ios系统click 事件300毫秒的延迟
@@ -170,6 +182,7 @@
         </script>
         <script src="/jyapp/js/myorder/jquery-weui.min.js"></script>
         <script>
+       		
         	//公司发票正则
             var companyName_reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[\u4e00-\u9fa5a-zA-Z0-9()()]{4,}$/;
 			var taxNumer_reg =/^[0-9A-Z]{18}$/;
@@ -315,6 +328,11 @@
 											sessionStorage.applysuccess="1";
 											sessionStorage.companyName=companyName;
 											sessionStorage.taxNumer=taxNumer;
+											if($(".type").html()=="单位"){
+												sessionStorage.type="danwei";
+											}else if($(".type").html()=="个人"){
+												sessionStorage.type="geren";
+											}
 											window.location.replace("/jyapp/front/myorder/paySuccess/" + {{.T.order_code}})
 										}else{
 											$("#tjsb").removeClass("disno");

+ 7 - 1
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -361,9 +361,11 @@
 				
 				$(window).resize(function(){
 					 if($(document).height() < oHeight){
-					    $("#bottombox").css("position","static");
+					   $("#bottombox").css("position","static");
+					  $("#pay_order").css("padding-bottom","0rem");
 					}else{
 					    $("#bottombox").css("position","fixed");
+					    $("#pay_order").css("padding-bottom","2.7rem");
 					}
 			   	});
 			   
@@ -844,6 +846,10 @@
 					$("#easyAlert").remove();
 				}
 			}
+			//
+            function showToast (content) {
+              EasyAlert.show(content,"",3000);
+            }
 		</script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}

+ 49 - 0
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html

@@ -347,6 +347,20 @@
 			    -webkit-transform: scaleY(.5);
 			    transform: scaleY(.5);
 			}
+			.easyalert {
+			    position: fixed;
+			    background-color: rgba(0,0,0,0.7);
+			    top: 50%;
+			    color: #fff;
+			    z-index: 999;
+			    border-radius: 6px;
+			    padding: 17px 20px;
+			    font-size: 15px;
+			    line-height: 22px;
+			    max-width: 260px;
+			    text-align: center;
+			    display: none;
+			}
 		</style>
 		<div class="app-layout-header">
 			<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
@@ -769,8 +783,10 @@
 				$('input:radio[name="way"]').click(function() {
 					var checkValue = $('input:radio[name="way"]:checked').val();
 		        	if(checkValue=="微信支付"){
+		        		localStorage.setItem($(".param_id").text(),"wx");
 		            	pay_way="wx_app";
 		        	}else{
+		        		localStorage.setItem($(".param_id").text(),"ali");
 		        		pay_way="ali_app";
 		        	}
 				});
@@ -804,6 +820,7 @@
 			            $(".loading_").hide();
 			            canpay = true;
 					})
+					
 				})
 				
 		        var interval
@@ -1237,10 +1254,12 @@
 				$(".param_id").text(param_id);
 				if(localStorage.getItem(param_id)=="wx"){
 					$("#wx").attr("checked",true);
+					$("#zfb").attr("checked",false);
 					pay_way="wx_app";
 				}else if(localStorage.getItem(param_id)=="ali"){
 					pay_way="ali_app";
 					$("#zfb").attr("checked",true);
+					$("#wx").attr("checked",false);
 				}
 				this_e=e;
 			}
@@ -1301,6 +1320,36 @@
 			}
 			*/
 		
+			//提示框
+			var EasyAlert = {
+				timeout: null,
+				waitTime: 1000,
+				show: function(text, css, waitTime) {
+					if (this.timeout != null) {
+						clearTimeout(this.timeout);
+						this.hide();
+						this.timeout = null;
+					}
+					var thisClass = this;
+					this.timeout = setTimeout(function() {
+						thisClass.hide();
+						thisClass.timeout = null;
+					}, waitTime ? waitTime : this.waitTime);
+					$("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
+					$("#easyAlert").css({
+						"left": "50%",
+						"margin-top": -($("#easyAlert").outerHeight() / 2),
+						"margin-left": -($("#easyAlert").outerWidth() / 2)
+					}).show();
+				},
+				hide: function() {
+					$("#easyAlert").remove();
+				}
+			}
+			//
+            function showToast (content) {
+              EasyAlert.show(content,"",3000);
+            }
 		</script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}

+ 52 - 37
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html

@@ -195,6 +195,20 @@
 		    -webkit-transform: scaleY(.5);
 		    transform: scaleY(.5);
 		}
+		.easyalert {
+		    position: fixed;
+		    background-color: rgba(0,0,0,0.7);
+		    top: 50%;
+		    color: #fff;
+		    z-index: 999;
+		    border-radius: 6px;
+		    padding: 17px 20px;
+		    font-size: 15px;
+		    line-height: 22px;
+		    max-width: 260px;
+		    text-align: center;
+		    display: none;
+		}
 	</style>
 		<script>
 			var pay_way="wx_app";
@@ -331,40 +345,7 @@
 			        	onek='<div class="item-list"><label>关键词:</label><ul class="item-list-parents"><li class="keywords">-</li></ul></div><div class="item-list"><label>附加词:</label><ul class="item-list-parents"><li class="appended">-</li></ul></div><div class="item-list"><label>排除词:</label><ul class="item-list-parents"><li class="exclude">-</li></ul></div>'
 	        	 	}
 			        $("#keywords").append(onek);
-//			        keywordsHtml ="";
-//			        appendedHtml ="";
-//			        excludeHtml ="";
-//                  if (keywords && keywords.length>0){
-//		                for (var i=0;i<keywords.length;i++){
-//		                    var keywordObj = keywords[i];
-//		                    //关键词
-//		                    var word = keywordObj["keyword"];
-//		                    //附加词
-//		                    var appended = keywordObj["appended"];
-//		                    var appendedStr =""+appended;
-//							var reg = RegExp(/,/);
-//							if(appendedStr.match(reg)){
-//								appendedStr=appendedStr.replace(/,/g," ");
-//							}
-//							//排除词
-//		                    var exclude = keywordObj["exclude"];
-//		                    var excludeStr =exclude+"";
-//							if(excludeStr.match(reg)){
-//								excludeStr=excludeStr.replace(/,/g," ");
-//							}
-//		                    keywordsHtml +="<span>" + word + "&nbsp</span>";
-//		                    appendedHtml +="<span>" + appendedStr + "&nbsp</span>";
-//		                    excludeHtml +="<span>" + excludeStr + "&nbsp</span>";
-//		                }
-//		            }else{
-//		            	 keywordsHtml +="<p></p>";
-//		            	 appendedHtml +="<p></p>";
-//		            	 excludeHtml +="<p></p>";
-//		            }
-//		            $(".keywords").append(keywordsHtml);
-//		            $(".appended").append(appendedHtml);
-//		            $(".exclude").append(excludeHtml);
-		            
+			        
 		            var priceHtml = "";
 		            if(price){
 		                priceHtml += "<span>" + price + "</span>";
@@ -427,14 +408,14 @@
 					$(".person_").hide()
 					$(".invoiceP").hide();
 					$(".person").show();
-					if(sessionStorage.taxNumer!=""){
+					if((sessionStorage.taxNumer!="")&&(sessionStorage.type=="danwei")){
 						$(".notpersontaitou").show();
 						$(".persontaitou").hide();
 						$(".company").text("单位名称:"+sessionStorage.companyName);
 						$(".company").show();
 						$(".tax").text("纳税人识别号:"+sessionStorage.taxNumer);
 						$(".tax").show();
-					}else{
+					}else if(sessionStorage.type=="geren"){
 						$(".persontaitou").show();
 					}
 					sessionStorage.removeItem("applysuccess");
@@ -453,8 +434,10 @@
 				$('input:radio[name="way"]').click(function() {
 					var checkValue = $('input:radio[name="way"]:checked').val();
 		        	if(checkValue=="微信支付"){
+		        		localStorage.setItem($(".param_id").text(),"wx");
 		            	pay_way="wx_app";
 		        	}else{
+		        		localStorage.setItem($(".param_id").text(),"ali");
 		        		pay_way="ali_app";
 		        	}
 				});
@@ -519,10 +502,12 @@
 				$(".param_id").text(param_id);
 				if(localStorage.getItem(param_id)=="wx"){
 					$("#wx").attr("checked",true);
+					$("#zfb").attr("checked",false);
 					pay_way="wx_app";
 				}else if(localStorage.getItem(param_id)=="ali"){
-					pay_way="ali_app";
 					$("#zfb").attr("checked",true);
+					$("#wx").attr("checked",false);
+					pay_way="ali_app";
 				}
 			}
 			
@@ -545,6 +530,36 @@
 	            return n+n2;
 	        }
 			
+			//提示框
+			var EasyAlert = {
+				timeout: null,
+				waitTime: 1000,
+				show: function(text, css, waitTime) {
+					if (this.timeout != null) {
+						clearTimeout(this.timeout);
+						this.hide();
+						this.timeout = null;
+					}
+					var thisClass = this;
+					this.timeout = setTimeout(function() {
+						thisClass.hide();
+						thisClass.timeout = null;
+					}, waitTime ? waitTime : this.waitTime);
+					$("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
+					$("#easyAlert").css({
+						"left": "50%",
+						"margin-top": -($("#easyAlert").outerHeight() / 2),
+						"margin-left": -($("#easyAlert").outerWidth() / 2)
+					}).show();
+				},
+				hide: function() {
+					$("#easyAlert").remove();
+				}
+			}
+			//
+            function showToast (content) {
+              EasyAlert.show(content,"",3000);
+            }
 		</script>		
 		<div class="app-layout-header">
 			<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>

+ 3 - 3
src/web/staticres/js/wxSupersearch.js

@@ -892,10 +892,10 @@ var SuperSearch = {
 					}else{
 						$("#supersearchPage #hasNoData_tiptext>font:eq(0)").show();
 					}
-					if($("#search_all").hasClass("on")){
-						$("#supersearchPage #allSearchModel").hide();
-					}else{
+					if($(".newdialog .tab-box .sub-search-title").find("li.active").attr('dataVal')=="searchtitle"){
 						$("#supersearchPage #allSearchModel").show();
+					}else{
+						$("#supersearchPage #allSearchModel").hide();
 					}
 					$("#supersearchPage #list").text("");
 					SuperSearch.hasNoData();

+ 5 - 0
src/web/templates/weixin/dataExport/dataExport_applyInvoice.html

@@ -286,6 +286,11 @@
 											sessionStorage.applysuccess="1";
 											sessionStorage.companyName=companyName;
 											sessionStorage.taxNumer=taxNumer;
+											if($(".type").html()=="单位"){
+												sessionStorage.type="danwei";
+											}else if($(".type").html()=="个人"){
+												sessionStorage.type="geren";
+											}
 											window.location.replace("/front/wxMyorder/wxPaySuccess/" + {{.T.order_code}})
 										}else{
 											$("#tjsb").removeClass("disno");

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

@@ -329,11 +329,14 @@
 				var oHeight = $(document).height(); //浏览器当前的高度
 				$(window).resize(function(){
 					 if($(document).height() < oHeight){
-					    $("#bottombox").css("position","static");
+					   $("#bottombox").css("position","static");
+					  $("#pay_order").css("padding-bottom","0rem");
 					}else{
 					    $("#bottombox").css("position","fixed");
+					    $("#pay_order").css("padding-bottom","2.7rem");
 					}
 			   	});
+			   	
 				if (sessionStorage.getItem("send_email_"+{{.T._id}})!=null&&sessionStorage.getItem("send_code_"+{{.T._id}})!=null&&sessionStorage.getItem("send_email_"+{{.T._id}})!=email_lastInput){
 					$(".email_check_ok").hide();
 					$(".email_input").val(sessionStorage.getItem("send_email_"+{{.T._id}}));

+ 2 - 2
src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html

@@ -312,14 +312,14 @@
 					$(".person_").hide()
 					$(".invoiceP").hide();
 					$(".person").show();
-					if(sessionStorage.taxNumer != "") {
+					if((sessionStorage.taxNumer!="")&&(sessionStorage.type=="danwei")){
 						$(".notpersontaitou").show();
 						$(".persontaitou").hide();
 						$(".company").text("单位名称:" + sessionStorage.companyName);
 						$(".company").show();
 						$(".tax").text("纳税人识别号:" + sessionStorage.taxNumer);
 						$(".tax").show();
-					} else {
+					} else if (sessionStorage.type=="geren"){
 						$(".persontaitou").show();
 					}
 					sessionStorage.removeItem("applysuccess");