admin.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. $(function(){
  2. $("a[id^='en']").click(function() {
  3. var id=$(this).attr('data');
  4. $("#en"+id).attr("class",'btn-disabled');
  5. $("#en"+id).hide();
  6. });
  7. $("a[id^='templte_']").click(function() {
  8. var id=$(this).attr('data');
  9. var content=$('#content_'+id).val();
  10. var title=$('#title_'+id).val();
  11. $('#title').html(title);
  12. $('#content').html(content);
  13. });
  14. $("a[id^='status_']").click(function() {
  15. var id=$(this).attr('data');
  16. var a = id.split(":");
  17. easyDialog.open({
  18. container : {
  19. header : '手动确认订单状态',
  20. content :'确认后,为该用户加入金额:'+a[1]+'<br/>操作人:<input type="text" name="username" id="username" value="" />',
  21. yesFn : function(){
  22. var username=$("#username").val();
  23. if($("#username").val()==""){
  24. alert('请填写操作人名称');
  25. return false;
  26. }else{
  27. var url="/m/c/status";
  28. $.ajax({
  29. url:url,
  30. type: "post",
  31. cache: false,
  32. dataType: "json",
  33. data: {
  34. id:a[0],
  35. username:username
  36. },
  37. global: true,
  38. success: function(data){
  39. window.location.reload();
  40. },
  41. error:function(err){
  42. alert('请检查操作');
  43. }
  44. });
  45. }
  46. },
  47. noFn : true
  48. }
  49. });
  50. });
  51. })