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.

175 lines
7.4 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/Maintain/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/Maintain/GetTreeSelectJson",
  24. });
  25. $("#Location").bindSelect({
  26. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=仓库类型",
  27. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=1",
  28. });
  29. $("#Shape").bindSelect({
  30. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=形状",
  31. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=2",
  32. });
  33. $("#Color").bindSelect({
  34. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=色度",
  35. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=3",
  36. });
  37. $("#Clarity").bindSelect({
  38. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=净度",
  39. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=4",
  40. });
  41. $("#Polish").bindSelect({
  42. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=抛光",
  43. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=5",
  44. });
  45. $("#Symmetry").bindSelect({
  46. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=对称性",
  47. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=6",
  48. });
  49. $("#Cut").bindSelect({
  50. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=切工",
  51. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=7",
  52. });
  53. $("#Other").bindSelect({
  54. //url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=分类",
  55. url: "/SystemManage/ItemsData/GetSelectJsonWH?keyValue=8",
  56. });
  57. }
  58. function submitForm() {
  59. if (!$('#form1').formValid()) {
  60. return false;
  61. }
  62. $.submitForm({
  63. url: "/ProductManage/Maintain/SubmitForm?keyValue=" + keyValue,
  64. param: $("#form1").formSerialize(),
  65. success: function () {
  66. $.currentWindow().$("#gridList").trigger("reloadGrid");
  67. }
  68. })
  69. }
  70. </script>
  71. <form id="form1">
  72. <div style="padding-top: 20px; margin-right: 20px;">
  73. <table class="form">
  74. <tr>
  75. <th class="formTitle">Product No</th>
  76. <td class="formValue">
  77. <input id="ProductSN" name="ProductSN" type="text" class="form-control required" placeholder="Please enter Product SN" />
  78. </td>
  79. <th class="formTitle">FinishedWeight</th>
  80. <td class="formValue">
  81. <input id="Weight" name="Weight" type="text" class="form-control required" placeholder="Please enter Weight" />
  82. </td>
  83. </tr>
  84. <tr>
  85. <th class="formTitle">Measurement</th>
  86. <td class="formValue">
  87. <input id="Measurement" name="Measurement" type="text" class="form-control required" placeholder="Please enter Measurement" />
  88. </td>
  89. <th class="formTitle">RoughWeight</th>
  90. <td class="formValue">
  91. <input id="GrossWeight" name="GrossWeight" type="text" class="form-control required" placeholder="Please enter GrossWeight" />
  92. </td>
  93. </tr>
  94. <tr>
  95. <th class="formTitle">Certificate No</th>
  96. <td class="formValue">
  97. <input id="CertificateNo" name="CertificateNo" type="text" class="form-control required" placeholder="Please enter Certificate No" />
  98. </td>
  99. <th class="formTitle">Shape</th>
  100. <td class="formValue">
  101. <select id="Shape" name="Shape" class="form-control required">
  102. <option value="">==请选择==</option>
  103. </select>
  104. </td>
  105. </tr>
  106. <tr>
  107. <th class="formTitle">Clarity</th>
  108. <td class="formValue">
  109. <select id="Clarity" name="Clarity" class="form-control required">
  110. <option value="">==请选择==</option>
  111. </select>
  112. </td>
  113. <th class="formTitle">Color</th>
  114. <td class="formValue">
  115. <select id="Color" name="Color" class="form-control required">
  116. <option value="">==请选择==</option>
  117. </select>
  118. </td>
  119. </tr>
  120. <tr>
  121. <th class="formTitle">Symmetry</th>
  122. <td class="formValue">
  123. <select id="Symmetry" name="Symmetry" class="form-control required">
  124. <option value="">==请选择==</option>
  125. </select>
  126. </td>
  127. <th class="formTitle">Polish</th>
  128. <td class="formValue">
  129. <select id="Polish" name="Polish" class="form-control required">
  130. <option value="">==请选择==</option>
  131. </select>
  132. </td>
  133. </tr>
  134. <tr>
  135. <th class="formTitle">Sort</th>
  136. <td class="formValue">
  137. <select id="Other" name="Other" class="form-control required">
  138. <option value="">==请选择==</option>
  139. </select>
  140. </td>
  141. <th class="formTitle">Cut</th>
  142. <td class="formValue">
  143. <select id="Cut" name="Cut" class="form-control required">
  144. <option value="">==请选择==</option>
  145. </select>
  146. </td>
  147. </tr>
  148. <tr>
  149. <th class="formTitle">Location</th>
  150. <td class="formValue">
  151. <select id="Location" name="Location" class="form-control required">
  152. <option value="">==请选择==</option>
  153. </select>
  154. </td>
  155. <th class="formTitle">Quantity</th>
  156. <td class="formValue">
  157. <input id="InvQty" name="InvQty" type="text" class="form-control required" value="1" placeholder="Please enter Quantity" />
  158. </td>
  159. </tr>
  160. <tr>
  161. <th class="formTitle" style="height: 35px;">Is Lock</th>
  162. <td class="formValue" style="padding-top: 1px;" >
  163. <div class="ckbox">
  164. <input id="IsLock" name="IsLock" type="checkbox"><label for="IsLock">Lock</label>
  165. </div>
  166. </td>
  167. <th class="formTitle" style="height: 35px;">Price</th>
  168. <td class="formValue" style="padding-top: 1px;">
  169. <input id="Price" name="Price" type="text" class="form-control required" placeholder="Please enter Price" />
  170. </td>
  171. </tr>
  172. </table>
  173. </div>
  174. </form>