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.

93 lines
3.5 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. $("#CusCode").bindSelect({
  26. url: "/ProductManage/DiscountRate/GetSelectJsonCustomer",
  27. });
  28. }
  29. function submitForm() {
  30. if (!$('#form1').formValid()) {
  31. return false;
  32. }
  33. $.submitForm({
  34. url: "/ProductManage/DiscountRate/SubmitForm?keyValue=" + keyValue,
  35. param: $("#form1").formSerialize(),
  36. success: function () {
  37. $.currentWindow().$("#gridList").trigger("reloadGrid");
  38. }
  39. })
  40. }
  41. </script>
  42. <form id="form1">
  43. <div style="padding-top: 20px; margin-right: 20px;">
  44. <table class="form">
  45. <tr>
  46. <th class="formTitle">客户编号</th>
  47. <td class="formValue">
  48. @*<input id="CusCode" name="CusCode" type="text" class="form-control required" placeholder="Please enter CusCode" />*@
  49. <select id="CusCode" name="CusCode" class="form-control required">
  50. <option value="">==请选择==</option>
  51. </select>
  52. </td>
  53. </tr>
  54. <tr>
  55. <th class="formTitle">1.0-1.49 成</th>
  56. <td class="formValue">
  57. <input id="DiscountC1" name="DiscountC1" type="text" class="form-control required" placeholder="Please enter Discount" />
  58. </td>
  59. </tr>
  60. <tr>
  61. <th class="formTitle">1.5-1.99 成</th>
  62. <td class="formValue">
  63. <input id="DiscountC2" name="DiscountC2" type="text" class="form-control required" placeholder="Please enter Discount" />
  64. </td>
  65. </tr>
  66. <tr>
  67. <th class="formTitle">2.0-2.99 成</th>
  68. <td class="formValue">
  69. <input id="DiscountC3" name="DiscountC3" type="text" class="form-control required" placeholder="Please enter Discount" />
  70. </td>
  71. </tr>
  72. <tr>
  73. <th class="formTitle">1.0-1.49 评</th>
  74. <td class="formValue">
  75. <input id="DiscountP1" name="DiscountP1" type="text" class="form-control required" placeholder="Please enter Discount" />
  76. </td>
  77. </tr>
  78. <tr>
  79. <th class="formTitle">1.5-1.99 评</th>
  80. <td class="formValue">
  81. <input id="DiscountP2" name="DiscountP2" type="text" class="form-control required" placeholder="Please enter Discount" />
  82. </td>
  83. </tr>
  84. <tr>
  85. <th class="formTitle">2.0-2.99 评</th>
  86. <td class="formValue">
  87. <input id="DiscountP3" name="DiscountP3" type="text" class="form-control required" placeholder="Please enter Discount" />
  88. </td>
  89. </tr>
  90. </table>
  91. </div>
  92. </form>