viewZsjk.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // 修改猪舍档案
  2. function editZsjk(id, from) {
  3. huimv.loadPage('zsdaRight', 'editZsjk.htm', {
  4. "id" : id,
  5. "from" : from
  6. });
  7. }
  8. /**
  9. * 删除监控档案
  10. * @param id
  11. * @param from
  12. * @param numOfExistLq
  13. */
  14. function disableZsjk(id, from) {
  15. Dialogs.alert("确定作废当前监控档案?", {
  16. title : '提示信息',
  17. width : 250,
  18. height : 80,
  19. top : 150,
  20. button : {
  21. ok : ['确定',function(){
  22. this.close();
  23. huimv.showProcessModel('处理数据中');
  24. jQuery.ajax({
  25. url : 'disableZsjk.htm',
  26. dataType : 'json',
  27. type : 'post',
  28. cache : false,
  29. data : {"id" : id},
  30. success : function(data) {
  31. huimv.hideProcessModel();
  32. if (data.returnCode > 0) {
  33. if (from == 'list') {
  34. huimv.reloadGrid('zsjkGrid');
  35. } else if (from == 'view') {
  36. loadZsjkList();
  37. }
  38. } else {
  39. Dialogs.alert("传入参数有误!", {
  40. width : 300,
  41. height : 50
  42. });
  43. }
  44. },
  45. error : function(data) {
  46. huimv.showError(data.responseText);
  47. }
  48. });
  49. }],
  50. cancel : ['取消',function(){
  51. this.close();
  52. }]
  53. }
  54. });
  55. }
  56. $("#displayPassword").click(function() {
  57. if ($("#displayPassword").val() == "显示密码") {
  58. document.getElementById("password").setAttribute("type", "text");
  59. $("#displayPassword").val("隐藏密码");
  60. } else {
  61. document.getElementById("password").setAttribute("type", "password");
  62. $("#displayPassword").val("显示密码");
  63. }
  64. });