admin.js 990 B

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