Edit.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. @model EMIS.ViewModel.TeachingMaterial.StockInView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "Edit";
  7. var defaultID = ViewBag.DefaultID;
  8. ComboGridOptions Library = new ComboGridOptions
  9. {
  10. TextField = "LibraryName",
  11. ValueField = "LibraryID",
  12. ID = "LibraryDropdown",
  13. Name = "LibraryDropdown",
  14. OnSelect = "QueryLibraryDropdownList",
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. new BoundFieldColumn { FieldName="LibraryCode", Align=AlignStyle.Center, Width=0.1 },
  20. new BoundFieldColumn { FieldName="LibraryName", Align=AlignStyle.Center, Width=0.2 }
  21. },
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/Library/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. ComboGridOptions LibraryCode = new ComboGridOptions
  30. {
  31. TextField = "LibraryCode",
  32. ValueField = "LibraryCode",
  33. ID = "LibraryDropdown",
  34. Name = "LibraryDropdown",
  35. OnSelect = "QueryLibraryDropdownList",
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new BoundFieldColumn { FieldName="LibraryCode", Align=AlignStyle.Center, Width=0.1 },
  41. new BoundFieldColumn { FieldName="LibraryName", Align=AlignStyle.Center, Width=0.2 }
  42. },
  43. IsCheckOnSelect = true,
  44. DataSourceUrl = Url.Content("~/Library/List"),
  45. IsPagination = true,
  46. IsShowRowNumbers = true,
  47. IsSingleSelect = false
  48. }
  49. };
  50. ComboGridOptions Psop = new ComboGridOptions
  51. {
  52. TextField = "UnitName",
  53. ValueField = "PublishID",
  54. ID = "PublishDropdown",
  55. Name = "PublishDropdown",
  56. OnSelect = "PublishChange",
  57. IsRequired = true,
  58. GridOptions = new DataGridOptions
  59. {
  60. Columns = new List<DataGridColumn>()
  61. {
  62. new BoundFieldColumn { FieldName="UnitCode",HeaderText="供应编码", Align=AlignStyle.Center, Width=0.1 },
  63. new BoundFieldColumn { FieldName="UnitName",HeaderText="供应商", Align=AlignStyle.Center, Width=0.2 }
  64. },
  65. IsCheckOnSelect = true,
  66. DataSourceUrl = Url.Content("~/Publisher/SupplierList"),
  67. IsPagination = true,
  68. IsShowRowNumbers = true,
  69. IsSingleSelect = false,
  70. }
  71. };
  72. var stockInID = Request.Params["stockInID"];
  73. }
  74. @section scripts{
  75. <script src="~/Scripts/Business/TeachingMaterial/StockInEdit.js"></script>
  76. <script type="text/javascript">
  77. var nonSelect = "@DropdownList.SELECT_ALL";
  78. //保存数据
  79. function ET06_05_01_StockIn_Save() {
  80. $("#hid_ApprovalStatusName").val("Save"); //保存
  81. $(document.forms[0]).submit(); //提交表单
  82. }
  83. //提交以后的数据、即不允许做修改、删除操作!
  84. function ET06_05_01_StockIn_Submit() {
  85. $("#hid_ApprovalStatusName").val("Submit"); //提交
  86. $(document.forms[0]).submit(); //提交表单
  87. }
  88. function QueryLibraryDropdownList() {
  89. var s = $("#LibraryDropdown").combobox("getValue");
  90. }
  91. //获取选中的数据、保存单头有明细
  92. function validChooseTM() {
  93. var d = [];
  94. $.each($("#dgStockInTMSelectList").cmsXDataTable("getSelections"), function (index) {
  95. d.push(this);
  96. });
  97. return d;
  98. }
  99. </script>
  100. }
  101. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  102. @using (Ajax.BeginForm(new AjaxOptions { Url = "/StockIn/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  103. {
  104. <div class="p_title">
  105. @* <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  106. 教材入库信息
  107. </div>*@
  108. @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
  109. {
  110. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  111. }
  112. </div>
  113. <div class="search_list">
  114. @Html.Hidden("hid_ApprovalStatusName")
  115. @Html.HiddenFor(x => x.StockInID)
  116. <table cellpadding="0" cellspacing="0" id="departmenttable">
  117. <tr>
  118. <td>
  119. @Html.LabelFor(x => x.SchoolyearID):
  120. </td>
  121. <td>
  122. @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), TextField = "Text", ValueField = "Value" })
  123. </td>
  124. <td>
  125. @Html.LabelFor(x => x.StockInType):
  126. </td>
  127. <td>
  128. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockInType, (x => x.StockInType), new DropdownListOptions { IsEnabled = false })
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>
  133. @Html.LabelFor(x => x.StockInDocumentNo):
  134. </td>
  135. <td>
  136. @Html.TextBoxFor(x => x.StockInDocumentNo)
  137. </td>
  138. <td>
  139. @Html.LabelFor(x => x.StockInNumber):
  140. </td>
  141. <td>
  142. @Html.TextBoxFor(x => x.StockInNumber)
  143. </td>
  144. </tr>
  145. <tr>
  146. <td>
  147. @Html.LabelFor(x => x.SupplierID):
  148. </td>
  149. <td>
  150. @Html.ComboGridFor(x => x.SupplierID, Psop)
  151. </td>
  152. <td>
  153. @Html.LabelFor(x => x.StockInDJTime):
  154. </td>
  155. <td>
  156. @Html.TextBoxFor(x => x.StockInDJTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
  157. </td>
  158. </tr>
  159. @*<tr>
  160. <td>
  161. @Html.LabelFor(x => x.RoomNumber):
  162. </td>
  163. <td>
  164. @Html.ComboGridFor(x => x.RoomNumber,LibraryCode)
  165. </td>
  166. <td>
  167. @Html.LabelFor(x => x.LibraryName):
  168. </td>
  169. <td>
  170. @Html.ComboGridFor(x => x.LibraryID, LibraryCode)
  171. </td>
  172. </tr>*@
  173. <tr>
  174. <td>
  175. @Html.Label("教材信息"):
  176. </td>
  177. <td colspan="3">
  178. @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
  179. {
  180. @Html.ContextMenuBar("Edit-StockInViewGrid")
  181. }
  182. @Html.DataGrid(new DataGridOptions
  183. {
  184. Columns = new List<DataGridColumn>()
  185. {
  186. new CheckBoxFieldColumn{ HeaderText="", FieldName="TeachingMaterialPoolID" },
  187. new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center, Width=0.04 },
  188. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center, Width=0.1},
  189. //new BoundFieldColumn { FieldName="CoursematerialCode", HeaderText="课程编号", Align=AlignStyle.Center, Width=0.04 },
  190. //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center,, Width=0.08 },
  191. //new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center, Width=0.04 },
  192. //new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center, Width=0.04 },
  193. //new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.04 },
  194. //new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center, Width=0.04 },
  195. new BoundFieldColumn { FieldName="OrderQty", HeaderText="数量", Align=AlignStyle.Center, Width=0.03 },
  196. new BoundFieldColumn { FieldName="Price", HeaderText="单价", Align=AlignStyle.Center, Width=0.03 },
  197. new BoundFieldColumn { FieldName="Discount", HeaderText="折扣率", Align=AlignStyle.Center, Width=0.03 },
  198. new BoundFieldColumn { FieldName="DiscountPrice", HeaderText="折合价", Align=AlignStyle.Center , Width=0.03 },
  199. new BoundFieldColumn { FieldName="MaYang", HeaderText="码洋", Align=AlignStyle.Center, Width=0.03 },
  200. new BoundFieldColumn { FieldName="ZongJia", HeaderText="总价", Align=AlignStyle.Center , Width=0.03 },
  201. new BoundFieldColumn { FieldName="IsLateName", HeaderText="是否过期", Align=AlignStyle.Center, Width=0.04 }
  202. },
  203. PageSize =30,
  204. IsCheckOnSelect = true,
  205. DataSourceUrl = Url.Content("~/StockIn/GetTMViewList?stockIn=" + Request.Params["stockInID"]),
  206. ID = "dgStockInTMSelectList",
  207. IsPagination = true,
  208. IsPostBack = true,
  209. IsShowRowNumbers = true,
  210. IsSingleSelect = false,
  211. MaxHeight = 180
  212. })
  213. </td>
  214. </tr>
  215. <tr>
  216. <td>
  217. @Html.LabelFor(x => x.Desc):
  218. </td>
  219. <td colspan="3">
  220. @Html.TextAreaFor(x => x.Desc, new Dictionary<string, object> { { "style", "width:85%;" } })
  221. </td>
  222. </tr>
  223. </table>
  224. </div>
  225. }
  226. </div>