@model EMIS.ViewModel.TeachingMaterial.StockOutView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @using EMIS.ViewModel; @{ ViewBag.Title = "Edit"; ComboGridOptions Psop = new ComboGridOptions { TextField = "UnitName", ValueField = "PublishID", ID = "PublishDropdown", Name = "PublishDropdown", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="UnitCode", HeaderText="单位编号", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="UnitName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.2 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Publisher/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions cgopLoginID = new ComboGridOptions { TextField = "UserName", ValueField = "UserID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.2 }, new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Students/StudentOnlyInSchool"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, //IsAutoLoad = false, } }; ComboGridOptions staffComboGrid = new ComboGridOptions { TextField = "Name", ValueField = "UserID", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Staff/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; string getBookStr = "教师领书"; var stockOutID = Request.Params["stockOutID"]; var stockOutType = Request.Params["stockOutType"]; if (!string.IsNullOrEmpty(Model.StockOutTypeID.ToString())) { stockOutType = Model.StockOutTypeID.ToString(); } if (stockOutType == "1") { getBookStr = "学生领书"; } var isView = false; var textAreaHtmlAttributes = new Dictionary { { "style", "width:500px;" } }; if (Model.StockOutID == Guid.Empty || Model.StockOutID == null) { textAreaHtmlAttributes.Add("disabled", "disabled"); } } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { Url = "/StockOut/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@*
@getBookStr
*@ @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示 {
@Html.ContextMenuBar("Edit")
}
@Html.Hidden("hid_ActionsType") @Html.HiddenFor(x => x.StockOutID) @if (stockOutType == "1") { } else { }
@Html.LabelFor(x => x.SchoolyearID): @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), TextField = "Text", ValueField = "Value" }) @Html.LabelFor(x => x.StockOutTypeID): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockOutType, (x => x.StockOutTypeID), new DropdownListOptions { IsEnabled = false })
@Html.LabelFor(x => x.StockOutNo): @Html.TextBoxFor(x => x.StockOutNo) @Html.LabelFor(x => x.RecipientUserID): @Html.ComboGridFor(x => x.RecipientUserID, cgopLoginID) @Html.LabelFor(x => x.RecipientUserID): @Html.ComboGridFor(x => x.RecipientUserID, staffComboGrid)
@Html.LabelFor(x => x.StockOutTime): @Html.TextBoxFor(x => x.StockOutTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime }) @Html.LabelFor(x => x.OutNumber): @Html.TextBoxFor(x => x.OutNumber, new Dictionary() { { "readonly", "true" } })
@Html.Label("教材信息"): @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示 { @Html.ContextMenuBar("Edit-StockOutViewGrid") } @Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn{ HeaderText="", FieldName="TeachingMaterialPoolID" }, new BoundFieldColumn { FieldName="TeachingMaterialCode", HeaderText="教材编号", Align=AlignStyle.Center, Width=0.04 }, new BoundFieldColumn { FieldName="TeachingMaterialName", HeaderText="教材名称", Align=AlignStyle.Center, Width=0.1 }, //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=10 }, //new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center, Width=0.06 }, //new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center, Width=0.06 }, //new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.1 }, //new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center, Width=0.04 }, new BoundFieldColumn { FieldName="Price", HeaderText="单价", Align=AlignStyle.Center, Width=0.03 }, new BoundFieldColumn { FieldName="Discount", HeaderText="折扣率",Align=AlignStyle.Center, Width=0.03 }, new BoundFieldColumn { FieldName="DiscountPrice", HeaderText="折合价",Align=AlignStyle.Center, Width=0.03 }, new BoundFieldColumn { FieldName="OrderQty", HeaderText="数量", Align=AlignStyle.Center, Width=0.03 }, new BoundFieldColumn { FieldName="PresentInventory", HeaderText="当前库存量", Align=AlignStyle.Center , Width=0.05 }, new BoundFieldColumn { FieldName="IsLateName", HeaderText="是否过期", Align=AlignStyle.Center , Width=0.04 } }, PageSize = 30, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/StockOut/GetTMViewList?stockOutID=" + Request.Params["stockOutID"]), ID = "dgStockInTMSelectList", IsPagination = true, IsPostBack = true, IsShowRowNumbers = true, IsSingleSelect = false, MaxHeight = 180 })
@Html.LabelFor(x => x.Desc): @Html.TextAreaFor(x => x.Desc, new Dictionary { { "style", "width: 90%;" } })
}