invoice.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. $(function() {
  2. $('a[node-express="untread"]').click(function() {
  3. $('td[node-express="msg"]').html($(this).attr('title'));
  4. });
  5. $("input[name='untreadPost']").click(function() {
  6. $("table[post-box='ture']").hide();
  7. });
  8. $("input[node-untread='post']").click(function() {
  9. $("table[post-box='ture']").show();
  10. });
  11. $("a[node-approval^='approval']").click(function() {
  12. $("input[name='status']").val($(this).attr("diss-data"));
  13. $("form[name='invoiceApproval']").submit();
  14. });
  15. $("a[node-invoice='droppedInvoice']").click(function() {
  16. $("input[name='droppedIidKey']").val($(this).attr("diss-data"));
  17. });
  18. $("a[node-invoice='untreadInvoice']").click(function() {
  19. $("input[name='untreadIidKey']").val($(this).attr("diss-data"));
  20. });
  21. $("a[node-post='express']").click(function() {
  22. var postData = $(this).attr("post-data");
  23. $("input[name='iidKey']").val(postData);
  24. $("div[loading-msg='true']").html("<img src='/global/img/loadIco.gif' />");
  25. var url = "/ajaxGetInvoicePostDetail";
  26. $.ajax({
  27. url : url,
  28. type : "post",
  29. cache : false,
  30. dataType : "json",
  31. data : {
  32. iidKey : postData
  33. },
  34. global : true,
  35. success : function(data) {
  36. if (data.status == 1) {
  37. $("td[recipients-data='true']").html(data.invoiceDetail.recipients);
  38. $("td[recipientsPhone-data='true']").html(data.invoiceDetail.recipientsPhone);
  39. $("td[recipientsAddress-data='true']").html(data.invoiceDetail.recipientsAddress);
  40. $("td[mailItems-data='true']").html(data.invoiceDetail.mailItems);
  41. $("div[loading-msg='true']").html("");
  42. } else
  43. $("div[loading-msg='true']").html("illegal request");
  44. },
  45. error : function(err) {
  46. }
  47. });
  48. });
  49. $("a[node-post='express-msg']").click(function() {
  50. var postData = $(this).attr("post-data");
  51. $("div[loading-msg='express-msg']").html("<img src='/global/img/loadIco.gif' />");
  52. var url = "/ajaxGetInvoicePostDetail";
  53. $.ajax({
  54. url : url,
  55. type : "post",
  56. cache : false,
  57. dataType : "json",
  58. data : {
  59. iidKey : postData
  60. },
  61. global : true,
  62. success : function(data) {
  63. if (data.status == 1) {
  64. $("td[recipients-data='express-msg']").html(data.invoiceDetail.recipients);
  65. $("td[recipientsPhone-data='express-msg']").html(data.invoiceDetail.recipientsPhone);
  66. $("td[recipientsAddress-data='express-msg']").html(data.invoiceDetail.recipientsAddress);
  67. $("td[mailItems-data='express-msg']").html(data.invoiceDetail.mailItems);
  68. $("td[actualItems-data='express-msg']").html(data.invoiceDetail.actualItems);
  69. $("td[expressCompany-data='express-msg']").html(data.invoiceDetail.expressCompany);
  70. $("td[expressNumber-data='express-msg']").html(data.invoiceDetail.expressNumber+"&nbsp;<a target='_blank' href='http://www.kuaidi100.com/chaxun?com="+data.invoiceDetail.expressCom+"&nu="+data.invoiceDetail.expressNumber+"'>点击查询快递信息</a>");
  71. $("div[loading-msg='express-msg']").html("");
  72. } else
  73. $("div[loading-msg='express-msg']").html("illegal request");
  74. },
  75. error : function(err) {
  76. }
  77. });
  78. });
  79. })