You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.6 KiB

4 days ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValue = $.request("keyValue");
  7. $(function () {
  8. initControl();
  9. if (!!keyValue) {
  10. $.ajax({
  11. url: "/ProductManage/DiscountRate/GetFormJson",
  12. data: { keyValue: keyValue },
  13. dataType: "json",
  14. async: false,
  15. success: function (data) {
  16. $("#form1").formSerialize(data);
  17. }
  18. });
  19. }
  20. });
  21. function initControl() {
  22. $("#F_Id").bindSelect({
  23. url: "/ProductManage/DiscountRate/GetTreeSelectJson",
  24. });
  25. }
  26. function submitForm() {
  27. if (!$('#form1').formValid()) {
  28. return false;
  29. }
  30. $.submitForm({
  31. url: "/ProductManage/DiscountRate/SubmitForms?keyValue=" + keyValue,
  32. param: $("#form1").formSerialize(),
  33. success: function () {
  34. $.currentWindow().$("#gridList").trigger("reloadGrid");
  35. }
  36. })
  37. }
  38. </script>
  39. <form id="form1">
  40. <div style="padding-top: 20px; margin-right: 20px;">
  41. <table class="form">
  42. <tr>
  43. <th class="formTitle">客户编号</th>
  44. <td class="formValue">
  45. <input id="CusCode" name="CusCode" type="text" class="form-control required" placeholder="Please enter CusCode" />
  46. </td>
  47. </tr>
  48. <tr>
  49. <th class="formTitle">最小值</th>
  50. <td class="formValue">
  51. <input id="StartValue" name="StartValue" type="text" class="form-control required" placeholder="Please enter Discount" />
  52. </td>
  53. </tr>
  54. <tr>
  55. <th class="formTitle">最大值</th>
  56. <td class="formValue">
  57. <input id="EndValue" name="EndValue" type="text" class="form-control required" placeholder="Please enter Discount" />
  58. </td>
  59. </tr>
  60. <tr>
  61. <th class="formTitle">仓库</th>
  62. <td class="formValue">
  63. <input id="WHType" name="WHType" type="text" class="form-control required" placeholder="Please enter Discount" />
  64. </td>
  65. </tr>
  66. <tr>
  67. <th class="formTitle">折扣率</th>
  68. <td class="formValue">
  69. <input id="Discount" name="Discount" type="text" class="form-control required" placeholder="Please enter Discount" />
  70. </td>
  71. </tr>
  72. </table>
  73. </div>
  74. </form>