addModel_win.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <title>Hello APP</title>
  7. <link rel="stylesheet" type="text/css" href="../../css/api.css" />
  8. <link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
  9. </head>
  10. <style>
  11. </style>
  12. <body>
  13. <header class="aui-bar aui-bar-nav aui-bar-info" id="aui-header">
  14. <a class="aui-btn aui-btn-info aui-pull-left" tapmode onclick="closeWin()"> <span class="aui-iconfont aui-icon-left"></span> </a>
  15. <div class="aui-title" id="aui-title"></div>
  16. <a class="aui-btn aui-btn-info aui-pull-right" tapmode onclick="addStore()"> <span class="aui-iconfont aui-icon-add"></span> </a>
  17. </header>
  18. </body>
  19. <script type="text/javascript" src="../../script/api.js"></script>
  20. <script type="text/javascript">
  21. function closeWin() {
  22. api.closeWin({
  23. });
  24. }
  25. apiready = function() {
  26. var title = "货物列表";
  27. if (api.pageParam.type == 2) {
  28. title = "类别列表"
  29. }
  30. if (api.pageParam.type == 5) {
  31. title = "供应商列表"
  32. }
  33. $api.text($api.byId("aui-title"), title);
  34. api.parseTapmode();
  35. var header = $api.byId('aui-header');
  36. $api.fixStatusBar(header);
  37. var headerPos = $api.offset(header);
  38. var body_h = $api.offset($api.dom('body')).h;
  39. api.openFrame({
  40. name : 'orderGood_body',
  41. url : 'orderGood_body.html',
  42. bounces : false,
  43. vScrollBarEnabled : false,
  44. hScrollBarEnabled : false,
  45. rect : {
  46. x : 0,
  47. y : headerPos.h,
  48. w : 'auto',
  49. h : 'auto'
  50. },
  51. bgColor : '#f5f5f5',
  52. pageParam : {
  53. type : api.pageParam.type
  54. }
  55. })
  56. };
  57. // function add(){
  58. // api.execScript({
  59. // frameName : 'orderGood_body',
  60. // script: 'add();'
  61. // });
  62. // }
  63. // 添加商品
  64. function addStore() {
  65. if (api.pageParam.type == 2) {
  66. api.execScript({
  67. frameName : 'orderGood_body',
  68. script : 'add();'
  69. });
  70. } else if (api.pageParam.type == 5) {
  71. api.openWin({
  72. name : 'addSupplier_win',
  73. url : './addSupplier_win.html'
  74. });
  75. } else {
  76. api.openWin({
  77. name : 'orderScan_win',
  78. url : './orderScan_win.html'
  79. });
  80. }
  81. }
  82. </script>
  83. </html>