viewSlda.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * 编辑饲料档案
  3. * @param id
  4. * @param from
  5. */
  6. function editSlda(id, from) {
  7. huimv.loadPage("sldaRight", "editSlda.htm", {
  8. "id" : id,
  9. "from" : from
  10. });
  11. }
  12. /**
  13. * 删除饲料档案
  14. * @param id
  15. * @param from
  16. */
  17. function disableSlda(id) {
  18. Dialogs.alert("确定作废当前饲料档案?", {
  19. title : '提示信息',
  20. width : 250,
  21. height : 80,
  22. top : 150,
  23. button : {
  24. ok : ['确定',function(){
  25. this.close();
  26. huimv.showProcessModel('处理数据中');
  27. jQuery.ajax({
  28. url : 'disableSlda.htm',
  29. dataType : 'json',
  30. type : 'post',
  31. cache : false,
  32. data : {"id" : id},
  33. success : function(data) {
  34. huimv.hideProcessModel();
  35. if (data.returnCode > 0) {
  36. loadSldaList();
  37. } else {
  38. Dialogs.alert("传入参数有误!", {
  39. width : 300,
  40. height : 50
  41. });
  42. }
  43. },
  44. error : function(data) {
  45. huimv.showError(data.responseText);
  46. }
  47. });
  48. }],
  49. cancel : ['取消',function(){
  50. this.close();
  51. }]
  52. }
  53. });
  54. }