viewHaifmvMcda.htm 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>daMcdaView</title>
  5. <style type="text/css">
  6. .nav-top {
  7. position: inherit;
  8. border-bottom: 1px solid #ccc;
  9. display: flex;
  10. flex-direction: row;
  11. justify-content: space-around;
  12. font-size:0.28rem;
  13. }
  14. .cont-div {
  15. width: 100%;
  16. height: 100%;
  17. position: absolute;
  18. overflow: hidden;
  19. margin:0px;
  20. padding: 0px !important;
  21. top: 0;
  22. left: 0;
  23. z-index: 1;
  24. background: #fff;
  25. font-size: 0.26rem;
  26. }
  27. .cont-div>div{
  28. display: -webkit-box;
  29. -webkit-box-orient: vertical;
  30. padding: 0.2rem 0.4rem;
  31. }
  32. .cont-div>div>div{
  33. padding: 0.15rem 0;
  34. }
  35. .cont-div div span:first-child {
  36. padding-right:20px;
  37. width:150px;
  38. }
  39. .nav-bottom {
  40. left: 0;
  41. right: 0;
  42. border-top: 1px solid #ccc;
  43. position: relative;
  44. bottom: 0;
  45. margin-bottom: 0;
  46. display: flex;
  47. flex-direction: row;
  48. justify-content: center;
  49. }
  50. .nav-bottom li {
  51. margin: 0.1rem;
  52. width: 0.54rem;
  53. height: 0.54rem;
  54. padding: 0.08rem;
  55. }
  56. .nav-top li {
  57. padding: 10px;
  58. }
  59. .nav-top li.active {
  60. color: #4b738c;
  61. border-bottom: 2px solid #4b738c;
  62. }
  63. .nav-bottom li::before {
  64. top: 0.05rem;
  65. left: 0.01rem;
  66. position: relative;
  67. font-size: 0.28rem;
  68. }
  69. /* 滚动条样式 */
  70. .iScrollVerticalScrollbar {
  71. position: absolute;
  72. z-index: 9999;
  73. width: 3px;
  74. bottom: 2px;
  75. top: 2px;
  76. right: 2px;
  77. overflow: hidden;
  78. padding: 0px !important;
  79. }
  80. .iScrollVerticalScrollbar.iScrollBothScrollbars {
  81. bottom: 18px;
  82. }
  83. .iScrollIndicator {
  84. position: absolute;
  85. right: 0;
  86. background: rgba(0, 0, 0);
  87. border: 2px solid rgba(0, 0, 0, 0.5);
  88. border-radius: 8px;
  89. }
  90. </style>
  91. <script type="text/javascript">
  92. $(function() {
  93. //返回
  94. $(".glyphicon-chevron-left").on("tap", function () {
  95. haifm.loadMobilePage("haifm", "haifmvMain.htm?uuid=" + $("#uuid").val() + "&mcid=" + $("#mcid").val() + "&qyid=" + $("#qyid").val() +"&toList=1");
  96. });
  97. iscroll(".cont-div");
  98. $(".nav-bottom").on("click", "li.glyphicon", function() {
  99. var mcid = $("#mcid").val();
  100. var lx = $(this).data("for");
  101. if (lx == "delete") {
  102. var zsnum = $("#zsnum").val();
  103. if (zsnum > 0) {
  104. mui.alert('无法删除此牧场,请先删除此牧场下的猪舍!', '提示', function() {});
  105. return;
  106. } else {
  107. if(confirm("确定要删除该牧场吗?删除成功后无法进行恢复!")) {
  108. jQuery.ajax({
  109. url : 'disableMcda.htm',
  110. dataType : 'json',
  111. type : 'post',
  112. cache : false,
  113. data : {"id" : mcid},
  114. success : function(data) {
  115. if (data.returnCode > 0) {
  116. mui.alert('删除成功!', '提示', function() {});
  117. haifm.loadMobilePage("haifm", "haifmvMain.htm");
  118. } else {
  119. mui.alert('删除失败!', '提示', function() {});
  120. }
  121. },
  122. error : function(data) {
  123. mui.alert('系统异常!删除失败!', '提示', function() {});
  124. }
  125. });
  126. }
  127. }
  128. }
  129. if (lx == "update") {
  130. haifm.loadMobilePage("zslb", "haifmvDaEditMcda.htm?mcid=" + mcid);
  131. }
  132. if (lx == "add") {
  133. haifm.loadMobilePage("zslb", "haifmvDaMcdaFrame.htm?mcid=" + mcid);
  134. }
  135. });
  136. });
  137. /* 滚动事件 */
  138. function iscroll(classd){
  139. var mScroll = new IScroll(classd,{
  140. scrollbars: true,
  141. fadeScrollbars:true,
  142. shrinkScrollbars:'clip',
  143. scrollbars: 'custom',
  144. click:true,
  145. tap:true
  146. });
  147. setTimeout(function () {
  148. mScroll.refresh();
  149. }, 100);
  150. }
  151. </script>
  152. </head>
  153. <body>
  154. <div style="display: flex;flex-direction: column;flex: 1;">
  155. <input type="hidden" value="$!numOfExistZs" id="zsnum">
  156. <input type="hidden" value="$!daMcda.id" id="mcid">
  157. <header>
  158. <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
  159. <p>档案信息</p>
  160. <span class="glyphicon" aria-hidden="true" style="width: 18px;height: 18px;"></span>
  161. </header>
  162. <ul class="nav-top">
  163. <li class="active">牧场档案</li>
  164. </ul>
  165. <div class="middle">
  166. <main class="cont-div">
  167. <div>
  168. <div><span>牧场名称</span><span>$!daMcda.mcmc</span></div>
  169. <div><span>牧场电话</span><span>$!daMcda.mcdh</span></div>
  170. <div><span>牧场地址</span><span>$!daMcda.mcdz</span></div>
  171. <div><span>牧场邮编</span><span>$!daMcda.mcyb</span></div>
  172. <div><span>牧场传真</span><span>$!daMcda.mccz</span></div>
  173. <div><span>修改人</span><span>$!xgrxm</span></div>
  174. <div><span>修改时间</span><span>$!dateTool.format('yyyy-MM-dd', $!daMcda.xgsj)</span></div>
  175. </div>
  176. </main>
  177. </div>
  178. <ul class="nav-bottom">
  179. #if("$!daxx_mcda_update" == "true")
  180. <li class="glyphicon glyphicon-pencil" data-for="update"></li>
  181. #end
  182. #if("$!daxx_mcda_delete" == "true")
  183. <li class="glyphicon glyphicon-trash" data-for="delete"></li>
  184. #end
  185. #if("$!daxx_zsda_insert" == "true")
  186. <li class="glyphicon glyphicon-plus" data-for="add"></li>
  187. #end
  188. </ul>
  189. </div>
  190. </body>
  191. </html>