ExpensesForm.cshtml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @{;
  2. ViewBag.Title = "表单页面";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. $(function () {
  7. initControl();
  8. });
  9. //初始化控件
  10. function initControl() {
  11. //支出种类
  12. $("#ExpensesType").ComboBox({
  13. url: "../../SystemManage/DataItemDetail/GetDataItemListJson",
  14. param: { EnCode: "Client_ExpensesType" },
  15. id: "ItemValue",
  16. text: "ItemName",
  17. description: "==请选择==",
  18. height: "200px"
  19. });
  20. //支出账户
  21. $("#ExpensesAccount").ComboBox({
  22. url: "../../SystemManage/DataItemDetail/GetDataItemListJson",
  23. param: { EnCode: "Client_PaymentAccount" },
  24. id: "ItemValue",
  25. text: "ItemName",
  26. description: "==请选择==",
  27. height: "200px"
  28. });
  29. }
  30. //保存表单;
  31. function AcceptClick() {
  32. if (!$('#form1').Validform()) {
  33. return false;
  34. }
  35. var postData = $("#form1").GetWebControls("");
  36. $.SaveForm({
  37. url: "../../CustomerManage/Expenses/SaveForm",
  38. param: postData,
  39. loading: "正在保存数据...",
  40. success: function () {
  41. $.currentIframe().$("#gridTable").trigger("reloadGrid");
  42. }
  43. })
  44. }
  45. </script>
  46. <div style="margin-top: 20px; margin-right: 30px;">
  47. <table class="form">
  48. <tr>
  49. <td class="formTitle">支出种类<font face="宋体">*</font></td>
  50. <td class="formValue">
  51. <div id="ExpensesType" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="formTitle">经手人员<font face="宋体">*</font></td>
  56. <td class="formValue">
  57. <input id="Managers" type="text" class="form-control" />
  58. </td>
  59. </tr>
  60. <tr>
  61. <td class="formTitle">支出账户<font face="宋体">*</font></td>
  62. <td class="formValue">
  63. <div id="ExpensesAccount" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td class="formTitle">支出日期<font face="宋体">*</font></td>
  68. <td class="formValue">
  69. <input id="ExpensesDate" type="text" value="@LeaRun.Util.Time.GetToday()" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" isvalid="yes" checkexpession="NotNull"/>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td class="formTitle">支出金额<font face="宋体">*</font></td>
  74. <td class="formValue">
  75. <input id="ExpensesPrice" type="text" class="form-control" isvalid="yes" checkexpession="Double"/>
  76. </td>
  77. </tr>
  78. <tr>
  79. <th class="formTitle" valign="top" style="padding-top: 4px;">摘要</th>
  80. <td class="formValue">
  81. <textarea id="ExpensesAbstract" class="form-control" style="height: 60px;"></textarea>
  82. </td>
  83. </tr>
  84. </table>
  85. </div>