123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- @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<DataGridColumn>()
- {
- 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<DataGridColumn>()
- {
- 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<DataGridColumn>()
- {
- 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<string, object> { { "style", "width:500px;" } };
-
- if (Model.StockOutID == Guid.Empty || Model.StockOutID == null)
- {
- textAreaHtmlAttributes.Add("disabled", "disabled");
- }
- }
- @section scripts{
- <script src="~/Scripts/Business/TeachingMaterial/StockOutEdit.js"></script>
- <script type="text/javascript">
- //保存数据
- function StockOut_Save() {
- $("#hid_ActionsType").val("Save"); //保存
- $(document.forms[0]).submit(); //提交表单
- }
- //获取选中的数据、保存单头有明细
- function validChooseTM() {
- var d = [];
- $.each($("#dgStockInTMSelectList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions { Url = "/StockOut/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
- {
- <div class="p_title">
- @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- @getBookStr
- </div>*@
- @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
- {
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
- }
- </div>
- <div class="search_list">
- @Html.Hidden("hid_ActionsType")
- @Html.HiddenFor(x => x.StockOutID)
- <table cellpadding="0" cellspacing="0" id="departmenttable">
- <tr>
- <td>
- @Html.LabelFor(x => x.SchoolyearID):
- </td>
- <td>
- @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), TextField = "Text", ValueField = "Value" })
- </td>
- <td>
- @Html.LabelFor(x => x.StockOutTypeID):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockOutType, (x => x.StockOutTypeID), new DropdownListOptions { IsEnabled = false })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StockOutNo):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StockOutNo)
- </td>
- @if (stockOutType == "1")
- {
- <td>@Html.LabelFor(x => x.RecipientUserID):
- </td>
- <td>@Html.ComboGridFor(x => x.RecipientUserID, cgopLoginID)
- </td>
- }
- else
- {
- <td>@Html.LabelFor(x => x.RecipientUserID):
- </td>
-
- <td>@Html.ComboGridFor(x => x.RecipientUserID, staffComboGrid)
- </td>
- }
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StockOutTime):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StockOutTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
- </td>
- <td>
- @Html.LabelFor(x => x.OutNumber):
- </td>
- <td>
- @Html.TextBoxFor(x => x.OutNumber, new Dictionary<string, object>() { { "readonly", "true" } })
- </td>
- </tr>
- <tr>
- <td>
- @Html.Label("教材信息"):
- </td>
- <td colspan="3">
- @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
- {
- @Html.ContextMenuBar("Edit-StockOutViewGrid")
- }
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- 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
- })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.Desc):
- </td>
- <td colspan="3">
- @Html.TextAreaFor(x => x.Desc, new Dictionary<string, object> { { "style", "width: 90%;" } })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|