纽威
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.

94 lines
3.4 KiB

3 years ago
  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. var keyValues = $.request("keyValues");
  7. $(function () {
  8. initControl();
  9. @*$.ajax({
  10. url: "/ProductManage/PreSell/GetFormJson",
  11. data: { keyValue: @NFine.Code.OperatorProvider.Provider.GetCurrent().UserId },
  12. dataType: "json",
  13. async: false,
  14. success: function (data) {
  15. $("#form1").formSerialize(data);
  16. $("#form1").find('.form-control,select,input').attr('readonly', 'readonly');
  17. $("#form1").find('div.ckbox label').attr('for', '');
  18. }
  19. });*@
  20. });
  21. function initControl() {
  22. $("#F_Id").bindSelect({
  23. url: "/ProductManage/PreSell/GetTreeSelectJson",
  24. });
  25. $("#F_PreSell").bindSelect({
  26. url: "/ProductManage/PreSell/GetGridJsonPS",
  27. id: "F_Id",
  28. text: "PreSellNo"
  29. });
  30. $("#F_CusName").bindSelect({
  31. url: "/SystemManage/Customer/GetFormJsonCus",
  32. id: "F_Id",
  33. text: "F_CusName"
  34. });
  35. $("#PreSellNo").bindText({
  36. url: "/ProductManage/PreSell/GetOrderNo",
  37. });
  38. }
  39. function submitForm() {
  40. var postData = $("#form1").formSerialize();
  41. postData["newPreSellNo"] = $("#PreSellNo").val();
  42. postData["oldPreSell"] = $("#F_PreSell").val();
  43. postData["IsUse"] = $("#PreSellNoOld").get(0).checked;
  44. postData["keyValue"] = keyValues;
  45. postData["CusID"] = $("#F_CusName").val();
  46. postData["CusName"] = $("#F_CusName").text();
  47. $.submitForm2({
  48. url: "/ProductManage/PreSell/SubmitForm",
  49. param: postData,
  50. success: function () {
  51. $.currentWindow().$("#gridList").trigger("reloadGrid");
  52. }
  53. });
  54. }
  55. </script>
  56. <form id="form1">
  57. <div style="padding-top: 20px; margin-right: 20px;">
  58. <table class="form">
  59. <tr>
  60. <th class="formTitle" style="width:120px;">Order No</th>
  61. <td class="formValue">
  62. <input id="PreSellNo" name="PreSellNo" type="text" class="form-control required" />
  63. </td>
  64. </tr>
  65. <tr>
  66. <th class="formTitle" style="width:120px;">Order Rule</th>
  67. <td class="formValue">
  68. <div class="ckbox">
  69. <input id="PreSellNoOld" name="PreSellNoOld" type="checkbox"><label for="PreSellNoOld">Use Historical Orders</label>
  70. </div>
  71. </td>
  72. </tr>
  73. <tr>
  74. <th class="formTitle" style="width:120px;">Historical Order No</th>
  75. <td class="formValue">
  76. <select id="F_PreSell" name="F_PreSell" class="form-control required">
  77. <option value="">====Please Choose====</option>
  78. </select>
  79. </td>
  80. </tr>
  81. <tr>
  82. <th class="formTitle" style="width:120px;">Customer</th>
  83. <td class="formValue">
  84. <select id="F_CusName" name="F_CusName" class="form-control required">
  85. <option value="">====Please Choose====</option>
  86. </select>
  87. </td>
  88. </tr>
  89. </table>
  90. </div>
  91. </form>