소스 검색

Merge branch 'dev/v4.9.2_cyl' of qmx/jy into feature/v4.9.2

cuiyalong 1 년 전
부모
커밋
7cac0eca69
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      src/web/templates/pc/invoice.html

+ 13 - 1
src/web/templates/pc/invoice.html

@@ -155,7 +155,7 @@
 	                <div class="text"></div>
 	            </div>
 	            <div class="modal-footer">
-	                <button type="button" class="btn btn-default" data-dismiss="modal" onclick="history.back()">我知道了</button>
+	                <button type="button" class="btn btn-default" data-dismiss="modal" id="i-know-btn">我知道了</button>
 	            </div>
 	        </div>
 	    </div>
@@ -251,6 +251,18 @@
           }
         })
         haslogin({{.T.logid}});
+        $('#i-know-btn').on('click', function () {
+            // 新窗口打开
+            // 判断窗口是不是window.open打开的
+            if (window.opener && window.opener !== window) {
+                window.close()
+            } else {
+                if (history.length <= 1) {
+                    window.close()
+                }
+                history.back()
+            }
+        })
       })
 	</script>
 </body>