viewCssz.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. changDqms($("#dqms").val());
  2. changeTxfs($("#txfs").val());
  3. changeClms($("#clms").val());
  4. /**
  5. * 系统参数编辑页面中点击取消按钮时返回的页面
  6. */
  7. function cancelCssz() {
  8. loadYjsbRight();
  9. }
  10. /**
  11. * 修改
  12. */
  13. function editSbcs(id, from) {
  14. huimv.loadPage('yjsbRight', 'editCssz.htm', {
  15. "id" : id,
  16. "from" : from
  17. });
  18. }
  19. /**
  20. * 当前模式联动
  21. */
  22. function changDqms(val) {
  23. $("#xl").hide();
  24. $("#xl1").hide();
  25. $("#xl2").hide();
  26. $("#xl3").hide();
  27. $("#tx").hide();
  28. $("#cl").hide();
  29. if (val == "1") {
  30. $("#xlbttxxt").html("适应一期");
  31. $("#xl").show();
  32. $("#xl1").show();
  33. } else if (val == "2") {
  34. $("#xlbttxxt").html("适应二期");
  35. $("#xl").show();
  36. $("#xl2").show();
  37. } else if (val == "3") {
  38. $("#xlbttxxt").html("注册期");
  39. $("#xl").show();
  40. $("#xl3").show();
  41. } else if (val == "4") {
  42. $("#tx").show();
  43. } else if (val == "5") {
  44. $("#cl").show();
  45. }
  46. }
  47. /**
  48. * 挑选方式联动
  49. */
  50. function changeTxfs(val) {
  51. $("#txfs3").hide();
  52. $("#txmx1").hide();
  53. $("#txmx2").hide();
  54. var str = $("#tzdw").text();
  55. if (val == "1") {
  56. $("#txmx1").show();
  57. $("#tztxt").html('门限重量');
  58. $("#tzdw").html(str+' Kg');
  59. $("#txmx2").show();
  60. } else if (val == "2") {
  61. $("#txmx1").show();
  62. $("#tztxt").html('分栏比例');
  63. $("#tzdw").html(str+' %');
  64. $("#txmx2").show();
  65. } else if (val == "3") {
  66. $("#txfs3").show();
  67. }
  68. }
  69. /**
  70. * 出栏模式联动
  71. */
  72. function changeClms(val) {
  73. $("#clfstxt").html("");
  74. $("#clfs1").hide();
  75. $("#clfs2").hide();
  76. $("#cleb").hide();
  77. if (val == "1") {
  78. $("#clfstxt").html("出栏体重");
  79. $("#clfs1").show();
  80. } else if (val == "2") {
  81. $("#clfstxt").html("出栏体重");
  82. $("#clfs1").show();
  83. } else if (val == "3") {
  84. $("#clfs2").show();
  85. $("#cleb").show();
  86. }
  87. }
  88. /**
  89. * 作废代码列表
  90. * @param id
  91. */
  92. function disableSbcs(id,jqdaid) {
  93. Dialogs.alert("确定删除当前机器的参数设置?", {
  94. title : '提示信息',
  95. width : 250,
  96. height : 80,
  97. top : 150,
  98. button : {
  99. ok : ['确定',function(){
  100. this.close();
  101. huimv.showProcessModel('处理数据中');
  102. jQuery.ajax({
  103. url : 'disableCssz.htm',
  104. dataType : 'json',
  105. type : 'post',
  106. cache : false,
  107. data : {"id" : id,"jqdaid" : jqdaid},
  108. success : function(data) {
  109. huimv.hideProcessModel();
  110. if (data.returnCode > 0) {
  111. loadYjsbRight();
  112. } else {
  113. Dialogs.alert("传入参数有误!", {
  114. width : 300,
  115. height : 50
  116. });
  117. }
  118. },
  119. error : function(data) {
  120. huimv.showError(data.responseText);
  121. }
  122. });
  123. }],
  124. cancel : ['取消',function(){
  125. this.close();
  126. }]
  127. }
  128. });
  129. }
  130. /**
  131. * 管理员编辑称重注册时间
  132. * @param gjz
  133. */
  134. function czzcsz(gjz) {
  135. if (gjz == "xg") {
  136. $("#czzcsjtxt").hide();
  137. $("#czzcsj").show();
  138. $("#xg").hide();
  139. $("#bc").show();
  140. }
  141. if (gjz == "bc") {
  142. jQuery.ajax({
  143. url : 'updateCzzcsj.htm',
  144. dataType : 'json',
  145. type : 'post',
  146. cache : false,
  147. data : {"lqid" : $("#lqid").val(),"czzcsj" : $("#czzcsj").val()},
  148. success : function(data) {
  149. if (data.returnCode > 0) {
  150. $("#czzcsjtxt").html($("#czzcsj").val());
  151. } else {
  152. Dialogs.alert("修改失败!", {
  153. width : 300,
  154. height : 50
  155. });
  156. }
  157. }
  158. });
  159. $("#czzcsjtxt").show();
  160. $("#czzcsj").hide();
  161. $("#xg").show();
  162. $("#bc").hide();
  163. }
  164. }