List.cshtml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "List";
  5. ComboGridOptions cgopCampus = new ComboGridOptions
  6. {
  7. TextField = "Name",
  8. ValueField = "CampusID",
  9. OnSelect = "QueryCampusComboGridList",
  10. Name = "CampusDropdown",
  11. ID = "CampusDropdown",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  17. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Campus/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false,
  24. }
  25. };
  26. ComboGridOptions cgopCollege = new ComboGridOptions
  27. {
  28. TextField = "Name",
  29. ValueField = "CollegeID",
  30. OnSelect = "queryCollege",
  31. Name = "CollegeDropdown",
  32. ID = "CollegeDropdown",
  33. GridOptions = new DataGridOptions
  34. {
  35. Columns = new List<DataGridColumn>()
  36. {
  37. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  38. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  39. },
  40. IsCheckOnSelect = true,
  41. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  42. IsPagination = true,
  43. IsShowRowNumbers = true,
  44. IsSingleSelect = false,
  45. }
  46. };
  47. ComboGridOptions cgop = new ComboGridOptions
  48. {
  49. TextField = "Name",
  50. ValueField = "GrademajorID",
  51. OnSelect = "QueryComboGridList",
  52. Name = "ComboGridGrademajor",
  53. ID = "ComboGridGrademajor",
  54. GridOptions = new DataGridOptions
  55. {
  56. Columns = new List<DataGridColumn>()
  57. {
  58. // new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center },
  59. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center }
  60. },
  61. IsCheckOnSelect = true,
  62. DataSourceUrl = Url.Content("~/Grademajor/List"),
  63. IsPagination = true,
  64. IsShowRowNumbers = true,
  65. IsSingleSelect = false,
  66. }
  67. };
  68. ComboGridOptions Csop = new ComboGridOptions
  69. {
  70. TextField = "CourseName",
  71. ValueField = "CoursematerialID",
  72. ID = "CourseDropdown",
  73. Name = "CourseDropdown",
  74. OnSelect = "QueryCourseDropdownList",
  75. GridOptions = new DataGridOptions
  76. {
  77. Columns = new List<DataGridColumn>()
  78. {
  79. // new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  80. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  81. },
  82. IsCheckOnSelect = true,
  83. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  84. IsPagination = true,
  85. IsShowRowNumbers = true,
  86. IsSingleSelect = false
  87. }
  88. };
  89. ComboGridOptions cgopStandard = new ComboGridOptions
  90. {
  91. TextField = "StandardName",
  92. ValueField = "StandardID",
  93. OnSelect = "queryStandard",
  94. Name = "ddlStandard",
  95. ID = "ddlStandard",
  96. GridOptions = new DataGridOptions
  97. {
  98. Columns = new List<DataGridColumn>()
  99. {
  100. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center }
  101. },
  102. IsCheckOnSelect = true,
  103. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  104. IsPagination = true,
  105. IsShowRowNumbers = true,
  106. IsSingleSelect = false,
  107. }
  108. };
  109. ComboGridOptions MaterialCode = new ComboGridOptions
  110. {
  111. TextField = "TeachingMaterialName",
  112. ValueField = "TeachingMaterialPoolID",
  113. ID = "TeachingMaterialDropdown",
  114. Name = "TeachingMaterialDropdown",
  115. OnSelect = "QueryTeachingMaterialDropdownList",
  116. GridOptions = new DataGridOptions
  117. {
  118. Columns = new List<DataGridColumn>()
  119. {
  120. new BoundFieldColumn { FieldName="TeachingMaterialName",HeaderText="教材名称", Align=AlignStyle.Center },
  121. // new BoundFieldColumn { FieldName="TeachingMaterialCode",HeaderText="教材编号", Align=AlignStyle.Center }
  122. },
  123. IsCheckOnSelect = true,
  124. DataSourceUrl = Url.Content("~/TeachingMaterialPool/List"),
  125. IsPagination = true,
  126. IsShowRowNumbers = true,
  127. IsSingleSelect = false
  128. }
  129. };
  130. }
  131. @section scripts{
  132. <script src="../../Scripts/Business/TeachingMaterial/StudentDistribute.js" type="text/javascript"></script>
  133. <script type="text/javascript">
  134. var nonSelect = "@DropdownList.SELECT_ALL";
  135. </script>
  136. <script type="text/javascript">
  137. //设置单元格颜色
  138. function XNSetColors(index, row, value) {
  139. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  140. return " <span style=\"color:red;\">" + value + "</span>";
  141. }
  142. else {
  143. return value
  144. }
  145. }
  146. function YXSetColors(index, row, value) {
  147. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  148. return " <span style=\"color:red;\">" + value + "</span>";
  149. }
  150. else {
  151. return value
  152. }
  153. }
  154. function NJSetColors(index, row, value) {
  155. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  156. return " <span style=\"color:red;\">" + value + "</span>";
  157. }
  158. else {
  159. return value
  160. }
  161. }
  162. function KCMSetColors(index, row, value) {
  163. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  164. return " <span style=\"color:red;\">" + value + "</span>";
  165. }
  166. else {
  167. return value
  168. }
  169. }
  170. function JCMSetColors(index, row, value) {
  171. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  172. return " <span style=\"color:red;\">" + value + "</span>";
  173. }
  174. else {
  175. return value
  176. }
  177. }
  178. function JCBHMSetColors(index, row, value) {
  179. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  180. return " <span style=\"color:red;\">" + value + "</span>";
  181. }
  182. else {
  183. return value
  184. }
  185. }
  186. function DJSetColors(index, row, value) {
  187. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  188. return " <span style=\"color:red;\">" + value + "</span>";
  189. }
  190. else {
  191. return value
  192. }
  193. }
  194. function ZKLSetColors(index, row, value) {
  195. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  196. return " <span style=\"color:red;\">" + value + "</span>";
  197. }
  198. else {
  199. return value
  200. }
  201. }
  202. function ZHJSetColors(index, row, value) {
  203. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  204. return " <span style=\"color:red;\">" + value + "</span>";
  205. }
  206. else {
  207. return value
  208. }
  209. }
  210. function XSSetColors(index, row, value) {
  211. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  212. return " <span style=\"color:red;\">" + value + "</span>";
  213. }
  214. else {
  215. return value
  216. }
  217. }
  218. function ZJSetColors(index, row, value) {
  219. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  220. return " <span style=\"color:red;\">" + value + "</span>";
  221. }
  222. else {
  223. return value
  224. }
  225. }
  226. function KCSetColors(index, row, value) {
  227. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  228. return " <span style=\"color:red;\">" + value + "</span>";
  229. }
  230. else {
  231. return value
  232. }
  233. }
  234. function StateSetColors(index, row, value) {
  235. if (row.TeachingMaterialName == null || row.TeachingMaterialName == undefined || row.TeachingMaterialName == "") {
  236. return " <span style=\"color:red;\">" + value + "</span>";
  237. }
  238. else {
  239. return value
  240. }
  241. }
  242. </script>
  243. }
  244. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  245. @Html.Position()
  246. <div class="p_SearchTitle">
  247. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  248. 查询条件
  249. </div>
  250. </div>
  251. <form id="formQuery" method="post" action="@Url.Content("~/StudentDistribute/Excel")">
  252. @Html.PositionCondition()
  253. <div class="search_keyword">
  254. <div class="search_input">
  255. <ul>
  256. @* <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  257. <li class="sv">
  258. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  259. </li>*@
  260. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  261. <li class="sv">
  262. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"), ID = "SchoolyearDropdown", Name = "SchoolyearDropdown", OnSelect = "queryClass", SelectedValue =@ViewBag.SchoolYearID }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  263. </li>
  264. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  265. <li class="sv">
  266. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  267. </li>
  268. <li class="sn" style="padding-left: 5px;">年级:</li>
  269. <li class="sv">
  270. @Html.SchoolYearDropDownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "DictionarySchoolyear", Name = "DictionarySchoolyear", OnSelect = "queryClass", SelectedValue=BaseExtensions.GetCurrentYearID() }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  271. </li>
  272. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  273. <li class="sv">
  274. @Html.ComboGrid(cgopStandard, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  275. </li>
  276. @*<li class="sn" style="padding-left: 5px;">专业名称:</li>
  277. <li class="sv">
  278. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/Facultymajor/BindStandardDropDownList"), Name = "ddlStandard", ID = "ddlStandard", OnSelect = "reloadClassmajor" }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })@*//, OnLoadSuccess = "reloadClassmajor"
  279. </li>*@
  280. @*<li class="sn" style="padding-left: 5px;">年级:</li>
  281. <li class="sv">
  282. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Grade, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "DictionarySchoolyear", Name = "DictionarySchoolyear", OnSelect = "QuerySchoolyearDictionaryList" }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  283. </li>*@
  284. </ul>
  285. <ul>
  286. <li class="sn" style="padding-left: 5px;">年级专业:</li>
  287. <li class="sv">
  288. @*@Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/Grademajor/BindDropdownListByCollege"), Name = "ComboGridGrademajor", ID = "ComboGridGrademajor", OnSelect = "QueryComboGridList", OnLoadSuccess = "QueryComboGridList" }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })*@
  289. @Html.ComboGrid(cgop, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  290. </li>
  291. <li class="sn" style="padding-left: 5px;">课程名称:</li>
  292. <li class="sv">
  293. @Html.ComboGrid(Csop, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  294. </li>
  295. <li class="sn" style="padding-left: 5px;">教材名称:</li>
  296. <li class="sv">
  297. @Html.ComboGrid(MaterialCode, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  298. </li>
  299. <li class="sn" style="padding-left: 5px;">发放状态:</li>
  300. <li class="sv">
  301. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions { BindType = DropdownListBindType.SelectAll, Name = "OrderedDropdown", ID = "OrderedDropdown", OnSelect = "QueryOrderedDropdownList" }, new Dictionary<string, string> { { "data-condition", "dgStudentDistributeList" } })
  302. </li>
  303. </ul>
  304. </div>
  305. </div>
  306. </form>
  307. <div class="p_title">
  308. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  309. 学生发放列表
  310. </div>
  311. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  312. </div>
  313. <div class="search_list">
  314. @Html.DataGrid(new DataGridOptions
  315. {
  316. Columns = new List<DataGridColumn>()
  317. {
  318. new CheckBoxFieldColumn{ HeaderText="", FieldName="StudentDistributeID", Align=AlignStyle.Center },
  319. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center,CustomFormatFun="XNSetColors", Width=0.06 },
  320. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center ,CustomFormatFun="YXSetColors", Width=0.08 },
  321. new BoundFieldColumn { FieldName="GradeSpecialtyName", HeaderText="年级专业名称", Align=AlignStyle.Center,CustomFormatFun="NJSetColors", Width=0.1 },
  322. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center,CustomFormatFun="KCMSetColors", Width=0.06 },
  323. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center,CustomFormatFun="KCMSetColors", Width=0.1, OverflowLength=15 },
  324. new BoundFieldColumn { FieldName="StudentQty", HeaderText="人数", Align=AlignStyle.Center,CustomFormatFun="XSSetColors", Width=0.03 },
  325. new BoundFieldColumn { FieldName="OrderQty", HeaderText="征订数量", Align=AlignStyle.Center,CustomFormatFun="ZJSetColors", Width=0.04 },
  326. new BoundFieldColumn { FieldName="Price", HeaderText="单价(¥)", Align=AlignStyle.Center,CustomFormatFun="DJSetColors", Width=0.04 },
  327. //new BoundFieldColumn { FieldName="DiscountStr", HeaderText="折扣率", Align=AlignStyle.Center ,CustomFormatFun="ZKLSetColors", Width=0.03},
  328. //new BoundFieldColumn { FieldName="DiscountPriceStr", HeaderText="折合价(¥)", Align=AlignStyle.Center,CustomFormatFun="ZHJSetColors", Width=0.06},
  329. new BoundFieldColumn { FieldName="PresentInventory", HeaderText="库存数量", Align=AlignStyle.Center,CustomFormatFun="KCSetColors", Width=0.04 },
  330. new LinkButtonColumn{ FieldName="DistributeQty", HeaderText="发放人数", Align=AlignStyle.Center,Handle="StudentDistributeDetail", Width=0.04},
  331. new LinkButtonColumn { FieldName="RemainingQty", HeaderText="未发人数", Align=AlignStyle.Center,Handle="StudentDistributeView", Width=0.04},
  332. //new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center,CustomFormatFun="JCBHMSetColors" , Width=0.06 },
  333. new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center,CustomFormatFun="JCMSetColors", Width=0.1 },
  334. new BoundFieldColumn { FieldName="GrademajorID", HeaderText="年级专业ID", IsHidden=true, Align=AlignStyle.Center, Width=0.02 },
  335. new BoundFieldColumn { FieldName="CoursematerialID", HeaderText="课程ID", IsHidden=true, Align=AlignStyle.Center, Width=0.02 },
  336. new BoundFieldColumn { FieldName="IsDistributeName", HeaderText="发放状态", Align=AlignStyle.Center,CustomFormatFun="StateSetColors", Width=0.04 }
  337. },
  338. PageSize = 50,
  339. IsCheckOnSelect = true,
  340. DataSourceUrl = Url.Content("~/StudentDistribute/List"),
  341. ID = "dgStudentDistributeList",
  342. IsPagination = true,
  343. IsShowRowNumbers = true,
  344. IsSingleSelect = false
  345. })
  346. </div>
  347. </div>