Edit.cshtml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. @model EMIS.ViewModel.TeachingMaterial.StockOutView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "Edit";
  7. ComboGridOptions Psop = new ComboGridOptions
  8. {
  9. TextField = "UnitName",
  10. ValueField = "PublishID",
  11. ID = "PublishDropdown",
  12. Name = "PublishDropdown",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="UnitName", Align=AlignStyle.Center, Width=0.1 }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Publisher/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. ComboGridOptions cgopuser = new ComboGridOptions
  27. {
  28. TextField = "StaffCode",
  29. ValueField = "StaffCode",
  30. GridOptions = new DataGridOptions
  31. {
  32. Columns = new List<DataGridColumn>()
  33. {
  34. new BoundFieldColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.1 },
  35. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 }
  36. },
  37. IsCheckOnSelect = true,
  38. DataSourceUrl = Url.Content("~/Staff/List"),
  39. IsPagination = true,
  40. IsShowRowNumbers = true,
  41. IsSingleSelect = false
  42. }
  43. };
  44. var stockOutID = Request.Params["stockOutID"];
  45. var stockOutType = Request.Params["stockOutType"];
  46. Model.StockOutTypeID = 5;
  47. }
  48. @section scripts{
  49. <script src="~/Scripts/Business/TeachingMaterial/TeacherRetailEdit.js"></script>
  50. <script type="text/javascript">
  51. //保存数据
  52. function TeacherRetail_Save() {
  53. $("#hid_ActionsType").val("Save"); //保存
  54. $(document.forms[0]).submit(); //提交表单
  55. }
  56. </script>
  57. }
  58. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  59. @using (Ajax.BeginForm(new AjaxOptions { Url = "/TeacherRetail/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  60. {
  61. <div class="p_title">
  62. @* <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  63. 教材零售信息
  64. </div>*@
  65. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  66. </div>
  67. <div class="search_list">
  68. @Html.Hidden("hid_ActionsType")
  69. @Html.HiddenFor(x => x.StockOutID)
  70. <table cellpadding="0" cellspacing="0" id="departmenttable">
  71. <tr>
  72. <td>
  73. @Html.LabelFor(x => x.SchoolyearID):
  74. </td>
  75. <td>
  76. @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), TextField = "Text", ValueField = "Value" })
  77. <td>
  78. @Html.LabelFor(x => x.StockOutTypeID):
  79. </td>
  80. <td>
  81. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockOutType, (x => x.StockOutTypeID), new DropdownListOptions { IsEnabled = false })
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. @Html.LabelFor(x => x.StockOutNo):
  87. </td>
  88. <td>
  89. @Html.TextBoxFor(x => x.StockOutNo)
  90. </td>
  91. <td>
  92. @Html.Label("零售对象"):
  93. </td>
  94. <td>
  95. @Html.TextBoxFor(x => x.GetBookNo)
  96. </td>
  97. </tr>
  98. <tr>
  99. <td>
  100. @Html.LabelFor(x => x.StockOutTime):
  101. </td>
  102. <td>
  103. @Html.TextBoxFor(x => x.StockOutTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  104. </td>
  105. <td>
  106. @Html.LabelFor(x => x.OutNumber):
  107. </td>
  108. <td>
  109. @Html.TextBoxFor(x => x.OutNumber, new { @readonly = "readonly" })
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>
  114. @Html.Label("教材信息"):
  115. </td>
  116. <td colspan="3">
  117. @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
  118. {
  119. @Html.ContextMenuBar("Edit-TeacherRetailViewGrid")
  120. }
  121. @Html.DataGrid(new DataGridOptions
  122. {
  123. Columns = new List<DataGridColumn>()
  124. {
  125. new CheckBoxFieldColumn{ HeaderText="", FieldName="TeachingMaterialPoolID" },
  126. new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center, Width=0.04 },
  127. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center, Width=0.1 },
  128. //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=10 },
  129. //new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center, Width=0.06 },
  130. //new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center, Width=0.06 },
  131. //new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.1 },
  132. //new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center, Width=0.04 },
  133. new BoundFieldColumn { FieldName="Price", HeaderText="单价", Align=AlignStyle.Center, Width=0.03 },
  134. new BoundFieldColumn { FieldName="Discount", HeaderText="折扣率",Align=AlignStyle.Center, Width=0.03 },
  135. new BoundFieldColumn { FieldName="DiscountPrice", HeaderText="折合价",Align=AlignStyle.Center, Width=0.03 },
  136. new BoundFieldColumn { FieldName="OrderQty", HeaderText="数量", Align=AlignStyle.Center, Width=0.03 },
  137. new BoundFieldColumn { FieldName="PresentInventory", HeaderText="当前库存量", Align=AlignStyle.Center , Width=0.05 },
  138. new BoundFieldColumn { FieldName="IsLateName", HeaderText="是否过期", Align=AlignStyle.Center , Width=0.04 }
  139. },
  140. PageSize = 30,
  141. IsCheckOnSelect = true,
  142. DataSourceUrl = Url.Content("~/TeacherRetail/GetTMViewList?stockOutID=" + Request.Params["stockOutID"]),
  143. ID = "dgStockInTMSelectList",
  144. IsPagination = false,
  145. IsPostBack = true,
  146. IsShowRowNumbers = true,
  147. IsSingleSelect = false,
  148. MaxHeight = 180
  149. })
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.Desc):
  155. </td>
  156. <td colspan="3">
  157. @Html.TextAreaFor(x => x.Desc, new Dictionary<string, object> { { "style", "width: 90%;" } })
  158. </td>
  159. </tr>
  160. </table>
  161. </div>
  162. }
  163. </div>