customer_create_rest.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script lang="text/javascript">
  6. //GET
  7. function m_get(url) {
  8. send_get_request(url);
  9. }
  10. //POST
  11. function m_post() {
  12. send_post_request(url);
  13. }
  14. //PUT
  15. function m_put() {
  16. send_put_request(url);
  17. }
  18. //DELETE
  19. function m_delete() {
  20. send_delete_request_as_url(url);
  21. }
  22. /////////////////////////////////////////////////////////////////////////////////////////////////
  23. $(document)
  24. .ready(
  25. function() {
  26. $('#get').click(function() {
  27. send_get_request($("#url").val());
  28. });
  29. $('#post').click(function() {
  30. send_post_request($("#url").val());
  31. });
  32. $('#put').click(function() {
  33. send_put_request($("#url").val());
  34. });
  35. $('#delete').click(function() {
  36. send_delete_request($("#url").val());
  37. });
  38. jQuery("#url").val("../jaxrs/customer/baseinfo/create");
  39. jQuery("#content")
  40. .text(
  41. '{"customername": "客户名称一","customertype": "客户","level": "一般客户","source": "转介绍","industryfirst": "金融业","industrysecond": "信托/担保/拍卖/典当","province": "重庆市","city": "两江新区","county": "工业园区","houseno": "详细街道地址","addresslongitude": "106.572463","addresslatitude": "29.649001","telno": "电话","customerfax": "传真","url": "网址","remark": "备注","email": "邮件","state": "见面拜访","qqno": "","webchat": "","customersequence": "20170531_000057","creatorname": "金飞"}');
  42. });
  43. </script>
  44. </head>
  45. <body>
  46. <div style="float: left; width: 720px;">
  47. <div style="width: 100%;">
  48. <table border="1" style="width: 100%">
  49. <tr>
  50. <td>URL:</td>
  51. <td><input type="text" id="url" style="width: 95%" placeholder="../jaxrs/forum/" value="" /></td>
  52. </tr>
  53. <tr>
  54. <td>type:</td>
  55. <td>创建客户。</td>
  56. </tr>
  57. <tr>
  58. <td colspan="2">
  59. <button id="put">PUT</button>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td colspan="2"><textarea id="content" style="width: 97%; height: 300px">{}</textarea></td>
  64. </tr>
  65. <tr>
  66. <td colspan="2"><textarea id="result" style="width: 97%; height: 400px"></textarea></td>
  67. </tr>
  68. </table>
  69. </div>
  70. </div>
  71. </body>
  72. </html>