@model EMIS.ViewModel.TeachingMaterial.StockInView @using EMIS.Web.Controls; @using Bowin.Web.Controls.Mvc; @using EMIS.ViewModel; @{ ViewBag.Title = "Edit"; var defaultID = ViewBag.DefaultID; ComboGridOptions Library = new ComboGridOptions { TextField = "LibraryName", ValueField = "LibraryID", ID = "LibraryDropdown", Name = "LibraryDropdown", OnSelect = "QueryLibraryDropdownList", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="LibraryCode", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="LibraryName", Align=AlignStyle.Center, Width=0.2 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Library/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions LibraryCode = new ComboGridOptions { TextField = "LibraryCode", ValueField = "LibraryCode", ID = "LibraryDropdown", Name = "LibraryDropdown", OnSelect = "QueryLibraryDropdownList", GridOptions = new DataGridOptions { Columns = new List() { new BoundFieldColumn { FieldName="LibraryCode", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="LibraryName", Align=AlignStyle.Center, Width=0.2 } }, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/Library/List"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false } }; ComboGridOptions Psop = new ComboGridOptions { TextField = "UnitName", ValueField = "PublishID", ID = "PublishDropdown", Name = "PublishDropdown", OnSelect = "PublishChange", IsRequired = true, 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/SupplierList"), IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false, } }; var stockInID = Request.Params["stockInID"]; } @section scripts{ }
@using (Ajax.BeginForm(new AjaxOptions { Url = "/StockIn/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" })) {
@*
教材入库信息
*@ @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示 {
@Html.ContextMenuBar("Edit")
}
@Html.Hidden("hid_ApprovalStatusName") @Html.HiddenFor(x => x.StockInID) @**@
@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.StockInType): @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockInType, (x => x.StockInType), new DropdownListOptions { IsEnabled = false })
@Html.LabelFor(x => x.StockInDocumentNo): @Html.TextBoxFor(x => x.StockInDocumentNo) @Html.LabelFor(x => x.StockInNumber): @Html.TextBoxFor(x => x.StockInNumber)
@Html.LabelFor(x => x.SupplierID): @Html.ComboGridFor(x => x.SupplierID, Psop) @Html.LabelFor(x => x.StockInDJTime): @Html.TextBoxFor(x => x.StockInDJTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
@Html.LabelFor(x => x.RoomNumber): @Html.ComboGridFor(x => x.RoomNumber,LibraryCode) @Html.LabelFor(x => x.LibraryName): @Html.ComboGridFor(x => x.LibraryID, LibraryCode)
@Html.Label("教材信息"): @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示 { @Html.ContextMenuBar("Edit-StockInViewGrid") } @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="CoursematerialCode", HeaderText="课程编号", Align=AlignStyle.Center, Width=0.04 }, //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center,, Width=0.08 }, //new BoundFieldColumn { FieldName="ISBN", HeaderText="ISBN", Align=AlignStyle.Center, Width=0.04 }, //new BoundFieldColumn { FieldName="PublishTime", HeaderText="版本时间", Align=AlignStyle.Center, Width=0.04 }, //new BoundFieldColumn { FieldName="PublishName", HeaderText="出版单位", Align=AlignStyle.Center, Width=0.04 }, //new BoundFieldColumn { FieldName="Author", HeaderText="作者", Align=AlignStyle.Center, Width=0.04 }, new BoundFieldColumn { FieldName="OrderQty", HeaderText="数量", Align=AlignStyle.Center, Width=0.03 }, 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="MaYang", HeaderText="码洋", Align=AlignStyle.Center, Width=0.03 }, new BoundFieldColumn { FieldName="ZongJia", HeaderText="总价", Align=AlignStyle.Center , Width=0.03 }, new BoundFieldColumn { FieldName="IsLateName", HeaderText="是否过期", Align=AlignStyle.Center, Width=0.04 } }, PageSize =30, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/StockIn/GetTMViewList?stockIn=" + Request.Params["stockInID"]), 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:85%;" } })
}