zzzqSearchModel.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. $(function(){
  2. var myScroll = null;
  3. myScroll=new IScroll(".scrollr",{
  4. scrollbars: true,
  5. fadeScrollbars:true,
  6. scrollbars: 'custom',
  7. shrinkScrollbars:'clip',
  8. tap:true
  9. });
  10. setTimeout(function () {
  11. myScroll.refresh();
  12. }, 100);
  13. $("#dweb").bind("blur", function() {
  14. var ids = $("#id").val();
  15. var temp = "";
  16. if (id != "") {
  17. temp = "&id=" + ids;
  18. }
  19. haifmp.loadMobilePage("haifmp", "getZzzqSearchDweb.htm?mcid=" + $("#mcid").val() + "&cxeph=" + $("#dweb").val() + temp + "&date=" +$("#date").val());
  20. });
  21. $(".dangan_scrollr").on("tap",'.chooseDweb', function() {
  22. if(confirm("确认选择耳牌编号: " + $(this).data("ep"))) {
  23. haifmp.loadMobilePage("haifmp", "hpSjlrZzzqEdit.htm?mcid=" + $("#mcid").val() + "&dweb=" + $(this).data("ep") + "&date=" +$("#date").val());
  24. }
  25. });
  26. //input[type='search']里面的val往左移动
  27. var k = $("input[type='search']").val();
  28. $("input[type='search']").focus(function(){
  29. $(".glyphicon-search").animate({left:"0.2rem"},250);
  30. $("input[type='search']").animate({"text-indent": '0.2rem'}, 250);
  31. if(k!=""){
  32. $(".glyphicon-search").animate({left:"0.2rem"},250);
  33. $("input[type='search']").animate({"text-indent": '0.2rem'}, 250);
  34. }
  35. });
  36. //模糊查询键盘enter键事件
  37. $("input[type='search']").on('keypress',function(e) {
  38. var keycode = e.keyCode;
  39. if(keycode=='13') {
  40. e.preventDefault();
  41. //请求搜索接口
  42. var ids = $("#id").val();
  43. var temp = "";
  44. if (id != "") {
  45. temp = "&id=" + ids;
  46. }
  47. haifmp.loadMobilePage("haifmp", "getZzzqSearchDweb.htm?mcid=" + $("#mcid").val() + "&cxeph=" + $("#dweb").val() + "&date=" +$("#date").val());
  48. }
  49. });
  50. });
  51. /**
  52. * 返回
  53. */
  54. function backUrl() {
  55. var ids = $("#id").val();
  56. var temp = "";
  57. if (id != "") {
  58. temp = "&id=" + ids;
  59. }
  60. haifmp.loadMobilePage("haifmp", "hpSjlrZzzqEdit.htm?mcid=" + $("#mcid").val() + "&id=" + $("#id").val() + temp + "&date=" +$("#date").val());
  61. }
  62. /**
  63. * 选中耳标
  64. */
  65. function chooseDweb(dweb) {
  66. }